Data processing method, apparatus, device and computer-readable storage medium
The application discloses a data processing method, apparatus, device and medium. The data processing method includes: receiving target activation data and a target activation instruction sent by a target server, wherein the target activation data includes a payment token to be activated corresponding to a payment card account number which needs to be activated; updating, in response to the target activation instruction, a target payment token in target personalized data to be the payment token to be activated, wherein a transaction card type indicated by the target personalized data is same as a transaction card type indicated by the target activation instruction; and setting the updated target payment token to be in an activated state.
1 . A method of an electronic device for setting a near field communication (NFC) function of the electronic device equipped to perform a card payment operation, comprising:
receiving a first payment card account number inputted by a user of the electronic device;
establishing communication with a server;
sending a card activation request to the server for card activation;
receiving activation data and an activation instruction from the server responsive to the card activation request from the electronic device, wherein the activation data includes a first payment token corresponding to the first payment card account number and the activation instruction indicates a first transaction card type which is a same type as a transaction card type of the first payment card account number;
determining that target personalized data associated with the card payment operation is stored in a security element of the electronic device, wherein the target personalized data includes a personalized application identifier (AID) comprising a generic character string, a payment token, and a state value, and the generic character string includes at least an account type, an application type, an institution code of an application provider, and a chip card type;
after determining that the target personalized data is stored in the security element, directly updating, in response to the activation instruction, a target payment token in the target personalized data stored on the electronic device with the first payment token, without downloading the target personalized data so as to reduce data processes on the electronic device, wherein a second payment card account number corresponding to the target payment token was active for the NFC function, the target personalized data comprised a second transaction card type of the second payment card account number, and the second transaction card type is a same type as the first transaction card type indicated by the activation instruction;
setting the updated target payment token, which is the first payment token, to be in an activated state such that the first payment card account number is activated for the NFC function; and
using the first payment card account number activated for the NFC function to implement a transaction between the electronic device and an acquiring device having an NFC information reading function.
2 . The method of claim 1 , wherein the determining that target personalized data associated with the card payment operation is stored in a security element of the electronic device further comprises:
if the target personalized data is not stored in the security element of the electronic device, receiving the target personalized data in the target activation data from the server; and
storing the target personalized data in the security element.
3 . The method of claim 2 , wherein before the receiving the card activation request, the method further comprises:
receiving the first payment card account number via a selection by the user of the electronic device from a plurality of possible payment card account numbers;
generating the card activation request according to the selected first payment card account number; and
wherein the card activating request is a default card setting request which is configured to request the server to set the selected first payment card account number as a default payment card account number for the NFC function.
4 . The method according to claim 2 , wherein before receiving the card activation request, the method further comprises:
receiving the first payment card account number via a selection by the user of the electronic device from a plurality of possible payment card account numbers;
generating the card activation request according to the selected first payment card account number,
wherein card activation request is a default card changing request which is configured to request the server to change a default payment card account number for the NFC function to be the selected first payment card account number.
5 . A device for setting a near-field communication (NFC) function of an electronic device, comprising: a processor and a memory storing computer program instructions;
wherein the processor is configured to execute the computer program instructions to implement the data processing method according to claim 1 .
6 . A non-transitory computer-readable storage medium storing computer program instructions, wherein the computer program instructions are executed by a processor to implement the data processing method according to claim 1 .