Simulation card instruction interaction method and device, terminal and storage medium
By creating a composite card and integrating the non-connected parameters of the simulated card, the problem of manually switching cards after the smart terminal fails to swipe cards, achieving a more efficient card swipe process.
Patent Information
- Application Number
- CN202311284803.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
After the smart terminal fails to swipe the card, the user needs to manually switch the card, resulting in a cumbersome card swipe process and low efficiency.
By creating a composite card, the non-connection parameters of multiple simulated cards are fused to obtain the target non-connection parameters, and the composite card is activated to realize the command interaction with the card reader.
The card swiping process is simplified, and the user can manually switch the simulated card and improve the card swiping efficiency.
Smart Images

Figure CN119721076A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of near field communication technology, and in particular to a command interaction method, device, terminal and storage medium for simulating a card. Background Art
[0002] With the development of diversified functions of smart terminals, smart phones, smart watches and other devices have NFC (Near Field Communication) simulation card function. After entering multiple simulation cards in the terminal, you only need to bring the terminal close to the card reader to complete the card swiping operation.
[0003] In the related art, the smart terminal can only activate one card at a time. When the activated card is incorrect, the user needs to manually switch the card and then swipe the card again, which makes the card swiping process cumbersome and inefficient. Summary of the invention
[0004] The embodiment of the present application provides a method, device, terminal and storage medium for simulating card instruction interaction. The technical solution is as follows:
[0005] On the one hand, an embodiment of the present application provides a command interaction method for simulating a card, the method comprising:
[0006] Create a composite card corresponding to at least two simulated cards;
[0007] Performing parameter fusion on the contactless parameters corresponding to the at least two simulation cards to obtain the target contactless parameters of the composite card, and activating the composite card;
[0008] When receiving a card reading instruction sent by a card reader, an instruction interaction is performed with the card reader based on the target contactless parameter.
[0009] On the other hand, an embodiment of the present application provides a command interaction method for a simulated card, the method comprising:
[0010] Displaying an activated card in the card swiping interface, the card being a composite card or at least two simulated cards, the composite card being composited from the at least two simulated cards;
[0011] The target contactless parameters of the composite card are used to perform command interaction with the card reader, wherein the target contactless parameters are obtained by integrating the contactless parameters corresponding to the at least two simulated cards. On the other hand, an embodiment of the present application provides a command interaction device for a simulated card, the device comprising:
[0012] A creation module, used for creating a composite card corresponding to at least two simulated cards;
[0013] A fusion module, used for fusing the contactless parameters corresponding to the at least two simulation cards, obtaining the target contactless parameters of the composite card, and activating the composite card;
[0014] The interaction module is used to perform instruction interaction with the card reader based on the target contactless parameter when receiving a card reading instruction sent by the card reader.
[0015] On the other hand, an embodiment of the present application provides a command interaction device for simulating a card, the device comprising:
[0016] A display module, used for displaying a card in an activated state in a card swiping interface, wherein the card is a composite card or at least two simulated cards, and the composite card is obtained by combining the at least two simulated cards;
[0017] An interaction module is used to perform command interaction with a card reader based on the target contactless parameters of the composite card, wherein the target contactless parameters are obtained by integrating the contactless parameters corresponding to the at least two simulated cards. On the other hand, an embodiment of the present application provides a terminal, wherein the terminal includes a processor, a memory, and an NFC component, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the command interaction method of the simulated card as described in the above aspect.
[0018] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores at least one program code, and the at least one program code is used to be executed by a processor to implement the instruction interaction method of the simulation card as described in the above aspects.
[0019] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device implements the instruction interaction method of the simulation card provided in the above aspect.
[0020] In the embodiment of the present application, in order to save the time of the terminal switching cards after the card swiping fails, the terminal first creates a corresponding composite card for at least two simulated cards, and then merges the contactless parameters corresponding to each simulated card to obtain the target contactless parameters corresponding to the composite card. In the subsequent card swiping process, the terminal responds to the card reading instruction sent by the card reader based on the target contactless parameters to realize the instruction interaction between the composite card and the card reader. After obtaining the target contactless parameters corresponding to the composite card, the terminal activates the composite card. When the terminal uses the target contactless parameters of the composite card to interact with the card reader, the multiple simulated cards corresponding to the composite card are all in an activated state. Therefore, the terminal can autonomously select the simulated card for instruction interaction according to the instruction sent by the card reader, eliminating the user's manual switching of simulated cards, simplifying the card swiping process, and improving the efficiency of card swiping. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A schematic diagram of an implementation environment shown in an exemplary embodiment of the present application is shown;
[0022] Figure 2 A flowchart of a command interaction method for a simulated card provided by an exemplary embodiment of the present application is shown;
[0023] Figure 3 A flowchart of a command interaction method for a simulated card provided by another exemplary embodiment of the present application is shown;
[0024] Figure 4 is a schematic diagram of field types included in an ATS response shown in an exemplary embodiment of the present application;
[0025] Figure 5 It is a schematic diagram of an implementation of the instruction interaction process between a bus card and a card reader shown in an exemplary embodiment of the present application;
[0026] Figure 6 It is a schematic diagram of an implementation of the instruction interaction process between a composite card and an access control card reader shown in an exemplary embodiment of the present application;
[0027] Figure 7 It is a schematic diagram of an implementation of the instruction interaction process between a composite card and a bus card reader shown in an exemplary embodiment of the present application;
[0028] Figure 8 is a schematic diagram of an implementation of a command interaction process between a composite card and a car key reader shown in an exemplary embodiment of the present application;
[0029] Fig. 9 is a schematic diagram of an implementation of an AID polling process shown in an exemplary embodiment of the present application;
[0030] Fig.10is a schematic diagram of a UI interface of a composite card shown in an exemplary embodiment of the present application;
[0031] Fig.11 is a schematic diagram of a UI interface after canceling a composite card, shown in an exemplary embodiment of the present application;
[0032] Fig.12 A structural block diagram of an instruction interaction device for simulating a card provided by an exemplary embodiment of the present application is shown;
[0033] Fig.13 A structural block diagram of an instruction interaction device for simulating a card provided by an exemplary embodiment of the present application is shown;
[0034] Fig.14 A structural block diagram of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0035] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0036] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0037] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment shown in an exemplary embodiment of the present application. The implementation environment includes a terminal 110 and a card reader 120.
[0038] The terminal 110 is an electronic device with NFC function, which may be a smart phone, a tablet computer, a smart wearable device or a personal computer, etc. The NFC function may include an NFC input function and an NFC card swiping function. The NFC input function is used to input the card information of the physical NFC card into the terminal and generate a simulated card corresponding to the physical NFC card. The NFC card swiping function is used to interact with the card reader based on the card information of the simulated card to realize specific card swiping functions, such as opening a door, deducting fees, unlocking a vehicle, etc.
[0039] The card reader 120 is a device for reading relevant data in an NFC physical card or a simulated card in a terminal. In some possible application scenarios, the card reader 120 may be an access control card reader set at an access control, used to control the opening and closing of the access control; the card reader 120 may be a transportation card reader set at a transportation vehicle or transportation station, used to implement transportation fee deduction; the card reader 120 may also be a vehicle key card reader integrated in a vehicle, used to implement a vehicle unlocking function. The embodiments of the present application do not limit the specific type of the card reader 120.
[0040] In the embodiment of the present application, the terminal 110 supports single card activation and multi-card activation modes. In the multi-card activation mode, when multiple analog cards meet the composite conditions, the terminal 110 can create a composite card corresponding to the multiple analog cards, and set the contactless parameters of the composite card based on the contactless parameters of each analog card. When interacting with the card reader 120 later, the terminal 110 can interact with the card reader 120 in initialization, anti-collision, and protocol transmission according to the contactless parameters of the composite card, so as to realize the simultaneous activation of multiple analog cards, and then select the analog card matching the card reader 120 from the multiple analog cards based on the instructions sent by the card reader 120 to interact, eliminating the user's manual switching of analog cards.
[0041] In the following embodiments, the instruction interaction method of the simulated card is used in the terminal 110 as an example for description.
[0042] Please refer to Figure 2 , which shows a flow chart of a command interaction method for simulating a card provided by an exemplary embodiment of the present application. The method comprises the following steps:
[0043] Step 201: Create a composite card corresponding to at least two simulated cards.
[0044] The simulated card is a virtual card generated by the terminal simulation. In a possible implementation, the terminal can copy the information of the physical card to the simulated card, so that the simulated card has the same functions as the physical card. For example, the terminal copies the internal data of the access card by bringing it close to the access card.
[0045] In another possible implementation, the terminal may obtain a simulated card by configuring the card. For example, the terminal adds a simulated bank card by inputting information such as a bank card number and a password.
[0046] When multiple cards are swiped at the same time, although the card reader can poll the physical card and find the corresponding card through anti-collision instructions or card selection instructions, the simulated card of the terminal is different from the physical card. Since different simulated cards have different corresponding contactless parameters, the terminal can only use one simulated card for swiping at a time, that is, the terminal can only activate one simulated card for swiping at a time. Therefore, after the card swiping fails, the terminal needs to switch the simulated card and then swipe the card again.
[0047] When the terminal fails to swipe the card using the wrong card, it is necessary to switch to the analog card first and then swipe the card again, resulting in low terminal swiping efficiency. Therefore, in order to improve the card swiping efficiency, the terminal merges two or more analog cards into a composite card, and uses the contactless parameters of the composite card to respond to the corresponding card reader instructions when swiping the card.
[0048] It should be noted that, since different analog cards have different corresponding contactless parameters, not all analog cards can be used to create composite cards. For n analog cards, they need to meet the corresponding composite conditions, and the terminal can create corresponding composite cards for n analog cards, where n is greater than or equal to 2.
[0049] The composite conditions that need to be met to create a composite card may include type composite conditions and parameter composite conditions. The type composite condition indicates that at least two analog cards need to meet a specific type combination. The parameter composite condition indicates that the contactless parameters of at least two analog cards need to be able to be integrated.
[0050] In a possible implementation, when at least two simulated cards meet the type composite condition, the terminal determines whether the contactless parameters of the at least two simulated cards meet the parameter composite condition, and when the parameter composite condition is met, the terminal creates a composite card.
[0051] In some embodiments, one or more composite cards may be created in the terminal, and different composite cards may be composited from completely different analog cards or composited from partially identical analog cards. For example, the first composite card is composited from access card A, bus card A, and digital car key A, the second composite card is composited from access card B, bus card A, and digital car key A, and the third composite card is composited from bus card B and access card A.
[0052] Step 202: merging the contactless parameters corresponding to at least two simulated cards to obtain target contactless parameters of the composite card, and activating the composite card.
[0053] Among them, activation indicates that the simulated card can respond to the card reading instruction sent by the card reader, that is, the activated simulated card is in a usable state. After activating the composite card, at least two simulated cards corresponding to the composite card are in an activated state, that is, they can respond to the card reading instruction sent by the card reader. Contactless parameters are used to realize wireless communication between contactless IC (Integrated Circuit) cards and card readers, such as UID (Unique Identifier) parameters, ATS (Answer to Select) parameters, SAK (Select AcKnowledge) parameters, ATQA (Answer To Request, Type A) parameters, etc.
[0054] Since the terminal responds to the card reading command according to the corresponding parameters in the contactless parameters during the interaction with the card reader, in order to obtain the target contactless parameters of the composite card, it is necessary to merge the contactless parameters of the multiple analog cards used for composite. Among them, the target contactless parameters of the composite card can be used to realize the command interaction between each analog card and the card reader before composite.
[0055] Step 203: upon receiving a card reading instruction sent by the card reader, perform instruction interaction with the card reader based on the target contactless parameter.
[0056] When the terminal uses a composite card whose contactless parameters are target contactless parameters to swipe the card, the terminal interacts with the card reader. According to the card reader instruction, the terminal responds using the contactless parameters of the corresponding type in the target contactless parameters. Since the target contactless parameters of the composite card incorporate the contactless parameters of multiple analog cards corresponding to the composite card, multiple analog cards can respond to the instructions sent by the card reader, that is, multiple analog cards are activated. Furthermore, the terminal can determine the analog card corresponding to the card reader among multiple analog cards through the instructions sent by the card reader, and then perform instruction interaction.
[0057] In summary, in the embodiment of the present application, in order to save the time of the terminal switching cards after the card swiping fails, the terminal first creates a corresponding composite card for at least two simulated cards, and then merges the contactless parameters corresponding to each simulated card to obtain the target contactless parameters corresponding to the composite card. In the subsequent card swiping process, the terminal responds to the card reading instruction sent by the card reader based on the target contactless parameters to realize the instruction interaction between the composite card and the card reader. After obtaining the target contactless parameters corresponding to the composite card, the terminal activates the composite card. When the terminal uses the target contactless parameters of the composite card to interact with the reading card, the multiple simulated cards corresponding to the composite card are all in an activated state. Therefore, the terminal can autonomously select the simulated card for instruction interaction according to the instruction sent by the card reader, eliminating the user's manual switching of the simulated card operation, simplifying the card swiping process, and improving the card swiping efficiency.
[0058] In the process of creating a composite card corresponding to at least two analog cards, the composite conditions of the at least two analog cards may include a type composite condition and a parameter composite condition. The at least two analog cards first need to meet the type composite condition, that is, meet a specific card type combination, and then when the card type meets the type composite condition, the terminal determines whether the contactless parameters of the at least two analog cards can be merged. When the contactless parameters corresponding to each analog card can be merged, the at least two analog cards meet the parameter composite condition, and then the terminal creates the composite card.
[0059] Please refer to Figure 3 , which shows a flow chart of a command interaction method for simulating a card provided by another exemplary embodiment of the present application. The method comprises the following steps:
[0060] Step 301, obtaining the card type of the recorded simulated card, where the card type includes access control type and non-access control type.
[0061] According to the different authentication methods of analog cards, the card types of analog cards can be divided into access control type and non-access control type. Among them, the access control type analog card is authenticated by the UID in the contactless parameter.
[0062] The non-access control type is different from the access control type. The non-access control type analog card is not authenticated by UID. In one possible implementation, the non-access control type analog card is authenticated by AID (Application Identifier). For example, the digital car key of an electric car, or the analog bus card.
[0063] Step 302: When there are at least two simulated cards whose card types meet the type composite condition, create a composite card corresponding to the at least two simulated cards.
[0064] Since different card types have different authentication methods for simulated cards, not any combination of simulated cards can be used to create a corresponding composite card. Therefore, the terminal needs to further determine the card type composite condition according to the card type.
[0065] Since the UIDs of different access control type simulation cards are different, and one access control type simulation card has only one UID corresponding to it, the terminal cannot obtain the UID that can represent two or more access control type simulation cards through fusion, so the access control type simulation cards cannot be fused with each other.
[0066] Since the authentication methods of non-access control type and access control type analog cards are different, the access control type uses the contactless parameter UID, while the non-access control type does not authenticate through UID, so an access control type analog card can be integrated with one or more non-access control type analog cards.
[0067] Similarly, multiple non-access control type analog cards can be integrated with each other.
[0068] From the above reasoning, it can be seen that type compound conditions can be divided into the following two cases according to the card type.
[0069] 1. The card types of different simulated cards are all non-access control types.
[0070] 2. Among the different simulated cards, one simulated card has a card type of access control type.
[0071] Since the contactless parameters of different access control cards are different, not all contactless parameters can be merged when the card types of at least two simulated cards meet the type composite condition.
[0072] In the case where there are at least two simulated cards whose card types meet the type composite conditions, in order to merge the contactless parameters of each simulated card, the contactless parameters of at least two simulated cards need to meet certain parameter composite conditions. Therefore, in the case where there are at least two simulated cards whose card types meet the type composite conditions, the terminal creates a composite card corresponding to at least two simulated cards, and may also include the following sub-steps.
[0073] 1. Obtain the contactless parameters corresponding to at least two analog cards.
[0074] 2. When the non-contact parameters meet the parameter composite conditions, create a composite card corresponding to at least two simulated cards.
[0075] Since the formats of the same type of contactless parameters of various analog cards may not be uniform, the situations where the contactless parameters meet the parameter compound conditions may include:
[0076] When the parameter formats of the same type of contactless parameters corresponding to at least two simulated cards are consistent, it is determined that the contactless parameters meet the parameter composite condition, and a composite card corresponding to the at least two simulated cards is created.
[0077] For example, the length of the UID of each simulated card may be different. The UID of the access card may be 4 bytes or 7 bytes, and the UID of the bus card is generally 4 bytes. The access card is of the access control type, and the bus card is of the non-access control type, which meets the type composite condition. However, the access card with a 7-byte UID cannot be integrated with the bus card with a 4-byte UID. The access card with a 4-byte UID and the bus card with a 4-byte UID meet the parameter composite condition because the UID format is consistent. You can create a composite card corresponding to the access card with a 4-byte UID and the bus card.
[0078] Step 303: Based on the card types of at least two simulated cards, different types of contactless parameters corresponding to the at least two simulated cards are fused to obtain target contactless parameters of the composite card. The card types include access control type and non-access control type.
[0079] In some embodiments, the contactless parameter types of the simulated card include ATQA, UID, ATS, and SAK. Among them, ATQA is used to respond to the card inquiry instruction of the card reader, indicating that there is a simulated card in the radio frequency field that can respond to the card reader instruction. UID is the unique identification identifier of the access control type card. The SAK parameter is included in the SAK response and is used to respond to the card selection instruction sent by the card reader. The card reader verifies the communication protocol supported by the simulated card by checking the individual bytes in the SAK response. The ATS parameter is included in the ATS response and is used to respond to the RATS (Request ATS, select response request) instruction sent by the card reader. ATS is only a contactless parameter for non-access control type simulated cards.
[0080] It should be noted that Type A in the contactless parameter ATQA indicates a type A card response. For a type B card, the contactless parameter type used to respond to the card reader's card inquiry command is ATQB (Answer To Request, Type B).
[0081] Since each analog card has the contactless parameters as described above, and the target contactless parameters are obtained by fusing the contactless parameters of the analog cards, the target contactless parameters also need to include the contactless parameters of the above type.
[0082] Optionally, the terminal may fuse the same type of contactless parameters according to the type of the contactless parameters. The fusion process of different types of contactless parameters is as follows.
[0083] 1. The process of determining the target UID of the composite card.
[0084] In the first case, the card types of at least two simulated cards are non-access control types.
[0085] Since non-access control type analog cards are not authenticated by UID, the content of the target UID will not affect the card reader's ability to find and interact with the corresponding analog card. The terminal can determine the UID of any analog card as the target UID.
[0086] For example, when a composite card contains a bus card and a car key, the UID of the bus card is UID1, and the UID of the car key is UID2. Since determining UID1 or UID2 as the target UID does not affect card authentication, the terminal can determine UID1 as the target UID of the composite card, or determine UID2 as the target UID of the composite card.
[0087] In the second case, the card type of at least one of the two simulated cards is a access control type.
[0088] Among them, the card type of the first simulated card is the access control type, and the card type of at least one second simulated card is the non-access control type.
[0089] When the UID of the second simulated card is determined as the target UID, since the first simulated card is authenticated by UID, the UID of the first simulated card does not exist in the target contactless parameters of the composite card, resulting in the terminal using the composite card to swipe the card reader corresponding to the first simulated card, and the card swiping fails. When the UID of the first simulated card is determined as the target UID, the terminal uses the UID of the first simulated card to interact with the access control type card reader, and the card swiping succeeds.
[0090] Therefore, in order to ensure that when using a composite card to interact with an access control type reader, the access control type reader can obtain the UID of the first simulated card among the multiple simulated cards corresponding to the composite card, and then complete the access control unlocking, the terminal determines the UID of the first simulated card as the target UID of the composite card.
[0091] For example, when the composite card contains an access card and a bus card, the UID of the access card is UID1, and the UID of the bus card is UID2. When the composite card determines the UID2 of the bus card as the target UID, the access card reader cannot obtain the UID1 corresponding to the access card, resulting in the failure of the access card reader to swipe the card; when the UID1 of the access card is determined as the target UID, during the terminal swiping process, the terminal can send the UID1 of the access card to the access card reader. After the UID matching is successful, the access control is unlocked, so the terminal determines UID1 as the target UID.
[0092] 2. The process of determining the target SAK parameters of the composite card.
[0093] In the first case, the card types of at least two simulated cards are non-access control types.
[0094] Since non-access control type analog cards use the same communication protocol to receive the instructions sent by the card reader, the terminal determines the SAK corresponding to the communication protocol applicable to the non-access control type as the target SAK parameter. For example, non-access control type analog cards all use the ISO14443 protocol, and the SAK parameter corresponding to the ISO14443 protocol is 0x20, so 0x20 can be determined as the target SAK parameter first.
[0095] In the second case, the card type of at least one of the two simulated cards is a access control type.
[0096] Since the communication protocols applicable to access control type analog cards and non-access control type analog cards are different, the SAK parameters of access control type cards are different from those of non-access control type cards. Access control type analog cards correspond to the first SAK parameter, and non-access control type analog cards correspond to the second SAK parameter.
[0097] Because the non-zero data of the first SAK parameter of the access control type card and the second SAK parameter of the non-access control type card occupy different byte positions, the card reader only checks the bytes where the non-zero data is located when checking the SAK parameters. Therefore, the first SAK parameter and the second SAK parameter can be combined to obtain the third SAK parameter.
[0098] For example, the communication protocol applicable to the access control type analog card is the Mifare protocol, and its corresponding SAK parameter is 0x08, while the communication protocol applicable to the non-access control type analog card is the ISO14443 protocol, and its corresponding SAK parameter is 0x20. Since the access control type card reader only verifies the byte where 8 is located, and does not verify the byte where 0 is located, while the non-access control card reader only verifies the byte where 2 is located, and does not verify the byte where 0 is located, the byte positions verified by the access control type card reader and the non-access control type card reader are different, so the SAK parameters can be merged to obtain 0x28, and 0x28 is determined to be the target SAK parameter.
[0099] 3. The process of determining the target ATS parameters of the composite card.
[0100] Since access control type analog cards usually do not have ATS parameters, while non-access control type analog cards usually have ATS parameters, the terminal can merge the ATS parameters of non-access control type analog cards as the target ATS parameters of the composite card. For example, bus card A has ATS parameter 1, and bus card B has ATS parameter 2. The target ATS parameter of the composite card including access control card, bus cards A and B is obtained by merging the ATS parameters of bus cards A and B.
[0101] It should be noted that since non-access control type analog cards may not have ATS parameters, when performing ATS parameter fusion, the terminal only fuses the ATS parameters of non-access control type analog cards that have ATS parameters.
[0102] Since the ATS parameter types of non-access control analog cards are different, not all analog cards with ATS parameters can be integrated with each other.
[0103] Indicatively, Figure 4 The field types included in the ATS response are shown, where the number of fields from T1 to Tn is indefinite, that is, the value of n is indefinite. Different non-access control type simulation cards have different field types and numbers at this position. Therefore, different non-access control type simulation cards have different ATS parameter types. When the ATS response of simulation card A has T1 to T5 fields, and the ATS response of simulation card B has only T1 to T3 fields, the terminal cannot fuse their ATS parameters.
[0104] For non-access control type analog cards with the same ATS parameter type, during the ATS parameter fusion process, the terminal fuses the same type of parameters.
[0105] In some embodiments, the ATS parameters include a waiting time parameter and a communication rate parameter. The waiting time parameter is used for the terminal to report to the card reader the time range required for the card reader to wait for the terminal to respond after the terminal receives the card reader instruction, that is, the maximum waiting time. The communication rate parameter is used to report to the card reader the fastest communication transmission rate supported by the terminal.
[0106] For example, Figure 4 As shown, the field types included in the ATS response, wherein the waiting time parameter is located in part of the TB(1) byte in the ATS response, and the communication rate parameter is located in part of the TA(1) byte in the ATS response.
[0107] Since the waiting time parameter indicates the maximum time range that the card reader waits for the terminal to respond, and the communication rate parameter indicates the fastest communication transmission rate supported by the terminal, the maximum waiting time parameter among the ATS parameters of multiple non-access control type analog cards can be determined as the target waiting time parameter in the target ATS parameters, and the minimum communication rate parameter among the ATS parameters of multiple non-access control type analog cards can be determined as the target communication rate parameter in the target ATS parameters. For example, when the communication rate corresponding to analog card A is 212kbps and the communication rate corresponding to analog card B is 424kbps, the communication rate corresponding to analog card B is faster than the communication rate corresponding to analog card A, and the terminal determines the communication rate parameter corresponding to analog card B as the target communication rate parameter in the ATS parameters.
[0108] 4. The process of determining the target ATQA parameters of the composite card.
[0109] In the case where the access control type analog card and the non-access control type analog card apply the same two ATQA parameters, namely 0400 and 0800, the terminal can take the common ATQA parameter as the composite card target ATQA parameter. For example, the target ATQA parameter can be 0x0400, and for another example, the target ATQA parameter can also be 0x0800, and all ATQA response card readers containing these two parameters can be identified.
[0110] It should be noted that the above-mentioned contactless parameter fusion method is applicable to most analog cards. However, after the contactless parameter fusion is performed based on the above-mentioned method, the card reader may not be able to recognize the fused target contactless parameters. Therefore, the terminal can determine multiple candidate contactless parameter fusion methods. When the card reader fails to recognize, the terminal changes the contactless parameter fusion method and re-acquires the target contactless parameters.
[0111] For example, in the contactless parameter fusion process of the bus card and the access card, the ATQA parameter of the bus card is 0x0800, and the ATQA parameter of the access card is 0x4400. The access card reader may not be able to recognize the fused target ATQA parameter 0x0800. The terminal determines 0x0800 and 0x4400 as candidate ATQA parameters respectively. When the access card reader fails to recognize 0x0800, the terminal determines 0x4400 as the target ATQA parameter.
[0112] For example, the SAK parameter of the bus card is 0x20, the SAK parameter of most access control cards is 0x08, and there are a few access control cards with SAK parameters of 0x18. In the process of contactless parameter fusion of the bus card and the access control card, the terminal can determine 0x28 and 0x38 as candidate SAK parameters respectively. When the access control card reader fails to recognize 0x28, the terminal determines 0x38 as the target SAK parameter. In addition, the terminal can count the number of successful and failed recognitions of the card reader, and determine the contactless parameter fusion method with the highest recognition success rate of the card reader as the target contactless parameter fusion method.
[0113] After obtaining the target contactless parameters, the terminal activates the composite card so that the multiple analog cards corresponding to the composite card are all in an activated state, so that the multiple analog cards can respond to the card reading instruction sent by the card reader, and the terminal can select the corresponding analog card to respond according to the instruction sent by the card reader.
[0114] Step 304: upon receiving a card reading instruction sent by the card reader, perform instruction interaction with the card reader based on the target contactless parameter.
[0115] Since the composite card performs contactless parameter fusion, the terminal responds to the command sent by the card reader using the target contactless parameters obtained by fusion.
[0116] In one possible implementation, the card reader first sends an anti-collision instruction to the terminal. Since the composite card has undergone contactless parameter fusion, the terminal reports the target UID of the composite card to the card reader. After receiving the UID reported by the terminal, the card reader uploads the UID to the background, which performs a UID comparison. After confirming that the UID reported by the terminal exists in the background database, the access control is unlocked.
[0117] In another possible implementation, the card reader first sends a RATS command to the terminal. Since the composite card has already undergone contactless parameter fusion, the terminal sends an ATS response containing the target ATS parameters to the card reader, and reports to the card reader information such as the waiting time and communication rate required for subsequent command interaction.
[0118] In another possible implementation, the card reader first sends a card selection instruction to the terminal, and then the terminal reports the communication protocol required for subsequent instruction interaction to the card reader by sending a SAK response including target SAK parameters to the card reader.
[0119] Schematically, the instruction interaction process between the bus card and the card reader is as follows: Figure 5 As shown, PCD (Proximity Coupling Device) represents the card reader, PCD_A represents the instruction sent by the card reader to the terminal, PICC (Proximity Card) is the bus card, and PICC_A represents the instruction sent by the terminal to the card reader. After the card reader sends the anti-collision instruction ANTICOLLISION to the terminal, the UID reported by the terminal to the card reader is 6F 3C CB 4CD4. Subsequently, after the card reader sends the card selection instruction SELECT to the terminal, the terminal sends a SAK response to the card reader, where the SAK parameter is 0x20. Since the bus card is a non-access control type analog card, after the card reader sends the RATS instruction to the terminal, the terminal sends an ATS response to the card reader.
[0120] It should be noted that the composite card can realize the command exchange between any analog card participating in the fusion and the card reader.
[0121] For example, when a composite card combines an access card, a bus card, and a car key, the composite card can interact with the bus card reader, the access card reader, and the car key reader.
[0122] For example, Figure 6As shown, when the composite card integrates the access card, bus card and car key, and interacts with the access card reader 601, the access card reader 601 first sends a card search command to the terminal 602 to monitor whether there is a card in the radio frequency field. After receiving the card search command, the terminal 602 sends an ATQA response to the access card reader 601. Then the access card reader 601 sends an anti-collision command to the terminal 602 to obtain the UID of the access card. After receiving the anti-collision command, the terminal 602 sends a UID response to the access card reader 601. After the access card reader 601 receives the UID sent by the terminal 602, the access card reader 601 transmits the UID to the background database 603 for UID matching. When the UID matches successfully, the access control is unlocked successfully.
[0123] For example, Figure 7 As shown, when the composite card integrates the access card, bus card and car key, and interacts with the bus card reader 701, the bus card reader 701 first sends a card search instruction to the terminal 702. After receiving the card search instruction, the terminal 702 sends an ATQA response to the bus card reader 701, and then the bus card reader 701 sends an anti-collision instruction to the terminal 702, and the terminal 702 sends a UID response to the bus card reader 701. Since the bus card is not authenticated by the UID, the bus card reader 701 continues to send a card selection instruction to the terminal 702. The terminal 702 sends a SAK response to the bus card reader 701, reports its applicable communication protocol to the bus card reader 701, and then the bus card reader 701 sends a RATS instruction to the terminal 702 to obtain the relevant parameters for subsequent communication, and the terminal 702 sends an ATS response containing ATS parameters to the bus card reader 701.
[0124] In order to authenticate the bus card and determine the application corresponding to the bus card, the bus card reader 701 sends an AID polling instruction to the terminal 702, and receives a confirmation signal from the terminal 702 for each AID sent by the bus card reader 701, that is, when the terminal 702 confirms that it has the AID sent by the bus card reader 701, it sends a signal with the AID to the bus card reader 701, and when the terminal 702 does not have the AID, it sends a signal to the bus card reader 701 that it does not have the AID.
[0125] After the bus card reader 701 receives the confirmation signal from the terminal 702, the bus card reader 701 can perform a balance query and deduction operation on the bus card. When the bus card is checked for balance, the bus card reader 701 first sends a balance query instruction to the terminal 702 to query the first data of the bus card, that is, the balance data. After receiving the instruction, the terminal 702 sends the first data of the bus card to the bus card reader 701. When the bus card is deducted, the bus card reader 701 first sends a deduction instruction to the terminal 702, and the terminal 702 transmits the second data to the bus card reader 701. Then the bus card reader 701 performs a deduction process on the second data of the bus card to deduct the bus fee. Among them, the second data fed back can be the balance data after the deduction.
[0126] For example, Figure 8 As shown, when the composite card integrates the access card, bus card and car key, and the composite card interacts with the car key reader 801, the car key reader 801 first sends a card search command to the terminal 802, and the terminal 802 sends an ATQA response to the car key reader 801. Then the car key reader 801 sends an anti-collision command to the terminal 802, and the terminal 802 sends a UID response to the car key reader 801. Since the car key reader 801 does not use the UID for authentication, the car key reader 801 continues to send a card selection command. After receiving the card selection command, the terminal 802 sends a SAK response and reports its applicable protocol to the car key reader 801. Then the car key reader 801 sends a RATS command to the terminal 802, and the terminal 802 sends an ATS response containing ATS parameters to the car key reader 801. Since the car key has no strict requirements on the ATS parameter content, the ATS parameters of the bus card are also applicable to the car key. And because the access control card does not have ATS parameters, after the ATS parameters are merged, the ATS response contains the ATS parameters of the bus card.
[0127] In order to authenticate the car key and determine the application corresponding to the car key, the car key reader 801 sends an AID polling instruction to the terminal 802, and receives a confirmation signal from the terminal 802 for each AID sent by the car key reader 801, that is, when the terminal 802 confirms that it has the AID sent by the car key reader 801, it sends a signal with the AID to the car key reader 801; when the terminal 802 does not have the AID, it sends a signal to the car key reader 801 that it does not have the AID.
[0128] In addition, when the composite card includes an access card, a bus card, car key 1 and car key 2, after the car key reader receives the confirmation signal from the terminal, the car key reader uses the AID confirmed by the terminal to determine the corresponding application. When the applications corresponding to car key 1 and car key 2 are the same, in order to distinguish car key 1 from car key 2, the card reader uses the application to send an authentication command, and the terminal responds to the authentication command, thereby determining that the car key corresponding to the car key reader is car key 1, and using the authentication information of car key 1 for identity authentication.
[0129] Optionally, after the terminal sends an ATS response to the card reader, the card reader determines the target simulated card through the AID.
[0130] In one possible implementation, the card reader sends an AID polling instruction to the terminal, that is, the card reader sends the AIDs of the applications it supports to the terminal one by one. After receiving the AID sent by the card reader, the terminal reports to the card reader whether it has the AID, thereby determining the target simulated card corresponding to the card reader, and the card reader obtains the corresponding application according to the matched target AID, and uses the application to perform subsequent operations on the non-access control card, such as data query, data modification, etc.
[0131] Indicatively, Fig. 9 As shown, when the composite card of terminal 901 includes access card, bus card, car key 1 and car key 2, the AID corresponding to the bus card is AID3, the AID corresponding to the access card is AID4, the AID corresponding to car key 1 is AID5, and the AID corresponding to car key 2 is AID6. The AIDs supported by bus card reader 902 are AID1, AID2 and AID3. Bus card reader 902 first sends AID1 to terminal 901, and terminal 901 confirms that AID1 is not supported through matching, and sends response 1, indicating that there is no AID1; bus card reader 902 then sends AID2 to terminal 901, and terminal 901 confirms that AID2 is not supported through matching, and sends response 2, indicating that there is no AID2; bus card reader 902 finally sends AID3 to terminal 901, and terminal 901 confirms that AID3 is supported through matching, and sends response 3, indicating that there is AID3. After receiving the response 3 from the terminal 901 , the bus card reader 902 selects the corresponding application according to AID3 and modifies the balance of the corresponding bus card supporting AID3.
[0132] When the card reader sends a data query instruction to the terminal, the terminal sends the query result in the target simulated card to the card reader according to the waiting time, communication rate and other parameters defined in the target ATS parameters of the composite card, that is, the first data corresponding to the target simulated card queried by the card reader.
[0133] When the card reader sends a data operation instruction to the terminal, the data operation instruction may include data modification, data deletion, data addition and other operations to change the data in the simulated card. Since the card reader needs to use the waiting time parameters and communication rate parameters to communicate with the terminal, the terminal performs corresponding operations on the data in the target simulated card according to the waiting time, communication rate and other parameters defined in the target ATS parameters of the composite card. For example, the card reader sends a data modification instruction, and the terminal modifies the corresponding data in the target simulated card, such as modifying the balance data corresponding to the target simulated card.
[0134] In the embodiment of the present application, the terminal first determines whether the composite simulated card meets the composite condition based on the card type of the simulated card that has been entered, and then creates a composite card and merges the contactless parameters of each simulated card in it if the composite condition is met, thereby determining the target contactless parameters of the composite card, and finally responds to the command sent to the terminal by the card reader based on the determined target contactless parameters of the composite card. Among them, the method of determining the composite condition based on the card type is conducive to the reasonable fusion of different types of simulated cards, thereby obtaining the target contactless parameters of each type of contactless parameters that do not conflict with each other, so that the composite card can normally respond to the command sent by the card reader and complete the command interaction.
[0135] After obtaining the composite card, the terminal uses the composite card to interact with the card reader to implement the card swiping operation. In a possible implementation, when the terminal is close to the card reader, the screen is not turned on for display, and the card swiping operation is completed through the background automatic card composite and instruction interaction operation.
[0136] Although the card readers produced by different manufacturers are manufactured according to the common protocol standards, there are still compatibility issues in some details. For example, when reading the SAK parameter of the SAK response, there is a type of access control card reader that verifies the entire SAK parameter byte instead of just part of the bytes, causing the fused SAK parameter 0x28 to become an illegal parameter, causing the composite card to fail to swipe.
[0137] Therefore, in order to solve the problem of card swiping failure, in a possible implementation, after the card swiping fails, the terminal restores the composite card to the original simulated card before fusion, and switches the card to the third simulated card.
[0138] Among them, the terminal may monitor the failure of composite card swiping in the following two situations:
[0139] 1. When the number of consecutive card swipes reaches the threshold, the terminal determines that the composite card swipe has failed.
[0140] For example, the terminal starts timing from the first card swipe. If the card is swiped three or more times in a row within 1 minute (for example, the terminal detects that the card enters the radio frequency field three or more times in a short period of time), it determines that the composite card swipe fails and switches the composite card to the third analog card.
[0141] 2. When the duration of the terminal being in the radio frequency field reaches a duration threshold, the terminal determines that the composite card swiping fails.
[0142] For example, the terminal starts timing from the first card swipe, and when the time the terminal is in the radio frequency field reaches a time threshold of 10 seconds, it is determined that the composite card swipe fails.
[0143] After the composite card fails to be swiped, the terminal determines the simulated card with the highest possibility of use as the third simulated card from the single simulated cards contained in the composite card.
[0144] In a possible implementation, the terminal can determine the currently required simulated card by monitoring the current geographical location. For example, when the terminal determines that it is located in Shenzhen through positioning, the user is more likely to use the simulated bus card of Shenzhen, and the terminal switches to the simulated bus card of Shenzhen.
[0145] In another possible implementation, the terminal can determine the currently required analog card by counting the usage frequency of the cards in a short period of time. For example, the terminal obtains through statistics that the analog card with the highest usage frequency in a week is the community access card, and the user is most likely to use this analog card in the current scenario, so the terminal switches to the community access card.
[0146] Optionally, in a possible implementation, the terminal may also determine the third simulated card by analyzing the reason for the card swiping failure. For example, the terminal concludes through analysis that the reason for the card swiping failure is the failure of the card reader UID matching, so the terminal may determine other access control cards except the access control card in the current composite card as the third simulated card.
[0147] In an embodiment of the present application, after a card swiping fails, the terminal cancels the composite card, determines a third simulated card among the simulated cards originally involved in the composite, and uses the contactless parameters of the third simulated card to interact with the card reader for instructions, so that the terminal automatically switches cards after a composite card swiping fails, thereby simplifying the card swiping process and improving the efficiency of card swiping.
[0148] Although the composite card swiping process is performed in the backend, the user needs to operate through the UI interface when adding or deleting cards, so the composite card also needs to be displayed in the front-end interface. Therefore, the instruction interaction method of the simulated card can include the following steps.
[0149] 1. Display the activated card in the card swiping interface. The card is a composite card or at least two simulated cards. The composite card is obtained by combining at least two simulated cards.
[0150] Activation means that the analog card can respond to the card reading instruction sent by the card reader, that is, the activated analog card is in a usable state. After the composite card is activated, at least two analog cards corresponding to the composite card are in an activated state, that is, they can respond to the card reading instruction sent by the card reader.
[0151] Optionally, the terminal may list and display the participating activated cards in a tiled or stacked manner, or may use a new simulated card to represent the activated composite card.
[0152] Indicatively, Fig.10 As shown, in the tiling diagram 1001, the terminal lists the activated cards in the UI interface in a tiling manner. In the stacking diagram 1002, the terminal lists the activated cards in the UI interface in a stacking manner. In the composite card diagram 1003, the terminal displays the activated cards in the UI interface as a new card, and the new card is the composite card.
[0153] 2. Perform command interaction with the card reader based on the target contactless parameters of the composite card, where the target contactless parameters are obtained by integrating the contactless parameters corresponding to at least two simulated cards.
[0154] The implementation of this step can refer to the above steps 303 and 304, and this embodiment will not be repeated here. In the case of composite card swiping failure, the terminal can activate a single simulated card to swipe the card. Therefore, the terminal can also perform the following steps after composite card swiping fails.
[0155] 3. When the number of consecutive card swiping failures reaches the number threshold, or the duration in the radio frequency field reaches the duration threshold, the simulated card in the first form and the second form are displayed in the card swiping interface, wherein the simulated card in the first form is in an activated state, and the simulated card in the second form is in a deactivated state.
[0156] When the number of consecutive card swiping failures reaches the number threshold, or the duration in the radio frequency field reaches the duration threshold, the terminal detects that the card swiping failed and switches to the third simulated card. In order to make it more convenient for users to swipe the card, the terminal changes the UI interface of the simulated card. Among them, the third simulated card is the first form simulated card displayed in the card swiping interface, and the third simulated card is in an activated state. The other simulated cards are the second form simulated cards and are in a deactivated state.
[0157] In a possible implementation, the terminal displays the simulated card in the first form as a large icon at the top of the interface, and displays the simulated card in the second form as small icons laid out or stacked at the bottom of the interface.
[0158] Indicatively, Fig.11 As shown, in the flattening diagram 1101, when the composite card includes the access card, car key 1, car key 2 and bus card, after the terminal fails to swipe the card, the terminal activates the access card and then displays the access card at the top of the interface. Then the terminal deactivates car key 1, car key 2 and bus card and then flattens car key 1, car key 2 and bus card at the bottom of the interface. In the stacking diagram 1102, car key 1, car key 2 and bus card are stacked at the bottom of the interface.
[0159] 4. Interact with the card reader based on the contactless parameters of the activated simulated card.
[0160] When the activated analog card receives a card reading instruction sent by the card reader, it interacts with the card reader based on its own contactless parameters.
[0161] In the embodiment of the present application, the terminal provides the user with a composite card UI interface, so that the user can operate the composite card through a visual interface, making the use of the composite card more convenient. After the card swipe fails, the terminal displays the switched card at the top of the interface and displays other simulated cards at the bottom of the interface, so that the user can identify the currently used card and switch cards when the card swipe fails.
[0162] Please refer to Fig.12 , which shows a structural block diagram of a command interaction device for simulating a card provided by an exemplary embodiment of the present application. The device includes:
[0163] A creation module 1201, used for creating a composite card corresponding to at least two simulated cards;
[0164] A fusion module 1202 is used to fuse the contactless parameters corresponding to the at least two simulation cards to obtain the target contactless parameters of the composite card and activate the composite card;
[0165] The interaction module 1203 is used to perform instruction interaction with the card reader based on the target contactless parameter when receiving a card reading instruction sent by the card reader.
[0166] Optionally, the creation module 1201 is further used to:
[0167] Obtain the card type of the recorded simulated card, where the card type includes access control type and non-access control type;
[0168] In the case that there are at least two simulated cards whose card types satisfy the type composite condition, the composite card corresponding to the at least two simulated cards is created.
[0169] Optionally, the creation module 1201 is further used to:
[0170] In the case that there are at least two simulated cards whose card types are both the non-access control type, determining that the at least two simulated cards meet the type composite condition, and creating the composite card corresponding to the at least two simulated cards;
[0171] In the case that the card type of one of the at least two simulated cards is the access control type, it is determined that the at least two simulated cards meet the type composite condition, and the composite card corresponding to the at least two simulated cards is created.
[0172] Optionally, the creation module 1201 is further used to:
[0173] Acquire the contactless parameters corresponding to the at least two simulation cards respectively;
[0174] In the case where the contactless parameters satisfy the parameter composite condition, the composite card corresponding to the at least two simulated cards is created.
[0175] Optionally, the creation module 1201 is further used to:
[0176] When the parameter formats of the same type of contactless parameters corresponding to the at least two analog cards are consistent, determine that the contactless parameters meet the parameter composite condition, and create the composite card corresponding to the at least two analog cards. Optionally, the fusion module 1202 is further configured to:
[0177] Based on the card types of the at least two simulated cards, the contactless parameters of different types corresponding to the at least two simulated cards are fused to obtain the target contactless parameters of the composite card, wherein the card types include access control type and non-access control type.
[0178] Optionally, the fusion module 1202 is further used for:
[0179] In the case where the card type of a first simulated card among the at least two simulated cards is the access control type, and the card type of at least one second simulated card among the at least two simulated cards is the non-access control type, determining the UID of the first simulated card as the target UID of the composite card;
[0180] In the case that the card types of the at least two simulated cards are both non-access control types, the UID of any one of the at least two simulated cards is determined as the target UID of the composite card.
[0181] Optionally, the fusion module 1202 is further used for:
[0182] The ATS parameters of the non-access control type analog card among the at least two analog cards are fused to obtain the target ATS parameters of the composite card.
[0183] Optionally, the fusion module 1202 is further used for:
[0184] Determine the maximum waiting time parameter in the ATS parameter as the target waiting time parameter in the target ATS parameter;
[0185] The minimum communication rate parameter in the ATS parameters is determined as the target communication rate parameter in the target ATS parameters.
[0186] Optionally, the fusion module 1202 is further used for:
[0187] In the case where the card type of the first analog card among the at least two analog cards is the access control type, and the card type of at least one second analog card among the at least two analog cards is the non-access control type, a first SAK parameter characterizing the access control type and a second SAK parameter corresponding to the second analog card are combined to obtain a third SAK parameter; and the third SAK parameter is determined as the target SAK parameter of the composite card;
[0188] In a case where the card types of the at least two simulated cards are both the non-access control type, a second SAK parameter characterizing the non-access control type is determined as the target SAK parameter of the composite card.
[0189] Optionally, the first SAK parameter is 0x08, the second SAK parameter is 0x20, and the third SAK parameter is 0x28.
[0190] Optionally, the interaction module 1203 is further used to:
[0191] When receiving the anti-collision instruction sent by the card reader, the target UID is reported to the card reader.
[0192] Optionally, the interaction module 1203 is further used to:
[0193] Upon receiving the RATS command sent by the card reader, an ATS response including the target ATS parameters is sent to the reader.
[0194] Optionally, the interaction module 1203 is further used to:
[0195] Upon receiving the AID polling instruction sent by the card reader, determining a target simulated card matching the AID in the AID polling instruction from the at least two simulated cards;
[0196] When receiving the data query instruction sent by the card reader, the first data corresponding to the target simulated card is sent to the card reader based on the target ATS parameters.
[0197] When receiving the data operation instruction sent by the card reader, a data operation is performed on the second data corresponding to the target simulated card.
[0198] Optionally, the interaction module 1203 is further used to:
[0199] When receiving the card selection instruction sent by the card reader, a SAK response including the target SAK parameters is sent to the reader. Optionally, the interaction module 1203 is further configured to:
[0200] When the number of consecutive card swiping failures reaches a number threshold, or the duration in the radio frequency field reaches a duration threshold, instruction interaction is performed with the card reader based on the contactless parameters of the third simulated card among the at least two simulated cards.
[0201] Please refer to Fig.13 , which shows a structural block diagram of a command interaction device for simulating a card provided by an exemplary embodiment of the present application. The device includes:
[0202] Display module 1301, used for displaying the card in the activated state in the card swiping interface, the card is a composite card or at least two simulated cards, the composite card is obtained by combining the at least two simulated cards;
[0203] The interaction module 1302 is used to perform command interaction with the card reader based on the target contactless parameters of the composite card, wherein the target contactless parameters are obtained by integrating the contactless parameters corresponding to the at least two simulated cards.
[0204] Optionally, the display module 1301 is further used for:
[0205] When the number of consecutive card swiping failures reaches a number threshold, or when the duration of being in the radio frequency field reaches a duration threshold, displaying a simulated card in a first form and a second form in the card swiping interface, wherein the simulated card in the first form is in an activated state, and the simulated card in the second form is in a deactivated state;
[0206] The interaction module 1302 is further configured to perform command interaction with the card reader based on the contactless parameters of the simulated card in the activated state.
[0207] Please refer to Fig.14 , which shows a structural block diagram of a terminal provided by an exemplary embodiment of the present application. The terminal may include one or more of the following components: a processor 1401 , a memory 1402 , and an NFC component 1403 .
[0208] Optionally, the processor 1401 utilizes various interfaces and lines to connect various parts within the entire terminal, and performs various functions of the terminal and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1402, and calling data stored in the memory 1402.
[0209] The memory 1402 may include a RAM (Random Access Memory) or a ROM (Read-Only Memory). The memory 1402 may be used to store instructions, programs, codes, code sets or instruction sets.
[0210] The NFC component 1403 may include an NFC chip and an SE (Secure Element) component, wherein the SE component is a non-essential component. When the terminal uses HCE (Host-based Card Emulation) to perform card emulation based on the host card, the terminal does not need to use the SE component. The NFC component 1403 may be used to simulate communication between the card and the card reader, thereby realizing instruction interaction between the terminal and the card reader.
[0211] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the instruction interaction method of the simulation card as described in the above embodiment.
[0212] The embodiment of the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the instruction interaction method of the simulation card provided in the above embodiment.
[0213] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0214] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A command interaction method for simulating a card, characterized in that: The method comprises: Create a composite card corresponding to at least two simulated cards; Performing parameter fusion on the contactless parameters corresponding to the at least two simulation cards to obtain the target contactless parameters of the composite card, and activating the composite card; When receiving a card reading instruction sent by a card reader, an instruction interaction is performed with the card reader based on the target contactless parameter.
2. The method according to claim 1, characterized in that The step of creating a composite card corresponding to at least two simulated cards includes: Obtain the card type of the recorded simulated card, where the card type includes access control type and non-access control type; In the case that there are at least two simulated cards whose card types satisfy the type composite condition, the composite card corresponding to the at least two simulated cards is created.
3. The method according to claim 2, characterized in that The step of creating the composite card corresponding to the at least two simulated cards when the card types of the at least two simulated cards satisfy the type composite condition comprises: In the case that there are at least two simulated cards whose card types are both the non-access control type, determining that the at least two simulated cards meet the type composite condition, and creating the composite card corresponding to the at least two simulated cards; In the case that the card type of one of the at least two simulated cards is the access control type, it is determined that the at least two simulated cards meet the type composite condition, and the composite card corresponding to the at least two simulated cards is created.
4. The method according to claim 3, characterized in that: The step of creating the composite card corresponding to the at least two simulated cards comprises: Acquire the contactless parameters corresponding to the at least two simulation cards respectively; In the case where the contactless parameters satisfy the parameter composite condition, the composite card corresponding to the at least two simulated cards is created.
5. The method according to claim 4, characterized in that When the contactless parameter satisfies the parameter composite condition, creating the composite card corresponding to the at least two simulation cards includes: When the parameter formats of the same type of contactless parameters corresponding to the at least two simulated cards are consistent, it is determined that the contactless parameters meet the parameter composite condition, and the composite card corresponding to the at least two simulated cards is created.
6. The method according to claim 1, characterized in that The step of fusing the contactless parameters corresponding to the at least two analog cards to obtain the target contactless parameters of the composite card includes: Based on the card types of the at least two simulated cards, the contactless parameters of different types corresponding to the at least two simulated cards are fused to obtain the target contactless parameters of the composite card, wherein the card types include access control type and non-access control type.
7. The method according to claim 6, characterized in that The contactless parameters include UID; The step of fusing the contactless parameters of different types corresponding to the at least two simulated cards based on the card types of the at least two simulated cards to obtain the target contactless parameters of the composite card includes: In the case where the card type of a first simulated card among the at least two simulated cards is the access control type, and the card type of at least one second simulated card among the at least two simulated cards is the non-access control type, determining the UID of the first simulated card as the target UID of the composite card; In the case that the card types of the at least two simulated cards are both non-access control types, determining the UID of any one of the at least two simulated cards as the target UID of the composite card; When receiving a card reading instruction sent by the card reader, performing instruction interaction with the card reader based on the target contactless parameter includes: When receiving the anti-collision instruction sent by the card reader, the target UID is reported to the card reader.
8. The method according to claim 6, characterized in that The contactless parameters include ATS parameters; The step of fusing the contactless parameters of different types corresponding to the at least two simulated cards based on the card types of the at least two simulated cards to obtain the target contactless parameters of the composite card includes: Performing parameter fusion on the ATS parameters of the non-access control type analog cards among the at least two analog cards to obtain target ATS parameters of the composite card; When receiving a card reading instruction sent by the card reader, performing instruction interaction with the card reader based on the target contactless parameter includes: Upon receiving the RATS command sent by the card reader, an ATS response including the target ATS parameters is sent to the reader.
9. The method according to claim 8, characterized in that The ATS parameters include a waiting time parameter and a communication rate parameter; The step of fusing the ATS parameters of the non-access control type analog cards among the at least two analog cards to obtain the target ATS parameters of the composite card includes: Determine the maximum waiting time parameter in the ATS parameter as the target waiting time parameter in the target ATS parameter; The minimum communication rate parameter in the ATS parameters is determined as the target communication rate parameter in the target ATS parameters.
10. The method according to claim 8, characterized in that When receiving a card reading instruction sent by the card reader, performing instruction interaction with the card reader based on the target contactless parameter, further comprising: Upon receiving the AID polling instruction sent by the card reader, determining a target simulated card matching the AID in the AID polling instruction from the at least two simulated cards; When receiving the data query instruction sent by the card reader, sending the first data corresponding to the target simulated card to the card reader based on the target ATS parameter; The method further comprises: When receiving the data operation instruction sent by the card reader, a data operation is performed on the second data corresponding to the target simulated card.
11. The method according to claim 6, characterized in that The contactless parameters include SAK parameters; The step of fusing the contactless parameters of different types corresponding to the at least two simulated cards based on the card types of the at least two simulated cards to obtain the target contactless parameters of the composite card includes: In the case where the card type of the first analog card among the at least two analog cards is the access control type, and the card type of at least one second analog card among the at least two analog cards is the non-access control type, a first SAK parameter characterizing the access control type and a second SAK parameter corresponding to the second analog card are combined to obtain a third SAK parameter; and the third SAK parameter is determined as the target SAK parameter of the composite card; In a case where the card types of the at least two simulated cards are both the non-access control type, determining a second SAK parameter characterizing the non-access control type as the target SAK parameter of the composite card; When receiving a card reading instruction sent by the card reader, performing instruction interaction with the card reader based on the target contactless parameter includes: When receiving the card selection instruction sent by the card reader, a SAK response including the target SAK parameters is sent to the reader.
12. The method according to claim 11, characterized in that The first SAK parameter is 0x08, the second SAK parameter is 0x20, and the third SAK parameter is 0x28.
13. The method according to any one of claims 1 to 12, characterized in that: The method further comprises: When the number of consecutive card swiping failures reaches a number threshold, or the duration in the radio frequency field reaches a duration threshold, instruction interaction is performed with the card reader based on the contactless parameters of the third simulated card among the at least two simulated cards.
14. A command interaction method for simulating a card, characterized in that: The method comprises: Displaying an activated card in the card swiping interface, the card being a composite card or at least two simulated cards, the composite card being composited from the at least two simulated cards; The target contactless parameter of the composite card is used to perform command interaction with the card reader, wherein the target contactless parameter is obtained by integrating the contactless parameters corresponding to the at least two simulated cards.
15. The method according to claim 14, characterized in that The method further comprises: When the number of consecutive card swiping failures reaches a number threshold, or when the duration of being in the radio frequency field reaches a duration threshold, displaying a simulated card in a first form and a second form in the card swiping interface, wherein the simulated card in the first form is in an activated state, and the simulated card in the second form is in a deactivated state; The card reader is interactively commanded based on the contactless parameters of the simulated card in the activated state.
16. A command interaction device for simulating a card, characterized in that: The device comprises: A creation module, used for creating a composite card corresponding to at least two simulated cards; A fusion module, used for fusing the contactless parameters corresponding to the at least two simulation cards, obtaining the target contactless parameters of the composite card, and activating the composite card; The interaction module is used to perform instruction interaction with the card reader based on the target contactless parameter when receiving a card reading instruction sent by the card reader.
17. A command interaction device for simulating a card, characterized in that: The device comprises: A display module, used for displaying a card in an activated state in a card swiping interface, wherein the card is a composite card or at least two simulated cards, and the composite card is obtained by combining the at least two simulated cards; The interaction module is used to perform command interaction with the card reader based on the target contactless parameters of the composite card, wherein the target contactless parameters are obtained by integrating the contactless parameters corresponding to the at least two simulated cards.
18. A terminal, characterized in that: The terminal includes a processor, a memory and an NFC component, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the instruction interaction method of the simulated card as described in any one of claims 1 to 15.
19. A computer-readable storage medium, characterized in that: The storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the instruction interaction method of the simulation card as described in any one of claims 1 to 15.
20. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device implements the instruction interaction method of the simulation card as described in any one of claims 1 to 15.