NFC simulation card sharing method, system and related device
By using key encryption and authentication password mechanisms between electronic devices, the problem of inconvenient operation for activating NFC simulation cards on electronic devices is solved, enabling convenient and secure sharing of NFC simulation cards and enhancing data security.
Patent Information
- Application Number
- CN202411869241.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-08-30
- Filing Date
- 2024-12-17
- Publication Date
- 2026-01-20
AI Technical Summary
In the existing technology, activating an NFC simulation card on an electronic device requires a specific card writing device, which is inconvenient and lacks effective data security protection.
Secure sharing of NFC analog cards is achieved through key encryption and authentication password mechanisms between electronic devices, including encrypting card information and setting permissions, validity period, etc., to ensure data security.
It enables convenient sharing and secure protection of NFC analog cards between electronic devices. Users can choose the sharing targets and permissions, improving data security and ease of operation.
Smart Images

Figure CN121367892A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of wireless communication, and particularly relates to a NFC (Near Field Communication) analog card sharing method and system and related devices. BACKGROUND
[0002] With the development of technology, more and more electronic devices support NFC (Near Field Communication) technology. Electronic devices can realize short-distance bidirectional communication through NFC technology. In NFC technology, the working mode of an NFC device with NFC function when communicating through NFC technology can be divided into three types: PCD (Proximity Coupling Device) mode (also known as reader mode), PICC (Proximity Integrated Circuit Card) mode (also known as card simulation mode) and P2P (Point to Point) mode.
[0003] At present, some electronic devices (such as mobile phones, tablets, wearable devices, etc.) supporting NFC technology can simulate PICC. Among them, a user can open one or more NFC analog cards (simply referred to as NFC cards) in an electronic device. When the electronic device is in the PICC mode, it can simulate itself into a PICC conforming to NFC related standards based on the data of the NFC analog card, and interact with the NFC card reading device. However, the electronic device needs to be opened through a specific card writing device to open the NFC analog card, which is inconvenient to operate. SUMMARY
[0004] The present application provides a NFC analog card sharing method, system and related devices, which realizes the function of sharing NFC analog cards through electronic devices.
[0005] In a first aspect, the present application provides a NFC analog card sharing method applied to a first electronic device, and the method comprises the following steps.
[0006] receiving a first input of sharing the first NFC card; after receiving the first input, displaying first prompt information, the first prompt information being used to prompt the user to input a key; receiving the input first key; encrypting a second key based on the first key to obtain first data; encrypting card information of the first NFC card based on the second key to obtain second data; and sending the first data and the second data to a second electronic device, the first data and the second data being used to open the first NFC card by the second electronic device. In this way, after receiving the first input, the first electronic device can encrypt the card information of the first NFC card based on the second key, encrypt the second key based on the first key input by the user, and send the first data and the second data to the second electronic device, so that the second electronic device can open the first NFC card based on the received data. The first electronic device can share the first NFC card to the second electronic device, and also protect the security of the data of the first NFC card.
[0007] In a possible implementation, the first electronic device includes a first authentication password of the first NFC card; after receiving the first input of sharing the first NFC card, the method further includes: displaying second prompt information, the second prompt information being used to prompt the user to input an authentication password; receiving the second authentication password input by the user; and displaying the first prompt information, specifically including: when it is determined that the second authentication password is the same as the first authentication password, displaying the first prompt information. In this way, when opening the first NFC card, the administrator of the first NFC card can set the first authentication password. The first electronic device can verify whether the user has the permission to share the first NFC card through the first authentication password.
[0008] In some examples, the security module of the first electronic device stores data of the first NFC card, the data of the first NFC card including card information and the first authentication password; the security module of the first electronic device determines that the second authentication password is the same as the first authentication password, encrypts the card information of the first NFC card based on the second key to obtain second data, and sends the second data to the second electronic device.
[0009] In a possible implementation, before the card information of the first NFC card is encrypted based on the second key to obtain the second data, the method further includes: displaying third prompt information; the third prompt information is used to prompt the user whether to grant the second electronic device the permission to share the first NFC card; receiving a second input of the user granting the second electronic device the permission to share the first NFC card; and encrypting the card information of the first NFC card based on the second key to obtain the second data, specifically including: encrypting the card information of the first NFC card and the first authentication password based on the second key to obtain the second data. In this way, the user can set, through the first electronic device, whether the second electronic device has the permission to share the first NFC card. When the user sets that the second electronic device does not have the permission to share the first NFC card, the second electronic device cannot share the first NFC card to other electronic devices at will after receiving the first NFC card, and the first NFC card can be protected from being leaked.
[0010] In a possible implementation, before the card information of the first NFC card is encrypted based on the second key to obtain the second data, the method further includes: displaying third prompt information; the third prompt information is used to prompt the user whether to grant the second electronic device the permission to share the first NFC card; receiving a second input of the user granting the second electronic device the permission to share the first NFC card; and encrypting the card information of the first NFC card based on the second key to obtain the second data, specifically including: encrypting the card information of the first NFC card and the sharing permission identifier based on the second key to obtain the second data, the sharing permission identifier being used to indicate that the second electronic device is granted the permission to share the first NFC card. In this way, the first electronic device can add the sharing permission identifier in the data sent to the second electronic device, to indicate whether the second electronic device has the permission to share the first NFC card.
[0011] In a possible implementation, before the card information of the first NFC card is encrypted based on the second key to obtain the second data, the method further includes: displaying fourth prompt information, the fourth prompt information being used to prompt the user to set the validity period of the first NFC card shared to the second electronic device; receiving a third input of the user setting the validity period of the first NFC; and encrypting the card information of the first NFC card based on the second key to obtain the second data, specifically including: encrypting the card information of the first NFC card and the validity period information based on the second key to obtain the second data, the validity period information being used to indicate the validity period of the card information of the first NFC card. In this way, the user can set, through the first electronic device, the validity period of the first NFC card of the second electronic device, so that the user can share the first NFC card temporarily, and the method is suitable for more application scenarios.
[0012] In a possible implementation, after receiving the first input of sharing the first NFC card, the method further includes: receiving a fourth input of a user selecting a second electronic device receiving the first NFC card; and sending the first data and the second data to the second electronic device, specifically including: in response to the fourth input, sending the first data and the second data to the second electronic device. In this way, the user can select an object receiving the first NFC card through the first electronic device, so that the user can share the first NFC card with the user who wants to share.
[0013] In a possible implementation, the fourth input of the user selecting the second electronic device receiving the first NFC card specifically includes: a fourth input of the user selecting a first account receiving the first NFC card, and the second electronic device is logged in the first account. In this way, the user can share the first NFC card to the second electronic device through the first account logged in by the second electronic device, so that the first electronic device can share the first NFC card to the second electronic device even if the distance between the first electronic device and the second electronic device is far.
[0014] In a possible implementation, the first electronic device is logged in a second account, and the second account is associated with the first account. In this way, the user can quickly determine the first account because the second account is associated with the first account.
[0015] In some examples, the second account is associated with the first account includes: the first account and the second account belong to the same application program, or the first account belongs to a contact list of the second account. In this way, the user can quickly select the first account in the contact list.
[0016] In a possible implementation, after receiving the first input of sharing the first NFC card, the method further includes: displaying one or more device options, the one or more device options including a first device option, and the first device option is used to indicate the second electronic device; and the fourth input of the user selecting the second electronic device receiving the first NFC card specifically includes: a fourth input of the user to the first device option. In this way, the first electronic device can find the second electronic device and share the first NFC card to the second electronic device.
[0017] In a possible implementation, the one or more device options are displayed, specifically including: searching for one or more electronic devices through a close-range communication technology, the one or more electronic devices including the second electronic device; and displaying the one or more device options based on the one or more electronic devices. In this way, the first electronic device can search for electronic devices in the vicinity through a close-range communication technology (for example, Bluetooth, Wi-Fi, etc.), and display device options of the searched electronic devices. The first electronic device can receive an input of a user selecting a first device option, establish a communication connection with the second electronic device indicated by the first device option, and share the first NFC card to the second electronic device. When the first electronic device is close to the second electronic device, the first NFC card can be shared faster through the close-range communication technology.
[0018] In a possible implementation, after the first data and the second data are sent to the second electronic device, the method further includes: displaying fifth prompt information, the fifth prompt information being used to prompt the user that the sharing of the first NFC card is successful. In this way, the first electronic device can prompt the user that the sharing of the first NFC card is successful after the sharing is successful, so as to facilitate the user to know the progress of the sharing of the first NFC card.
[0019] In a possible implementation, after the first data and the second data are sent to the second electronic device, the method further includes: displaying fifth prompt information, the fifth prompt information being used to prompt the user that the sharing of the first NFC card is successful. In this way, the first electronic device can prompt the user that the sharing of the first NFC card is successful after the sharing is successful, so as to facilitate the user to know the progress of the sharing of the first NFC card.
[0020] In a possible implementation, after the first data and the second data are sent to the second electronic device, the method further includes: displaying fifth prompt information, the fifth prompt information being used to prompt the user that the sharing of the first NFC card is successful. In this way, the first electronic device can prompt the user that the sharing of the first NFC card is successful after the sharing is successful, so as to facilitate the user to know the progress of the sharing of the first NFC card.
[0021] In a possible implementation, the card information of the first NFC card is obtained from the second data based on the second key, and specifically includes: obtaining the card information of the first NFC card and the first authentication password from the second data based on the second key; after the first NFC card is opened based on the card information of the first NFC card, the method further includes: receiving a fifth input of sharing the first NFC card; displaying eighth prompt information, the eighth prompt information being used to prompt the user to input an authentication password; receiving a second authentication password input by the user; when it is determined that the second authentication password is the same as the first authentication password, displaying ninth prompt information, the ninth prompt information being used to prompt the user to input a key; receiving a third key input; encrypting the second key based on the third key to obtain third data; encrypting the card information of the first NFC card based on the second key to obtain fourth data; and sending the fourth data and the third data to a third electronic device. In this way, the second electronic device can share the first NFC card to other electronic devices based on the first authentication password after receiving the first authentication password.
[0022] In a possible implementation, after the first NFC card is opened based on the card information of the first NFC card, the method further includes: displaying a sharing control, the sharing control being used to trigger the second electronic device to share the first NFC card; and the fifth input is an input of the sharing control by the user. In this way, the user can share the first NFC card to other electronic devices through the sharing control.
[0023] In a possible implementation, after the first NFC card is opened based on the card information of the first NFC card, the method further includes: receiving a fifth input of sharing the first NFC card; displaying eighth prompt information, the eighth prompt information being used to prompt the user to input an authentication password; receiving a second authentication password input by the user; and when it is determined that the card information of the first NFC card of the second electronic device does not include the authentication password, displaying tenth prompt information, the tenth prompt information being used to prompt the user that the user does not have the permission to share the first NFC card. In this way, when the second electronic device does not receive the first authentication password, the second electronic device cannot share the first NFC card to other electronic devices.
[0024] In some examples, the sharing control is displayed, and specifically includes: determining that the first authentication password is received, and displaying the sharing control. In this way, the second electronic device determines that the user has the permission to share the first NFC card after determining that the first authentication password is received, and displays the sharing control. If the second electronic device does not receive the first authentication password, the sharing control can not be displayed, so that the user of the second electronic device can confirm that the user does not have the permission to share the first NFC card.
[0025] In a possible implementation, the card information of the first NFC card is obtained from the second data based on the second key, and specifically includes: obtaining the card information of the first NFC card and the sharing permission identifier from the second data based on the second key; after the first NFC card is opened based on the card information of the first NFC card, the method further includes: receiving a fifth input of sharing the first NFC card; if it is determined that the sharing permission identifier is used to indicate that the second electronic device has the permission of sharing the first NFC card, displaying a ninth prompt information, the ninth prompt information is used to prompt the user to input a key; receiving the input third key; encrypting the second key based on the third key to obtain third data; encrypting the card information of the first NFC card based on the second key to obtain fourth data; sending the fourth data and the third data to the third electronic device; if it is determined that the sharing permission identifier is used to indicate that the second electronic device does not have the permission of sharing the first NFC card, displaying a tenth prompt information, the tenth prompt information is used to prompt the user that the user does not have the permission of sharing the first NFC card. The third data and the fourth data are used to open the first NFC card by the third electronic device. In this way, the first electronic device can set whether the second electronic device has the permission of sharing the first NFC card through the sharing permission identifier.
[0026] In some examples, the fifth input of sharing the first NFC card is received; if it is determined that the sharing permission identifier is used to indicate that the second electronic device has the permission of sharing the first NFC card, the ninth prompt information is displayed, the ninth prompt information is used to prompt the user to input a key; the third key input by the user is received; the fourth key is encrypted based on the third key to obtain third data; the card information of the first NFC card is encrypted based on the fourth key to obtain fourth data. In this way, the second electronic device can generate the fourth key when opening the first NFC card. The second electronic device can encrypt the card information of the first NFC card based on the fourth key when sharing the first NFC card, and protect the security of the card information by changing the key of the encrypted card information.
[0027] In some examples, if it is determined that the sharing permission identifier is used to indicate that the second electronic device has the permission of sharing the first NFC card, a sharing control is displayed. In this way, when the second electronic device has the permission of sharing the first NFC card, the sharing control is displayed, so that the user can share the first NFC card through the sharing control. Optionally, if the second electronic device has the permission of sharing the first NFC card, the sharing control can not be displayed, so that the user of the second electronic device can confirm that the user does not have the permission of sharing the first NFC card.
[0028] In a possible implementation, after the first NFC card is opened based on the card information of the first NFC card, the method further includes: after entering a radio frequency field generated by the NFC card reading device, completing the card swiping business of the first NFC card based on the card information of the first NFC card. In this way, after the second electronic device opens the first NFC card, the user can realize the card swiping business of the first NFC card through the second electronic device.
[0029] In a possible implementation, the card information of the first NFC card is obtained from the second data based on the second key, and specifically includes: the card information of the first NFC card and the valid period information are obtained from the second data based on the second key, and the valid period information is used to indicate the valid period of the card information of the first NFC card. In this way, the first electronic device can set the valid period of the first NFC card in the second electronic device through the valid period information, and limit the time for the user of the second electronic device to use the first NFC card.
[0030] In a possible implementation, after entering the radio frequency field generated by the NFC card reading device, the card swiping business of the first NFC card is completed based on the card information of the first NFC card, and specifically includes: after entering the radio frequency field generated by the NFC card reading device within the time period indicated by the valid period information, the card swiping business of the first NFC card is completed based on the card information of the first NFC card.
[0031] In a possible implementation, after the first NFC card is opened based on the card information of the first NFC card, the method further includes: displaying the valid period information. In this way, the user of the second electronic device can determine the valid time of the first NFC card based on the displayed valid period information.
[0032] In a possible implementation, the first data and the second data sent by the first electronic device are received, and specifically includes: logging in a second account; based on the second account, the first data and the second data sent by the first electronic device logged in with a first account are received, and the first account is associated with the second account. In this way, the second electronic device can receive the first NFC card shared by the first electronic device based on the logged-in second account.
[0033] In a possible implementation, the first NFC card is opened based on the card information of the first NFC card, and specifically includes: generating a first dedicated file (DF), the first DF includes the card information of the first NFC card, and the first DF is used to realize the card swiping business of the first NFC card.
[0034] In a third aspect, the present application provides a communication system, comprising: a first electronic device and a second electronic device; wherein the first electronic device is configured to perform the NFC analog card sharing method in any possible implementation manner of the first aspect; and the second electronic device is configured to perform the NFC analog card sharing method in any possible implementation manner of the second aspect. In this way, the first electronic device can share the first NFC card to the second electronic device through the NFC analog card sharing method, and the second electronic device can receive the first NFC card shared by the first electronic device through the NFC analog card sharing method, so that each electronic device can share the NFC card more conveniently.
[0035] In a fourth aspect, the present application provides a near field communication analog card sharing method, applied to a first electronic device; the method comprises: receiving a first input of sharing a first NFC card; obtaining a first key after receiving the first input; encrypting a second key based on the first key to obtain first data; encrypting card information of the first NFC card based on the second key to obtain second data; and sending the first data and the second data to a second electronic device, the first data and the second data being used by the second electronic device to open the first NFC card. In this way, the first electronic device can obtain the first key after receiving the first input, encrypt the card information of the first NFC card based on the second key, encrypt the second key based on the obtained first key, and send the first data and the second data to the second electronic device, so that the second electronic device can open the first NFC card based on the received data. The first electronic device can not only share the first NFC card to the second electronic device, but also protect the security of the data of the first NFC card. Since the first electronic device obtains a new first key each time the operation of sharing the NFC card is performed, the card information of the first NFC card can be better protected.
[0036] In a possible implementation manner, the first key is obtained, specifically comprising: displaying first prompt information, the first prompt information being used to prompt a user to input a key; and receiving the input first key. In this way, the user of the first electronic device can determine the first key by himself / herself, or the user of the first electronic device can agree with the user of the second electronic device on the first key, so as to more conveniently determine the first key known by the user of the first electronic device and the user of the second electronic device.
[0037] In a possible implementation manner, the first key is obtained, specifically comprising: establishing a secure transmission channel with the second electronic device; and obtaining the first key by negotiating with the second electronic device on the secure transmission channel. In this way, the first electronic device can establish a secure transmission channel with the second electronic device, and obtain the first key by negotiating with the second electronic device on the secure transmission channel, so as to reduce the operation steps of the user, and make the user can share the NFC card more conveniently.
[0038] In some examples, the secure transmission channel is a Wi-Fi transmission channel or a Bluetooth transmission channel.
[0039] In some examples, the first key is negotiated with the second electronic device over the secure transmission channel, specifically including: generating the first key; encrypting the first key based on a first public key in the first public-private key pair to obtain first encrypted data; and sending the first encrypted data to the second electronic device through the secure transmission channel.
[0040] In a possible implementation, the first electronic device includes a first authentication password of the first NFC card; after receiving the first input of sharing the first NFC card, the method further includes: displaying second prompt information, the second prompt information being used to prompt the user to input an authentication password; and receiving a second authentication password input by the user; and displaying the first prompt information, specifically including: displaying the first prompt information when it is determined that the second authentication password is the same as the first authentication password.
[0041] In a possible implementation, before encrypting the card information of the first NFC card based on the second key to obtain the second data, the method further includes: displaying third prompt information; and receiving a second input of the user granting the second electronic device the permission to share the first NFC card; and encrypting the card information of the first NFC card based on the second key to obtain the second data, specifically including: encrypting the card information of the first NFC card and the first authentication password based on the second key to obtain the second data.
[0042] In a possible implementation, before encrypting the card information of the first NFC card based on the second key to obtain the second data, the method further includes: displaying third prompt information; and receiving a second input of the user granting the second electronic device the permission to share the first NFC card; and encrypting the card information of the first NFC card based on the second key to obtain the second data, specifically including: encrypting the card information of the first NFC card and the sharing permission identifier based on the second key to obtain the second data, the sharing permission identifier being used to indicate that the second electronic device is granted the permission to share the first NFC card.
[0043] In a possible implementation, before the card information of the first NFC card is encrypted based on the second key to obtain the second data, the method further includes: displaying fourth prompt information, the fourth prompt information being used to prompt the user to set a validity period of the first NFC card shared to the second electronic device; receiving a third input of the user setting the validity period of the first NFC card; and encrypting the card information of the first NFC card based on the second key to obtain the second data, specifically including: encrypting the card information of the first NFC card and validity period information based on the second key to obtain the second data, the validity period information being used to indicate the validity period of the card information of the first NFC card.
[0044] In a possible implementation, after receiving the first input of sharing the first NFC card, the method further includes: receiving a fourth input of the user selecting a second electronic device receiving the first NFC card; and sending the first data and the second data to the second electronic device, specifically including: sending the first data and the second data to the second electronic device in response to the fourth input.
[0045] In a possible implementation, the fourth input of the user selecting the second electronic device receiving the first NFC card is specifically received, including: receiving a fourth input of the user selecting a first account receiving the first NFC card, the second electronic device being logged in with the first account.
[0046] In a possible implementation, the first electronic device is logged in with a second account, and the second account is associated with the first account.
[0047] In some examples, the second account being associated with the first account includes that the first account and the second account belong to the same application program, or the first account belongs to a contact list of the second account. In this way, the user can quickly select the first account in the contact list.
[0048] In a possible implementation, after receiving the first input of sharing the first NFC card, the method further includes: displaying one or more device options, the one or more device options including a first device option, the first device option being used to indicate the second electronic device; and receiving the fourth input of the user selecting the second electronic device receiving the first NFC card, specifically including: receiving a fourth input of the user to the first device option. In this way, the first electronic device can find the second electronic device and share the first NFC card to the second electronic device.
[0049] In a possible implementation, the one or more device options are displayed, specifically including: searching for one or more electronic devices through a near distance communication technology, the one or more electronic devices including the second electronic device; and displaying the one or more device options based on the one or more electronic devices.
[0050] In a possible implementation, after the first data and the second data are sent to the second electronic device, the method further includes: displaying fifth prompt information, the fifth prompt information being used to prompt the user that the first NFC card is successfully shared.
[0051] In a fifth aspect, the present application provides a method for sharing a near field communication (NFC) card, applied to a second electronic device. The method includes: receiving first data and second data sent by a first electronic device, the second data including encrypted card information of a first NFC card; obtaining a first key; obtaining a second key from the first data based on the first key; obtaining the card information of the first NFC card from the second data based on the second key; and opening the first NFC card based on the card information of the first NFC card. In this way, the second electronic device can obtain the first key, and based on the obtained first key and the received first data and second data, obtain the card information of the first NFC card. The second electronic device can receive the data of the first NFC card shared by the first electronic device, and open the first NFC card.
[0052] In a possible implementation, the first key is obtained in the following manner: displaying sixth prompt information, the sixth prompt information being used to prompt the user to input a key; and receiving the input first key. In this way, the user of the second electronic device can input the first key provided by the user of the first electronic device, and decrypt the first data based on the first key.
[0053] In a possible implementation, the first key is obtained in the following manner: establishing a secure transmission channel with the first electronic device; and obtaining the first key by negotiating with the first electronic device on the secure transmission channel. In this way, the second electronic device can establish a secure transmission channel with the first electronic device, and obtain the first key by negotiating with the first electronic device on the secure transmission channel, thereby reducing the steps of user operation and making it more convenient for the user to receive the NFC card shared by the first electronic device.
[0054] In a possible implementation, after the first NFC card is opened based on the card information of the first NFC card, the method further includes: displaying seventh prompt information, the seventh prompt information being used to prompt the user that the first NFC card is successfully opened. In this way, the second electronic device can prompt the user that the first NFC card can be used.
[0055] In some examples, the secure transmission channel is a Wi-Fi transmission channel or a Bluetooth transmission channel.
[0056] In some examples, the first key is obtained by negotiating with the first electronic device on the secure transmission channel in the following manner: receiving first encrypted data through the secure transmission channel; and decrypting the first encrypted data based on a first private key in a first public-private key pair to obtain the first key.
[0057] In a possible implementation, the card information of the first NFC card is obtained from the second data based on the second key, and specifically includes: obtaining the card information of the first NFC card and the first authentication password from the second data based on the second key; after the first NFC card is opened based on the card information of the first NFC card, the method further includes: receiving a fifth input of sharing the first NFC card; displaying eighth prompt information, the eighth prompt information being used to prompt the user to input an authentication password; receiving a second authentication password input by the user; when it is determined that the second authentication password is the same as the first authentication password, displaying ninth prompt information, the ninth prompt information being used to prompt the user to input a key; receiving a third key input; encrypting the second key based on the third key to obtain third data; encrypting the card information of the first NFC card based on the second key to obtain fourth data; and sending the fourth data and the third data to a third electronic device.
[0058] In a possible implementation, after the first NFC card is opened based on the card information of the first NFC card, the method further includes: displaying a sharing control, the sharing control being used to trigger the second electronic device to share the first NFC card; and the fifth input is an input of the sharing control by the user.
[0059] In a possible implementation, after the first NFC card is opened based on the card information of the first NFC card, the method further includes: receiving a fifth input of sharing the first NFC card; displaying eighth prompt information, the eighth prompt information being used to prompt the user to input an authentication password; receiving a second authentication password input by the user; and when it is determined that the data of the first NFC card of the second electronic device does not include the authentication password, displaying tenth prompt information, the tenth prompt information being used to prompt the user that the user does not have the permission to share the first NFC card. In some examples, the sharing control is displayed, and specifically includes: determining that the first authentication password is received, and displaying the sharing control.
[0060] In a possible implementation, the card information of the first NFC card is obtained from the second data based on the second key, and specifically includes: the card information of the first NFC card and the sharing permission identifier are obtained from the second data based on the second key; after the first NFC card is opened based on the card information of the first NFC card, the method further includes: receiving a fifth input of sharing the first NFC card; if it is determined that the sharing permission identifier is used to indicate that the second electronic device has the permission of sharing the first NFC card, displaying a ninth prompt information, the ninth prompt information is used to prompt the user to input a key; receiving the input third key; encrypting the second key based on the third key to obtain third data; encrypting the card information of the first NFC card based on the second key to obtain fourth data; sending the fourth data and the third data to a third electronic device; if it is determined that the sharing permission identifier is used to indicate that the second electronic device does not have the permission of sharing the first NFC card, displaying a tenth prompt information, the tenth prompt information is used to prompt the user that the user does not have the permission of sharing the first NFC card. The third data and the fourth data are used to open the first NFC card by the third electronic device.
[0061] In some examples, the fifth input of sharing the first NFC card is received; if it is determined that the sharing permission identifier is used to indicate that the second electronic device has the permission of sharing the first NFC card, the ninth prompt information is displayed, the ninth prompt information is used to prompt the user to input a key; the input third key is received; the fourth key is encrypted based on the third key to obtain third data; the card information of the first NFC card is encrypted based on the fourth key to obtain fourth data.
[0062] In some examples, if it is determined that the sharing permission identifier is used to indicate that the second electronic device has the permission of sharing the first NFC card, the sharing control is displayed. Optionally, if the second electronic device has the permission of sharing the first NFC card, the sharing control can not be displayed, so that the user of the second electronic device can confirm that the user does not have the permission of sharing the first NFC card.
[0063] In a possible implementation, after the first NFC card is opened based on the card information of the first NFC card, the method further includes: after entering the radio frequency field generated by the NFC card reading device, completing the card swiping business of the first NFC card based on the card information of the first NFC card.
[0064] In a possible implementation, the card information of the first NFC card is obtained from the second data based on the second key, and specifically includes: the card information of the first NFC card and the valid period information are obtained from the second data based on the second key, and the valid period information is used to indicate the valid period of the card information of the first NFC card.
[0065] In a possible implementation, after entering the radio frequency field generated by the NFC card reading device, the card information of the first NFC card is used to complete the card swiping service of the first NFC card, specifically including: after entering the radio frequency field generated by the NFC card reading device within the time period indicated by the validity period information, the card information of the first NFC card is used to complete the card swiping service of the first NFC card.
[0066] In a possible implementation, after the first NFC card is opened based on the card information of the first NFC card, the method further includes: displaying the validity period information.
[0067] In a possible implementation, the first data and the second data sent by the first electronic device are received, specifically including: logging in the second account; based on the second account, the first data and the second data sent by the first electronic device logged in the first account are received, and the first account is associated with the second account.
[0068] In a possible implementation, the first NFC card is opened based on the card information of the first NFC card, specifically including: 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.
[0069] In a sixth aspect, the present 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, and the one or more memories are used to store a computer program. When the one or more processors execute the computer program, the NFC analog card sharing method in the first aspect, the fourth aspect, any possible implementation of the fourth aspect, and any possible implementation of the first aspect is executed.
[0070] In a seventh aspect, the present 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, and the one or more memories are used to store a computer program. When the one or more processors execute the computer program, the NFC analog card sharing method in the second aspect, the fifth aspect, any possible implementation of the fifth aspect, and any possible implementation of the second aspect is executed.
[0071] In an eighth aspect, the present application provides a computer storage medium, storing a computer program. When the computer program is executed by a processor, the NFC analog card sharing method in the first aspect, the fourth aspect, any possible implementation of the fourth aspect, and any possible implementation of the first aspect is implemented.
[0072] In a ninth aspect, the present application provides a computer storage medium, which stores a computer program, and when the computer program is executed by a processor, the NFC analog card sharing method in the second aspect, any possible implementation manner of the fifth aspect, any possible implementation manner of the second aspect, and any possible implementation manner of the first aspect is implemented.
[0073] In a tenth aspect, the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the NFC analog card sharing method in the first aspect, any possible implementation manner of the fourth aspect, any possible implementation manner of the first aspect, and any possible implementation manner of the first aspect is implemented.
[0074] In an eleventh aspect, the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the NFC analog card sharing method in the second aspect, any possible implementation manner of the fifth aspect, any possible implementation manner of the second aspect, and any possible implementation manner of the second aspect is implemented.
[0075] In a twelfth aspect, the present application provides a chip system, which includes a processing circuit and an interface circuit, the interface circuit is used for receiving code instructions and transmitting to the processing circuit, and the processing circuit is used for running the code instructions to execute the NFC analog card sharing method in the first aspect, any possible implementation manner of the fourth aspect, any possible implementation manner of the first aspect, and any possible implementation manner of the first aspect.
[0076] In a thirteenth aspect, the present application provides a chip system, which includes a processing circuit and an interface circuit, the interface circuit is used for receiving code instructions and transmitting to the processing circuit, and the processing circuit is used for running the code instructions to execute the NFC analog card sharing method in the second aspect, any possible implementation manner of the fifth aspect, any possible implementation manner of the second aspect, and any possible implementation manner of the second aspect. BRIEF DESCRIPTION OF DRAWINGS
[0077] Figure 1 A schematic diagram of an NFC working principle provided by an embodiment of the present application;
[0078] Figure 2 A schematic diagram of a communication system 10 provided by an embodiment of the present application;
[0079] Figure 3A A structural schematic diagram of an electronic device provided by an embodiment of the present application;
[0080] Figure 3B A schematic diagram of an NFC protocol stack provided by an embodiment of the present application;
[0081] Figure 3C A file structure schematic diagram of an MF provided by an embodiment of the present application;
[0082] Figure 3D Another file structure diagram of MF provided for an embodiment of the present application;
[0083] Figures 4A-4L A set of interface diagrams of sharing a specified NFC card provided for an embodiment of the present application;
[0084] Figures 5A-5H A set of interface diagrams of receiving a specified NFC card provided for an embodiment of the present application;
[0085] Figure 6 A flow diagram of a sharing method of an NFC simulation card provided for an embodiment of the present application;
[0086] Figures 7A-7C Another set of interface diagrams of sharing a specified NFC card provided for an embodiment of the present application;
[0087] Figure 8 A flow diagram of another sharing method of an NFC simulation card provided for an embodiment of the present application;
[0088] Figure 9 A flow diagram of another sharing method of an NFC simulation card provided for an embodiment of the present application;
[0089] Figure 10 A hardware structure diagram of an electronic device provided for an embodiment of the present application;
[0090] Figure 11 A structure diagram of a communication device provided for an embodiment of the present application;
[0091] Figure 12 Another structure diagram of a communication device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0092] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, “ / ” represents the meaning of or, for example, A / B can represent A or B; the “and / or” in the text only represents a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, “multiple” means two or more than two.
[0093] The terms "first", "second", "third", etc. are used herein only to describe different instances, and cannot be understood as indicating or implying relative importance or implying a specific number of the technical features indicated. Therefore, the features defined with "first", "second", etc. can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.
[0094] The NFC working principle in the embodiments of the present application is introduced as follows.
[0095] Figure 1 A schematic diagram of the NFC working principle provided in the embodiments of the present application is shown.
[0096] As Figure 1 indicated, the two parties using NFC technology for communication can include a proximity coupling device (PCD) (also referred to as an NFC card reading device) and a proximity intelligent card (PICC). The PCD can achieve proximity contactless communication with the PICC. The PCD and the PICC can allow near field communication at a specific data rate (for example, 106 kilobits per second (kbit / s), 212 kbit / s, 424 kbit / s, 848 kbit / s, etc.). The communication between the PCD and the PICC can occur within a short distance, for example, within a range of about 2 to 4 centimeters.
[0097] The PCD can generate high-frequency alternating current to generate a radio frequency field at a specified frequency (for example, 13.56 MHz) and transmit data to the PICC through the radio frequency field. After the PICC approaches the PCD, the PICC can induct the radio frequency field emitted by the PCD. The PICC can obtain energy from the radio frequency field of the PCD through electromagnetic induction after entering the radio frequency field emitted by the PCD, and generate power by means of the obtained energy to drive the circuit inside the PICC, analyze the data transmitted by the PCD through the radio frequency field, so as to realize the data transmission from the PCD to the PICC. The PICC can also send data to the PCD in the form of load modulation of the radio frequency field, realizing the data transmission from the PICC to the PCD.
[0098] In the embodiments of the present application, the PICC can be a physical NFC tag card, and some NFC devices (for example, mobile phones, tablets, smart watches, and other electronic devices) can also simulate themselves into a PICC conforming to NFC related standards by using the data of an NFC analog card (referred to as an NFC card) to realize the function of the PICC and perform NFC communication with the PCD.
[0099] The NFC card reading device can perform a card swiping verification process based on card information of the PICC. The NFC card reading device can send a card swiping result to the PICC through NFC command interaction. The card information of the PICC can include, but is not limited to, one or more of access control information, key information, transaction account information, electronic ticket information, and validity period information (used to indicate the validity period of the card information).
[0100] The device type of the NFC card reading device can be any one of a mobile phone, a tablet computer, a handheld computer, a desktop computer, a laptop computer, an ultra-mobile personal computer, a netbook, a cellular phone, a personal digital assistant, a smart large screen, a smart speaker, a wearable device such as a smart bracelet or a smart watch, augmented reality, virtual reality, mixed reality, a vehicle, an access control device, a smart door lock, a card swiping device, a cash register, a ticket buying and / or checking terminal, a bank service terminal, and an identification card reading device.
[0101] A communication system provided in an embodiment of the present application is introduced below.
[0102] Figure 2 A schematic diagram of a communication system 10 provided in an embodiment of the present application is shown.
[0103] As Figure 2 shown, the communication system 10 can include an electronic device 100 and an electronic device 200. The electronic device 100 and the electronic device 200 establish a communication connection. The electronic device 100 and the electronic device 200 can transmit data to each other after establishing the communication connection. The embodiments of the present application do not limit the manner in which the electronic device 100 and the electronic device 200 establish the communication connection, for example, the communication connection can be established through a logged account, a bound device, or a scanned two-dimensional code. The embodiments of the present application do not limit the type of the communication connection established between the electronic device 100 and the electronic device 200, for example, the type of the communication connection can include, but is not limited to, a wired connection and a wireless connection. The wireless connection can include a Bluetooth connection, a wireless fidelity point to point (Wi-Fi P2P) connection, a near field communication (NFC) connection, an infrared (IR) connection, and a remote connection (for example, a connection established through a server).
[0104] In some examples, the communication system 10 can further include a server 300. The server 300 can establish a communication connection with a plurality of electronic devices. When the electronic device 100 shares the NFC analog card to the electronic device 200, the server 300 can transmit the data of the NFC analog card shared by the electronic device 100 to the electronic device 200, and the data of the NFC analog card can include the card information.
[0105] In some examples, the communication system 10 can further include a server 400. When the electronic device 100 shares the NFC analog card to the electronic device 200, the server 400 can send the sharing key provided by the electronic device 100 to the electronic device 200. Alternatively, the server 400 can generate the sharing key, and the server 400 can send the sharing key to the double-sided device sharing the card information of the NFC analog card. Wherein, the sharing key can be used to encrypt the authentication key. Wherein, the authentication key can be used to encrypt the card information of the NFC analog card.
[0106] The structure of the electronic device 100 provided in the embodiments of the present application is introduced below.
[0107] Figure 3A The structure of the electronic device 100 provided in the embodiments of the present application is introduced below.
[0108] As shown in Figure 3A , the electronic device 100 can include a processor 101 and an NFC module 102. Wherein, one or more applications can be run in the processor 101. Wherein, the one or more applications can include one or more of an application (for example, a wallet application) for managing the NFC analog card, one or more host-based card emulation (HCE) applications, and the like. Optionally, the electronic device 100 can further include a secure element (SE) 103 and / or a subscriber identity module (SIM) card 104. The processor 101 can be connected with the NFC module 102, the SE 103 and the SIM card 104 respectively. The NFC module 102 can also be connected with the SE 103 and the SIM card 104.
[0109] The NFC module 102 can 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 ). Wherein, the NFC controller can be connected with the processor 101, and the NFC controller can also be connected with the NFC transceiver and the NFC memory respectively.
[0110] The NFC controller is mainly used for modulating and demodulating non-contact communication signals, controlling the input and output of data in the NFC memory, and interacting with the processor 101. The NFC transceiver is used to realize the transmission and reception of NFC signals (for example, 13.56 MHz radio frequency signals), which can include an electromagnetic compatibility (EMC) filter circuit, a matching circuit, a receiving circuit, and an NFC antenna, etc., wherein the NFC antenna can be a loop antenna, which is used to realize the proximity-based non-contact communication capability of the NFC module 102. The NFC memory can be used to store data transmitted by the NFC module 102 to the NFC card reading device, and data received from the NFC card reading device. In some embodiments, the NFC memory can be one memory, which can be shared by the above components in the NFC module 102, for example, some data in the NFC memory can be called by the NFC controller, and other data can be called by the SE 103.
[0111] In other embodiments, the NFC memory can also be a collection of multiple memories, for example, the NFC controller can include a first memory of the multiple memories, the first memory can include instructions or data used or recycled by the NFC controller, and if the NFC controller needs to use the instructions or data again, the instructions or data can be directly called from the first memory, so as to reduce the waiting time of the NFC controller. The SE 103 can include a second memory of the multiple memories. The second memory can include card information of a NFC emulation card based on the secure element, etc., so that if the SE 103 needs to read the card information of the NFC emulation card, the card information of the NFC emulation card can be read from the second memory in the SE 103. The SIM card 104 can include a third memory of the multiple memories. The third memory can include card information of a NFC emulation card based on the SIM card, etc., so that if the SIM card 104 needs to read the card information of the NFC emulation card, the card information of the NFC emulation card can be read from the third memory in the SIM card 104.
[0112] In some embodiments, the NFC memory described above can also store routing information. In some embodiments, the routing information can be controlled or managed by the NFC controller, and the routing information can include a routing table composed of a list of routing rules. Each routing rule contains an applet identifier (AID) and a destination. The destination is where the Applet that implements the business logic of the NFC emulation card runs. The destination can include an HCE application running in the processor 101 of the electronic device 100, or the SE 103 or the SIM card 104 connected to the NFC controller.
[0113] The SE 103 and the NFC module 102 can be two independent chips. Alternatively, the SE 103 and the NFC module 102 can be packaged in one chip.
[0114] The electronic device 100 can open one or more NFC emulation cards in the application according to the user's input, so as to enable the electronic device 100 to support one or more NFC services. The business processing logic of the NFC emulation card in the electronic device 100 is implemented by an applet. The applet can be stored and run in the hardware device or software module (for example, HCE application, SIM card, SE, etc.) corresponding to the NFC emulation card.
[0115] The card emulation mode on the electronic device 100 can be divided into a hardware-based virtual card mode and a software-based HCE mode. In the hardware-based virtual card mode,
[0116] 1. In the hardware-based virtual card mode, the electronic device 100 can provide the running environment of the Applet of the NFC emulation card and the storage and processing of the business data of the NFC emulation card through the SE 103 or the SIM card 104. The NFC module 102 as the front end of the contactless communication forwards the command received from the external PCD to the SE 103 or the SIM card 104, and then the Applet in the SE 103 or the SIM card 104 processes it and sends the response data to the external PCD through the NFC module 102. The user can open one or more NFC emulation cards in the wallet application, and the wallet application can write the Applet and card data of the one or more NFC emulation cards into the SE 103. Alternatively, the user can open one or more NFC emulation cards in the SIM card application. The SIM card application can write the Applet and card data of the one or more NFC emulation cards into the SIM card 104 for storage.
[0117] 2、In the software-based HCE mode, the HCE application running in the processor 101 can provide a running environment of the Applet corresponding to the NFC emulation card and storage and processing of the service data of the NFC emulation card. After receiving a command sent by an external PCD, the NFC module 102 can send the command to the HCE application. The HCE application can process the command received by the NFC module through the Applet running in the HCE application or a cloud server, and generate response data for the PCD. The HCE application can send the response data to the NFC module 102. The NFC module 102 can send the response data to the external PCD. The user can open one or more NFC emulation cards in the HCE application, and the HCE application can run the Applet of the one or more NFC emulation cards and save the card data of the NFC emulation card on the local storage of the electronic device 100 or on the cloud server.
[0118] Optionally, the processor 101 can also run an NFC basic service module. The NFC basic service module can be used to provide common management functions for one or more NFC services. The common management functions can include file management, card long activation, security management, service routing management, and the like.
[0119] It should be noted that the description of the hardware structure of the electronic device 200 can also be referred to the structure diagram shown in Figure 3A , which will not be described here in detail.
[0120] The following describes an NFC protocol stack provided in an embodiment of the present application.
[0121] Figure 3B An NFC protocol stack provided in an embodiment of the present application is shown.
[0122] As Figure 3B shown, the NFC protocol stack can include a physical layer, a radio frequency layer, an access layer, a transmission layer, and an application layer.
[0123] The physical layer can be used to implement the physical characteristics during NFC communication.
[0124] The radio frequency layer can be used to implement the radio frequency specifications during NFC communication, for example, data rate, frequency of the radio frequency signal, and the like.
[0125] The access layer can be used to implement the functions of polling and device discovery, service result notification, card conflict management, transmission protocol negotiation, timeout and retransmission mechanism, PICC / PCD mode switching, fusion card selection, and the like.
[0126] The transmission layer includes a high-speed data transmission protocol, through which the data transmission between the PCD and the PICC in the application layer can be implemented.
[0127] 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 can include no-code payment, electronic ticket, access control, digital ID card, full-scene tap-to-tap, near-field data transmission, etc. The one or more service management policies can include any one or more of file management, card long activation, security management, and service routing management, etc. The processing logic of the NFC service can be executed by the Applet. In a possible implementation, the processing logic of the service management policy can be executed by the NFC base service module.
[0128] In some application scenarios, the PCD and the PICC store card information and an external authentication key (referred to as an authentication key for short). When the PICC approaches the card swiping area of the PCD, the PICC can confirm whether to send the card information to the PCD based on the stored authentication key and the authentication key stored by the PCD. The PICC can send the card information to the PCD when it is determined to send the information to the PCD. The PCD can complete the NFC service corresponding to the PICC based on the card information obtained from the PICC. In this way, the PICC can authenticate the PCD through the authentication key, and the PCD can determine the card swiping result through the card information of the PICC. After the user loses the PICC, other personnel do not have the authentication key and cannot obtain the card information of the PICC.
[0129] In some examples, the PICC can generate a random number. The PCD can obtain the random number from the PICC. The PCD can encrypt the random number using the authentication key to obtain authentication ciphertext. The PCD can send the authentication ciphertext to the PICC. The PICC can decrypt the authentication ciphertext using the stored authentication key to obtain the random number. The PICC can send the card information of the PICC to the PCD when it is determined that the decrypted random number is the same as the generated random number. The PCD can complete the NFC service corresponding to the PICC based on the received card information of the PICC. It can be understood that the PICC can not send the card information of the PICC to the PCD when it is determined that the decrypted random number is different from the generated random number. In this way, the PICC can confirm whether to send the card information of the PICC to the PCD based on the stored authentication key and the authentication key stored by the PCD.
[0130] In some examples, the PICC can encrypt the random number and the card information using the authentication key to obtain encrypted data when it is determined that the decrypted random number is the same as the generated random number. The PICC can send the encrypted data to the PCD. After receiving the encrypted data, the PCD can decrypt the encrypted data based on the authentication key to obtain the card information. In this way, because the random number generated by the PICC is different, the encrypted data sent by the PICC to the PCD is also different, and it can be avoided that other devices obtain the card information.
[0131] In some examples, the electronic device 100 can save the card information and the authentication key of the PICC in a dedicated file (DF) of the SE 103 or the SIM card 104, and open the NFC emulation card corresponding to the PICC. The dedicated file is a file provided by the electronic device 100 for storing data of the NFC emulation card. The dedicated file of the NFC emulation card can include a plurality of storage areas, including a first storage area and a second storage area. The electronic device 100 can store the card information of the NFC emulation card in the first storage area, and store the authentication key in the second storage area. In this way, the electronic device 100 can more standardizedly manage the data of the opened NFC emulation card.
[0132] When the electronic device 100 starts the NFC function, the NFC module 102 can simulate the PICC based on the data of the dedicated file of the NFC emulation card. When the electronic device 100 simulating the PICC through the NFC module 102 is close to the card swiping area of the PCD, the electronic device 100 can confirm whether to send the card information of the NFC emulation card to the PCD based on the stored authentication key and the authentication key stored by the PCD. When it is determined to send the card information of the NFC emulation card to the PCD, the electronic device 100 can send the card information to the PCD. The PCD can complete the NFC service corresponding to the PICC based on the card information obtained from the electronic device 100. For details, please refer to the above embodiments.
[0133] Embodiments of the present application provide a NFC analog card sharing method. An electronic device 100 stores data of a specified NFC card, the data including card information and an authentication key of the specified NFC card. The electronic device 100 can display prompt information 1 after receiving an input of sharing the specified NFC card to an electronic device 200, the prompt information 1 being used to prompt a user to input a sharing key. The electronic device 100 can encrypt the card information of the specified NFC card using the authentication key to obtain ciphertext 1 after receiving the sharing key input by the user. The electronic device 100 can encrypt the authentication key using the sharing key to obtain ciphertext 2. The electronic device 100 can send the ciphertext 1 and the ciphertext 2 to the electronic device 200. The electronic device 200 can display prompt information 2 after receiving the ciphertext 1 and the ciphertext 2, the prompt information 2 being used to prompt the user to input the sharing key. The electronic device 200 can obtain the authentication key by decrypting the ciphertext 2 using the sharing key after receiving the input sharing key. The electronic device 200 can obtain the card information of the specified NFC card by decrypting the ciphertext 1 using the authentication key. The electronic device 200 can open the specified NFC card based on the data of the specified NFC card. In this way, the electronic device 100 that has opened the specified NFC card can receive the input of the user and share the data of the specified NFC card to other electronic devices. The electronic device 200 can open the specified NFC card based on the data shared by the electronic device 100, which is more convenient. The electronic device 200 that has opened the specified NFC card can complete the NFC service corresponding to the specified NFC card after turning on the NFC function and moving into the radio frequency field generated by the PCD when approaching the card swiping area of the corresponding PCD.
[0134] In some examples, the authentication password is also stored in the private file of the specified NFC card of the electronic device 100, and the authentication password corresponds to the card information of the specified NFC card and the authentication key. After receiving the input of sharing the specified NFC card to the electronic device 200, the electronic device 100 can display prompt information 3, which can be used to prompt the user to input the authentication password. After receiving the input authentication password, the electronic device 100 can determine whether to continue to perform the operation of sharing the specified NFC card to the electronic device 200 based on the stored authentication password and the authentication password input by the user. In this way, the electronic device 100 can verify whether the user can share the specified NFC card to other electronic devices through the authentication password. For example, when the administrator who opens the specified NFC card for the electronic device 100 allows the user to share the specified NFC card to other electronic devices, the administrator can inform the user of the electronic device 100 of the authentication password, so that the user of the electronic device 100 can send the content of the private file of the specified NFC card stored by the electronic device 100 to other electronic devices through the authentication password. When the administrator who opens the specified NFC card for the electronic device 100 does not allow the user to share the specified NFC card to other electronic devices, the administrator can not inform the user of the electronic device 100 of the authentication password.
[0135] For example, after the electronic device 100 receives the authentication password input by the user, the electronic device 100 can generate a first check value based on the authentication password. The SE 103 or the SIM card 104 of the electronic device 100 can generate a second check value based on the stored authentication password. When the electronic device 100 determines that the first check value and the second check value are the same, the electronic device 100 can continue to perform the operation of sharing the specified NFC card (for example, display prompt information 1 for prompting the user to input the sharing key). When the electronic device 100 determines that the first check value and the second check value are different, the electronic device 100 cancels the sharing of the specified NFC card.
[0136] It should be noted that the electronic device 100 can determine whether the stored authentication password of the specified NFC card and the authentication password received by the electronic device 100 are the same after receiving the authentication password input by the user, which is not limited to determining whether to continue to perform the operation of sharing the specified NFC card through the first check value and the second check value. The electronic device 100 can continue to perform the operation of sharing the specified NFC card when it is determined that the stored authentication password and the authentication password received by the electronic device 100 are the same, and the embodiments of the present application are not limited thereto.
[0137] Optionally, the electronic device 100 may display a failure message when it determines that the first verification value and the second verification value are different, or when it determines that the stored authentication password is different from the authentication password received by the electronic device 100. The failure message can be used to inform the user that sharing the specified NFC card failed and / or the authentication password is incorrect. In this way, the electronic device 100 can indicate that the operation of sharing the specified NFC card has failed, making it easier for the user to find the reason for the failure.
[0138] In some examples, electronic device 100 can store data from one or more NFC emulator cards using a file tree structure. 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 elementary files (EF). Each 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 (EFs) used to store card information, as well as authentication keys corresponding to one or more card information entries (EFs). The authentication keys corresponding to different card information entries (EFs) within the same DF may be the same or different.
[0139] The dedicated file can be used to store the data of the NFC simulation card. The NFC simulation card data may include one or more of the following: card information, authentication key, authentication password, etc. Card information may include one or more of the following: access control information, key information, transaction account information, electronic ticket information, validity period information, etc. 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 NFC simulation card corresponding to the PICC. In other examples, the NFC simulation card data may include one or more of the following: card information, authentication key, authentication password, and validity period information, etc. Card information may include one or more of the following: access control information, key information, transaction account information, electronic ticket information, etc.
[0140] For example, such as Figure 3C As shown, the NFC-enabled analog cards activated on electronic device 100 can include access cards for community A, access cards for community B, Shenzhen Tong transportation cards, and home door lock key cards. The MF directory can store the following keys: key EF1, Applet identity public key EF, Applet identity private key EF, mapping table EF, DF1, DF2, DF3, and DF4. Among them:
[0141] 1. The key EF1 can include a master key and a maintenance key. The master key in the key EF1 can be used for encryption and decryption when data in the key EF1 is updated. The maintenance key in the key EF1 can be used for encryption and decryption when data in the Applet identity public key EF, the Applet identity private key EF and the mapping table EF is updated.
[0142] 2. The Applet identity private key EF can be used to store one or more Applet identity private keys.
[0143] 3. The Applet identity public key EF can be used to store one or more Applet identity public keys.
[0144] 4. The mapping table EF can be used to indicate a mapping relationship between device feature information and the identity of the DF. The device feature information can be used to identify an NFC card reading device. After receiving the device feature information sent by the NFC card reading device, the electronic device 100 can determine the NFC emulation card corresponding to the NFC card reading device from one or more NFC emulation cards according to the device feature information. For example, the device feature information 1 corresponds to the DF1, which can be used to store the data of the access control card of the A cell. The device feature information 2 corresponds to the DF2, which can be used to store the data of the access control card of the B cell. The device feature information 3 corresponds to the DF3, which can be used to store the data of the Shenzhen Tong traffic card. The device feature information 4 corresponds to the DF4, which can be used to store the data of the home door lock key card.
[0145] 5、The DF1 stores a key EF11, device feature information EF12, a file permission list EF13, and X card information EFs. X is a positive integer. The key EF11 can include one or more of a master key, a maintenance key, X authentication keys, an authentication password, etc. The master key in the key EF11 can be used for encryption and decryption when data in the key EF11 is updated. The maintenance key in the key EF11 can be used for encryption and decryption when data in the device feature information EF12, the file permission list EF13, and the X card information EFs in the DF1 is updated. The X authentication keys in the DF1 correspond to the X card information EFs in the DF1, and one authentication key corresponds to one card information EF. Different card information EFs in the DF1 can correspond to the same or different authentication keys. For example, the DF1 can include a card information EF storing card information 1 and a card information EF storing card information 2. The card information 1 can be used to open the access control of a building in a cell A, and the card information 2 can be used to open the access control of two buildings in the cell A. The authentication password can be used for the electronic device 100 to verify when sharing the data of the NFC emulation card corresponding to the DF1. The device feature information EF12 can be used to store the device feature information corresponding to the DF1. The file permission list EF13 can be used to indicate the read and write permissions of the X card information EFs in the DF1. Optionally, the card information EF can include valid period information, which can indicate the valid period of the card information stored in the card information EF. Alternatively, the key EF11 can include X valid period information, and the X valid period information in the DF1 corresponds to the X card information EFs in the DF1, and one valid period information corresponds to one card information EF. The valid period information can be used to indicate the valid period of the corresponding card information.
[0146] 6、The DF2 stores a key EF21, device feature information EF22, a file permission list EF23 and Y card information EFs. Y is a positive integer. Among them, the key EF21 can include a master key, a maintenance key and Y authentication keys. The master key in the key EF21 can be used for encryption and decryption when updating the data in the key EF21. The maintenance key in the key EF21 can be used for encryption and decryption when updating the data of the device feature information EF22, the file permission list EF23 and the Y card information EFs in the DF2. The Y authentication keys in the DF2 correspond to the Y card information EFs in the DF2, and one authentication key corresponds to one card information EF, wherein the authentication keys corresponding to different card information EFs in the DF2 can be the same or different. For example, the DF2 can include a card information EF storing card information 3, wherein the card information 3 can be used to open all access control in the B cell. The authentication password can be used for the electronic device 100 to verify when sharing the data of the NFC analog card corresponding to the DF2. The device feature information EF22 can be used to store the device feature information corresponding to the DF2. The file permission list EF23 can be used to indicate the read and write permissions of the Y card information EFs in the DF2. Optionally, the card information EF can include valid period information, which can indicate the valid period of the card information stored in the card information EF. Alternatively, the key EF21 can include Y valid period information, and the Y valid period information in the DF2 corresponds to the Y card information EF in the DF2, and one valid period information corresponds to one card information EF.
[0147] 7. The DF3 stores a key EF31, device feature information EF32, a file permission list EF33 and L card information EFs. L is a positive integer. The key EF31 can include a master key, a maintenance key and L authentication keys. The master key in the key EF31 can be used for encryption and decryption when the data in the key EF31 is updated. The maintenance key in the key EF31 can be used for encryption and decryption when the data in the device feature information EF32, the file permission list EF33 and the L card information EFs in the DF3 is updated. The L authentication keys in the DF3 correspond to the L card information EFs in the DF3, one authentication key corresponding to one card information EF, wherein the authentication keys corresponding to different card information EFs in the DF3 can be the same or different. For example, the DF3 can include a card information EF storing card information 4, wherein the card information 4 can be used for payment of public transportation in Shenzhen. An authentication password can be used for the electronic device 100 to verify when sharing the data of the NFC emulation card corresponding to the DF3. The device feature information EF32 can be used to store the device feature information corresponding to the DF3. The file permission list EF33 can be used to indicate the read and write permissions of the L card information EFs in the DF3. Optionally, the card information EF can include valid period information, which can indicate the valid period of the card information stored in the card information EF. Alternatively, the key EF31 can include L valid period information, the L valid period information in the DF3 corresponding to the L card information EFs in the DF3, one valid period information corresponding to one card information EF.
[0148] 8. The DF4 stores a key EF41, device feature information EF42, a file permission list EF43, and M card information EFs. M is a positive integer. The key EF41 can include a master key, a maintenance key, and M authentication keys. The master key in the key EF41 can be used for encryption and decryption when data in the key EF41 is updated. The maintenance key in the key EF41 can be used for encryption and decryption when data in the device feature information EF42, the file permission list EF43, and the M card information EFs in the DF4 is updated. The M authentication keys in the DF4 correspond to the M card information EFs in the DF4, and one authentication key corresponds to one card information EF. Different card information EFs in the DF4 can correspond to the same or different authentication keys. For example, the DF4 can include a card information EF storing card information 5, and the card information 5 can be used to open a door lock of a home. An authentication password can be used for the electronic device 100 to verify when sharing data of an NFC analog card corresponding to the DF5. The device feature information EF42 can be used to store device feature information corresponding to the DF4. The file permission list EF43 can be used to indicate read and write permissions of the M card information EFs in the DF4. Optionally, the card information EF can include valid period information, which can indicate a valid period of card information stored in the card information EF. Alternatively, the key EF41 can include M valid period information, and the M valid period information in the DF4 correspond to the M card information EFs in the DF4, and one valid period information corresponds to one card information EF.
[0149] The above Figure 3C The examples shown above are only used to explain the present application and should not be construed as limiting the present application.
[0150] In some examples, the service processing logic of the NFC analog card in the electronic device 100 is implemented by a small program (Applet). The Applet can be stored and run in a hardware device or a software module (e.g., the NFC module 102, the HCE application, the SIM card, the SE, etc.) corresponding to the NFC analog card. Since one or more NFC analog cards are opened on the electronic device 100, there can be one or more Applets on the electronic device 100. One NFC analog card corresponds to one Applet.
[0151] An Applet corresponds to a master file (MF), and different Applets correspond to different MFs. Therefore, after the first Applet is determined, the NFC module 102 can obtain the MF of the first Applet through the first Applet. If the MF of the first Applet includes a DF, the DF is the first DF corresponding to the first NFC simulation card. If the MF of the first Applet includes multiple DFs, the MF of the first Applet can further include a first mapping table, where the first mapping table is used to indicate the mapping relationship between the 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 simulation card according to the device feature information of the NFC card reading device and the first mapping table.
[0152] The electronic device 100 can store data of one or more NFC simulation cards in the form of a file tree. The data of the NFC simulation card can include device feature information, keys, permission information, and the like associated with the NFC simulation card. The file tree can include a master file (MF), a dedicated file (DF), and an elementary file (EF). The directory of the MF can store one or more EFs and one or more DFs, and the directory of each DF can store one or more EFs. One NFC simulation card corresponds to one DF, and different NFC simulation cards correspond to different DFs. Since one NFC simulation card can correspond to one or more card information, one DF can store one or more card information EFs (for example, one DF can store up to 8 card information EFs, and the data length of each card information EF can be 4 bytes) for storing card information and authentication keys corresponding to the one or more card information EFs. The authentication keys corresponding to different card information EFs in the same DF are the same or different.
[0153] For example, the NFC simulation cards opened on the electronic device 100 can include an A-cell access card, a B-cell access card, a Shenzhen Tong traffic card, and a home door lock key card. Since all the access cards can correspond to the same Applet, the card information of the A-cell access card and the card information of the B-cell access card can be placed in different DFs in MF1. The Shenzhen Tong traffic card corresponds to another Applet, and therefore the card information of the Shenzhen Tong traffic card can be placed in a DF in MF2, and the DF includes the authentication password of the Shenzhen Tong traffic card. The home door lock key card corresponds to a separate Applet, and therefore the card information of the home door lock key card can be placed in a DF in MF3, and the DF includes the authentication password of the home door lock key card.
[0154] As an example, as shown in FIG. 1, the electronic device 100 can include the key EF1, the Applet identity public key EF, the Applet identity private key EF, the mapping table EF, the DF1, the DF2 and the DF3. Figure 3D
[0155] 1. The key EF1 can include a master key and a maintenance key. The master key in the key EF1 can be used for encryption and decryption when data in the key EF1 is updated. The maintenance key in the key EF1 can be used for encryption and decryption when data in the Applet identity public key EF, the Applet identity private key EF and the mapping table EF is updated.
[0156] 2. The Applet identity private key EF can be used to store one or more Applet identity private keys used by one or more Applets.
[0157] 3. The Applet identity public key EF can be used to store one or more Applet identity public keys used by one or more Applets.
[0158] 4. The mapping table EF can be used to store the first mapping table described above, which indicates the mapping relationship between the device feature information and the identity of the DF. For example, the device feature information 1 corresponds to the DF1, which can be used to store the data of the access card of the A cell. The device feature information 2 corresponds to the DF2, which can be used to store the data of the access card of the B cell.
[0159] 5. The DF1 stores the key EF11, the device feature information EF12, the file permission list EF13 and X card information EF. X is a positive integer. The key EF11 can include a master key, a maintenance key, X authentication keys and an authentication password. The master key in the key EF11 can be used for encryption and decryption when data in the key EF11 is updated. The maintenance key in the key EF11 can be used for encryption and decryption when data in the device feature information EF12, the file permission list EF13 and the X card information EF in the DF1 is updated. The X authentication keys in the DF1 correspond to the X card information EF in the DF1, one authentication key corresponding to one card information EF, wherein the authentication keys corresponding to different card information EF in the DF1 can be the same or different. For example, the DF1 can include the card information EF storing the card information 1 and the card information EF storing the card information 2, wherein the card information 1 can be used to open the access of a building in the A cell, and the card information 2 can be used to open the access of two buildings in the A cell. The authentication password can be used for the electronic device 100 to verify when sharing the data of the NFC analog card corresponding to the DF1. The device feature information EF12 can be used to store the device feature information corresponding to the DF1. The file permission list EF13 can be used to indicate the read and write permissions of the X card information EF in the DF1.
[0160] 6. The DF2 stores a key EF21, device feature information EF22, a file permission list EF23, and Y card information EFs. Y is a positive integer. The key EF21 can include a master key, a maintenance key, Y authentication keys, and an authentication password. The master key in the key EF21 can be used for encryption and decryption when data in the key EF21 is updated. The maintenance key in the key EF21 can be used for encryption and decryption when data in the device feature information EF22, the file permission list EF23, and the Y card information EFs in the DF2 is updated. The Y authentication keys in the DF2 correspond to the Y card information EFs in the DF2, and one authentication key corresponds to one card information EF. Different card information EFs in the DF2 can correspond to the same or different authentication keys. For example, the DF2 can include a card information EF that stores card information 3, and the card information 3 can be used to open all access control in the B cell. The authentication password can be used for the electronic device 100 to verify when sharing data of the NFC emulation card corresponding to the DF2. The device feature information EF22 can be used to store device feature information corresponding to the DF2. The file permission list EF23 can be used to indicate read and write permissions of the Y card information EFs in the DF2.
[0161] The above Figure 3D The examples shown above are only used to explain the present application and should not be construed as limiting the present application.
[0162] If the MF corresponding to the first Applet is MF1, the first Applet can obtain a first mapping list from the mapping list EF of the MF1 shown above after obtaining the device feature information of the NFC card reading device from the NFC module 102 or the application. Then, the first Applet can determine the first DF corresponding to the first NFC emulation card according to the device feature information of the NFC card reading device and the first mapping list. Figure 3D
[0163] In one possible implementation, the electronic device 100 logs in a first account, and the electronic device 200 logs in a second account. After the electronic device 100 receives an input of sharing a specified NFC card to the electronic device logging in the second account, the electronic device 100 sends data of the specified NFC card to the electronic device logging in the second account. The accounts logged in by the electronic device 100 and the electronic device 200 can be accounts of specified applications (for example, a wallet application, a Huawei account application, an instant messaging application, etc.) of the electronic device. In this way, the electronic device 100 can share the specified NFC card to the electronic device 200 through the account logged in by the electronic device 200, so that the user can share the specified NFC card more conveniently.
[0164] Specifically, the electronic device 100 can display prompt information 1 after receiving an input of sharing the specified NFC card to an electronic device (e.g., the electronic device 200) logged in a second account. The prompt information 1 can be used to prompt the user to input a sharing key. The electronic device 100 can encrypt the card information of the specified NFC card using the authentication key to obtain ciphertext 1 after receiving the sharing key input by the user. The electronic device 100 can encrypt the authentication key using the sharing key to obtain ciphertext 2. The electronic device 100 can send the ciphertext 1 and the ciphertext 2 to the electronic device 200 logged in the second account through the server 300. The server 300 is a server of a specified application that provides the first account and the second account. The electronic device 200 can display prompt information 2 after receiving the ciphertext 1 and the ciphertext 2. The prompt information 2 can be used to prompt the user to input a sharing key. The electronic device 200 can decrypt the ciphertext 2 using the sharing key to obtain the authentication key after receiving the input sharing key. The electronic device 200 can decrypt the ciphertext 1 using the authentication key to obtain the card information of the specified NFC card. The electronic device 200 can open the specified NFC card based on the card information of the specified NFC card.
[0165] In some examples, the electronic device 100 can display one or more account options after receiving an input of sharing the specified NFC card. The account options can be used to trigger the electronic device 100 to share the specified NFC card to an electronic device logged in an account indicated by the account options. The one or more account options include an account option used to indicate the electronic device logged in the second account. Here, the input of sharing the specified NFC card to the electronic device 200 can be understood as an input to the account option of the second account.
[0166] In some examples, the server 300 receives the ciphertext 1 and the ciphertext 2 sent to the electronic device logged in the second account, and determines that the number of electronic devices logged in the second account is greater than 1. The server 300 can send the ciphertext 1 and the ciphertext 2 to all electronic devices logged in the second account. Alternatively, the server 300 can determine whether the electronic devices logged in the second account support NFC function. The server 300 can send the ciphertext 1 and the ciphertext 2 to the electronic devices logged in the second account and supporting NFC function. The multiple electronic devices logged in the second account can display prompt information 2 after receiving the ciphertext 1 and the ciphertext 2. An electronic device logged in the second account can obtain the card information of the specified NFC card based on the sharing key, the ciphertext 1 and the ciphertext 2 after receiving the sharing key input by the user. The electronic device can open the specified NFC card based on the card information of the specified NFC card. In this way, when the multiple electronic devices logged in the second account receive the NFC card shared by the electronic device 100 logged in the first account, the user can select an electronic device from the multiple electronic devices logged in the second account to receive the NFC card.
[0167] Optionally, the plurality of electronic devices logged in the second account display prompt information for prompting whether to receive the data of the specified NFC card after receiving the data of the specified NFC card. The electronic device 200 logged in the second account displays prompt information 2 after receiving the input of the user receiving the data of the NFC card. In this way, the user can select an electronic device to receive the data of the NFC card. Optionally, the plurality of electronic devices logged in the second account display prompt information for prompting whether to receive the data of the specified NFC card within a preset display time length (for example, 5 seconds) after receiving the data of the specified NFC card. In this way, the electronic devices not selected by the user can cancel the display of the prompt information after the preset display time length, and do not affect the use of the electronic devices not selected by the user.
[0168] In some examples, the server 300 can notify the plurality of electronic devices logged in the second account that the electronic device 100 shares the specified NFC card after receiving the data of the specified NFC card sent to the electronic device logged in the second account. The plurality of electronic devices logged in the second account can display prompt information for prompting whether to receive the data of the specified NFC card after receiving the notification message. One or more electronic devices logged in the second account display prompt information 2 after receiving the input of the user receiving the data of the NFC card, and obtain the data of the specified NFC card from the server 300. In this way, the server 300 can share the specified NFC card to the plurality of electronic devices.
[0169] In other examples, the server 300 can send the data of the specified NFC card to the electronic device that sends the message for indicating receiving the specified NFC card to the server 300 earliest after receiving the message for indicating receiving the specified NFC card sent by the plurality of electronic devices logged in the second account. In this way, only one electronic device logged in the second account can receive the data of the specified NFC card among the plurality of electronic devices, and it can be avoided that too many electronic devices obtain the specified NFC card, and the security of the specified NFC card is ensured.
[0170] Next, a set of interface schematic diagrams provided by the embodiments of the present application are introduced.
[0171] For example, Figure 4AAs shown, 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.
[0172] If an NFC-enabled electronic device 100 is placed by a user within the card-swiping area of an access control device 500, and the access control device 500 is a PCD (Personal Control Device), when the electronic device 100 has its NFC function enabled and is in PICC mode, the electronic device 100 can simulate the corresponding PICC based on a stored specified NFC card to implement PICC services. The following example, using a specified NFC card and its corresponding PICC as the access control card, illustrates the steps for the electronic device 100 to share the specified NFC card. It is understood that using a specified NFC card and its corresponding PICC as the access control card is merely an example and should not constitute a specific limitation on the specified NFC card.
[0173] When electronic device 100 simulates an access card and is placed near the card reader of access control device 500, it can trigger access control device 500 to switch from a closed state to an open state, allowing the user holding electronic device 100 to pass through access control device 500. Furthermore, electronic device 100 can also display... Figure 4B The interface shown is 410. (As shown) Figure 4B As shown, interface 410 includes a card icon 411, which indicates that electronic device 100 is simulating an access control card. Optionally, interface 410 may also include a prompt message 412, which can be used to notify the user that the access control device 500 has been successfully opened by electronic device 100.
[0174] Electronic device 100 can receive user input Figure 4A After inputting the wallet application icon 402 as shown, in response to that input, the following will be displayed: Figure 4C The interface shown is 420. (As shown) Figure 4C As shown, interface 420 includes one or more icons, which can be used to trigger electronic device 100 to display the interface corresponding to the icon. These icons may include a wallet icon 421, a payment icon, a ride icon, and a door open icon, etc.
[0175] Upon receiving input from a user for the wallet icon 421, the electronic device 100 can respond to the input by displaying, as shown below. Figure 4D The interface shown is 430. (As shown) Figure 4D As shown, interface 430 includes one or more card options. These card options can be used to represent NFC analog cards that have been added or are to be added by the electronic device 100. For example, these card options may include, but are not limited to, card option 431. Card option 431 can represent an NFC analog card corresponding to an access control card that has already been added to the electronic device 100.
[0176] Electronic device 100 can receive user input Figure 4D After inputting the card option 431 shown, in response to that input, the following is displayed: Figure 4E The interface shown is 440. (As shown) Figure 4E As shown, interface 440 includes a card icon 441, which indicates that electronic device 100 has activated an access control card. Interface 440 also includes one or more functional controls that can be used to manage access control cards. For example, these one or more functional controls may include, but are not limited to, a card swipe control, a share control 442, a set as default card control, a delete control, etc. The card swipe control can be used to trigger electronic device 100 to simulate an access control card, allowing users to use electronic device 100 to access access control device 500. The edit control can be used to trigger electronic device 100 to display an interface for editing access control cards; for example, this interface can provide functions such as modifying the name of the access control card and the color of the card icon 441. The set as default card control can be used to set the access control card as the default card. After setting the access control card as the default card, when electronic device 100 with NFC enabled comes into contact with an NFC card reader (e.g., access control device 500), it can first simulate the access control card. The delete control can be used to delete an access control card.
[0177] Electronic device 100 can receive user input Figure 4E After input is received into the sharing control 442 shown, in response to that input, the following is displayed: Figure 4F The interface shown is 450. (As shown) Figure 4FAs shown, interface 450 includes a sharing account list 451. The sharing account list 451 includes one or more account options. These one or more account options include account option 451A. Account option 451A can be used to trigger electronic device 100 to share an access card to the device with the account "Alan". Optionally, interface 450 may also include a search control (not shown in the figure), which can be used to trigger electronic device 100 to display search prompts. These prompts can prompt the user to enter account information (e.g., account name, nickname, or mobile phone number). After receiving the account information entered by the user, electronic device 100 can share the specified NFC card to the electronic device indicated by that account information. This allows the user to more quickly identify the electronic device to be shared with.
[0178] Electronic device 100 can receive user input Figure 4F After entering account option 451A as shown, in response to that input, the following will be displayed: Figure 4G The interface shown is 460 degrees. (As shown) Figure 4G As shown, interface 460 includes an input box 461, a confirmation control 462, and a prompt message 463. The input box 461 can be used to input a sharing key. The confirmation control 462 can be used to trigger the electronic device 100 to use the content in the input box 461 as the sharing key. The prompt message 463 can be used to prompt the user to enter the sharing key in the input box 461. The prompt message 463 can include, but is not limited to, one or more of text-based prompts, image-based prompts, and voice-based prompts. For example, prompt message 463 includes the text-based prompt message: "Before sharing the card to 'Alan' devices, please enter the key to encrypt the card to ensure card security."
[0179] Electronic device 100 can receive user input Figure 4G After the user enters content into input box 461, the system receives input from the user into confirmation control 462. Electronic device 100 can then display, for example... Figure 4H The interface shown is 470. (As shown) Figure 4H As shown, interface 470 may include a prompt message 471, which can be used to inform the user that electronic device 100 is sharing an access card to electronic device 200 indicated by account option 451A. For example, prompt message 471 may include, but is not limited to, a text-based prompt message: "Sharing card to 'Alan's' device." Specifically, electronic device 100 may, in response to the user's input to confirmation control 462, obtain the sharing key and display, as shown... Figure 4HThe interface 470 shown. The electronic device 100 can encrypt the card information of the specified NFC card (i.e., the access card) using the authentication key to obtain ciphertext 1. The electronic device 100 can encrypt the authentication key using the sharing key to obtain ciphertext 2. The electronic device 100 can send the ciphertext 1 and the ciphertext 2 to the electronic device 200 through the server 300.
[0180] The electronic device 100 displays the interface 470 as shown in Figure 4H , the electronic device 100 can display the interface 475 as shown in Figure 4I or the interface 440 as shown in Figure 4E after sending the ciphertext 1 and the ciphertext 2 to the electronic device 200 through the server 300. As shown in Figure 4H , the interface 475 includes prompt information 476, which can be used to prompt the user that the electronic device 100 has shared the specified NFC card to the electronic device 200.
[0181] In some examples, when the electronic device 100 displays the interface 470 as shown in Figure 4H , if the electronic device 200 successfully opens the NFC simulation card corresponding to the access card after receiving the ciphertext 1 and the ciphertext 2. The electronic device 200 can notify the electronic device 100 that the sharing of the access card is successful through the server 300. After receiving the notification indicating that the electronic device 100 successfully shares the access card, the electronic device 100 displays the interface 475 as shown in Figure 4I or the interface 440 as shown in Figure 4E . If the electronic device 200 fails to open the access card (for example, the electronic device 200 receives an input of the user refusing to receive the access card), the electronic device 200 can notify the electronic device 100 that the sharing of the access card fails through the server 300. The electronic device 100 can display prompt information prompting the user that the sharing of the access card fails. In this way, the electronic device 100 can display corresponding content according to whether the electronic device 200 successfully opens the access card, so that the user of the electronic device 100 can know the result of sharing the card.
[0182] In some examples, the electronic device 100 can verify whether the electronic device 100 can share the specified NFC card to other electronic devices through the authentication password of the specified NFC card. For details, please refer to the above embodiments. In this way, the electronic device 100 needs the user to know the authentication password, and can only perform the operation of sharing the specified NFC card, thereby reducing the probability of data leakage of the specified NFC card.
[0183] For example, the electronic device 100 receives an input to the sharing control 442 as shown in Figure 4E , and in response to the input, displays the interface 480 as shown in Figure 4J . As shown in Figure 4JAs shown, interface 480 includes an input box 481, a prompt message 482, and a confirmation control 483. The input box 481 can be used to input an authentication password. The prompt message 482 can be used to prompt the user to enter an authentication password. For example, the prompt message 482 may include, but is not limited to, text-based prompts such as "Please enter your authentication password" and "To ensure card security, please enter the card's authentication password before sharing it with other users." The confirmation control 483 can be used to trigger electronic device 100 to perform the operation of sharing the access card based on the authentication password in input box 481. Specifically, the steps for electronic device 100 to verify the authentication password can be found in the above embodiment and will not be repeated here.
[0184] Electronic device 100 receives user's... Figure 4J After the authentication password is entered in the input box 481 shown, the system receives the user's authentication password. Figure 4J The confirmation control 483 shown is for input. The electronic device 100 can determine whether the authentication password entered by the user is the same as the stored authentication password. When the electronic device 100 confirms that the authentication password entered by the user is the same as the stored authentication password, it can display the following: Figure 4F The interface shown is 450.
[0185] It should be noted that this is not limited to receiving [the information / resources]. Figure 4E After input is received into the sharing control 442 shown, in response to that input, the following is displayed: Figure 4J The interface shown is 480. Electronic device 100 can also receive... Figure 4F After entering the account option 451A as shown, the following will be displayed: Figure 4J The interface 480 shown is not limited in this embodiment of the application.
[0186] In some examples, the data shared by electronic device 100 with a designated NFC card to electronic device 200 includes expiration information. This expiration information can be used to indicate the duration (i.e., validity period) for which the electronic device receiving the card information of the designated NFC card can use the designated NFC card. Specifically, electronic device 100 can display an expiration prompt after receiving input to share the designated NFC card. This expiration prompt can be used to prompt the user to set the expiration period of the shared designated NFC card (e.g., unlimited duration, 1 day, 1 week, 1 month, etc.). After receiving input from the user to set the expiration period, electronic device 100 can set the expiration period information of the shared designated NFC card. Electronic device 100 can send the card information and expiration information of the designated NFC card to electronic device 200. In this way, electronic device 100 can limit the swiping duration of the designated NFC card shared with other electronic devices by setting the expiration period.
[0187] In this embodiment, electronic device 100 can send an EF containing card information and expiration information to electronic device 200. Alternatively, electronic device 100 can send an EF containing card information and an EF containing expiration information to electronic device 200.
[0188] For example, if electronic device 100 shares a specified NFC card with electronic device 200, it sets an expiration date for the specified NFC card. When electronic device 200 simulates the specified NFC card, it sends the card information and expiration date information to the PCD. The PCD can detect whether the card is currently within its validity period based on the expiration date information. If the PCD determines that the card is currently within its validity period, it can complete the NFC service corresponding to the card information. If the PCD determines that the card is not currently within its validity period, it can notify electronic device 200 that the card swipe failed, or it can choose not to respond to electronic device 200.
[0189] For example, electronic device 100 can receive user input... Figure 4F After inputting account option 451A as shown, the system responds to that input by displaying the following: Figure 4K The interface shown is 490. (As shown) Figure 4K As shown, interface 490 includes a prompt message 491, a time setting icon 492, and a confirmation control 493. The prompt message 491 prompts the user to set the validity period of the shared NFC card. For example, the prompt message 491 may include a text message such as "Please set the expiration date for sharing the card." The time setting icon 492 is used to set the validity period. For example, the time setting icon 492 may include multiple time items, each with its own validity period. The time setting icon 492 can accept user swipe input to switch between different time items. The confirmation control 493 triggers the electronic device 100 to confirm the validity period indicated by the time setting icon 492. The electronic device 100 can add validity period information indicating this validity period to the card information of the specified NFC card. Here, interface 490 can be referred to as the validity period setting interface.
[0190] Afterwards, electronic device 100 can receive user input... Figure 4K Upon input of the confirmation control 493 shown, in response to the input, the following is displayed: Figure 4G The interface shown is 460.
[0191] It should be noted that this is not limited to receiving [the information / resources]. Figure 4F After inputting account option 451A as shown, the system responds to that input by displaying the following: Figure 4K The interface shown is 490. Electronic device 100 can also receive... Figure 4G After inputting the confirmation control 462 shown, the following will be displayed: Figure 4KThe interface 490 shown in the figure is not limited by the embodiments of the present application.
[0192] In some examples, the electronic device 100 can display a sharing permission prompt information after receiving the input of sharing the specified NFC card. The sharing permission prompt information can be used to prompt the user to set the sharing permission of the shared specified NFC card (for example, allowing sharing to other electronic devices, not allowing sharing to other electronic devices, etc.). When the electronic device 100 shares the specified NFC card to the electronic device 200, the electronic device 100 can receive the input of the user to set whether the electronic device 200 can share the specified NFC card to other electronic devices. In this way, the scenario that the electronic device 200 randomly shares the specified NFC card to other electronic devices can be avoided, and the security of the specified NFC card is protected.
[0193] For example, the electronic device 100 can set the sharing permission of the shared specified NFC card through the authentication password. Specifically, when the electronic device 100 receives the input of the user setting the sharing permission of the shared specified NFC card as not allowing sharing to other electronic devices, the electronic device 100 can not send the authentication password of the specified NFC card to the electronic device 200. In this way, after the electronic device 200 receives the input of sharing the specified NFC card to other electronic devices, since the electronic device 200 does not store the authentication password, the electronic device 200 cannot perform the operation of sending the content of the private file of the specified NFC card to other electronic devices.
[0194] Similarly, when the electronic device 100 receives the input of the user setting the sharing permission of the shared specified NFC card as allowing sharing to other electronic devices, the electronic device 100 can send the authentication password of the specified NFC card to the electronic device 200. It can be understood that the electronic device 100 can encrypt the authentication password and the card information using the authentication key to obtain ciphertext 1, so that the electronic device 200 can obtain the authentication password. In this way, after the electronic device 200 receives the input of sharing the specified NFC card to other electronic devices, since the electronic device 200 stores the authentication password and the authentication password is readable, the electronic device 200 can perform the operation of sharing the specified NFC card after verifying the authentication key input by the user.
[0195] For example, the electronic device 100 determines that the received authentication password and the stored authentication password are the same, and specifically, the above embodiments can be referred to. Then, the electronic device 100 can receive the input of the user to the confirmation control 462 after receiving the content input by the user in the input box 461. Figure 4G The electronic device 100 can display the interface 495 shown in the figure in response to the input of the confirmation control 462. Figure 4L The electronic device 100 can display the interface 495 shown in the figure in response to the input of the confirmation control 462. Figure 4LAs shown, the interface 495 can include, but is not limited to, a prompt information 496, an allow control 497 and a reject control 498. The prompt information 496 can be used to prompt the user to set the sharing permission of the shared specified NFC card. For example, the prompt information 496 can include a text prompt information: "Do you allow 'Alan' to share the access card to other users?". The allow control 497 can be used to trigger the electronic device 100 to set the sharing permission of the shared specified NFC card as the permission of allowing sharing to other electronic devices. The reject control 498 can be used to trigger the electronic device 100 to set the sharing permission of the shared specified NFC card as the permission of not allowing sharing to other electronic devices. Here, the interface 495 can be referred to as a sharing permission setting interface.
[0196] After the electronic device 100 receives the input of the user on the allow control 497, the electronic device 100 can display an interface 470 as shown in Figure 4H The electronic device 100 can encrypt the card information of the specified NFC card using the authentication key to obtain ciphertext 1. The electronic device 100 can encrypt the authentication key using the sharing key to obtain ciphertext 2. The electronic device 100 can send the ciphertext 1 and the ciphertext 2 to the electronic device 200 through the server 300. In this way, the electronic device 200 can obtain the authentication password.
[0197] After the electronic device 100 receives the input of the user on the reject control 498, the electronic device 100 can display an interface 470 as shown in Figure 4H The electronic device 100 can encrypt the card information of the specified NFC card using the authentication key to obtain ciphertext 1. The electronic device 100 can encrypt the authentication key using the sharing key to obtain ciphertext 2. The electronic device 100 can send the ciphertext 1 and the ciphertext 2 to the electronic device 200 through the server 300. In this way, the electronic device 200 cannot obtain the authentication password.
[0198] It should be noted that, not limited to receiving the input of the user on the confirm control 462 as shown in Figure 4G in response to the input, displaying the interface 495 as shown in Figure 4L The electronic device 100 can also display the interface 495 as shown in Figure 4K after receiving the input of the user on the confirm control 493 as shown in Figure 4L and the like, which are not limited by the embodiments of the present application. In this way, the electronic device 100 can set the validity period and the sharing permission of the shared specified NFC card when sharing the specified NFC card.
[0199] In some examples, the data of the specified NFC card of the electronic device 100 further includes a sharing identifier. The sharing identifier can be used to indicate whether the electronic device has the permission to share the specified NFC card. The sharing identifier of the specified NFC card of the electronic device 100 can indicate that the electronic device 100 has the permission to share the specified NFC card.
[0200] After the electronic device 100 receives the input of sharing the specified NFC card, and receives the input of setting the sharing permission of the specified NFC card to be the permission of not allowing sharing to other electronic devices, the electronic device 100 can set the sharing identifier in the data of the specified NFC card sent to the electronic device 200 to be used to indicate that the electronic device 200 does not have the permission to share the specified NFC card. After the electronic device 200 opens the specified NFC card based on the data of the specified NFC card, the sharing identifier of the specified NFC card of the electronic device 200 can indicate that the electronic device 200 does not have the permission to share the specified NFC card. For example, the sharing identifier can be 1 bit. When the value of the sharing identifier is a first value (e.g., “0”), it can indicate that the electronic device to which the specified NFC card belongs has the permission to share the specified NFC card. When the value of the sharing identifier is a second value (e.g., “1”), it can indicate that the electronic device to which the specified NFC card belongs does not have the permission to share the specified NFC card.
[0201] After the electronic device 100 receives the input of sharing the specified NFC card, and receives the input of setting the sharing permission of the specified NFC card to be the permission of allowing sharing to other electronic devices, the electronic device 100 can set the sharing identifier in the data of the specified NFC card sent to the electronic device 200 to be used to indicate that the electronic device 200 has the permission to share the specified NFC card. After the electronic device 200 opens the specified NFC card based on the data of the specified NFC card, the sharing identifier of the specified NFC card of the electronic device 200 can indicate that the electronic device 200 has the permission to share the specified NFC card.
[0202] After the electronic device 200 receives the input of sharing the specified NFC card to other electronic devices, the electronic device 200 can determine whether to continue the operation of sharing the specified NFC card based on the sharing identifier of the specified NFC card. When the electronic device 200 determines that the sharing identifier of the specified NFC card is used to indicate the permission to share the specified NFC card, the electronic device 200 can continue the operation of sharing the specified NFC card. When the electronic device 200 determines that the sharing identifier of the specified NFC card is used to indicate the permission to share the specified NFC card, the electronic device 200 can stop the operation of sharing the specified NFC card. The electronic device 200 can further display prompt information for prompting the user that the user does not have the permission to share the specified NFC card.
[0203] In this way, when the electronic device 100 shares the designated NFC card, the electronic device 100 can set the sharing identifier in the data of the shared designated NFC card, so as to limit whether the electronic device receiving the designated NFC card can continue to share the designated NFC card.
[0204] In some examples, after the server 300 receives the ciphertext 1 and the ciphertext 2 sent to the electronic device 200, the server 300 can notify the electronic device 200 that the electronic device 100 shares the designated NFC card to the electronic device 200. After the electronic device 200 receives the message indicating that the electronic device 100 shares the designated NFC card to the electronic device 200, the electronic device 200 can display sharing prompt information. The sharing prompt information can be used to prompt the user that the electronic device 100 is sharing the designated NFC card to the electronic device 200. After the electronic device 200 receives the input of the user receiving the designated NFC card shared by the electronic device 100, the electronic device 200 can display prompt information 2. After the electronic device 200 receives the input of the user refusing to receive the designated NFC card shared by the electronic device 100, the electronic device 200 can delete the ciphertext 1 and the ciphertext 2. In this way, the user of the electronic device 200 can decide whether to open the designated NFC card by himself.
[0205] As shown in Figure 5A , the electronic device 200 displays a desktop 501. The desktop 501 can include a plurality of application icons (for example, a wallet application icon 502, and the like). Optionally, the desktop 501 further displays a status bar 503 above the desktop 501. The status bar 503 can include an NFC indicator 503A, an intensity indicator of a communication signal, a power value, a time, and the like. The NFC indicator 503A can be used to indicate that the electronic device 100 turns on the NFC function. For details, refer to the embodiment shown in Figure 4A , which will not be described here again.
[0206] The electronic device 200 can perform a card swiping process based on the opened NFC simulation card when the electronic device 200 approaches the card swiping area of the access control device 500. At this time, since the electronic device 200 does not open the access control card for passing through the access control device 500, the electronic device 200 fails to swipe the card, and the access control device 500 remains in a closed state. At this time, since the electronic device 200 does not open any NFC simulation card, the electronic device 200 can display an interface 510 as shown in Figure 5B . As shown in Figure 5B , the interface 510 includes an icon 511. The icon 511 can be used to prompt the user to add an access control card. Optionally, the icon 511 can further include an adding control. The adding control can be used to trigger the electronic device 100 to display an interface for adding an access control card.
[0207] The electronic device 200 displays an interface 520 as shown in Figure 5AWhen desktop 501 is displayed, a message sent by server 300 instructing electronic device 100 to share a specified NFC card with electronic device 200 is received, and the following can be displayed: Figure 5C The prompt box 521 is shown. (As shown) Figure 5C As shown, the prompt box 521 includes a prompt message 521A, a receive control 521B, and a reject control 521C. For details, please refer to the above embodiment, which will not be repeated here. For example, the prompt message 521A may include a text-based prompt message: "User 'Lily' is sharing her access card with you."
[0208] Electronic device 200 can receive user input Figure 5C Upon input to the rejection control 521C shown, the display of the prompt box 521 is canceled in response to the input. Electronic device 200 can also notify server 300 to refuse to receive data from the specified NFC card sent by electronic device 100. Server 300 can, upon receiving notification that electronic device 200 refuses to receive data sent by electronic device 100, notify electronic device 100 that electronic device 200 refuses to receive the shared data. Electronic device 100 can, upon receiving notification that electronic device 200 refuses to receive the shared data, display a prompt message indicating that the sharing of the specified NFC card has failed. Optionally, server 300 can, upon receiving notification that electronic device 200 refuses to receive data sent by electronic device 100, delete ciphertext 1 and ciphertext 2.
[0209] Electronic device 200 can receive user input Figure 5C After receiving input from the control 521B shown, in response to that input, the following is displayed: Figure 5D The prompt box shown is 525. (As shown in the image...) Figure 5D As shown, the prompt box 525 includes an input box 525A, a confirmation control 525B, and a prompt message 525C. The input box 525A can be used to input a sharing key. The confirmation control 525B can be used to trigger the electronic device 200 to use the content in the input box 525A as the sharing key. The prompt message 525C can be used to prompt the user to enter the sharing key; for example, the prompt message 525C may include a text prompt such as: "Please enter the key set by user 'Lily'". This avoids the situation where the user of electronic device 100 accidentally shares a specified NFC card to other electronic devices, and the other electronic devices directly receive the specified NFC card.
[0210] Electronic device 200 receives user's Figure 5D The sharing key is entered in input box 525A as shown. Afterwards, the electronic device 200 can receive the user's input... Figure 5D Upon input of the confirmation control 525B as shown, in response to the input, the following is displayed: Figure 5E The interface shown is 530. (As shown) Figure 5EAs shown, interface 530 can include, but is not limited to, prompt information 531, which can be used to prompt the user that the electronic device 200 is receiving the specified NFC card. For example, prompt information 531 can include text prompt information: "Receiving access card, please wait…". Optionally, interface 530 can also include a progress bar, which can be used to prompt the user of the progress of the electronic device 200 in opening the specified NFC card.
[0211] In some examples, the electronic device 100 can send the identification of the specified NFC card to the electronic device 200 when sending the ciphertext 1 and the ciphertext 2 to the electronic device 200 through the server 300, and the electronic device 200 can display the identification of the specified NFC card, so that the user of the electronic device 200 can understand the details of the card shared by the electronic device 100.
[0212] The electronic device 200 can receive the ciphertext 1 and the ciphertext 2 sent by the server 300 in the process of displaying the interface 530 as shown in Figure 5E The electronic device 200 can use the sharing key input by the user to decrypt the ciphertext 2 to obtain the authentication key. The electronic device 200 can use the authentication key to decrypt the ciphertext 1 to obtain the card information of the specified NFC card. The electronic device 200 can open the access card based on the authentication key and the card information. Specifically, the electronic device 200 can create a special file of the access card, and write the authentication key and the card information of the access card into the corresponding storage area of the special file. It can be understood that if the electronic device 100 sets the validity period of the specified NFC card, the card information of the specified NFC card also includes the validity period information. If the electronic device 100 sets the specified NFC card to have the permission to share the specified NFC card to other electronic devices, the electronic device 200 can use the authentication key to decrypt the ciphertext 1 to obtain the card information of the specified NFC card and the authentication password. The electronic device 200 can also write the authentication password into the special file of the access card.
[0213] After the electronic device 200 successfully opens the access card, the electronic device 200 can display the interface 540 as shown in Figure 5F The interface 540 can be used to prompt the user that the electronic device 200 has successfully opened the access card. As shown in Figure 5F The interface 540 can include prompt information 541. For example, the prompt information 541 can include text prompt information: "Receiving success". Optionally, the interface 540 can also include a completion control 542, which can be used to trigger the electronic device 200 to cancel the display of the interface 540. For example, the completion control 542 can be used to trigger the electronic device 200 to display the desktop 501 as shown in Figure 5A or display the interface 550 as shown in Figure 5G .
[0214] As shown in Figure 5GAs shown, interface 550 includes a card icon 551, which can be used to indicate that electronic device 200 has successfully activated the access control card. Optionally, interface 550 may also include one or more functional controls; for details, please refer to [link to documentation]. Figure 4E The embodiments shown are not described in detail here.
[0215] Optionally, when the data of the designated NFC card shared by the electronic device 100 includes an authentication password, the interface 550 may also include a sharing control. Figure 5G (Not shown in the image), the sharing control can be used to trigger electronic device 200 to share a specified NFC card. When the card information of the specified NFC card shared by electronic device 100 does not include an authentication password, interface 550 may also not include the sharing control. Alternatively, when the sharing control of interface 550 is triggered by the user, electronic device 200 may display a prompt message indicating that the user does not have sharing permissions. For example, electronic device 200 can obtain the stored authentication password after receiving user input to the sharing control. When electronic device 200 determines that it has not stored the authentication password for the specified NFC card, it may display a prompt message indicating that the user does not have sharing permissions.
[0216] Optionally, when the data received by the electronic device 200 from the specified NFC card includes a sharing identifier, if the sharing identifier indicates that the electronic device 200 has permission to share the specified NFC card, the electronic device 200 may display a sharing control. If the sharing identifier indicates that the electronic device 200 does not have permission to share the specified NFC card, the electronic device 200 may not display the sharing control. Alternatively, when the electronic device 200 displays the sharing control, the sharing control may be used to trigger the electronic device 200 to display a prompt message indicating to the user that it does not have permission to share the specified NFC card. In this way, the electronic device 200 can prompt the user whether or not they can share the specified NFC card through the sharing control.
[0217] In some examples, when the data of the specified NFC card shared by the electronic device 100 includes expiration information, the interface 550 may also include a prompt message 552, which can be used to prompt the user about the expiration date of the specified NFC card. For example, the prompt message 552 may include a text prompt message: "Expiration date: 1 day". It should be noted that the specific content of the prompt message 552 is only an example, and the electronic device 200 may also display a countdown timer including the expiration date of the specified NFC card, etc., which is not limited in this embodiment.
[0218] Optionally, the electronic device 200 displays, for example... Figure 5F When the interface 540 is shown, after receiving input from the user to return to the previous page (e.g., input sliding inward from the edge of the interface 540), the interface can respond to the input by displaying, as shown in the image. Figure 5G The interface shown is 550 or as followsFigure 5A Desktop 501 as shown. Alternatively, electronic device 100 can display, as shown in the image. Figure 5F When the preset display duration is reached, the interface 540 will display as shown below. Figure 5G The interface shown is 550 or as follows Figure 5A Desktop 501 is shown.
[0219] After successfully activating the access control card, when the electronic device 200 with NFC enabled comes into contact with the card reader area of the access control device 500, the electronic device 200 can display the following: Figure 5H The interface 560 shown is provided, and the access control device 500 can be switched from a closed state to an open state, allowing the holder of the electronic device 200 to access the device 500.
[0220] For example, such as Figure 5H As shown, interface 560 includes a card icon 561, which can indicate that electronic device 200 is simulating an access card shared by electronic device 100. Optionally, interface 560 may also include a prompt message 562, which can be used to notify the user that they have successfully opened access control device 500 through electronic device 200.
[0221] In other examples, after receiving ciphertext 1 and ciphertext 2 from server 300, electronic device 200 can display, as shown below. Figure 5C The prompt box 521 shown. Electronic device 200 can receive user input... Figure 5C Upon input to the rejection control 521C shown, the prompt box 521 is canceled in response to the input. Electronic device 200 can also notify electronic device 100 via server 300 that electronic device 200 refuses to receive shared data. Optionally, electronic device 200 can delete received ciphertext 1 and ciphertext 2.
[0222] Electronic device 200 can receive user input Figure 5C After receiving input from the control 521B shown, in response to that input, the following is displayed: Figure 5D The prompt box 525 shown is displayed. Electronic device 200 receives a message from the user... Figure 5D The sharing key is entered in input box 525A as shown. Afterwards, the electronic device 200 can receive the user's input... Figure 5D Upon input of the confirmation control 525B as shown, in response to the input, the following is displayed: Figure 5E The interface 530 shown is displayed. The electronic device 200 can display, for example... Figure 5EIn the process of the interface 530 shown, the ciphertext 2 is decrypted using the sharing key input by the user to obtain the authentication key. The electronic device 200 can decrypt the ciphertext 1 using the authentication key to obtain the card information of the specified NFC card. The electronic device 200 can open the access control card based on the authentication key and the card information.
[0223] In some other examples, the server 300 can send a message to the electronic device 200 to inform the electronic device 200 that the electronic device 100 is sharing the specified NFC card with the electronic device 200 before sending the data of the specified NFC card to the electronic device 200. After receiving the message, the electronic device 200 can display sharing prompt information. The sharing prompt information can be used to prompt the user of the electronic device 200 that the electronic device 100 is sharing the specified NFC card with the electronic device 200. The electronic device 200 can display prompt information 2 after receiving the input of the user accepting the specified NFC card shared by the electronic device 100. The electronic device 200 can inform the server 300 that the electronic device 200 refuses to accept the specified NFC card after receiving the input of the user refusing to accept the specified NFC card shared by the electronic device 100. The server 300 can cancel the operation of sending the data of the specified NFC card to the electronic device 200 after receiving the message sent by the electronic device 200 to refuse to accept the specified NFC card.
[0224] Optionally, the server 300 can also inform the electronic device 100 that the electronic device 200 refuses to accept the specified NFC card after receiving the message sent by the electronic device 200 to refuse to accept the specified NFC card. The electronic device 100 can display prompt information to prompt the user that the electronic device 200 refuses to accept the specified NFC card based on the information.
[0225] Next, the flowchart of the NFC analog card sharing method provided by the embodiments of the present application is introduced.
[0226] For example, as shown in the figure, Figure 6 The NFC analog card sharing method provided by the embodiments of the present application includes the following steps:
[0227] S601. The electronic device 100 logs in a first account and stores the data of a specified NFC card. The data of the specified NFC card includes the card information of the specified NFC card and an authentication key.
[0228] The electronic device 100 can simulate the specified NFC card and trigger the corresponding PCD to complete the NFC service based on the card information of the specified NFC card.
[0229] S602. The electronic device 200 logs in a second account.
[0230] In some examples, the first account and the second account are associated. For example, the first account and the second account being associated can mean that the first account and the second account are accounts of the same application. For another example, the first account and the second account being associated can mean that the contact list of the first electronic device includes the second account. It should be noted that the first account and the second account are not limited to being accounts of the same application, and the first account and the second account can be accounts of different applications, and the embodiments of the present application do not limit this.
[0231] S603. The electronic device 100 receives an input of sharing the specified NFC card to the second account.
[0232] The electronic device 100 can perform step S604 after receiving the input of sharing the specified NFC card to the second account. For example, the input of sharing the specified NFC card to the second account can be an input of the account option 451A shown in FIG. 4B. Figure 4F
[0233] S604. The electronic device 100 displays prompt information 1 for prompting the user to input a sharing key.
[0234] The electronic device 100 can display prompt information 1 for prompting the user to input a sharing key in response to the input of sharing the specified NFC card to the second account. For example, the prompt information 1 can be the prompt information 463 shown in FIG. 4B. Figure 4G
[0235] S605. The electronic device 100 receives the sharing key.
[0236] The electronic device 100 can perform step S606 and step S607 after receiving the sharing key input by the user. The specific description of the electronic device 100 receiving the sharing key can be referred to the embodiments shown in FIG. 4C, and will not be described here. Figure 4G
[0237] S606. The electronic device 100 encrypts the card information of the specified NFC card using the authentication key to obtain ciphertext 1.
[0238] In some examples, the data of the specified NFC card includes the authentication password and the card information. The electronic device 100 can receive the input of the user to set the sharing permission of the specified NFC card. If the sharing permission indicates that the specified NFC card has the permission of being shared to other electronic devices. The electronic device 100 can encrypt the card information and the authentication password of the specified NFC card using the authentication key to obtain ciphertext 1.
[0239] S607. The electronic device 100 encrypts the authentication key using the sharing key to obtain ciphertext 2.
[0240] S608. The electronic device 100 sends the identification of the second account, the cipher text 1 and the cipher text 2 to the server 300.
[0241] S609. The server 300 sends the cipher text 1 and the cipher text 2 to the electronic device 200 based on the identification of the second account.
[0242] The server 300 is a server of a designated application (e.g., a wallet application) that provides the first account and the second account. An electronic device that logs in an account of the designated application can send data to other electronic devices that log in accounts of the designated application through the server 300. For example, the server 300 stores a correspondence between the identification of each account and the address (e.g., an Internet Protocol address, etc.) of each electronic device. The identification of the account can be an account name, a mobile phone number, etc. used to log in the account. The server 300 can send the cipher text 1 and the cipher text 2 to the electronic device 200 that logs in the second account based on the identification of the second account.
[0243] S610. The electronic device 200 displays prompt information 2 for prompting the user to input the sharing key.
[0244] For example, the prompt information 2 can be the prompt information 525C shown in FIG. 5C. Figure 5D
[0245] In some other examples, the electronic device 200 can display the prompt information 2 after receiving the input of the user receiving the simulated NFC card. The electronic device 200 can receive the sharing key input by the user after displaying the prompt information 2. The electronic device 200 can decrypt the encrypted data of the designated NFC card based on the sharing key to obtain the data of the designated NFC card after receiving the encrypted data of the designated NFC card shared by the electronic device 100. For example, the electronic device 200 can provide a control for triggering the electronic device 200 to receive the data of the NFC simulated card. The electronic device 200 can display the prompt information 2 and execute receiving the data of the NFC simulated card shared by the server 300 after receiving the input of the user to the control.
[0246] S611. The electronic device 200 receives the sharing key.
[0247] The description of the electronic device 200 receiving the sharing key can refer to the above embodiments, which will not be repeated here.
[0248] S612. The electronic device 200 decrypts the cipher text 2 using the sharing key to obtain the authentication key.
[0249] The electronic device 200 can decrypt the ciphertext 2 using the share key input by the user to obtain the authentication key. In this way, the user of the electronic device 100 can inform the user of the electronic device 200 of the share key, so that the user of the electronic device 200 can decrypt the ciphertext 2 through the share key.
[0250] S613. The electronic device 200 decrypts the ciphertext 1 using the authentication key to obtain the card information of the specified NFC card.
[0251] S614. The electronic device 200 opens the specified NFC card based on the data of the specified NFC card.
[0252] The electronic device 200 can open the specified NFC card based on the card information of the specified NFC card and the authentication key. Specifically, the electronic device 200 can generate a special file of the specified NFC card after obtaining the data of the specified NFC card. The special file of the specified NFC card includes the card information of the specified NFC card and the authentication key. The special file of the specified NFC card can be used to implement the card swiping business of the specified NFC card.
[0253] It should be noted that it is not limited to encrypting the card information based on the authentication key and encrypting the authentication key based on the share key to ensure the security of the card information in the sharing process. The electronic device 100 can also encrypt the card information in other ways. For example, the electronic device 100 can encrypt the card information based on the share key and send the encrypted card information to the electronic device 200. For another example, the electronic device 100 can splice the card information and the authentication key according to a preset format, encrypt the spliced card information and authentication key based on the share key, and send the encrypted card information and authentication key to the electronic device 200, and the like. The embodiments of the present application do not limit this.
[0254] After the electronic device 200 opens the specified NFC card, the electronic device 200 with the NFC function enabled can open the access control device 500 when approaching the card swiping area of the access control device 500 based on the card information of the specified NFC card. For details, please refer to the above embodiments, which will not be repeated here.
[0255] In some examples, the electronic device 100 can receive the sharing key input by the user, and send the sharing key to the electronic device 200. For example, the electronic device 100 can send the sharing key to the electronic device 200 through a cellular network. Wherein, the electronic device 200 can display the sharing key in the form of a short message after receiving the sharing key. Or, the electronic device 200 can save the sharing key after receiving the sharing key, and directly decrypt the ciphertext 2 based on the saved sharing key when the electronic device 200 receives the ciphertext 2 sent by the server 300. In this way, the electronic device 100 can automatically send the sharing key to the electronic device 200, without the need for the user of the electronic device 100 to inform the user of the electronic device 200 of the sharing key. And since the electronic device 100 does not send the sharing key to the electronic device 200 through the server 300, the server 300 can be prevented from obtaining the data of the specified NFC card according to the sharing key.
[0256] In some examples, the electronic device 100 can receive the sharing key input by the user, and establish a near distance communication connection with the electronic device 200, for example, a Bluetooth connection, an infrared connection, an NFC connection, etc. The electronic device 100 can send the sharing key to the electronic device 200 through the near distance communication connection. In this way, when the electronic device 100 is close to the electronic device 200, the electronic device 100 can send the sharing key to the electronic device 200 through the near distance communication connection, so that the user of the electronic device 200 does not need to input the sharing key, and the operation is more simple and convenient.
[0257] In some examples, the electronic device 100 can receive the sharing key input by the user, and send the sharing key and the identifier of the second account to the server 400. The server 400 can send the sharing key to the electronic device 200 logged in the second account based on the identifier of the second account. Wherein, the server 400 is different from the server 300. The description of the server 400 sending the sharing key to the electronic device 200 can refer to the description of the server 300 sending the ciphertext 1 and the ciphertext 2 to the electronic device 200. In this way, the electronic device 100 can automatically send the sharing key to the electronic device 200.
[0258] In some examples, the electronic device 100 can receive the input of sharing the specified NFC card to the second account, randomly generate the sharing key, and send the sharing key to the electronic device 200. In this way, the electronic device 100 does not need the user to input the sharing key, and the operation is more simple.
[0259] In some examples, the electronic device 100 can establish a secure transmission channel with the electronic device 200 after receiving the input of sharing the specified NFC card to the second account, and negotiate a sharing key with the electronic device 200 through the secure transmission channel. In this way, neither the electronic device 100 nor the electronic device 200 needs the user to input the sharing key, and the operation is simpler.
[0260] In some examples, the electronic device 100 can establish a secure transmission channel with the electronic device 200 after receiving the input of sharing the specified NFC card to the second account, and negotiate a sharing key with the electronic device 200 through the secure transmission channel. In this way, neither the electronic device 100 nor the electronic device 200 needs the user to input the sharing key, and the operation is simpler.
[0261] In a possible implementation, the electronic device 100 stores data of the specified NFC card, and the data of the specified NFC card includes an authentication key and card information. The electronic device 100 can display prompt information 1 after receiving the input of sharing the specified NFC card, and the prompt information 1 can be used to prompt the user to input a sharing key. The electronic device 100 can encrypt the card information of the specified NFC card using the authentication key to obtain ciphertext 1 after receiving the sharing key input by the user. The electronic device 100 can encrypt the authentication key using the sharing key to obtain ciphertext 2. The electronic device 100 can establish a communication connection with the electronic device 200, and send the ciphertext 1 and the ciphertext 2 to the electronic device 200 through the communication connection. The electronic device 200 can display prompt information 2 after receiving the ciphertext 1 and the ciphertext 2, and the prompt information 2 can be used to prompt the user to input the sharing key. The electronic device 200 can obtain the authentication key by decrypting the ciphertext 2 using the sharing key after receiving the input sharing key. The electronic device 200 can obtain the card information of the specified NFC card by decrypting the ciphertext 1 using the authentication key. The electronic device 200 can open the specified NFC card based on the card information of the specified NFC card. In this way, the electronic device 100 can establish a communication connection with the electronic device 200, and send the data of the specified NFC card to the electronic device 200 through the communication connection.
[0262] In some examples, the electronic device 100 can establish a communication connection with the electronic device 200 through NFC technology. In this way, when the card swiping area of the electronic device 100 is close to the card swiping area of the electronic device 200, the electronic device 100 can directly send the data of the specified NFC card to the electronic device 200.
[0263] For example, the electronic device 100 displays the interface 440 as shown in Figure 4E For example, the electronic device 100 displays the interface 440 as shown inFigure 4G The interface shown is 460. Electronic device 100 can receive user input... Figure 4G After the user enters content into the input box 461, the electronic device 100 receives input from the user to the confirmation control 462. The electronic device 100 can respond to the input to the confirmation control 462 by displaying... Figure 7A The interface shown is 701.
[0264] like Figure 7A As shown, interface 701 includes a prompt message 702, which can be used to prompt the user to place the top back of electronic device 100 against the top back of electronic device 200. For example, prompt message 702 may include, but is not limited to, text-based prompt messages such as: "Please keep the top backs of the two phones touching, and this device will share the access card to the phone that is touching."
[0265] Electronic device 100 displays such as Figure 7A After interface 701 is displayed, when the top back of electronic device 200 is detected to be in contact with the top back of electronic device 100 via NFC, a prompt message is displayed to indicate that a specified NFC card is being shared with electronic device 200, and ciphertext 1 and ciphertext 2 are sent to electronic device 200. When the top back of electronic device 200 is detected to be in contact with the top back of electronic device 100 via NFC, an input box can be displayed to prompt the user that electronic device 100 is sharing a specified NFC card. This input box may include, but is not limited to, a prompt message indicating whether the user should accept the specified NFC card, a receive control triggering electronic device 200 to accept the specified NFC card, and a rejection control triggering electronic device 200 to refuse to accept the specified NFC card. For details, please refer to [link to relevant documentation]. Figure 5C The embodiments shown are not described in detail here.
[0266] After receiving user input to the receiving control, electronic device 200 can display a prompt message asking the user to enter a sharing key. Optionally, when displaying the prompt message, electronic device 200 can also display an input box and / or confirmation control for entering the sharing key. For example, the prompt message may include a text message such as "Please enter the key set by electronic device 100," and the confirmation control can be used to trigger electronic device 200 to use the content in the input box as the sharing key. After receiving the user-input sharing key, electronic device 200 can receive data sent by electronic device 100 and activate the access card based on that data. For details, please refer to [link to relevant documentation]. Figure 5E to Figure 5GThe illustrated embodiment will not be described in detail here. Optionally, when electronic device 200 detects via NFC that the top back of electronic device 200 is in contact with the top back of electronic device 100, it displays an input box for entering a sharing key.
[0267] In some examples, electronic device 100 can display, for example, Figure 7A After the interface 701 shown, when the top back of electronic device 200 is detected to be in contact with the top back of electronic device 100 via NFC, the following will be displayed: Figure 7B The interface shown is 710. (As shown) Figure 7B As shown, interface 710 may include a prompt message 711, a cancel control 712, and a confirm control 713. The prompt message 711 can be used to prompt the user whether to share the access card to electronic device 200. The cancel control 712 can be used to trigger electronic device 100 to cancel the operation of sharing the access card to electronic device 200. The confirm control 713 can be used to trigger electronic device 100 to perform the operation of sharing the access card to electronic device 200. After receiving user input on the cancel control 712, electronic device 100 may display the following... Figure 4E The interface 440 shown. The electronic device 100 can display, after receiving user input on the confirmation control 713, the following... Figure 7A The interface shown is 701. In this way, electronic device 100 can confirm whether to send data of the specified NFC card to electronic device 200.
[0268] In some examples, electronic device 100 can also display an input box for entering an authentication password after receiving input to share a specified NFC card. Electronic device 100 can send the data of the specified NFC card to electronic device 200 via NFC after receiving the authentication password entered by the user and confirming that the received authentication password matches the stored authentication password. For example, electronic device 100 can, upon receiving user input... Figure 4E After input is made into the sharing control 442 shown, the following will be displayed: Figure 4J The interface shown is 480. Upon receiving and confirming the authentication password entered by the user, the electronic device 100 can display, as shown below... Figure 7A The interface 701 is shown. In this way, electronic device 100 can verify whether a specified NFC card can be shared with other electronic devices through an authentication key.
[0269] Optionally, the electronic device 100 may also display an interface for setting the validity period and / or an interface for setting sharing permissions after receiving input to share a specified NFC card. For details, please refer to the above embodiments, which will not be repeated here. In this way, the electronic device 100 can also set the validity period and / or sharing permissions of the shared specified NFC card, making it suitable for a wider range of application scenarios.
[0270] In some examples, the electronic device 100 can establish a near field communication connection with the electronic device 200 based on Bluetooth technology, infrared technology, Wi-Fi technology, or the like. In this way, when the electronic device 100 is close to the electronic device 200, the electronic device 100 can directly send the data of the specified NFC card to the electronic device 200.
[0271] For example, after the electronic device 100 displays the interface 440 as shown in Figure 4E , the electronic device 100 can display the interface 460 as shown in Figure 4G after receiving the input of the user on the sharing control 442. The electronic device 100 can receive the input of the user on the confirmation control 462 after receiving the input content of the user in the input box 461 as shown in Figure 4G . The electronic device 100 can display the interface 720 as shown in Figure 7C in response to the input on the confirmation control 462.
[0272] As shown in Figure 7C , the interface 720 includes a device list 721, and the device list 721 includes one or more device options. The one or more device options can be used to trigger the electronic device 100 to share the specified NFC card to the corresponding electronic device, and the one or more device options include a device option 722. The electronic device 100 can search for the electronic device in the vicinity based on the near field communication technology. The electronic device 100 can generate the one or more device options based on the searched electronic device.
[0273] Optionally, when the electronic device 100 determines the one or more device options through the Bluetooth technology, the electronic device 100 can display a Bluetooth indicator 403B as shown in Figure 7C . The Bluetooth indicator 403B can be used to indicate that the electronic device 100 turns on the Bluetooth function. It can be understood that the electronic device (for example, the electronic device 200) indicated by the one or more device options has turned on the Bluetooth function, and the electronic device indicated by the one or more device options can also display the Bluetooth indicator.
[0274] The electronic device 100 can display prompt information for prompting the user that the electronic device 100 is sharing the specified NFC card to the electronic device 200 in response to the input of the user on the device option 722, and perform the operation of sharing the specified access card to the electronic device 200. For details, please refer to the above embodiments, which will not be described here.
[0275] Optionally, the electronic device 100 can also display an input box for inputting an authentication password after receiving the input of sharing the specified NFC card. The electronic device 100 can send the data of the specified NFC card to the electronic device 200 through the communication connection after receiving the authentication password input by the user, and the received authentication password is the same as the stored authentication password.
[0276] Optionally, the electronic device 100 can also display an interface for setting the validity period and / or an interface for setting the sharing permission after receiving the input of sharing the specified NFC card. For details, please refer to the above embodiments, which will not be repeated here. In this way, the electronic device 100 can also set the validity period and / or sharing permission of the shared specified NFC card, which is suitable for more application scenarios.
[0277] In some examples, the electronic device 100 can obtain the communication address of the electronic device 200 through NFC technology. The electronic device 100 can establish a communication connection with the electronic device 200 based on the obtained communication address. For example, the electronic device 200 in the PICC mode can be an NFC analog card based on the card information, and the communication address of the electronic device 200 can be sent to the electronic device 100 in the PCD mode through NFC signaling interaction. The electronic device 100 can establish a communication connection with the electronic device 100 based on the obtained communication address. Similarly, the electronic device 200 can obtain the communication address of the electronic device 100 through NFC technology and establish a communication connection with the electronic device 100. In this way, the electronic device 100 and the electronic device 200 can establish a communication connection when they are touched, and share the specified NFC card to the electronic device 200. After the electronic device 100 and the electronic device 200 establish a communication connection, the user can move the electronic device 100 and / or the electronic device 200, and the electronic device 100 and / or the electronic device 200 can also share the NFC card through the communication connection without being in contact. The user does not need to keep the posture of the electronic device 100 and the electronic device 200, which is convenient for the user to perform the sharing operation.
[0278] Next, the flowchart of the NFC analog card sharing method provided by the embodiments of the present application is introduced.
[0279] For example, as shown in Figure 8 The NFC analog card sharing method provided by the embodiments of the present application includes the following steps:
[0280] S801. The electronic device 100 stores the data of the specified NFC card, and the data of the specified NFC card includes the card information and the authentication key of the specified NFC card.
[0281] The electronic device 100 can simulate the specified NFC card, trigger the corresponding PCD to complete the NFC service based on the card information of the specified NFC card.
[0282] S802. The electronic device 100 receives an input of sharing the specified NFC card to the electronic device 200.
[0283] The electronic device 100 can perform step S803 after receiving the input of sharing the specified NFC card to the electronic device 200. For example, the input of sharing the specified NFC card to the electronic device 200 can be an input to the determination control 713 as shown in FIG. 7A, or an input of placing the back top of the electronic device 100 close to the back top of the electronic device 200 when the interface 701 as shown in FIG. 7B is displayed, or an input to the device option 722 as shown in FIG. 7C. Figure 7B Figure 7A The electronic device 100 can perform step S803 after receiving the input of sharing the specified NFC card to the electronic device 200. For example, the input of sharing the specified NFC card to the electronic device 200 can be an input to the determination control 713 as shown in FIG. 7A, or an input of placing the back top of the electronic device 100 close to the back top of the electronic device 200 when the interface 701 as shown in FIG. 7B is displayed, or an input to the device option 722 as shown in FIG. 7C. Figure 7C
[0284] S803. The electronic device 100 displays prompt information 1 for prompting the user to input a sharing key.
[0285] The electronic device 100 can display prompt information 1 for prompting the user to input a sharing key in response to the input of sharing the specified NFC card to the electronic device 200.
[0286] S804. The electronic device 100 receives the sharing key.
[0287] The electronic device 100 can perform step S805 and step S806 after receiving the sharing key input by the user. The specific description of the electronic device 100 receiving the sharing key can be referred to the above-mentioned embodiments, which will not be repeated here.
[0288] S805. The electronic device 100 encrypts the card information of the specified NFC card using the authentication key to obtain ciphertext 1.
[0289] In some examples, the electronic device 100 can receive the input of the user to set the validity period of the specified NFC card. The electronic device 100 can add the validity period information in the card information of the shared specified NFC card.
[0290] In some examples, the data of the specified NFC card includes an authentication password. The electronic device 100 can receive the input of the user to set the sharing permission of the specified NFC card. If the sharing permission indicates that the user has the permission to share the specified NFC card to other electronic devices. The electronic device 100 can encrypt the card information and the authentication password of the specified NFC card using the authentication key to obtain ciphertext 1.
[0291] S806. The electronic device 100 encrypts the authentication key using the sharing key to obtain ciphertext 2.
[0292] S807. The electronic device 100 and the electronic device 200 establish a communication connection.
[0293] S808. The electronic device 100 sends the ciphertext 1 and the ciphertext 2 to the electronic device 200 through the communication connection.
[0294] S809. The electronic device 200 displays prompt information 2 for prompting the user to input the sharing key.
[0295] The electronic device 200 can display the prompt information 2 for prompting the user to input the sharing key after receiving the ciphertext 1 and the ciphertext 2.
[0296] In some examples, the electronic device 100 can send a message 81 to the electronic device 200 through the communication connection after establishing the communication connection with the electronic device 200. The message 81 can be used to indicate that the electronic device 100 shares the specified NFC card with the electronic device 200. The electronic device 200 can display prompt information 82 after receiving the message 81. The prompt information 82 can be used to prompt the user of the electronic device 200 whether to receive the specified NFC card. The electronic device 200 can send a message 83 to the electronic device 100 through the communication connection after receiving the input of the user receiving the specified NFC card, in response to the input. The message 83 can be used to instruct the electronic device 100 to share the specified NFC card with the electronic device 200. The electronic device 100 can send the ciphertext 1 and the ciphertext 2 to the electronic device 200 after receiving the message 83.
[0297] The electronic device 200 can send a message 84 to the electronic device 100 through the communication connection after receiving the input of the user refusing to receive the specified NFC card, in response to the input. The message 84 can be used to instruct the electronic device 100 to cancel the operation of sharing the specified NFC card with the electronic device 200. The electronic device 100 can display prompt information for prompting the user of the electronic device 100 that the sharing of the specified NFC card fails after receiving the message 84.
[0298] In some examples, the electronic device 200 can display the prompt information 2 after receiving the input of the user receiving the simulated NFC card. The electronic device 200 can receive the sharing key input by the user after displaying the prompt information 2. The electronic device 200 can decrypt the encrypted data of the specified NFC card based on the sharing key after receiving the encrypted data of the specified NFC card shared by the electronic device 100, to obtain the data of the specified NFC card. For example, the electronic device 200 can provide a control for triggering the electronic device 200 to receive the data of the NFC simulated card. The electronic device 200 can display the prompt information 2 and perform receiving the data of the NFC simulated card shared by other electronic devices (for example, turn on the near field communication function) after receiving the input of the user on the control. In this way, the electronic device 200 can actively receive the NFC simulated card shared by other electronic devices.
[0299] S810. The electronic device 200 receives the sharing key.
[0300] The electronic device 200 receives the description of the sharing key, which can be seen from the above embodiments, and will not be described here.
[0301] S811. The electronic device 200 decrypts the ciphertext 2 using the sharing key to obtain the authentication key.
[0302] The electronic device 200 can use the sharing key input by the user to decrypt the ciphertext 2 to obtain the authentication key. In this way, the user of the electronic device 100 can inform the user of the electronic device 200 of the sharing key, so that the user of the electronic device 200 can decrypt the ciphertext 2 through the sharing key.
[0303] S812. The electronic device 200 decrypts the ciphertext 1 using the authentication key to obtain the card information of the specified NFC card.
[0304] S813. The electronic device 200 opens the specified NFC card based on the data of the specified NFC card.
[0305] The electronic device 200 can open the specified NFC card based on the card information of the specified NFC card and the authentication key, and the specific process can be seen from the above embodiments. After the electronic device 200 opens the specified NFC card, the electronic device 200 with NFC function enabled can open the access control device 500 based on the card information of the specified NFC card when approaching the card swiping area of the access control device 500, and the specific process can be seen from the above embodiments, which will not be described here.
[0306] In some examples, the electronic device 100 can send the sharing key to the electronic device 200 through the communication connection after receiving the sharing key input by the user. In this way, the user of the electronic device 200 can not need to input the sharing key by himself.
[0307] In some examples, the electronic device 100 can randomly generate a sharing key and send it to the electronic device 200 after receiving the input of sharing the specified NFC card to the electronic device 200. In this way, the electronic device 100 does not need the user to input the sharing key, and the operation is simpler.
[0308] In a possible implementation, the electronic device 100 stores data of the specified NFC card, and the data of the specified NFC card includes an authentication key and card information. The electronic device 100 can establish a secure transmission channel with the electronic device 200 after receiving an input of sharing the specified NFC card. The electronic device 100 and the electronic device 200 can negotiate a sharing key through the secure transmission channel. The electronic device 100 can encrypt the card information of the specified NFC card using the authentication key to obtain ciphertext 1 after negotiating the sharing key. The electronic device 100 can encrypt the authentication key using the sharing key to obtain ciphertext 2. The electronic device 100 can send the ciphertext 1 and the ciphertext 2 to the electronic device 200 through the secure transmission channel. The electronic device 200 can decrypt the ciphertext 2 using the negotiated sharing key to obtain the authentication key after receiving the ciphertext 1 and the ciphertext 2. The electronic device 200 can decrypt the ciphertext 1 using the authentication key to obtain the card information of the specified NFC card. The electronic device 200 can open the specified NFC card based on the card information of the specified NFC card. In this way, the electronic device 100 can establish a secure transmission channel with the electronic device 200, and negotiate a sharing key on the secure transmission channel, without the need for the user to negotiate the sharing key by himself / herself, simplifying the operation of the user sharing the NFC card, and enabling the user to share the NFC card more conveniently and quickly.
[0309] Next, a flowchart of the NFC analog card sharing method provided by the embodiments of the present application is introduced.
[0310] For example, as shown in FIG. 7A, the NFC analog card sharing method provided by the embodiments of the present application includes the following steps: Figure 9
[0311] S901. The electronic device 100 stores data of a specified NFC card, and the data of the specified NFC card includes card information of the specified NFC card and an authentication key.
[0312] The electronic device 100 can simulate the specified NFC card, and trigger a corresponding PCD to complete an NFC service based on the card information of the specified NFC card.
[0313] S902. The electronic device 100 receives an input of sharing the specified NFC card to the electronic device 200.
[0314] The electronic device 100 can perform step S903 after receiving the input of sharing the specified NFC card to the electronic device 200. For example, the input of sharing the specified NFC card to the electronic device 200 can be an input to the determination control 713 as shown in FIG. 7B, or an input of the back top of the electronic device 100 displaying the interface 701 as shown in FIG. 7C being close to the back top of the electronic device 200, or an input to the device option 722 as shown in FIG. 7D. Figure 7B Figure 7A Figure 7C
[0315] S903. The electronic device 100 and the electronic device 200 establish a secure transmission channel.
[0316] The electronic device 100 can establish a secure transmission channel with the electronic device 200 in response to the input of sharing the specified NFC card to the electronic device 200 after receiving the input. The secure transmission channel can be used to ensure the security of the data transmitted by the electronic device 100 and the electronic device 200. For example, the secure transmission channel can be a Wi-Fi transmission channel, a Bluetooth transmission channel, and the like.
[0317] S904. The electronic device 100 and the electronic device 200 negotiate a sharing key.
[0318] After the electronic device 100 establishes a secure transmission channel with the electronic device 200, the electronic device 100 and the electronic device 200 can negotiate a sharing key on the secure transmission channel. After the electronic device 100 obtains the sharing key, the electronic device 100 can perform steps S905 and S906.
[0319] For example, the electronic device 100 can generate a sharing key after establishing a secure transmission channel with the electronic device 200. For example, the electronic device 100 can randomly generate a sharing key. The electronic device 100 can obtain a public key in a public-private key pair from the electronic device 200 through the secure transmission channel. The public key can be verified by a digital certificate issued by a certificate authority (CA). The electronic device 100 can encrypt the sharing key using the public key in the public-private key pair to obtain an encrypted sharing key. The electronic device 100 can send the encrypted sharing key to the electronic device 200 through the secure transmission channel. After receiving the encrypted sharing key, the electronic device 200 can decrypt the encrypted sharing key based on the private key in the public-private key pair to obtain the sharing key. In this way, the electronic device 100 and the electronic device 200 negotiate the sharing key on the secure transmission channel.
[0320] It should be noted that the above-mentioned electronic device 100 randomly generates a sharing key and sends an encrypted sharing key to the electronic device 200 is only an example, and is not limited to the electronic device 100 randomly generating a sharing key. After the electronic device 100 and the electronic device 200 establish a secure transmission channel, the electronic device 200 can randomly generate a sharing key and send the generated sharing key to the electronic device 100, and the like, which is not limited by the embodiments of the present application.
[0321] In some examples, the electronic device 100 or the electronic device 200 can generate a random string and use the random string as the sharing key, or the electronic device 100 or the electronic device 200 can generate a random number and use the random number as the sharing key, and the like. In this way, the electronic device 100 or the electronic device 200 can randomly generate the sharing key, and reduce the probability of other electronic devices guessing the sharing key. It should be noted that the sharing key is not limited to being randomly generated. The electronic device 100 can also generate the sharing key based on information of the electronic device 100 (for example, a communication address used by the electronic device 100 when establishing a secure transmission channel, a mobile phone number of the electronic device 100, and the like). Similarly, the electronic device 200 can also generate the sharing key based on information of the electronic device 200, and the embodiments of the present application are not limited thereto.
[0322] It should be further noted that the sharing key is not limited to being negotiated on the secure transmission channel. The electronic device 100 and the electronic device 200 can generate the sharing key based on the current time, or the electronic device 100 and the electronic device 200 can generate the sharing key based on the current location, and the like. In this way, the electronic device 100 and the electronic device 200 can use a key generation algorithm to process predetermined information in advance to obtain the sharing key. The electronic device 100 and the electronic device 200 can obtain the sharing key without transmitting the sharing key, and reduce the probability of other electronic devices obtaining the sharing key. Moreover, since the information used by the electronic device 100 and the electronic device 200 to generate the sharing key will change, the sharing key can be better protected.
[0323] S905. The electronic device 100 encrypts the card information of the specified NFC card using the authentication key to obtain ciphertext 1.
[0324] In some examples, the electronic device 100 can receive an input of a user to set an effective period of the specified NFC card. The electronic device 100 can add the effective period information in the shared card information of the specified NFC card.
[0325] In some examples, the data of the specified NFC card includes an authentication password. The electronic device 100 can receive an input of a user to set a sharing permission of the specified NFC card. If the sharing permission indicates that the specified NFC card has a permission to be shared to other electronic devices. The electronic device 100 can encrypt the card information and the authentication password of the specified NFC card using the authentication key to obtain ciphertext 1.
[0326] S906. The electronic device 100 encrypts the authentication key using the sharing key to obtain ciphertext 2.
[0327] S907. The electronic device 100 sends the ciphertext 1 and the ciphertext 2 to the electronic device 200 through the secure transmission channel.
[0328] S908. The electronic device 200 decrypts the ciphertext 2 using the sharing key to obtain the authentication key.
[0329] The electronic device 200 can decrypt the ciphertext 2 using the sharing key input by the user to obtain the authentication key. In this way, the user of the electronic device 100 can inform the user of the electronic device 200 of the sharing key, so that the user of the electronic device 200 can decrypt the ciphertext 2 through the sharing key.
[0330] In some examples, the electronic device 100 can send a message 81 to the electronic device 200 through the secure transmission channel after establishing the secure transmission channel with the electronic device 200. The message 81 can be used to indicate that the electronic device 100 shares the specified NFC card with the electronic device 200. After receiving the message 81, the electronic device 200 can display prompt information 82. The prompt information 82 can be used to prompt the user of the electronic device 200 whether to receive the specified NFC card. After receiving the input of the user receiving the specified NFC card, the electronic device 200 can send a message 83 to the electronic device 100 through the secure transmission channel in response to the input. The message 83 can be used to instruct the electronic device 100 to share the specified NFC card with the electronic device 200. After receiving the message 83, the electronic device 100 can send the ciphertext 1 and the ciphertext 2 to the electronic device 200.
[0331] After receiving the input of the user refusing to receive the specified NFC card, the electronic device 200 can send a message 84 to the electronic device 100 through the secure transmission channel in response to the input. The message 84 can be used to instruct the electronic device 100 to cancel the operation of sharing the specified NFC card with the electronic device 200. After receiving the message 84, the electronic device 100 can display prompt information prompting the user of the electronic device 100 that the sharing of the specified NFC card fails.
[0332] In some examples, the electronic device 200 can establish a secure transmission channel with the electronic device 100 after receiving the input of the user receiving the simulated NFC card. After receiving the data of the encrypted specified NFC card shared by the electronic device 100, the electronic device 200 can decrypt the encrypted data based on the sharing key to obtain the data of the specified NFC card. For example, the electronic device 200 can provide a control for triggering the electronic device 200 to receive the data of the NFC simulated card. After receiving the input of the user on the control, the electronic device 200 can establish a secure transmission channel with another electronic device (for example, turn on the near field communication function). After establishing the secure transmission channel with the electronic device, the electronic device 200 can receive the data of the NFC simulated card shared by the electronic device. In this way, the electronic device 200 can actively receive the NFC simulated card shared by another electronic device.
[0333] S909. Electronic device 200 uses the authentication key to decrypt ciphertext 1 and obtain the card information of the specified NFC card.
[0334] S910. Electronic device 200 activates a specified NFC card based on data from the specified NFC card.
[0335] The electronic device 200 can activate a specified NFC card based on the card information and authentication key of the specified NFC card. For details, please refer to the above embodiments. After the electronic device 200 activates the specified NFC card, the electronic device 200 with NFC function enabled can open the access control device 500 based on the card information of the specified NFC card when it is brought close to the card swiping area of the access control device 500. For details, please refer to the above embodiments, which will not be repeated here.
[0336] In one possible implementation, the electronic device 100 can receive user input... Figure 4E Upon input to the sharing control 442 shown, one or more options are displayed in response to the input. These options may include, but are not limited to, account sharing options and proximity sharing options. The account sharing option can be used to trigger electronic device 100 to send data from a specified NFC card to a target electronic device (e.g., electronic device 200) through the target account selected by the user. For details, please refer to [link to relevant documentation]. Figure 6 The illustrated embodiment will not be described in detail here. The proximity sharing option can be used to trigger the electronic device 100 to establish a proximity communication connection with the target electronic device, and to send the data of the specified NFC card to the target electronic device through this proximity communication connection. For details, please refer to [link to relevant documentation]. Figure 8 The illustrated embodiment will not be described in detail here. In this way, users can choose the appropriate sharing method based on the distance to the target electronic device, providing users with more diverse sharing options, applicable to more diverse scenarios, and improving the user experience.
[0337] Figure 10 This illustration shows a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of this application.
[0338] The following description uses electronic device 100 as an example to illustrate the embodiment. It should be understood that... Figure 10 The electronic device 100 shown is merely an example, and the electronic device 100 may have more than Figure 10 The more or fewer components shown can be combined into two or more components, or they can 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.
[0339] The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include one or more of a pressure sensor 180A, a gyro sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0340] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0341] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions. The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that have just been used or are repeatedly used by the processor 110. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.
[0342] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0343] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection modes or a combination of multiple interface connection modes in the above embodiments.
[0344] The charging management module 140 is configured to receive charging input from a charger. The power management module 141 is configured to connect the battery 142 and the charging management module 140. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
[0345] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor. The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0346] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1 and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves radiated through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be arranged in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be arranged in the same device.
[0347] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.
[0348] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).
[0349] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.
[0350] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be made of a liquid crystal display (LCD). The display screen panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a miniled, a microled, a micro-oled, a quantum dot light emitting diodes (QLED), and the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.
[0351] The electronic device 100 can implement a photographing function through an ISP, the camera 193, a video codec, a GPU, the display screen 194, and an application processor.
[0352] The external memory interface 120 can be configured 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 configured to store computer-executable program codes including instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required for at least one function (such as a sound play function, an image play function, and the like), and the like. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phonebook, and the like), and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one of a magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
[0353] The electronic device 100 can implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. For example, music play, recording, and the like.
[0354] The pressure sensor 180A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. The gyro sensor 180B is configured to determine a motion posture of the electronic device 100. The barometric sensor 180C is configured to measure a barometric pressure. The magnetic sensor 180D includes a Hall sensor. The acceleration sensor 180E is configured to detect an acceleration of the electronic device 100 in various directions (typically, three axes). The distance sensor 180F is configured to measure a distance. The proximity light sensor 180G can include, for example, a light emitting diode (LED) and a photo detector, such as a photodiode. The ambient light sensor 180L is configured to sense an ambient light brightness. The fingerprint sensor 180H is configured to acquire a fingerprint. The temperature sensor 180J is configured to detect a temperature. The touch sensor 180K, also referred to as a "touch panel," can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 can form a touch screen, also referred to as a "touch screen panel." The touch sensor 180K is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor 180K can transmit a detected touch operation to the application processor to determine a touch event type. A visual output related to the touch operation can be provided via the display screen 194. In other embodiments, the touch sensor 180K can be disposed on a surface of the electronic device 100, which is different from a location where the display screen 194 is disposed. The bone conduction sensor 180M can acquire a vibration signal. The keys 190 include a power key, a volume key, and the like. The motor 191 can generate a vibration alert. The indicator 192 can be an indicator light configured to indicate a charging state, a power level change, and the like, and can also be configured to indicate a message, a missed call, a notification, and the like.
[0355] The SIM card interface 195 is configured to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than one. The SIM card interface 195 can support a Nano SIM card, a Micro SIM card, a SIM card, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external storage cards. The electronic device 100 interacts with a network through a SIM card to implement functions such as calling and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0356] In some embodiments, the wireless communication module 160 can be specifically configured to establish a short-range wireless communication link with other electronic devices (e.g., the access control device 500, the electronic device 200) so as to perform short-range wireless data transmission between the two. Exemplarily, the short-range wireless communication link can be a Bluetooth link, a Wi-Fi link, an NFC link, etc. Therefore, the wireless communication module 160 can specifically include a Bluetooth communication module, a Wi-Fi communication module, or an NFC module. The NFC module can include any appropriate components for implementing proximity-based non-contact communication between the electronic device 100 and the access control device 500, thereby providing the electronic device 100 with NFC functionality. For the NFC module, refer to the description of the NFC module in the above Figure 3A embodiments, which will not be repeated here.
[0357] It should be noted that the description of the hardware structure of the electronic device 200 can refer to the description of the hardware structure of the electronic device 100 in the above Figure 10 embodiments, which will not be repeated here.
[0358] The above describes the method provided by the present application in detail. In order to better implement the above-mentioned scheme of the embodiments of the present application, the embodiments of the present application also provide a corresponding device or equipment.
[0359] The embodiments of the present application can divide the functional modules of the electronic device 100 or the electronic device 200 according to the above-mentioned method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be realized in the form of hardware or in the form of a software functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical functional division. In actual implementation, there can be another division manner.
[0360] The communication device of the embodiments of the present application will be described in detail below. Figure 11
[0361] In the case of using an integrated unit, refer to Figure 11 , Figure 11 is a structural schematic diagram of the communication device 1000 provided by the embodiments of the present application. The communication device 1000 can be the electronic device 100 or the electronic device 200 in the above-mentioned embodiments. Alternatively, the communication device 1000 can be a chip / chip system, for example, an NFC chip. As Figure 11 indicated, the communication device 1000 can include a transceiver unit 1010 and a processing unit 1020.
[0362] The transceiver unit 1010 can also be used to perform the functions and steps of sending and receiving performed by the electronic device 100 or the electronic device 200 in the above-mentioned embodiments of the present application.
[0363] Optionally, the processing unit 1020 can also be configured to perform the steps of the method performed by the electronic device 100 or the electronic device 200 in the embodiments described above.
[0364] It should be understood that the communication apparatus 1000 in the embodiments can perform the steps of the method performed by the electronic device 100 or the electronic device 200 in the embodiments described above. For brevity, the steps will not be described again.
[0365] The electronic device 100 or the electronic device 200 in the embodiments described above should be understood as follows: any product with the functions of the communication apparatus 1000 described above falls within the scope of protection of the embodiments. Figure 11 The electronic device 100 or the electronic device 200 in the embodiments described above should be understood as follows: any product with the functions of the communication apparatus 1000 described above falls within the scope of protection of the embodiments.
[0366] As a possible product form, the electronic device 100 or the electronic device 200 in the embodiments described above can be implemented by a general bus architecture.
[0367] Referring to Figure 12 , Figure 12 FIG. 11 is a structural schematic diagram of a communication apparatus 1100 according to an embodiment of the present application. The communication apparatus 1100 can be the electronic device 100 or a device therein. The communication apparatus 1100 can also be the electronic device 200 or a device therein. As shown in FIG. 11, the communication apparatus 1100 includes a processor 1101 and a transceiver 1102 in communication with the processor 1101. The processor 1101 can be a general processor or a special-purpose processor, etc. For example, it can be a central processing unit and / or an NFC controller, etc. The transceiver 1102 can be referred to as a transceiving unit, a transceiver, or a transceiving circuit, etc., and is configured to implement a transceiving function. The transceiver 1102 can include a receiver and a transmitter. The receiver can be referred to as a receiver or a receiving circuit, etc., and is configured to implement a receiving function, such as an NFC receiving function. The transmitter can be referred to as a transmitter or a transmitting circuit, etc., and is configured to implement a transmitting function, such as an NFC transmitting function. Optionally, the communication apparatus 1100 can further include an antenna 1103 and / or a radio frequency unit (not shown in FIG. 11), for example, an NFC antenna, wherein the NFC antenna can be a coil-shaped antenna. The antenna 1103 and / or the radio frequency unit can be located inside the communication apparatus 1100, or can be separate from the communication apparatus 1100, i.e., the antenna 1103 and / or the radio frequency unit can be remotely located or distributed. Figure 12 Figure 12
[0368] Optionally, one or more memories 1104 can be included in the communication apparatus 1100, and instructions can be stored thereon. The instructions can be computer program, which can be run on the communication apparatus 1100, so that the communication apparatus 1100 performs the method steps described in the above embodiments of the present application. Optionally, data can also be stored in the memory 1104. The communication apparatus 1100 and the memory 1104 can be separately arranged, or can be integrated together.
[0369] The processor 1101, the transceiver 1102, and the memory 1104 can be connected through a communication bus.
[0370] In one design, the communication apparatus 1100 can be configured to perform the functions of the electronic device 100 described in the above embodiments. The processor 1101 can be configured to perform the function steps and / or other processes described in the above embodiments of the electronic device 100 related to NFC protocol analysis and packaging, NFC service processing flow, designated NFC card sharing flow, and display, etc., and / or for the technology described herein. The transceiver 1102 can be configured to perform the function steps and / or other processes described in the above embodiments of the electronic device 100 related to sending and receiving, etc., and / or for the technology described herein.
[0371] In any of the above designs, the processor 1101 can include a transceiver for implementing receiving and sending functions. For example, the transceiver can be a transceiver circuit, or an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing receiving and sending functions can be separate, or can be integrated together. The above transceiver circuit, interface, or interface circuit can be used for reading and writing of code / data, or the above transceiver circuit, interface, or interface circuit can be used for transmission or transfer of signals.
[0372] In any of the above designs, the processor 1101 can store instructions, which can be a computer program. The computer program can be run on the processor 1101, so that the communication apparatus 1100 performs the method steps described in the above embodiments of the electronic device 100. The computer program can be fixed in the processor 1101, and in this case, the processor 1101 can be implemented by hardware.
[0373] In an implementation, the communication apparatus 1100 can include circuitry that can implement the functions of transmitting or receiving or communicating in the foregoing method embodiments. The processor and transceiver described in the present application can be implemented on an integrated circuit (IC), an analog IC, a radio frequency integrated circuit (RFIC), a mixed-signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (NMOS), positive channel metal oxide semiconductor (PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.
[0374] The scope of the communication apparatus described in the present application is not limited thereto, and the structure of the communication apparatus can not be limited by Figure 12 The communication apparatus 1100 can be a standalone device or can be a part of a larger device. For example, the communication apparatus 1100 can be:
[0375] (1) a standalone integrated circuit (IC), or a chip, or a chip system or subsystem; (2) a set of one or more ICs, optionally including memory elements for storing data and computer program instructions; (3) an ASIC, such as a NFC chip; (4) a module that can be embedded within other devices; (5) a receiver, a terminal, a smart terminal, a cellular phone, a wireless device, a handset, a mobile unit, a car device, a network device, a cloud device, an artificial intelligence device, etc.; (6) others, etc.
[0376] The embodiments of the present application also provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps performed by the electronic device 100 or the electronic device 200 in each of the method embodiments described above can be implemented.
[0377] The embodiment of the present application further provides a computer program product, comprising a computer program, which, when running on a computer, enables the computer to implement the steps performed by the electronic device 100 or the electronic device 200 in each of the above method embodiments.
[0378] The embodiment of the present application further provides a chip system, comprising a processing circuit and an interface circuit, the interface circuit being configured to receive code instructions and transmit the code instructions to the processing circuit, and the processing circuit being configured to run the code instructions so that the chip system implements the steps performed by the electronic device 100 or the electronic device 200 in any of the method embodiments of the present application. The chip system can be a single chip or a chip module composed of multiple chips.
[0379] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; even though the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalent features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A near field communication (NFC) analog card sharing method, characterized in that, The method is applied to a first electronic device, and comprises: receiving a first input of sharing a first NFC card; after receiving the first input, obtaining a first key; based on the first key, encrypting a second key to obtain first data; based on the second key, encrypting card information of the first NFC card to obtain second data; sending the first data and the second data to a second electronic device, the first data and the second data being used by the second electronic device to open the first NFC card.
2. The method of claim 1, wherein, The first key is obtained in particular by: displaying first prompt information, the first prompt information being used to prompt a user to input a key; receiving the input first key.
3. The method of claim 1, wherein, The first key is obtained in particular by: establishing a secure transmission channel with the second electronic device; negotiating the first key with the second electronic device on the secure transmission channel.
4. The method according to any one of claims 1 to 3, characterized in that, The first electronic device comprises a first authentication password of the first NFC card; after receiving the first input of sharing the first NFC card, the method further comprises: displaying second prompt information, the second prompt information being used to prompt a user to input an authentication password; receiving a second authentication password input by the user; The first prompt information is displayed in particular by: when it is determined that the second authentication password is the same as the first authentication password, the first prompt information is displayed.
5. The method of claim 4, wherein, Before the card information of the first NFC card is encrypted based on the second key to obtain the second data, the method further comprises: displaying third prompt information; wherein the third prompt information is used to prompt a user whether to grant the second electronic device the permission to share the first NFC card; receiving a second input of the user granting the second electronic device the permission to share the first NFC card; The card information of the first NFC card is encrypted based on the second key to obtain the second data in particular by: based on the second key, encrypting the card information of the first NFC card and the first authentication password to obtain the second data.
6. The method according to any one of claims 1-3, characterized in that, Before the card information of the first NFC card is encrypted based on the second key to obtain the second data, the method further comprises: displaying third prompt information; wherein the third prompt information is used to prompt a user whether to grant the second electronic device the permission to share the first NFC card; receiving a second input of the user granting the second electronic device the permission to share the first NFC card; The card information of the first NFC card is encrypted based on the second key to obtain the second data in particular by: based on the second key, encrypting the card information of the first NFC card and the sharing permission identifier to obtain the second data, the sharing permission identifier being used to indicate that the second electronic device is granted the permission to share the first NFC card.
7. The method according to any one of claims 1 to 6, characterized in that, Before the card information of the first NFC card is encrypted based on the second key to obtain the second data, the method further comprises: displaying fourth prompt information, the fourth prompt information being used to prompt a user to set an effective period of the first NFC card shared to the second electronic device; receiving a third input of a user setting a validity period of the first NFC; encrypting the card information of the first NFC card based on the second key to obtain second data, specifically including: encrypting the card information of the first NFC card and the validity period information based on the second key to obtain the second data, the validity period information being used to indicate the validity period of the card information of the first NFC card.
8. The method according to any one of claims 1-7, characterized in that, After the receiving of the first input of sharing the first NFC card, the method further includes: receiving a fourth input of a user selecting the second electronic device receiving the first NFC card; sending the first data and the second data to the second electronic device, specifically including: sending the first data and the second data to the second electronic device in response to the fourth input.
9. The method of claim 8, wherein, The receiving of the fourth input of a user selecting the second electronic device receiving the first NFC card specifically includes: receiving the fourth input of a user selecting a first account of the first NFC card, the second electronic device being logged in the first account.
10. The method of claim 9, wherein, The first electronic device is logged in a second account, the second account being associated with the first account.
11. The method of claim 8, wherein, After the receiving of the first input of sharing the first NFC card, the method further includes: displaying one or more device options, the one or more device options including a first device option, the first device option being used to indicate the second electronic device; The receiving of the fourth input of a user selecting the second electronic device receiving the first NFC card specifically includes: receiving a fourth input of a user to the first device option.
12. The method of claim 11, wherein, The displaying of the one or more device options specifically includes: searching for one or more electronic devices through a near distance communication technology, the one or more electronic devices including the second electronic device; displaying the one or more device options based on the one or more electronic devices.
13. The method according to any one of claims 1-12, characterized in that, After the sending of the first data and the second data to the second electronic device, the method further includes: displaying fifth prompt information, the fifth prompt information being used to prompt a user that sharing the first NFC card is successful.
14. A near field communication (NFC) analog card sharing method, characterized in that, Applied to a second electronic device; the method includes: receiving first data and second data sent by a first electronic device, the second data including encrypted card information of a first NFC card; obtaining a first key; obtaining a second key from the first data based on the first key; obtaining the card information of the first NFC card from the second data based on the second key; opening the first NFC card based on the card information of the first NFC card.
15. The method of claim 14, wherein, The obtaining of the first key specifically includes: displaying sixth prompt information, the sixth prompt information being used to prompt a user to input a key; receiving the input first key.
16. The method of claim 14, wherein, The obtaining of the first key specifically includes: establishing a secure transmission channel with the first electronic device; obtaining the first key by negotiating with the first electronic device on the secure transmission channel.
17. The method according to any one of claims 14-16, characterized by, After the opening of the first NFC card based on the card information of the first NFC card, the method further includes: displaying seventh prompt information, the seventh prompt information being used to prompt the user to successfully open the first NFC card.
18. The method according to any one of claims 14-17, characterized by, The first NFC card information is obtained from the second data based on the second key, and specifically includes: The first NFC card information is obtained from the second data based on the second key, and specifically includes: After the first NFC card is opened based on the first NFC card information, the method further includes: receiving a fifth input of sharing the first NFC card; displaying eighth prompt information, the eighth prompt information being used to prompt the user to input an authentication password; receiving a second authentication password input by the user; When it is determined that the second authentication password is the same as the first authentication password, displaying ninth prompt information, the ninth prompt information being used to prompt the user to input a key; receiving a third key input; encrypting the second key based on the third key to obtain third data; encrypting the first NFC card information based on the second key to obtain fourth data; sending the fourth data and the third data to a third electronic device.
19. The method of claim 18, wherein, After the first NFC card is opened based on the first NFC card information, the method further includes: displaying a sharing control, the sharing control being used to trigger the second electronic device to share the first NFC card; wherein the fifth input is an input of the sharing control by the user.
20. The method of any one of claims 14-17, wherein, After the first NFC card is opened based on the first NFC card information, the method further includes: receiving a fifth input of sharing the first NFC card; displaying eighth prompt information, the eighth prompt information being used to prompt the user to input an authentication password; receiving a second authentication password input by the user; When it is determined that the first NFC card data of the second electronic device does not include an authentication password, displaying tenth prompt information, the tenth prompt information being used to prompt the user that the user does not have the permission to share the first NFC card.
21. The method of any one of claims 14-17, wherein, The first NFC card information is obtained from the second data based on the second key, and specifically includes: The first NFC card information is obtained from the second data based on the second key, and specifically includes: After the first NFC card is opened based on the first NFC card information, the method further includes: receiving a fifth input of sharing the first NFC card; If it is determined that the sharing permission identifier is used to indicate that the second electronic device has the permission to share the first NFC card, displaying ninth prompt information, the ninth prompt information being used to prompt the user to input a key; receiving a third key input; encrypting the second key based on the third key to obtain third data; encrypting the first NFC card information based on the second key to obtain fourth data; sending the fourth data and the third data to a third electronic device; If it is determined that the sharing permission identifier is used to indicate that the second electronic device does not have the permission to share the first NFC card, tenth prompt information is displayed, and the tenth prompt information is used to prompt that the user does not have the permission to share the first NFC card.
22. The method of any one of claims 14-21, wherein, After the first NFC card is opened based on the card information of the first NFC card, the method further includes: After entering the radio frequency field generated by the NFC card reading device, the card swiping business of the first NFC card is completed based on the card information of the first NFC card.
23. The method of claim 22, wherein, The first NFC card information is obtained from the second data based on the second key, and specifically includes: The first NFC card information and the validity period information of the first NFC card are obtained from the second data based on the second key, and the validity period information is used to indicate the validity period of the card information of the first NFC card.
24. The method of claim 23, wherein, After entering the radio frequency field generated by the NFC card reading device, the card swiping business of the first NFC card is completed based on the card information of the first NFC card, and specifically includes: After entering the radio frequency field generated by the NFC card reading device within the time period indicated by the validity period information, the card swiping business of the first NFC card is completed based on the card information of the first NFC card.
25. The method of claim 23 or 24, wherein, After the first NFC card is opened based on the card information of the first NFC card, the method further includes: The validity period information is displayed.
26. The method of claims 14-25, wherein, The first data and the second data sent by the first electronic device are received, and specifically includes: Logging in a second account; Based on the second account, the first data and the second data sent by the first electronic device logged in with a first account are received, and the first account is associated with the second account.
27. The method of any one of claims 14-26, wherein, The first NFC card is opened based on the card information of the first NFC card, and specifically includes: A first dedicated file (DF) is generated, the first DF includes the card information of the first NFC card, and the first DF is used to realize the card swiping business of the first NFC card.
28. A communication system, characterized by It includes: A first electronic device and a second electronic device; wherein The first electronic device is configured to execute the method in any one of claims 1-13; The second electronic device is configured to execute the method in any one of claims 14-27.
29. An electronic device, comprising: It includes: 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 analog card sharing method in any one of claims 1-13 is executed.
30. An electronic device, comprising: It includes: 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 analog card sharing method in any one of claims 14-27 is executed.
31. A computer readable storage medium, characterized in that, A computer program product having stored thereon a computer program which, when executed by a processor, implements the NFC analog card sharing method of any of claims 1-13.
32. A computer-readable storage medium, comprising: A computer program product having stored thereon a computer program which, when executed by a processor, implements the NFC analog card sharing method of any of claims 14-27.
33. A computer program product, characterised in that, A computer program product having stored thereon a computer program which, when executed by a processor, implements the NFC analog card sharing method of any of claims 1-13.
34. A computer program product, characterised in that, A computer program product having stored thereon a computer program which, when executed by a processor, implements the NFC analog card sharing method of any of claims 14-27.
35. A chip system, characterized by A computer program product having stored thereon a computer program which, when executed by a processor, implements the NFC analog card sharing method of any of claims 1-13.
36. A chip system, characterized by A computer program product having stored thereon a computer program which, when executed by a processor, implements the NFC analog card sharing method of any of claims 14-27.