Simulation card instruction interaction method and device, terminal and storage medium

By integrating the non-connected parameters of multiple simulated cards on the smart terminal to generate the target non-connected parameters of the composite card, and automatically update the non-connected parameters after the card swiping fails, the problem that the smart terminal can only activate one card and the cumbersome card swiping process is solved, and a more efficient card swiping operation is achieved.

CN119721075APending Publication Date: 2025-03-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311284784.0
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

Technical Problem

The smart terminal can only activate one simulated card at the same time. After the card swiping fails, the user needs to manually switch the card, resulting in a cumbersome card swiping process and low efficiency.

Method used

By fusing the non-connection parameters of at least two simulated cards, the target non-connection parameters of the composite card are generated, so that multiple simulated cards can be activated simultaneously. If the card swiping fails and the card reader is identified as an access card reader, the target non-connection parameters are updated using the non-connection parameters of the candidate access control simulation card to achieve automatic switching.

Benefits of technology

The card swiping operation process is simplified, the card swiping efficiency is improved, the card switching time is saved, and the user's manual operation steps are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721075A_ABST
    Figure CN119721075A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an instruction interaction method and device of a simulation card, a terminal and a storage medium, and belongs to the technical field of near field communication. The method comprises the steps that under the condition that a card reading instruction sent by a card reader is received, instruction interaction with the card reader is carried out based on target non-contact parameters of a composite card, the composite card corresponds to at least two simulation cards, and the target non-contact parameters are obtained based on fusion of non-contact parameters corresponding to the at least two simulation cards; under the condition that card swiping of the composite card fails and the card reader is recognized as an access control card reader based on the instruction interaction condition, target non-contact parameters are updated based on non-contact parameters corresponding to candidate access control simulation cards, and the candidate access control simulation cards do not belong to at least two simulation cards corresponding to the composite card; and performing instruction interaction with the card reader based on the updated target non-contact parameter. By adopting the scheme provided by the embodiment of the invention, the card swiping process can be simplified, and the card swiping efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

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] In recent years, the functions of smart terminals have become more diverse. For example, smart phones, smart watches and other devices have the NFC (Near Field Communication) analog card function, that is, after entering multiple analog cards, the card swiping operation can be completed by simply approaching the card reader.

[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] When receiving a card reading instruction sent by a card reader, performing instruction interaction with the card reader based on a target contactless parameter of a composite card, the composite card corresponds to at least two simulated cards, and the target contactless parameter is obtained by integrating the contactless parameters corresponding to the at least two simulated cards;

[0007] In the case where the composite card fails to be swiped and the card reader is identified as an access control card reader based on the instruction interaction, the target contactless parameter is updated based on the contactless parameter corresponding to the candidate access control simulation card, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card;

[0008] Perform command interaction with the card reader based on the updated target contactless parameters.

[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] Performing command interaction with a card reader based on a target contactless parameter of the composite card, wherein the target contactless parameter is obtained by fusing the contactless parameters corresponding to the at least two simulated cards;

[0012] In the case where the composite card fails to be swiped and the card reader is identified as an access control card reader, a command interaction is performed with the card reader based on the updated target contactless parameters, and the updated target contactless parameters are obtained by updating the target contactless parameters based on the contactless parameters corresponding to the candidate access control simulation card, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card. On the other hand, an embodiment of the present application provides a command interaction device for a simulation card, the device comprising:

[0013] An interaction module, configured to, upon receiving a card reading instruction sent by a card reader, perform instruction interaction with the card reader based on a target contactless parameter of a composite card, wherein the composite card corresponds to at least two simulated cards, and the target contactless parameter is obtained by integrating the contactless parameters corresponding to the at least two simulated cards;

[0014] an updating module, configured to update the target contactless parameters based on contactless parameters corresponding to candidate access control simulation cards when the composite card fails to be swiped and the card reader is identified as an access control card reader based on the instruction interaction situation, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card;

[0015] The interaction module is also used to perform instruction interaction with the card reader based on the updated target contactless parameters.

[0016] On the other hand, an embodiment of the present application provides a command interaction device for simulating a card, the device comprising:

[0017] 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;

[0018] An interaction module, used for performing command interaction with a card reader based on a target contactless parameter of the composite card, wherein the target contactless parameter is obtained by integrating the contactless parameters corresponding to the at least two simulated cards;

[0019] The interaction module is also used to perform command interaction with the card reader based on the updated target contactless parameters when the composite card fails to be swiped and the card reader is identified as an access control card reader. The updated target contactless parameters are obtained by updating the target contactless parameters based on the contactless parameters corresponding to the candidate access control simulation card, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card. On the other hand, an embodiment of the present application provides a terminal, the terminal includes a processor, a memory, and an NFC component, 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 simulation card as described in the above aspect.

[0020] 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.

[0021] 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.

[0022] In an embodiment of the present application, the terminal obtains the target contactless parameters of the composite card corresponding to at least two simulated cards by fusing the contactless parameters corresponding to each of at least two simulated cards, so that the multiple simulated cards corresponding to the composite card are all in an activated state. When the terminal receives a card reading instruction sent by the card reader, the terminal first responds to the card reading instruction sent by the card reader based on the target contactless parameters of the composite card to complete the instruction interaction between the card reader and the terminal and realize the card swiping operation of the composite card. Subsequently, when the composite card fails to swipe the card, and the card reader is identified as an access control card reader based on the instruction interaction, the terminal automatically updates the target contactless parameters using the contactless parameters corresponding to the candidate access control simulated cards other than the multiple simulated cards corresponding to the composite card, and realizes the switching of the candidate simulated cards. Finally, the terminal interacts with the card reader based on the updated target contactless parameters to complete the card swiping operation of the candidate access control simulated card. Compared with the manual switching of access control cards by users after a card swiping failure, the terminal automatically updates the target contactless parameters based on the contactless parameters of the candidate simulated card after a card swiping failure, thereby realizing automatic switching of candidate simulated cards, saving the time of card switching, simplifying the card swiping operation process, and improving the efficiency of card swiping. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of an implementation environment shown in an exemplary embodiment of the present application is shown;

[0024] Figure 2 A flowchart of a command interaction method for a simulated card provided by an exemplary embodiment of the present application is shown;

[0025] Figure 3 A flowchart of a command interaction method for a simulated card provided by another exemplary embodiment of the present application is shown;

[0026] Figure 4 A flowchart of a command interaction method for a simulated card provided by another exemplary embodiment of the present application is shown;

[0027] Figure 5 It is a schematic diagram of an implementation of a UID polling process in a buffer zone shown in an exemplary embodiment of the present application;

[0028] Figure 6 It is a schematic diagram of an implementation of the instruction interaction process between the access control card and the access control card reader shown in an exemplary embodiment of the present application;

[0029] Figure 7 It is a schematic diagram of an implementation of the instruction interaction process between a bus card and a bus card reader shown in an exemplary embodiment of the present application;

[0030] Figure 8 is a schematic diagram of an implementation of a process of maintaining updated target contactless parameters, shown in an exemplary embodiment of the present application;

[0031] Fig. 9 is a schematic diagram of a card swiping interface of at least two simulated cards shown in an exemplary embodiment of the present application;

[0032] Fig.10 It is a schematic diagram of a card swiping interface in a case where a composite card swiping fails and the card reader is identified as a door access control card reader, as shown in an exemplary embodiment of the present application;

[0033] Fig.11 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.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;

[0035] Fig.13 A structural block diagram of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0036] 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.

[0037] 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.

[0038] 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.

[0039] 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.

[0040] 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.

[0041] 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.

[0042] In the following embodiments, the instruction interaction method of the simulated card is used in the terminal 110 as an example for description.

[0043] 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:

[0044] Step 201, when receiving a card reading instruction sent by a card reader, the target contactless parameters of the composite card are used to interact with the card reader, the composite card corresponds to at least two analog cards, and the target contactless parameters are obtained by integrating the contactless parameters corresponding to the at least two analog cards.

[0045] The card reading instruction sent by the card reader to the terminal is used to obtain relevant information of the simulated card in the terminal. The card reading instruction may include a card search instruction, an anti-collision instruction, etc. Among them, the card search instruction is used to monitor whether there is a simulated card in the radio frequency field of the card reader, and the anti-collision instruction is used to obtain the UID (Unique Identifier) ​​of the simulated card.

[0046] 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.

[0047] 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.

[0048] Different analog cards have their own contactless parameters. Contactless parameters are used to realize wireless communication between contactless IC (Integrated Circuit) cards and card readers, such as UID parameters, ATS (Answer to Select) parameters, SAK (Select AcKnowledge) parameters, ATQA (Answer To Request, Type A) parameters, etc. Among them, ATQA is used to respond to the card reader's card search command, indicating that there is an analog card in the radio frequency field that can respond to the reader's command. UID is the unique identification of access control type cards. SAK parameters are included in the SAK response and are used to respond to the card selection command sent by the card reader. The card reader verifies the communication protocol supported by the analog card by checking individual bytes in the SAK response. ATS parameters are included in the ATS response and are used to respond to the RATS (Request ATS) command sent by the card reader. ATS is only a contactless parameter for non-access control type analog cards.

[0049] Since the contactless parameters of different analog cards are different, in order to subsequently merge the contactless parameters, at least two analog cards corresponding to the composite card need to meet composite conditions. The composite conditions may include type composite conditions and parameter composite conditions.

[0050] According to the authentication method of the analog card, the terminal divides the analog card into access control type and non-access control type. Among them, the access control type analog card is authenticated by UID, and the non-access control type analog card is not authenticated by UID. For example, the access control card is authenticated by UID, and the access control card belongs to the access control type analog card. For another example, the bus card is authenticated by AID (Application Identifier), and the bus card belongs to the non-access control type analog card.

[0051] 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, during the contactless parameter fusion process, the terminal cannot obtain the UID that can represent two or more access control type simulation cards through fusion. Therefore, access control type simulation cards cannot be fused with each other, that is, a composite card contains at most one access control card.

[0052] Since non-access control type and access control type analog cards use different authentication methods, the access control type is authenticated by UID, while the non-access control type is not authenticated by UID, so an access control type analog card can be integrated with one or more non-access control type analog cards.

[0053] Similarly, multiple non-access control type analog cards can be integrated with each other.

[0054] 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.

[0055] 1. The card types of different simulated cards are all non-access control types.

[0056] 2. Among the different simulated cards, one simulated card has a card type of access control type.

[0057] For example, a composite card can contain a bus card and a car key. For another example, a composite card can contain an access card and two different bus cards. Among them, the bus card and the car key are both non-access control type analog cards.

[0058] When at least two simulated cards meet the type compounding conditions, not all non-contact parameters of the same type can be merged. Therefore, it may still be impossible to create a composite card even if the type compounding conditions are met. For example, two non-access control cards have private ATS parameters, and the terminal cannot obtain the target ATS parameters by fusing the ATS parameters. Therefore, non-access control cards with private ATS parameters cannot be composited.

[0059] In order to merge the contactless parameters of at least two analog cards to obtain the target contactless parameters, when at least two analog cards meet the type compound condition, at least two analog cards also need to meet the parameter compound condition, wherein the parameter compound condition may include the same type of contactless parameter format being consistent.

[0060] For example, since the format of the same type of contactless parameters may not be uniform, for example, the UID of the access card is 7 bytes and the UID of the bus card is 4 bytes. Although the access card and the bus card meet the type compounding condition, the length of the UID is inconsistent, resulting in the access card and the bus card cannot be compounded. When the UIDs of the access card and the bus card are both 4 bytes, the access card and the bus card meet the type compounding condition and the parameter compounding condition, and can be compounded.

[0061] After obtaining the target contactless parameters, multiple analog cards are activated at the same time, and the composite card can realize the command exchange between any analog card involved in the fusion and the card reader. For example, when the composite card integrates the access card, bus card and car key, the composite card can interact with the bus card reader, the access card reader and the car key reader.

[0062] During the process of command interaction between the card reader and the terminal, the terminal includes the contactless parameters in the response it sends to the card reader, and responds with the corresponding response according to the command sent by the card reader. For example, after receiving the card search command sent by the card reader, the terminal sends an ATQA response containing ATQA parameters to the card reader.

[0063] Step 202, when the composite card fails to be swiped and the card reader is identified as an access control card reader based on the instruction interaction, the target contactless parameters are updated based on the contactless parameters corresponding to the candidate access control simulation card, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card.

[0064] Since the composite card contains at most one access card, there may be other non-composite access cards in the terminal. Therefore, when the terminal interacts with the access card reader corresponding to other access cards based on the target contactless parameters of the composite card, the card swiping will fail and the terminal needs to switch to other access cards and swipe again.

[0065] In order to save time in switching other access cards, the terminal can determine other access cards as candidate access cards, and then update the target contactless parameters based on the contactless parameters of the candidate access cards to activate the candidate access cards. The terminal then re-interacts with the access card reader based on the updated target contactless parameters to implement the card swiping operation of the candidate access cards.

[0066] It should be noted that the contactless parameters of other access control cards and the contactless parameters of other non-access control cards corresponding to the original composite card may not meet the parameter composite conditions. For example, the UIDs of the original access control card and the bus card are both 4 bytes, and the UID lengths are consistent. They can be merged to obtain a composite card corresponding to the access control card and the bus card, while the UID length of other access control cards is 7 bytes, which is inconsistent with the UID length of the bus card. Therefore, other access control cards cannot be composited with the bus card, and the target contactless parameters cannot be updated.

[0067] Optionally, the terminal may determine other access control cards that meet the parameter compound condition as candidate access control cards. The terminal may also determine other access control cards as candidate access control cards, and then check whether the candidate access control cards meet the parameter compound condition before updating the target contactless parameters.

[0068] After updating the target contactless parameters, the terminal may still fail to swipe the card. There are generally many reasons why the terminal fails to swipe the card.

[0069] 1. The simulated card type is different from the card reader type. For example, the terminal uses a bus card to swipe the access control card reader.

[0070] 2. When the simulated card type and the card reader type are the same, the authentication information of the simulated card does not match. For example, when the terminal uses the access card to swipe the access card reader, the card reader uploads the access card UID to the background, and after matching it with the UID in the database, the match fails. For another example, the terminal uses the Shenzhen bus card to swipe the Guangzhou bus card reader. Because the AID of the Shenzhen bus card and the Guangzhou bus card reader do not match, the card swipe fails.

[0071] 3. The problem of contactless parameter fusion of composite cards. For example, some card readers cannot recognize the fused contactless parameters due to design problems. Another example is that the contactless parameter fusion rules of composite cards are not perfect, resulting in the card reader failing to find the corresponding card for interaction.

[0072] 4. Other situations. For example, the command error or command sending failure occurs during the interaction between the terminal simulation card and the card reader. Another example is the communication failure between the terminal and the card reader due to radio frequency parameter problems.

[0073] Since there are many reasons for the terminal to swipe the card failure as mentioned above, in order to avoid the terminal always switching to the candidate access card for swiping after the composite card swiping fails, the terminal can switch to the candidate access card for swiping when detecting that the current card reader is an access card reader.

[0074] From the above reasoning, it can be seen that when the composite card swiping fails and the terminal recognizes that the card reader is an access control card reader, the terminal can update the target contactless parameters based on the contactless parameters corresponding to the candidate access control card, and then re-interact with the access control card reader based on the updated new target contactless parameters to implement the card swiping operation of the candidate access control card.

[0075] Step 203: Perform command interaction with the card reader based on the updated target contactless parameters.

[0076] When the composite card fails to be swiped and the card reader is identified as an access control card reader based on the command interaction, the terminal updates the target contactless parameters and then swipes the card again. The command interaction in the re-swiping process is the same as step 201, that is, after the terminal receives the command sent by the card reader, the corresponding contactless parameters are included in the response and sent to the card reader. For example, the card reader first sends a card search command to the terminal, and after receiving the card search command sent by the card reader, the terminal sends an ATQA response containing ATQA parameters to the card reader.

[0077] In summary, in the embodiment of the present application, the terminal obtains the target contactless parameters of the composite card corresponding to at least two simulated cards by fusing the contactless parameters corresponding to each of at least two simulated cards, so that the multiple simulated cards corresponding to the composite card are all in an activated state. When the terminal receives the card reading instruction sent by the card reader, the terminal first responds to the card reading instruction sent by the card reader based on the target contactless parameters of the composite card to complete the instruction interaction between the card reader and the terminal, and realizes the card swiping operation of the composite card. Subsequently, when the composite card fails to swipe the card, and the card reader is identified as an access control card reader based on the instruction interaction, the terminal automatically updates the target contactless parameters using the contactless parameters corresponding to the candidate access control simulated cards other than the multiple simulated cards corresponding to the composite card, and realizes the switching of the candidate simulated cards. Finally, the terminal interacts with the card reader based on the updated target contactless parameters to complete the card swiping operation of the candidate access control simulated card. Compared with the manual switching of access control cards by users after a card swiping failure, the terminal automatically updates the target contactless parameters based on the contactless parameters of the candidate simulated card after a card swiping failure, thereby realizing automatic switching of candidate simulated cards, saving the time of card switching, simplifying the card swiping operation process, and improving the efficiency of card swiping.

[0078] Since the target contactless parameters that need to be updated by the composite card under different types of composite conditions are different, the instruction interaction method of the simulation card is discussed below according to the different update situations of the target contactless parameters.

[0079] When the composite card includes an access card and at least one non-access card simulation card, since the target contactless parameters have integrated the relevant parameters of the access card, when switching the candidate access card, the terminal only needs to update the UID in the target contactless parameters based on the UID of the candidate access card.

[0080] Please refer to Figure 3 , 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:

[0081] Step 301, when there is a candidate access control simulation card that does not belong to at least two simulation cards corresponding to the composite card, write the UID of the candidate access control simulation card into the buffer.

[0082] During the process of command interaction between the terminal and the access control card reader, the access control card reader only needs to obtain the UID of the access control card, and then send the UID to the background to match it with the UID in the background database. If the match is successful, the access control is unlocked, and if the match fails, the access control is not unlocked. Therefore, the terminal only needs to obtain the UID of the candidate access control card and send the candidate access control card to the card reader in the UID response.

[0083] In order for the terminal to quickly read the UID of the candidate access control simulation card when the composite card swiping fails, the terminal may write the UID of the candidate access control simulation card into the buffer, for example, the terminal writes the UID of the candidate access control card into the buffer of the NFC controller.

[0084] It should be noted that the buffer may store the UIDs of multiple candidate access cards, so the terminal needs to consider whether the storage capacity of the buffer is sufficient. Since the capacity of the NFC controller buffer is much larger than the space occupied by the UID of the candidate access card, for example, the capacity of the NFC controller buffer is 32KB, while the UID of a candidate access card only occupies 4-7B, the buffer is sufficient to accommodate the UIDs of multiple candidate access cards.

[0085] Step 302, when receiving a card reading instruction sent by the card reader, the target contactless parameters of the composite card are used to interact with the card reader, the composite card corresponds to at least two analog cards, and the target contactless parameters are obtained by integrating the contactless parameters corresponding to the at least two analog cards.

[0086] The implementation of this step may refer to the above step 201, and this embodiment will not be described in detail here.

[0087] Step 303: when the composite card fails to be swiped and the card reader is identified as an access control card reader based on the instruction interaction, the UID of the candidate access control simulation card is read from the buffer.

[0088] When the composite card swipe fails and the card reader is identified as an access control card reader based on the command interaction, the operation of reading the UID can be divided into the following two cases.

[0089] 1. When a UID of a candidate access control simulation card is written in the buffer, read the UID of the candidate access control simulation card.

[0090] In a possible implementation, the terminal reads a UID from the buffer, and after reading the UID, the terminal does not continue to read UIDs from the buffer.

[0091] 2. When at least two UIDs of candidate access control simulation cards are written in the buffer, the UIDs of the candidate access control simulation cards are read from the buffer in turn by polling.

[0092] In a possible implementation, the terminal sequentially obtains the UID from the buffer and sequentially updates the UID in the target contactless parameter. When the terminal detects that the card swipe fails, the terminal continues to read the next UID from the buffer and updates the UID in the target contactless parameter. When the terminal detects that the card swipe succeeds, the terminal no longer reads the UID from the buffer.

[0093] For example, Figure 5 As shown, terminal 502 has access card A, access card B, access card C, bus card and car key, wherein access card A, bus card and car key are included in the composite card, access card B and access card C are candidate access cards, access card A corresponds to UID1, access card B corresponds to UID2, access card C corresponds to UID3, and UID2 and UID3 are cached in buffer 501.

[0094] In the case that the access control card included in the composite card fails to be swiped, the terminal 502 first obtains UID2 from the buffer 501, and then after receiving the anti-collision instruction sent by the access control reader 503, the terminal 502 sends the UID response containing UID2 to the access control reader 503. Subsequently, the access control reader 503 sends UID2 to the background database 504 for matching. When the match is successful, the access control is unlocked. When the match fails, the terminal 502 obtains UID3 from the buffer 501 and repeats the above operation until the access control is unlocked, or until all UIDs in the buffer 501 are matched.

[0095] In addition, when the composite card fails to be swiped and the card reader is identified as an access control reader based on the instruction interaction, the terminal detects that the UID of the candidate access control card does not exist in the buffer, and determines that there is no access control card corresponding to the access control reader in the terminal, and the terminal fails to swipe the card.

[0096] It should be noted that the length of the UID of the candidate access card in the buffer may be inconsistent with the original UID in the target contactless parameter. Therefore, before updating the UID in the target contactless parameter, the contactless parameter of the candidate access card needs to meet the parameter composite condition, that is, the UID of the candidate access card needs to be consistent with the original UID format in the target contactless parameter.

[0097] Optionally, the terminal may store UIDs of other access control cards in the same format as the original UID in the target contactless parameter into a buffer, and then update the target UID using the UID in the buffer in the event of a card swiping failure.

[0098] Optionally, the terminal may also write the UIDs of other access control cards into the buffer. Before updating the UID in the target contactless parameter, the terminal first determines whether the UID in the buffer satisfies the parameter composite condition.

[0099] Step 304: Update the original UID in the target contactless parameter to the UID of the candidate access control simulation card.

[0100] Before the terminal interacts with the card reader, the original UID is obtained by integrating the contactless parameters corresponding to the multiple simulated cards corresponding to the composite card.

[0101] In the process of merging the contactless parameters corresponding to the multiple simulation cards corresponding to the composite card, since there are two types of composite conditions of the composite card, there are also two original UIDs in the target contactless parameters.

[0102] In the first case, when at least two simulated cards are non-access control simulated cards, the original UID in the target contactless parameter is the UID of any non-access control simulated card.

[0103] Since non-access control type analog cards are not authenticated by UID, the content of the original UID in the target contactless parameter will not affect the card reader from finding the corresponding analog card and interacting with it. The terminal can determine the UID of any analog card as the original UID.

[0104] For example, when the composite card contains a bus card and a car key, the UID of the bus card is UID4 and the UID of the car key is UID5. Since determining UID4 or UID5 as the original UID does not affect the card authentication, the terminal can determine UID4 as the original UID in the target contactless parameters, or determine UID5 as the original UID in the target contactless parameters.

[0105] In the second case, when the at least two simulated cards include one access control simulated card and at least one non-access control simulated card, the original UID in the target contactless parameter is the UID of the access control simulated card.

[0106] When the UID of the non-access control simulation card is determined to be the original UID, since the access control simulation card is authenticated by the UID, the UID of the access control simulation 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 access control simulation card, and the card swiping fails. When the UID of the access control simulation card is determined to be the original UID, the terminal uses the UID of the access control simulation card to interact with the access control type card reader, and the card swiping succeeds.

[0107] Therefore, in order to ensure that when a composite card is used to interact with an access control type reader, the access control type reader can obtain the UID of the access control simulation card among the multiple simulation cards corresponding to the composite card, and then complete the access control unlocking, the terminal determines the UID of the access control simulation card as the original UID in the target contactless parameter.

[0108] 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 UID4. When the composite card determines the UID4 of the bus card as the original 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 original 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 original UID in the target contactless parameters.

[0109] Since the composite card contains at most one access control card, when the composite card fails to be swiped and the card reader is an access control card reader, the composite card does not contain the access control simulation card corresponding to the card reader, so the access control simulation card corresponding to the card reader may be in the buffer. The terminal can update the original UID in the target contactless parameter with the UID of the candidate access control simulation card to implement the switching operation of the candidate access control simulation card. Then, based on the updated UID, after the card reader sends the anti-collision instruction to the terminal, the UID of the candidate access control simulation card is included in the UID response and sent to the card reader to implement the card swiping operation of the candidate access control simulation card.

[0110] Before switching the candidate access control card, the terminal needs to first identify the type of the card reader as an access control card reader. Since the command interaction process between the access control card reader and the terminal is different from the command interaction process between the non-access control card reader and the terminal, the terminal can identify whether the card reader type is an access control card reader based on the command interaction between it and the card reader.

[0111] The first type of interactive instructions are used in the command interaction process between the access control card reader and the terminal, and after the access control card swipe fails, the first type of interactive instructions will be repeated between the terminal and the access control card reader. The first type of interactive instructions and the second type of interactive instructions are used in the command interaction process between the non-access control card reader and the terminal. Among them, the first type of interactive instructions include card search instructions, card search response, anti-collision instructions and UID response, and the second type of interactive instructions include card selection instructions, card selection response, RATS instructions and selection response.

[0112] For example, the instruction interaction process between the access card and the access card reader is as follows: Figure 6As shown, PCD (Proximity Coupling Device) represents the access control card reader, PCD_A represents the instruction sent by the access control card reader to the terminal, PICC (Proximity Card) is a bus card, and PICC_A represents the instruction sent by the terminal to the access control card reader. The access control card reader first sends a card search instruction WUPA to the terminal to monitor whether there is a card in the radio frequency field. After receiving the card search instruction, the terminal sends an ATQA response to the access control card reader. Then the access control card reader sends an anti-collision instruction ANTICOLLISION to the terminal to obtain the UID of the access control card. After receiving the anti-collision instruction, the terminal sends a UID response UID CL1 to the access control card reader. After the terminal sends the UID response and the access control card in the composite card is swiped successfully, the reader and the terminal no longer interact with each other. After the terminal sends the UID response and the access control card in the composite card fails to be swiped, the reader and the terminal repeat the interaction of the above four instructions.

[0113] Exemplarily, the instruction interaction process between the bus card and the bus card reader is as follows: Figure 7 As shown, PCD represents the bus card reader, PCD_A represents the instruction sent by the bus card reader to the terminal, PICC represents the bus card, and PICC_A represents the instruction sent by the terminal to the reader. After the reader sends the anti-collision instruction ANTICOLLISION to the terminal, the UID reported by the terminal to the reader is 6F 3C CB 4C D4. Subsequently, after the bus card reader sends the card selection instruction SELECT to the terminal, the terminal sends a SAK response to the reader, where the SAK parameter is 0x20. Since the bus card is a non-access control type analog card, after the reader sends the RATS instruction to the terminal, the terminal sends an ATS response to the reader, indicating that the parameters required for subsequent communication are reported to the reader.

[0114] Step 305: Perform command interaction with the card reader based on the updated target contactless parameters.

[0115] After the access card fails to be swiped, the terminal and the access card reader repeat the following steps: Figure 6 As shown in the command interaction, after the UID parameter is updated, when the access control card reader sends an anti-collision command to the terminal, the terminal sends a response containing the updated UID to the access control card reader.

[0116] When there is a UID corresponding to a candidate access card that has not been polled in the buffer, the terminal continues to execute the following Figure 5 The UID reading method shown in the figure. When all the UIDs corresponding to the candidate access control cards in the buffer are polled, the terminal and the card reader end the command interaction.

[0117] In the application embodiment, the terminal first composites multiple simulated cards that meet the composite conditions to obtain a composite card, and puts the UIDs corresponding to other access control cards that do not meet the composite conditions into the buffer. Then, the terminal interacts with the card reader through instructions. In the case that the composite card fails to be swiped, the terminal determines that the current card reader is an access control card reader by identifying the instruction interaction situation. Since the buffer has a fast read and write speed, the terminal can quickly switch the candidate access control cards by reading the UID from the buffer, saving the time required to switch to the candidate access control card after the composite card fails to be swiped. Compared with the method in which the user manually switches the candidate access control card, the operation process is simplified and the card swiping efficiency is improved. The terminal then updates the target contactless parameters to obtain the updated target contactless parameters, and responds to the card reading instructions sent by the access control card reader based on the updated target contactless parameters to achieve the instruction interaction of the candidate access control cards.

[0118] Different from the case where the composite card includes an access card, when the composite card does not include an access card, the parameters that need to be updated in the target contactless parameters include not only the UID parameters but also the SAK parameters. The following discusses the command interaction of the simulated card when the composite card does not include an access card.

[0119] Please refer to Figure 4 , 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:

[0120] Step 401, when there is a candidate access control simulated card that does not belong to at least two simulated cards corresponding to the composite card, write the UID of the candidate access control simulated card into the buffer.

[0121] The implementation of this step may refer to the above step 301, and this embodiment will not be described in detail here.

[0122] Step 402, when receiving a card reading instruction sent by the card reader, the target contactless parameters of the composite card are used to interact with the card reader, the composite card corresponds to at least two analog cards, and the target contactless parameters are obtained by integrating the contactless parameters corresponding to the at least two analog cards.

[0123] The implementation of this step may refer to the above step 302, and this embodiment will not be described in detail here.

[0124] Step 403, when the composite card swipe fails and the card reader is identified as an access control card reader based on the instruction interaction situation, the UID of the candidate access control simulation card is read from the buffer.

[0125] The implementation of this step may refer to the above step 303, and this embodiment will not be described in detail here.

[0126] Step 404: Update the original UID in the target contactless parameter to the UID of the candidate access control simulation card.

[0127] The implementation of this step may refer to the above step 304, and this embodiment will not be described in detail here.

[0128] Step 405: Update the first SAK parameter representing the non-access control type in the target contactless parameter to a second SAK parameter representing the composite type, where the second SAK parameter is obtained by combining the first SAK parameter and the third SAK parameter representing the access control type.

[0129] When at least two analog cards are non-access control analog cards, the SAK parameter in the target contactless parameter is the first SAK parameter that represents the non-access control type. When the terminal switches to the candidate analog card for swiping, in addition to updating the UID of the target contactless parameter, the terminal also needs to update the first SAK parameter to the second SAK parameter that represents the composite type.

[0130] Since the card reader verifies the communication protocol supported by the simulated card by checking individual bytes in the SAK response, and the non-zero byte used for reader verification in the first SAK parameter representing the non-access control type is in a different position from the non-zero byte used for reader verification in the third SAK parameter representing the access control type, the first SAK parameter and the third SAK parameter can be combined to obtain the second SAK parameter representing the composite type.

[0131] For example, the third SAK parameter corresponding to the Mifare protocol is 0x08, and the first SAK parameter corresponding to the ISO14443 protocol is 0x20. When the card reader receives the SAK response sent by the terminal and verifies the SAK parameters, it only verifies the bytes 8 and 2. Therefore, the first SAK parameter and the third SAK parameter can be combined to obtain the second SAK parameter representing the composite type, which is 0x28.

[0132] In addition, after updating the SAK parameter in the target contactless parameter, the card reader may not recognize the updated SAK parameter. For example, the SAK parameter of the bus card is 0x20, the SAK parameter of most access cards is 0x08, and the SAK parameter of a few access cards is 0x18. When the access card with SAK parameter 0x18 is combined with the bus card, the access card reader may not recognize the SAK parameter 0x28 obtained after the fusion.

[0133] In order to solve the problem that the card reader cannot recognize the fused SAK parameters, in a possible implementation, the terminal can determine multiple candidate SAK parameters as target SAK parameters. For example, the terminal determines 0x28 and 0x38 as candidate SAK parameters respectively. When the access card reader fails to recognize 0x28, the terminal determines 0x38 as the target SAK parameter.

[0134] It should be noted that this step can also be performed after step 402 and before step 403. In the embodiment of the present application, the order of updating the UID parameter and the SAK parameter in the target contactless parameters is not limited.

[0135] Step 406: Perform command interaction with the card reader based on the updated target contactless parameters.

[0136] The implementation of this step may refer to the above step 305, and this embodiment will not be described in detail here.

[0137] In an embodiment of the present application, the terminal first composites multiple analog cards that meet the composite conditions to obtain a composite card, and puts the UIDs corresponding to other access control cards that do not meet the composite conditions into a buffer. Then, the terminal interacts with the card reader through instructions. When the composite card fails to swipe, the terminal determines that the current card reader is an access control card reader by identifying the instruction interaction situation. Since the buffer has a fast read and write speed, the terminal realizes the rapid switching of candidate access control cards by reading the UID from the buffer, saving the time required to switch to the candidate access control card after the composite card fails to swipe. In the case where the multiple analog cards contained in the composite card are all non-access control cards, the terminal needs to update the SAK parameters describing the applicable protocol of the analog card in addition to the UID in the target contactless parameters. Compared with the method of manually switching candidate access control cards by the user, the operation process is simplified and the card swiping efficiency is improved. Subsequently, the terminal updates the target contactless parameters to obtain the updated target contactless parameters, and responds to the card reading instructions sent by the access control card reader based on the updated target contactless parameters to realize the instruction interaction of the candidate access control cards.

[0138] Furthermore, during the access card swiping process, there may be accidental situations that cause the composite card to swipe incorrectly. For example, when the card reader receives the response sent by the terminal, an accidental reception error occurs. The terminal needs to use the composite card to swipe again. After swiping again, the terminal can swipe the card successfully.

[0139] In order to prevent the terminal from switching to the candidate access card immediately after the card swiping fails under accidental circumstances, resulting in repeated card swiping failures, in a possible implementation, the terminal can determine that the composite card swiping fails by detecting that the number of repetitions of the first type of interaction instructions exceeds the first number threshold, that is, the number of repetitions of the card search instruction, card search response, anti-collision instruction and UID response exceeds the first number threshold, such as more than 3 times. Since after the terminal sends the UID response to the card reader, the non-access control type simulation card and the non-access control card reader will continue to interact with the second type of interaction instructions, that is, the card selection instruction, card selection response, RATS instruction and selection response, when the number of repetitions of the first type of interaction instructions reaches the first number threshold, and there is no second type of interaction instruction, the terminal can determine that the current card reader is an access control card reader, thereby reading the UID of the candidate access control card from the buffer and interacting with the access control card reader.

[0140] In an embodiment of the present application, the terminal determines that the composite card swipe fails and the current card reader is the access control card reader by monitoring that the number of interactions between the access control card reader and the instruction exceeds the first number threshold, thereby avoiding the terminal from mistakenly switching to a candidate access control card in an unexpected situation.

[0141] After re-swiping the card at the terminal, due to special circumstances, repeated card swiping errors may occur when the access card and the card reader correspond. For example, there may be compatibility issues between the access simulation card and the access card reader.

[0142] Since some RF parameters of the card reader may be unknown, in a possible implementation, in order to avoid card swiping errors due to compatibility issues, the terminal can load the RF parameters corresponding to the simulated card to ensure smooth communication between the terminal and the access control card reader.

[0143] Since the access card in the composite card and the candidate access card in the buffer apply the same RF parameters, the RF parameters specific to the access card can be preloaded when the terminal loads the RF parameters, so as to save the time of loading the RF parameters after the terminal switches to the candidate access card.

[0144] The RF parameters corresponding to the access control card may include frequency following parameters and phase adaptive parameters. Among them, the frequency following parameter is used to make the frequency of the terminal follow the frequency of the card reader when swiping the card, and the phase adaptive parameter is used to dynamically adjust the subcarrier phase according to the RF coupling between the mobile phone and the card reader when swiping the card. The RF parameters of the access control card may also include transmitting voltage parameters, receiving sensitivity parameters and other RF parameters that are common to non-access control type analog cards. Therefore, the specific RF parameters corresponding to the preloaded access control card are not described in detail in the examples of this application.

[0145] In a possible implementation, the terminal obtains the RF parameters corresponding to the access control card reader by monitoring the RF field around the card reader, and stores the RF parameters in a memory. Subsequently, the terminal extracts the RF parameters from the memory and loads them into a buffer that can be read quickly, so that the terminal can quickly obtain the RF parameters during the communication process.

[0146] In an embodiment of the present application, the terminal pre-loads the candidate access control card to ensure that the candidate access control card can smoothly interact with the card reader for instructions, thereby solving the compatibility problem between the access control simulation card and the access control card reader and ensuring smooth communication between the terminal and the access control card reader.

[0147] In the above embodiment, in the case where the composite card swipe fails, when the terminal identifies that the card reader type is an access control reader, the terminal reads the UID of the candidate access control card from the buffer, and updates the original UID in the target contactless parameter to the UID of the candidate access control card, thereby realizing rapid switching of the candidate access control card.

[0148] After the candidate access card is swiped successfully, the terminal can restore the target contactless parameters of the composite card. When the terminal swipes the card next time and receives the anti-collision instruction sent by the card reader, the terminal includes the original UID in the UID response and sends it to the card reader.

[0149] It should be noted that the restoration of the target contactless parameter also includes, when all analog cards included in the composite card are non-access control type analog cards, restoring the second SAK parameter representing the composite type to the first SAK parameter representing the non-access control type.

[0150] Furthermore, when the candidate access card is used more frequently than the access card included in the composite card, the terminal will frequently update and restore the target contactless parameters. In order to save time in switching candidate access cards, the terminal can also update the number of successful swipes of the candidate access simulation card after each successful swipe, and retain the target contactless parameters with a high number of successful swipes.

[0151] In a possible implementation, the terminal sets a number threshold for the number of successful swipes of the candidate access control simulation card. When the number of successful swipes of the candidate access control simulation card does not reach the number threshold, the candidate access control simulation card is not used frequently, so the terminal restores the target contactless parameters of the composite card; when the number of successful swipes of the candidate access control simulation card reaches the number threshold, the candidate access control simulation card is used frequently, so the terminal maintains the target contactless parameters of the composite card. For example, the terminal updates the number of successful swipes of the candidate access control simulation card within a week, and sets the second number threshold to 5. When the number of successful swipes of the candidate access control simulation card reaches 5 times, the terminal maintains the updated target contactless parameters. When the number of successful swipes of the candidate access control simulation card is less than 5 times, the terminal restores the target contactless parameters of the composite card.

[0152] Indicatively, Figure 8 As shown, take the UID in the target contactless parameter as an example. In the case where the composite card includes access card A, access card B, bus card, and car key, access card A, bus card, and car key meet the composite condition, and a composite card including access card A, bus card, and digital car key is obtained, wherein the original UID in the target contactless parameter of the composite card is UID1 of access card A. Subsequently, terminal 802 determines access card B as a candidate access card, and terminal 802 puts UID2 of access card B into buffer 801. In the case where the composite card fails to swipe, and terminal 802 identifies the card reader as an access card reader, terminal 802 updates the UID in the target contactless parameter with UID2 corresponding to access card B. After access card B is swiped successfully, terminal 802 updates the number of successful swipes of access card B and compares it with the second count threshold. When the number of successful card swipes of access control card B reaches the second number threshold, it means that the access control card B has been used frequently recently. Therefore, terminal 802 retains the target contactless parameters of the currently updated composite card, and then writes the UID1 of access control card A into buffer 801, that is, terminal 802 composites access control card B with the bus card and car key, and determines access control card A as a candidate access control card. After retaining the target contactless parameters of the currently updated composite card, the next time the card is swiped, the terminal first uses the composite card containing access control card B to swipe the card. After the composite card swiping fails, the terminal updates the target contactless parameters of the composite card based on the UID corresponding to access control card A in the buffer. Subsequently, the terminal interacts with the access control card reader based on the updated target contactless parameters.

[0153] In the embodiment of the present application, after the card is swiped successfully, the terminal can choose to restore the target contactless parameters or keep the target contactless parameters of the composite card. In order to improve the success rate of the next card swipe, the terminal counts the number of successful card swipes of the candidate access control simulation card, determines the candidate access control card with the highest number of successful card swipes, that is, the candidate access control card that is used most frequently, and then retains the target contactless parameters with the highest number of successful card swipes.

[0154] After the terminal fails to swipe the card, since the interaction process between the terminal and the card reader is not visible, and the terminal contains multiple simulated cards, the user cannot determine the card currently in use. Therefore, the terminal can display the currently activated card.

[0155] The instruction interaction method of the simulation card including the visual interface may include the following steps:

[0156] 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.

[0157] Optionally, the terminal may display at least two activated simulated cards in the card swiping interface, or may display a composite card in the card swiping interface. The at least two simulated cards may be displayed in a tiled or stacked manner.

[0158] For example, Fig. 9 It is a card swiping interface for at least two simulated cards. In the tiled diagram 901, the terminal lists the activated access card, bus card and car key in a tiled manner in the card swiping interface; in the stacked diagram 902, the terminal lists the activated access card, bus card and car key in a stacked manner in the card swiping interface; in the composite card diagram 903, the terminal displays the activated access card, bus card and car key in the card swiping interface as a new card, and the new card is a composite card corresponding to the access card, bus card and car key.

[0159] 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.

[0160] After obtaining the target contactless parameters, multiple analog cards are activated at the same time, and the composite card can realize the command exchange between any analog card involved in the fusion and the card reader. For example, when the composite card integrates the access card, bus card and car key, the composite card can interact with the bus card reader, the access card reader and the car key reader.

[0161] During the process of command interaction between the card reader and the terminal, the terminal includes the contactless parameters in the response it sends to the card reader, and responds with the corresponding response according to the command sent by the card reader. For example, after receiving the card search command sent by the card reader, the terminal sends an ATQA response containing ATQA parameters to the card reader.

[0162] 3. When the composite card fails to be swiped and the card reader is identified as an access control card reader, the command interaction is performed with the card reader based on the updated target contactless parameters. The updated target contactless parameters are obtained by updating the target contactless parameters based on the contactless parameters corresponding to the candidate access control simulation card. The candidate access control simulation card does not belong to at least two simulation cards corresponding to the composite card.

[0163] The implementation of this step may refer to the above-mentioned step 202 and step 203.

[0164] In addition, when the composite card fails to be swiped and the card reader is identified as an access control card reader, the display of the card swiping interface can be divided into the following two situations.

[0165] First, when at least two simulated cards include one access control simulated card and at least one non-access control simulated card, the access control simulated card in the card swiping interface is replaced with a candidate access control simulated card.

[0166] When at least two simulation cards include one access control simulation card and at least one non-access control simulation card, the terminal activates the candidate access control simulation card, deactivates the access control simulation card included in the composite card, and then replaces the access control simulation card in the card swiping interface with the candidate access control simulation card.

[0167] The second method is to display candidate access control simulation cards in the card swiping interface when at least two simulation cards are non-access control simulation cards.

[0168] In the case that at least two simulation cards are non-access control simulation cards, the terminal activates the candidate access control simulation card and then adds and displays the candidate access control simulation card in the card swiping interface.

[0169] For example, Fig.10 The card swiping interface is when the composite card fails to be swiped and the card reader is identified as an access control card reader. In the card swiping interface diagram 1001, when the composite card includes an access control card, a bus card and a car key, after the card swiping fails, the terminal replaces the access control card with a candidate access control card; in the card swiping interface diagram 1002, when the composite card includes a bus card and a car key, after the card swiping fails, the terminal adds and displays a candidate access control card.

[0170] In an embodiment of the present application, the terminal first displays the card that is currently activated, and then interacts with the card reader based on the card that is in the activated state. After the simulated card swipe fails, if there is an access card in the original composite card, the terminal first deactivates the access card, and then activates the candidate access card. If there is no access card in the original composite card, the terminal activates the candidate access card. Finally, the terminal displays the currently activated card on the card swiping interface, and then swipes the card again. In an embodiment of the present application, the terminal displays the currently activated card, showing the switching process of the simulated card, and improving the user experience.

[0171] Please refer to Fig.11 , 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:

[0172] The interaction module 1101 is used for, when receiving a card reading instruction sent by the card reader, performing instruction interaction with the card reader based on a target contactless parameter of the composite card, the composite card corresponds to at least two simulated cards, and the target contactless parameter is obtained by integrating the contactless parameters corresponding to the at least two simulated cards;

[0173] An updating module 1102 is configured to update the target contactless parameters based on contactless parameters corresponding to candidate access control simulation cards when the composite card fails to be swiped and the card reader is identified as an access control card reader based on the instruction interaction situation, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card;

[0174] The interaction module 1101 is further configured to perform instruction interaction with the card reader based on the updated target contactless parameters.

[0175] Optionally, the updating module 1102 is further configured to:

[0176] The original UID in the target contactless parameter is updated to the UID of the candidate access control simulation card.

[0177] Optionally, the updating module 1102 is further configured to:

[0178] In the case where the at least two simulated cards include one access control simulated card and at least one non-access control simulated card, the original UID in the target contactless parameter is the UID of the access control simulated card;

[0179] In the case that the at least two simulation cards are both non-access control simulation cards, the original UID in the target contactless parameter is the UID of any non-access control simulation card.

[0180] Optionally, the updating module 1102 is further configured to:

[0181] In the case that the at least two analog cards are non-access control analog cards, the first SAK parameter representing the non-access control type in the target contactless parameter is updated to a second SAK parameter representing a composite type, and the second SAK parameter is obtained by combining the first SAK parameter and the third SAK parameter representing the access control type.

[0182] Optionally, the first SAK parameter is 0x20, the second SAK parameter is 0x28, and the third SAK parameter is 0x08.

[0183] Optionally, the updating module 1102 is further configured to:

[0184] In the case that there is a candidate access control simulation card that does not belong to the at least two simulation cards corresponding to the composite card, the UID of the candidate access control simulation card is written into the buffer.

[0185] Optionally, the updating module 1102 is further configured to:

[0186] The UID of the candidate access control simulation card is read from the buffer.

[0187] Optionally, the updating module 1102 is further configured to:

[0188] In the case where the UIDs of at least two candidate access control simulation cards are written in the buffer, the UIDs of the candidate access control simulation cards are read from the buffer in sequence by polling.

[0189] Optionally, the updating module 1102 is further configured to:

[0190] When the instruction interaction situation indicates that the number of repetitions of the first type of interaction instruction reaches a first number threshold and there is no second type of interaction instruction, it is determined that the composite card swiping has failed, and the card reader is an access control card reader, the first type of interaction instruction is an instruction used by the access control simulation card to interact with the access control card reader, and the second type of interaction instruction is an instruction used by the non-access control simulation card to interact with the non-access control card reader.

[0191] Optionally, the first type of interaction instructions include card search instructions, card search responses, anti-collision instructions and UID responses, and the second type of interaction instructions include card selection instructions, card selection responses, RATS instructions and selection responses.

[0192] Optionally, the updating module 1102 is further configured to:

[0193] When a card reading instruction sent by a card reader is received and the at least two simulated cards include an access control simulated card and at least one non-access control simulated card, the radio frequency parameters are preloaded, wherein the radio frequency parameters are multiplexed by the access control simulated card and the candidate access control simulated card, and the radio frequency parameters include at least one of a radio frequency following parameter and a phase adaptive parameter.

[0194] Optionally, the device further includes:

[0195] The restoring module is used to restore the target contactless parameters of the composite card when the composite card is swiped successfully.

[0196] Optionally, the restoration module is further used to:

[0197] When the composite card is swiped successfully, the number of successful swiping times of the candidate access control simulation card is updated;

[0198] When the number of successful card swiping times does not reach the second number threshold, the target contactless parameter of the composite card is restored.

[0199] Optionally, the updating module 1102 is further configured to:

[0200] When the number of successful card swiping reaches the second number threshold, the target contactless parameter of the composite card is maintained.

[0201] 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:

[0202] The display module 1201 is used to display the card in the activated state in the 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;

[0203] An interaction module 1202 is used to perform command interaction with a card reader based on a target contactless parameter of the composite card, wherein the target contactless parameter is obtained by integrating the contactless parameters corresponding to the at least two simulated cards;

[0204] The interaction module 1202 is also used to interact with the card reader based on the updated target contactless parameters when the composite card fails to be swiped and the card reader is identified as an access control card reader. The updated target contactless parameters are obtained by updating the target contactless parameters based on the contactless parameters corresponding to the candidate access control simulation card, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card.

[0205] Optionally, the device further includes:

[0206] A replacement module, configured to replace the access control simulation card in the card swiping interface with the candidate access control simulation card when the at least two simulation cards include one access control simulation card and at least one non-access control simulation card;

[0207] The display module 1201 is further configured to, when the at least two simulated cards are non-access control simulated cards, additionally display the candidate access control simulated card in the card swiping interface.

[0208] Please refer to Fig.13 , which shows a block diagram of a terminal structure provided by an exemplary embodiment of the present application. The terminal may include one or more of the following components: a processor 1301 , a memory 1302 , and an NFC component 1303 .

[0209] Optionally, the processor 1301 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 1302, and calling data stored in the memory 1302.

[0210] The memory 1302 may include a RAM (Random Access Memory) or a ROM (Read-Only Memory). The memory 1302 may be used to store instructions, programs, codes, code sets or instruction sets.

[0211] The NFC component 1303 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 Card Mode) based on the host card to perform card emulation, the terminal does not need to use the SE component. The NFC component 1303 may be used to simulate communication between the card and the card reader, thereby realizing instruction interaction between the terminal and the card reader.

[0212] 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.

[0213] 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.

[0214] 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.

[0215] 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: When receiving a card reading instruction sent by a card reader, performing instruction interaction with the card reader based on a target contactless parameter of a composite card, the composite card corresponds to at least two simulated cards, and the target contactless parameter is obtained by integrating the contactless parameters corresponding to the at least two simulated cards; In the case where the composite card fails to be swiped and the card reader is identified as an access control card reader based on the instruction interaction, the target contactless parameter is updated based on the contactless parameter corresponding to the candidate access control simulation card, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card; Perform command interaction with the card reader based on the updated target contactless parameters.

2. The method according to claim 1, characterized in that The updating of the target contactless parameters based on the contactless parameters corresponding to the candidate access control simulation card includes: The original UID in the target contactless parameter is updated to the UID of the candidate access control simulation card.

3. The method according to claim 2, characterized in that In the case where the at least two simulated cards include one access control simulated card and at least one non-access control simulated card, the original UID in the target contactless parameter is the UID of the access control simulated card; In the case that the at least two simulation cards are both non-access control simulation cards, the original UID in the target contactless parameter is the UID of any non-access control simulation card.

4. The method according to claim 2, characterized in that: The updating of the target contactless parameters based on the contactless parameters corresponding to the candidate access control simulation card also includes: In the case that the at least two analog cards are non-access control analog cards, the first SAK parameter representing the non-access control type in the target contactless parameter is updated to a second SAK parameter representing a composite type, and the second SAK parameter is obtained by combining the first SAK parameter and the third SAK parameter representing the access control type.

5. The method according to claim 4, characterized in that The first SAK parameter is 0x20, the second SAK parameter is 0x28, and the third SAK parameter is 0x08.

6. The method according to claim 2, characterized in that The method further comprises: In the case that there is a candidate access control simulation card that does not belong to the at least two simulation cards corresponding to the composite card, writing the UID of the candidate access control simulation card into the buffer; The updating of the target contactless parameters based on the contactless parameters corresponding to the candidate access control simulation card also includes: The UID of the candidate access control simulation card is read from the buffer.

7. The method according to claim 6, characterized in that The step of reading the UID of the candidate access control simulation card from the buffer includes: In the case where the UIDs of at least two candidate access control simulation cards are written in the buffer, the UIDs of the candidate access control simulation cards are read from the buffer in sequence by polling.

8. The method according to claim 1, characterized in that The method further comprises: When the instruction interaction situation indicates that the number of repetitions of the first type of interaction instruction reaches a first number threshold and there is no second type of interaction instruction, it is determined that the composite card swiping has failed, and the card reader is an access control card reader, the first type of interaction instruction is an instruction used by the access control simulation card to interact with the access control card reader, and the second type of interaction instruction is an instruction used by the non-access control simulation card to interact with the non-access control card reader.

9. The method according to claim 8, characterized in that The first type of interactive instructions include card search instructions, card search responses, anti-collision instructions and UID responses, and the second type of interactive instructions include card selection instructions, card selection responses, RATS instructions and selection responses.

10. The method according to claim 1, characterized in that The method further comprises: When a card reading instruction sent by a card reader is received and the at least two simulated cards include an access control simulated card and at least one non-access control simulated card, the radio frequency parameters are preloaded, wherein the radio frequency parameters are multiplexed by the access control simulated card and the candidate access control simulated card, and the radio frequency parameters include at least one of a radio frequency following parameter and a phase adaptive parameter.

11. The method according to claim 1, characterized in that: After performing instruction interaction with the card reader based on the updated target contactless parameter, the method further includes: When the composite card is swiped successfully, the target contactless parameter of the composite card is restored.

12. The method according to claim 11, characterized in that When the composite card is swiped successfully, restoring the target contactless parameter of the composite card includes: When the composite card is swiped successfully, the number of successful swiping times of the candidate access control simulation card is updated; If the number of successful card swiping times does not reach the second number threshold, restoring the target contactless parameter of the composite card; The method further comprises: When the number of successful card swiping reaches the second number threshold, the target contactless parameter of the composite card is maintained.

13. 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; Performing command interaction with a card reader based on a target contactless parameter of the composite card, wherein the target contactless parameter is obtained by fusing the contactless parameters corresponding to the at least two simulated cards; In the case that the composite card fails to be swiped and the card reader is identified as an access control card reader, instructions are interacted with the card reader based on the updated target contactless parameters, and the updated target contactless parameters are obtained by updating the target contactless parameters based on the contactless parameters corresponding to the candidate access control simulation card, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card.

14. The method according to claim 13, characterized in that The at least two simulated cards are displayed in the card swiping interface; In the case where the composite card fails to be swiped and the card reader is identified as a door access control card reader, the method further includes: In a case where the at least two simulated cards include one access control simulated card and at least one non-access control simulated card, replacing the access control simulated card in the card swiping interface with the candidate access control simulated card; In the case that the at least two simulated cards are both non-access control simulated cards, the candidate access control simulated cards are additionally displayed in the card swiping interface.

15. A command interaction device for simulating a card, characterized in that: The device comprises: An interaction module, configured to, upon receiving a card reading instruction sent by a card reader, perform instruction interaction with the card reader based on a target contactless parameter of a composite card, wherein the composite card corresponds to at least two simulated cards, and the target contactless parameter is obtained by integrating the contactless parameters corresponding to the at least two simulated cards; an updating module, configured to update the target contactless parameters based on contactless parameters corresponding to candidate access control simulation cards when the composite card fails to be swiped and the card reader is identified as an access control card reader based on the instruction interaction situation, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card; The interaction module is further used to perform instruction interaction with the card reader based on the updated target contactless parameters.

16. 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; An interaction module, used for performing command interaction with a card reader based on a target contactless parameter of the composite card, wherein the target contactless parameter is obtained by integrating the contactless parameters corresponding to the at least two simulated cards; The interaction module is also used to perform command interaction with the card reader based on the updated target contactless parameters when the composite card fails to be swiped and the card reader is identified as an access control card reader. The updated target contactless parameters are obtained by updating the target contactless parameters based on the contactless parameters corresponding to the candidate access control simulation card, and the candidate access control simulation card does not belong to the at least two simulation cards corresponding to the composite card.

17. 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 14.

18. 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 14.

19. 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 14.

Citation Information

Cited By

  • Multi-card identification method, device and equipment based on near field communication technology

    CN120475359A