Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
References herein to "a plurality" means two or more. "and/or" describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate that there are three cases of a alone, a and B together, and B alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Referring to FIG. 1, a schematic diagram of an implementation environment is shown in accordance with an exemplary embodiment of the present application. The implementation environment includes a terminal 110 and a reader 120.
Terminal 110 is an NFC enabled electronic device that may be a smart phone, tablet, smart wearable device, or personal computer, among others. The NFC function may include an NFC input function and an NFC card swiping function, where the NFC input function is used to input card information of an entity NFC card into a terminal and generate an analog card corresponding to the entity NFC card, and the NFC card swiping function is used to interact with a card reader based on card information of the analog card so as to implement specific card swiping functions, such as opening a door, deducting fees, unlocking a vehicle, and the like.
The card reader 120 is a device for reading related data in an NFC physical card or an analog card in a terminal. In some possible application scenarios, the card reader 120 may be an entrance guard card reader arranged at an entrance guard for controlling opening and closing of the entrance guard, the card reader 120 may be a traffic card reader arranged at a vehicle or a traffic station for realizing traffic deduction, and the card reader 120 may also be a vehicle key card reader integrated in a vehicle for realizing a vehicle unlocking function. The specific type of reader 120 is not limited by embodiments of the present application.
In the embodiment of the present application, the single card activation and multi-card activation modes are supported in the terminal 110. In the multi-card activation mode, when the plurality of analog cards meet the composite condition, the terminal 110 may create a composite card corresponding to the plurality of analog cards, and set the non-connection parameters of the composite card based on the respective non-connection parameters of each analog card. When the terminal 110 interacts with the card reader 120 subsequently, the terminal 110 can perform initialization, anti-collision, protocol transmission and other interactions with the card reader 120 according to the non-connection parameters of the composite card, so that simultaneous activation of a plurality of analog cards is realized, and further based on the instruction sent by the card reader 120, the analog card matched with the card reader 120 is selected from the plurality of analog cards to perform interaction, so that the operation of manually switching the analog cards by a user is avoided.
In the following embodiments, an instruction interaction method of a analog card is described as an example for the terminal 110.
Referring to fig. 2, a flowchart of a method for interacting instructions of a simulation card according to an exemplary embodiment of the present application is shown. The method comprises the following steps:
step 201, grouping the analog cards based on the usage areas corresponding to the analog cards to obtain at least one analog card group, wherein different analog card groups correspond to different usage areas.
The simulation card is a virtual card generated by terminal simulation. In one possible implementation, the terminal may copy the information of the physical card into the analog card, so that the analog card has the same function as the physical card. For example, the terminal copies the internal data of the access card in a manner of being close to the access card.
In another possible implementation manner, the terminal may obtain the analog card by configuring the card, for example, the terminal adds the analog bank card by inputting information such as a bank card number, a password, and the like.
The using area of the analog card is the area where the position of the analog card and the card reader interact with instructions. Different analog cards correspond to different areas of use. For example, the cell access card is used for a cell gate, and the use area of the cell access card can be a city or a village where the cell is located. For another example, the subway card is generally used for subway stations in a city, and the use area of the subway card can be the city or province where the subway is located.
Because the area where the terminal uses each analog card to perform the card swiping activity may be fixed or may not be fixed, for the analog card with the fixed use area, the terminal may group the analog cards according to the use area of the analog card to obtain an analog card group, and for the analog card terminal with the unfixed use area, the terminal may add the analog card group into the group corresponding to the fixed use area.
The analog card group is the group where the analog cards with the same use area are located. For example, the city a traffic card and the city a entrance guard card are both used in city a, so that the city a traffic card and the city a entrance guard card can be incorporated into one analog card group, and the usage area corresponding to the analog card group is city a.
Since the terminal may perform a card swiping activity in multiple areas, there may be multiple different analog card groups in the terminal corresponding to different usage areas.
Illustratively, as shown in fig. 3, the terminal determines a city as a usage area of the analog card. The terminal firstly groups the simulation cards according to cities to obtain a simulation card group 1 corresponding to the A city, a simulation card group 2 corresponding to the B city and a simulation card group 3 corresponding to the C city, wherein the simulation cards in each simulation card group can be various cards with corresponding use areas, such as traffic cards, access cards, social security cards and the like.
Step 202, creating a composite card corresponding to the analog card group, wherein the composite card corresponds to at least two analog cards in the analog card group.
When the terminal uses the card in the using area, the situation that the card needs to be switched when the card is swiped in a failure possibly occurs, in order to save the time of switching the card after the card is swiped in a failure, the terminal can compound a plurality of analog cards corresponding to the using area to obtain a compound card, and then the card is swiped by using the compound card.
Illustratively, as shown in fig. 3, a city analog card 1 and a city analog card 2 are present in the analog card group 1, a B city analog card 2, and a B city analog card 3 are present in the analog card group 2, and a C city analog card 1 and a C city analog card 2 are present in the analog card group 3. The terminal creates a composite card A corresponding to an A city based on the A city simulation card 1 and the A city simulation card 2, creates a composite card B corresponding to a B city based on the B city simulation card 1, the B city simulation card 2 and the B city simulation card 3, and creates a composite card C corresponding to a C city based on the C city simulation card 1 and the C city simulation card 2. The terminal firstly activates the composite card A, namely the terminal uses the composite card A to swipe the card by default, and when the composite card A fails to swipe the card, the terminal is switched to the composite card B or the composite card C to swipe the card.
It should be noted that, because the non-connection parameters corresponding to different analog cards are different, not all analog cards can be used to create the composite card. When the analog card group comprises n Zhang Moni cards, wherein the m Zhang Moni cards need to meet corresponding compound conditions, the terminal can create a corresponding compound card for the m Zhang Moni cards in the n Zhang Moni cards, wherein n is greater than or equal to 2, and m is less than or equal to n.
Since the number m of cards used for creating composite cards in the analog card group is smaller than the number n of analog cards included in the analog card group, the number of cards for creating each composite card in the terminal is equal to or smaller than all the numbers of cards. Compared with a mode that the terminal utilizes all the simulation cards meeting the composite conditions to create the composite card, the embodiment of the application firstly groups the simulation cards, and then utilizes the simulation cards meeting the composite conditions in the group to create the composite card, thereby reducing the number of cards participating in fusion and reducing the fusion difficulty of non-connection parameters.
And 203, carrying out parameter fusion on the non-connection parameters of the analog card corresponding to the composite card to obtain the target non-connection parameters of the composite card.
The contactless parameters are used to enable wireless communication between a contactless IC (INTEGRATED CIRCUIT ) card and a card reader, such as a UID (Unique Identifier ) parameter, an ATS (Answer to Select) parameter, a SAK (Select AcKnowledge, card Select response) parameter, an ATQA (Answer To Request, type a, poll class a card response) parameter, and the like.
In the process of interaction with the card reader, the terminal responds to the card reading instruction according to the corresponding parameters in the non-connection parameters, so that in order to obtain the target non-connection parameters of the composite card, the non-connection parameters of a plurality of analog cards corresponding to the composite card are required to be fused, and interaction between the composite card and the card reader is realized.
Step 204, under the condition that a card reading instruction sent by the card reader is received, the instruction interaction is carried out with the card reader based on the target non-connection parameters.
In the process of swiping a card by using a composite card, the terminal interacts with a card reader. And the terminal responds by using the non-connection parameters of the corresponding type in the target non-connection parameters of the composite card according to the card reader instruction. Because the target non-connection parameters of the composite card are fused with the non-connection parameters of the plurality of analog cards corresponding to the composite card, the plurality of analog cards can respond to the instruction sent by the card reader, namely the plurality of analog cards are activated.
Further, the terminal can determine the analog card corresponding to the card reader in the plurality of analog cards through the instruction sent by the card reader, and then perform instruction interaction.
For example, the card reader corresponding to the non-access card firstly transmits an AID polling command to the terminal, namely the card reader transmits the AID supported by the card reader to the terminal one by one, the terminal responds to the card reader whether the card reader supports the AID after receiving the AID transmitted by the card reader, and after confirming the AID corresponding to the analog card in the terminal, the card reader uses an application program corresponding to the AID to perform subsequent interaction with the analog card corresponding to the terminal. For another example, after the entrance guard card reader sends an anti-collision instruction to the terminal, the terminal sends a UID response corresponding to the entrance guard card to the card reader when the composite card contains the entrance guard card, and the terminal sends a UID response corresponding to the non-entrance guard card to the card reader when the composite card does not contain the entrance guard card.
In summary, in the embodiment of the present application, the terminal first obtains at least one analog card group by grouping according to the usage area, and then creates the composite card based on at least two analog cards in each analog card group. Then, in order to save the time of card switching after card swiping failure of the terminal, the terminal fuses non-connection parameters of the composite card corresponding to a plurality of analog cards to obtain target non-connection parameters of the composite card, and after receiving a card reading instruction of the card reader, the subsequent terminal sends corresponding response to the card reader based on the target non-connection parameters to complete instruction interaction between the terminal and the card reader. The terminal groups the analog cards according to the use area, then creates a composite card in the analog card group, reduces the number of the analog cards participating in fusion, reduces the fusion difficulty of non-connection parameters, enables a plurality of analog cards to be in an activated state by fusing the non-connection parameters of the analog cards in the analog card group, and can autonomously select the analog cards to conduct instruction interaction according to instructions sent by the card reader, so that the operation of manually switching the analog cards by a user is omitted, the card swiping process is simplified, and the card swiping efficiency is improved.
Since different analog cards have different card types, the terminal can determine the composite condition of the analog card, namely, the type composite condition according to the card type of the analog card. According to different authentication modes of the analog card, the terminal can divide the analog card into an access control card and a non-access control card.
And under the condition that the access control card exists in the simulation card group, the terminal performs instruction interaction with the card reader based on the target non-connection parameters of the composite card comprising the access control card and other non-access control cards.
Referring to fig. 4, a flowchart of a method for interacting instructions of a simulation card according to another exemplary embodiment of the present application is shown. The method comprises the following steps:
Step 401, grouping the analog cards based on the usage areas corresponding to the analog cards to obtain at least one analog card group, wherein different analog card groups correspond to different usage areas.
The implementation of this step may refer to step 201, and this embodiment is not described herein.
Step 402, obtaining a card type of an analog card in the analog card group.
Because the authentication modes of different analog cards are different, the terminal can divide the analog cards in the analog card group into an access control type and a non-access control type. The entrance guard type analog card passes UID authentication, and the non-entrance guard type analog card does not pass UID authentication.
In one possible implementation, the terminal determines the card type of the analog card in the analog card group according to the card type selected by the analog card in the analog card group at the time of card entry. For example, when the terminal inputs the access card, the terminal firstly enters an input port corresponding to the access card, then copies the access card, and after the access card is copied successfully, the terminal records that the type of the access card is the access type so as to acquire the card type next time.
And step 403, creating composite cards corresponding to at least two analog cards under the condition that the card types of the at least two analog cards meet the type composite condition.
Because the authentication modes of the analog cards of different card types are different, not any analog card combination can be used for creating the corresponding composite card, and therefore, the terminal needs to further determine whether the card meets the type composite condition according to the card type.
Because UIDs of different entrance guard type analog cards are different, and only one UID of one entrance guard type analog card corresponds to the UID, a terminal cannot obtain UIDs capable of representing two or more entrance guard type analog cards through fusion, and therefore the entrance guard type analog cards cannot be fused with each other.
Because the access control type adopts the non-access parameter UID to authenticate, but the non-access control type does not pass through the UID to authenticate, the analog card of the access control type can be fused with one or more analog cards of the non-access control type.
Similarly, multiple non-access type analog cards can be mutually fused.
From the above reasoning, the type compounding condition can be classified into the following two cases according to the card type.
1. The card types of different analog cards are all non-access control types.
2. The card type of one analog card in different analog cards is an entrance guard type.
Since there may be one access card in the analog card group, there may be multiple access cards or there may be no access cards. Therefore, the terminal can divide the creation of the composite card into three cases, namely, the case that a single access card exists in the analog card group, the case that a plurality of access cards exist in the analog card group and the case that no access card exists in the analog card group.
And step 404, carrying out parameter fusion on the non-connection parameters of the analog card corresponding to the composite card to obtain the target non-connection parameters of the composite card.
In some embodiments, the type of interfacing parameters of the analog card includes ATQA, UID, ATS, SAK. Wherein, ATQA is used for responding to the card inquiry command of the card reader, which means that the analog card capable of responding to the card reader command exists in the radio frequency field. The UID is the unique identification of the access control type card. The SAK parameter is contained in the SAK response and is used for responding to the card selection instruction 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. The ATS parameter is included in the ATS response and is used to respond to an RATS (Request ATS, select response Request) command sent from the reader. ATS is only a non-access parameter for a non-access type analog card.
Note that, type a in the non-access parameter ATQA indicates a Type a card response, and for a Type B card, the Type of non-access parameter for responding to the card reader polling command is ATQB (Answer To Request, type B, poll Type B card response).
Since each analog card has the above-mentioned non-connection parameters, and the target non-connection parameters are obtained by fusing the non-connection parameters of the analog card, the target non-connection parameters also need to include the above-mentioned types of non-connection parameters.
Optionally, the terminal may fuse the same type of non-access parameters according to the type of non-access parameters. The fusion process of the different types of non-connection parameters is as follows.
1. And determining the UID parameters of the composite card targets.
In the first case, the card types of at least two analog cards are non-gate inhibition types.
Because the non-entrance guard type analog card does not pass the UID authentication, the content of the target UID does not influence the card reader to find the corresponding analog card and interact, and the terminal can determine the UID of any analog card as the target UID.
For example, when the composite card includes the traffic card and the car key, the UID of the traffic card is UID1, and the UID of the car key is UID2, and since determining that UID1 or UID2 is the target UID does not affect card authentication, the terminal may determine UID1 as the target UID of the composite card, or UID2 as the target UID of the composite card.
In the second case, a card type of one analog card of the at least two analog cards is an entrance guard type.
When the UID of the non-access card is determined to be the target UID, the access card passes through the UID for authentication, and the UID of the access card does not exist in the target non-access parameters of the composite card, so that the card swiping failure occurs when the terminal uses the composite card to swipe the card reader corresponding to the access card. When the UID of the access card is determined to be the target UID, the terminal interacts with the access card reader by using the UID of the access card, and the card swiping is successful.
Therefore, in order to ensure that the access control type card reader can acquire the UID of the access control card in the plurality of analog cards corresponding to the composite card when the composite card is used for interaction with the access control type card reader, the access control unlocking is further completed, and the terminal determines the UID of the access control card as the target UID of the composite card.
For example, when the composite card contains an access card and a traffic card, the UID of the access card is UID1, the UID of the traffic card is UID2, when the composite card determines the UID2 of the traffic card as a target UID, the access card reader cannot acquire the UID1 corresponding to the access card, so that the access card reader fails to swipe the card, when the UID1 of the access card is determined as the target UID, the terminal can send the UID1 of the access card to the access card reader in the process of swiping the card by the terminal, and after the UID is successfully matched, the access card is unlocked, so that the terminal determines the UID1 as the target UID.
2. And determining the SAK parameters of the composite card targets.
In the first case, the card types of at least two analog cards are non-gate inhibition types.
Because the analog card of the non-access control type is applicable to the same communication protocol to receive the instruction sent by the card reader, the terminal determines SAK corresponding to the communication protocol applicable to the non-access control type as a target SAK parameter. For example, the non-access control type analog cards are all applicable to the ISO14443 protocol, and the SAK parameter corresponding to the ISO14443 protocol is 0x20, so that the 0x20 can be determined as the target SAK parameter first.
In the second case, a card type of one analog card of the at least two analog cards is an entrance guard type.
The SAK parameters of the access card are different from those of the non-access card because the access card is different from the communication protocol applicable to the non-access card. The access card corresponds to a first SAK parameter, and the non-access card corresponds to a second SAK parameter.
And because the byte positions occupied by the non-zero data of the first SAK parameter of the access control slice and the second SAK parameter of the non-access control slice are different, the card reader only checks the byte where the non-zero data is located when checking the SAK parameter, so that the first SAK parameter and the second SAK parameter can be combined to obtain the third SAK parameter.
For example, the communication protocol applicable to the access card is the Mifare protocol, the corresponding SAK parameter is 0x08, the communication protocol applicable to the non-access card is the ISO14443 protocol, and the corresponding SAK parameter is 0x20. Since the gate inhibition card reader only checks the byte at 8, not checks the byte at 0, but the gate inhibition card reader only checks the byte at 2, not checks the byte at 0, and the gate inhibition card reader is different from the gate inhibition card reader in checking byte position, SAK parameters can be fused to obtain 0x28, and then the terminal determines 0x28 as the target SAK parameter.
3. And determining the target ATS parameters of the composite card.
Because the access card generally has no ATS parameters, but the non-access card generally has ATS parameters, the terminal can fuse the ATS parameters of the non-access card as target ATS parameters of the composite card. For example, if the traffic card a has an ATS parameter 1 and the traffic card B has an ATS parameter 2, the target ATS parameters of the composite card including the access card and the traffic cards a and B are obtained by fusing the ATS parameters of the traffic cards a and B.
Because some non-access cards have proprietary ATS parameters, not all analog cards with ATS parameters can be fused with each other. The non-access cards with the privately-owned ATS parameters cannot be mutually fused, and the non-access cards without the privately-owned ATS parameters cannot be mutually fused.
Illustratively, the ATS response defined in the IOS14443 protocol is shown in fig. 5, where the IOS14443 protocol does not define the contents of the ATS response contained in the T1 to Tn fields. Different manufacturers can therefore add different proprietary parameters to the ATS parameters. In other fields defined by the IOS14443 protocol, the corresponding parameter types in each ATS response are the same, with the possibility of fusion.
4. And determining the target ATQA parameters of the composite card.
Because the access card and the non-access card are applicable to the same two ATQA parameters, namely 0400 and 0800, the terminal can take the common ATQA parameter as the target ATQA parameter of the composite card. For example, the target ATQA parameter may be 0x0400, and for example, the target ATQA parameter may be 0x0800, and all ATQA response readers containing both parameters may be identified.
And step 405, under the condition that a card reading instruction sent by the card reader is received, performing instruction interaction with the card reader based on the target non-connection parameters.
The implementation of this step may refer to step 204, and this embodiment is not described herein.
In the embodiment of the application, the terminal firstly obtains at least one analog card group in a mode of grouping according to the use area, then obtains the card type of each analog card in the analog card group, determines that at least two analog cards meet the type composite condition based on the card type, and creates the composite card. Then, in order to save the time of card switching after card swiping failure of the terminal, the terminal fuses the non-connection parameters of the analog card corresponding to the composite card to obtain the target non-connection parameters of the composite card, and after receiving a card reading instruction of the card reader, the subsequent terminal sends a response to the card reader based on the target non-connection parameters to complete instruction interaction between the terminal and the card reader. The terminal groups the analog cards according to the use area, then creates a composite card in the analog card group, reduces the number of the analog cards participating in fusion, reduces the fusion difficulty of non-connection parameters, enables a plurality of analog cards to be in an activated state by fusing the non-connection parameters of different types of the analog cards in the analog card group, and can autonomously select the analog cards to conduct instruction interaction according to instructions sent by the card reader, so that the operation of manually switching the analog cards by a user is omitted, the card swiping process is simplified, and the card swiping efficiency is improved.
However, not all card readers can identify the fused target non-connection parameters, for example, after some card readers receive the SAK response or the ATQA response sent by the terminal, the SAK parameter 0x28 or the ATQA parameter 0x0400 obtained after fusion is regarded as illegal content, so that the composite card swiping fails. For another example, proprietary parameters may exist in the traffic cards, and in the case where different traffic cards have different proprietary parameters, the different traffic cards cannot be fused.
In order to reduce the difficulty of non-connection parameter fusion, after the terminal groups the analog cards and before the non-connection parameter fusion is carried out on the analog cards, the terminal can carry out situation division processing on the creation of the composite card according to the type of the analog cards.
Since the analog card groups are grouped according to the usage areas, there may be access cards and there may not be access cards in the analog card group corresponding to one usage area. In the analog card group with the access cards, one access card may be included, and a plurality of access cards may be included.
Under the condition that the simulation card group only comprises one access card, the terminal can compound one access card in the simulation card group with other non-access cards because the authentication modes of the access card and the non-access cards are different.
Referring to fig. 6, a flowchart of a method for interacting instructions of a composite card based on a simulated card set including a single access card according to an exemplary embodiment of the present application is shown. The method comprises the following steps:
and 601, grouping the analog cards based on the use areas corresponding to the analog cards to obtain at least one analog card group, wherein different analog card groups correspond to different use areas.
The implementation of this step may refer to step 401 described above, and this embodiment is not described herein.
Step 602, obtaining a card type of an analog card in the analog card group.
For the implementation of this step, reference may be made to step 402, and this embodiment is not described herein.
And 603, under the condition that a single access card exists in the simulation card group and the access card and other non-access cards in the simulation card group meet the type composite condition, creating composite cards corresponding to the access card and the other non-access cards.
The terminal can divide the non-access cards into a first type of non-access cards with the privately-owned non-access parameters and a second type of non-access cards without the privately-owned non-access parameters according to whether the non-access parameters contain the private parameters or not.
Because the first type non-access cards have respective proprietary non-access parameters, a plurality of first type non-access cards with different proprietary non-access parameters cannot participate in fusion, namely, a composite card can only contain one first type non-access card.
And because the second type of non-access cards do not have proprietary non-access parameters, a plurality of second type of non-access cards with the same type of non-access parameters can participate in fusion, so that one first type of non-access card can be fused with one or more second type of non-access cards, and the private parameters of the first type of non-access cards are reserved in the fusion process of the non-access parameters of the first type of non-access cards and the second type of non-access cards. The proprietary non-access parameters of the first type of non-access cards may include proprietary ATS parameters.
For example, the ATS parameters corresponding to the traffic cards include proprietary parameters, the ATS parameters corresponding to the vehicle keys do not include proprietary parameters, where multiple traffic cards with different proprietary ATS parameters cannot be fused, multiple vehicle keys with the same type of ATS parameters can be fused, and one traffic card can be fused with one or more vehicle keys without proprietary parameters.
From the above reasoning, it can be seen that in the case that a single access card exists in the analog card group, when the card types of at least two analog cards in the analog card group satisfy the following type of composite conditions, a composite card can be created.
In the first case, under the condition that a single access card and a single non-access card of a first type exist in the analog card group, creating a composite card corresponding to the access card and the non-access card of the first type.
Because the authentication modes of the access card and the non-access card are different, the single access card and the single non-access card of the first type can be combined, and therefore the terminal can create a combined card containing the single access card and the single non-access card of the first type.
For example, an a city district entrance guard card and an a city traffic card exist in the analog card group corresponding to the a city, the a city district entrance guard card and the a city traffic card meet the type composite condition, and the terminal can create the composite card comprising the a city district entrance guard card and the a city traffic card.
In the second case, under the condition that a single access card, a single first-type non-access card and at least one second-type non-access card exist in the analog card group, creating a composite card corresponding to the access card, the first-type non-access card and the second-type non-access card.
Because the authentication modes of the access card and the non-access card are different, a single access card can be combined with a plurality of non-access cards. And because the single first-type non-access card with the privatization parameter can be compounded with at least one second-type non-access card without the privatization parameter, the simulation cards in the simulation card group meet the coincidence condition, and the terminal creates a compound card comprising the single access card, the single first-type non-access card and the at least one second-type non-access card.
For example, an a city district entrance guard card, an a city traffic card and a car key card of a car with an a city license plate exist in the analog card group corresponding to the a city, the type composite conditions of a single Zhang Menjin card, a single first type non-entrance guard card and at least one second type non-entrance guard card are met, and the terminal can create a composite card comprising a district entrance guard card, a traffic card and a car key card.
And in the third case, under the condition that a single access card and at least one second type of non-access card exist in the analog card group, creating a composite card corresponding to the access card and the second type of non-access card.
Because the authentication modes of the access card and the non-access card are different, a single access card can be combined with at least one non-access card, and therefore the terminal can create a combined card comprising the single access card and at least one second type non-access card.
For example, an access control card of an A city company and two car keys of a car with an A city license plate exist in an analog card group corresponding to the A city, the type composite condition of a single Zhang Menjin card and at least one second type non-access control card is met, and a terminal creates a composite card comprising the access control card of the company and the two car keys.
And step 604, carrying out parameter fusion on the non-connection parameters of the analog card corresponding to the composite card to obtain the target non-connection parameters of the composite card.
In this step, reference may be made to the case that the card type of one analog card in the at least two analog cards in step 404 is the entrance guard type, and this embodiment is not described herein.
Step 605, under the condition that a card reading instruction sent by the card reader is received, the instruction interaction is carried out with the card reader based on the target non-connection parameter.
The implementation of this step may refer to step 204, and this embodiment is not described herein.
In the embodiment of the application, the terminal firstly obtains at least one analog card group in a mode of grouping according to the use area, then the terminal obtains the card type of each analog card in the analog card group, under the condition that the analog card group comprises one access card, the terminal determines the type composite condition based on the card types of other non-access cards, and then under the condition that a plurality of analog cards in the analog card group meet the type composite condition, the terminal creates the composite card corresponding to the plurality of analog cards, thereby solving the fusion problem of the non-access cards with privateization parameters and reducing the fusion difficulty of the non-access parameters. And then the terminal fuses the non-connection parameters of each analog card contained in the composite card to obtain target non-connection parameters, and finally the terminal performs instruction interaction with the card reader based on the target non-connection parameters.
Under the condition that a plurality of access cards exist in the simulation card group, the terminal needs to determine a target access card firstly because only one access card can be contained in the composite card, and then the simulation card group discusses the type composite condition according to other non-access card types.
Referring to fig. 7, a flowchart of a method for interacting instructions of a composite card based on a simulated card set including a plurality of access cards according to an exemplary embodiment of the present application is shown. The method comprises the following steps:
and 701, grouping the analog cards based on the use areas corresponding to the analog cards to obtain at least one analog card group, wherein different analog card groups correspond to different use areas.
The implementation of this step may refer to step 401 described above, and this embodiment is not described herein.
Step 702, obtaining a card type of an analog card in an analog card group.
For the implementation of this step, reference may be made to step 402, and this embodiment is not described herein.
In step 703, in the case that at least two access cards exist in the analog card group, determining a target access card of the at least two access cards.
Because the composite card contains at most one access card, the terminal needs to determine a target access card for creating the composite card when at least two access cards exist in the analog card group.
Optionally, the terminal may determine the target access card by determining a current geographic location of a use area corresponding to each access card in the analog card group. And when the current position of the terminal is located in the using area of the access card, determining the access card corresponding to the using area as a target access card.
In one possible implementation, the terminal first determines the current geographic position through longitude and latitude coordinate positioning, then uses the card swiping place as a center, and when the distance between the terminal and the card swiping place does not exceed a distance threshold value, the terminal determines that the current position is in a using area of the access card, and determines the access card as a target access card.
For example, in the case where the analog card group includes a district access card, a company access card and other non-access cards, since the district access card and the company access card have fixed card swiping places, when the terminal is not more than 500 meters away from the card swiping place of the district access card, the terminal determines the district access card as a target access card, when the terminal is not more than 500 meters away from the card swiping place of the company access card, the terminal determines the company access card as a target access card, when the terminal is more than 500 meters away from the card swiping place of the company access card, and when the terminal is more than 500 meters away from the card swiping place of the district access card, the current target access card is not changed, or any access card in the current analog card group is selected as the target access card.
Although the current geographic position can be well determined based on the coordinate positioning of longitude and latitude, when the using areas of the cards overlap, for example, when the using areas of the property entrance guard card and the company entrance guard card are in the same building, wherein the using area of the property entrance guard card is in the first building and the using area of the company entrance guard card is in the tenth building, at this time, the terminal cannot determine the current position based on the coordinate positioning of longitude and latitude, so that the target entrance guard card cannot be determined.
Therefore, in another possible implementation manner, the terminal determines the current position through a WiFi (WIRELESS FIDELITY, wireless local area network) fingerprint positioning technology, that is, the terminal can record WiFi information of a usage area, including information such as a WiFi signal name and a signal strength, when the terminal monitors that the current monitored WiFi information matches with the WiFi information of the usage area, the terminal can determine that the current access card is located in the usage area of the access card, and determine the access card corresponding to the usage area as a target access card.
For example, when the service area of the access card and the service area of the access card of the company are in the same building, wherein the service area of the access card of the service is in the first building, and the service area of the access card of the company is in the tenth building. When the terminal is in the second floor, a stronger property WiFi signal is received, a weaker company WiFi signal is received, then the terminal determines that the terminal is currently located in a use area of the property access card, and determines the property access card as a target access card.
In addition, the terminal can also determine the target access card according to the usage time rule of each access card in the analog card group. For example, the terminal can determine that 7-8 hours in the morning, 6-8 hours in the evening and the whole day of rest are the using time periods of the district access card by recording the using time periods of the company access card and the district access card in one month, the terminal can determine that the district access card is a target access card, and the terminal can determine that the company access card is a target access card when 8-9 hours in the morning or 5-6 hours in the evening.
And step 704, under the condition that the target access card and other non-access cards in the simulated card group meet the type composite condition, creating composite cards corresponding to the target access card and other non-access cards.
Similar to step 603 described above, after determining the target access card, the terminal may create a composite card if the target access card meets type composite conditions with other non-access cards. Other non-access cards can be classified into a first type of non-access card with proprietary non-access parameters and a second type of non-access card without proprietary non-access parameters.
Because the first type non-access cards have respective proprietary non-access parameters, a plurality of first type non-access cards with different proprietary non-access parameters cannot participate in fusion, and the composite card can only contain one first type non-access card.
And because the second type of non-access cards do not have proprietary non-access parameters, a plurality of second type of non-access cards with the same type of non-access parameters can participate in fusion, so that one first type of non-access card can be fused with one or more second type of non-access cards, and the private parameters of the first type of non-access cards are reserved in the fusion process of the non-access parameters of the first type of non-access cards and the second type of non-access cards.
From the above reasoning, in the case that the target access card and other non-access cards meet the type composite condition, the creation of the composite card can be classified as follows.
Under the first condition, under the condition that a single first type of non-access card exists in the analog card group, determining that the target access card and the single first type of non-access card meet type composite conditions, and creating composite cards corresponding to the target access card and the first type of non-access card.
Under the condition that at least two access cards and a single first type of non-access card exist in the analog card group, the terminal firstly determines the target access card because the composite card can only contain one access card. After the target access card is determined, the target access card and a single first type of non-access card can be combined because the access card and the non-access card are different in authentication mode, and the terminal creates a composite card containing the target access card and the first type of non-access card.
For example, an a city district entrance guard card, an a city company entrance guard card and an a city traffic card exist in an analog card group corresponding to the a city, the terminal is located in a use area of the a city district entrance guard card, the a city district entrance guard card is determined to be a target entrance guard card, wherein the a city district entrance guard card belongs to an entrance guard type, the a city traffic card belongs to a non-entrance guard type, the a city district entrance guard card and the a city traffic card meet type composite conditions, and the terminal can create a composite card comprising the a city district entrance guard card and the a city traffic card.
In the second case, under the condition that a single first-type non-access card and at least one second-type non-access card exist in the analog card group, determining that the target access card, the single first-type non-access card and the at least one second-type non-access card meet type composite conditions, and creating composite cards corresponding to the target access card, the first-type non-access card and the second-type non-access card.
Under the condition that at least two access cards, a single first type non-access card and at least one second type non-access card exist in the analog card group, the terminal firstly determines the target access card because the composite card can only contain one access card. Because the access card and the non-access card authentication mode are different, a single access card can be combined with one or more non-access cards, and therefore, the target access card can be combined with a single first type non-access card or at least one second type non-access card. And because the single first type non-access card with the privatization parameter can be compounded with at least one second type non-access card without the privatization parameter, the terminal can determine that the single Zhang Mubiao access card, the single first type non-access card and the at least one second type non-access card meet the type compounding condition, and then the terminal creates a compounding card comprising the single target access card, the single first type non-access card and the at least one second type non-access card.
For example, an a city district entrance guard card, an a city company entrance guard card, an a city traffic card and a car key card of a car with an a city license plate exist in an analog card group corresponding to the a city, the terminal firstly monitors that the current position is in a use area of the company entrance guard card, and then the terminal determines the company entrance guard card as a target entrance guard card. Because one access card is combined with a plurality of non-access cards, and one first type of non-access card can be combined with a plurality of second type of non-access cards, the terminal can determine that one company access card, one traffic card and one car key meet type combination conditions, and the terminal can create a combination card comprising one company access card, one traffic card and one car key.
And in the third case, under the condition that at least one second type of non-access card exists in the analog card group, determining that at least one second type of non-access card of the target access card meets the type composite condition, and creating composite cards corresponding to the target access card and the second type of non-access card.
Under the condition that at least two access cards and at least one second type of non-access card exist in the analog card group, the terminal firstly determines the target access card because the composite card can only contain one access card. Because the access card and the non-access card authentication mode are different, a single access card can be combined with one or more non-access cards, so that the single access card and at least one second type non-access card meet the type combination condition, and the terminal creates a combination card containing the single access card and the at least one second type non-access card.
For example, an access control card of an A city company, an access control card of an A city district and two car keys exist in an analog card group corresponding to the A city, wherein the car keys are second-class non-access control cards without privatization parameters. The terminal first recognizes that the current position is located in a use area of the company access card, and then the terminal determines the company access card as a target access card. Because an access control card can be combined with a plurality of non-access control cards, the terminal determines that an access control card of a company and two car keys meet type combination conditions, and the terminal can create a combination card comprising the access control card of the company and the two car keys.
It should be noted that, in the case that there are at least two access cards in the analog card group, since the usage areas of the access cards may overlap, the terminal may determine an incorrect target access card, which results in failure of card swiping of the access card.
In order to solve the problem of card swiping failure caused by overlapping of the usage areas, in one possible implementation manner, after the card swiping failure, the terminal first determines another usage area to which the overlapping portion belongs, then, under the condition that the access card corresponding to the usage area and other non-access cards in the analog card group meet the type composite condition, the composite card is re-created, and then, the terminal uses the composite card to swipe the card again.
And step 705, carrying out parameter fusion on the non-connection parameters of the analog card corresponding to the composite card to obtain the target non-connection parameters of the composite card.
For the implementation of this step, reference may be made to step 404, which is not described in detail here.
Step 706, under the condition that a card reading instruction sent by the card reader is received, performing instruction interaction with the card reader based on the target non-connection parameter.
The implementation of this step may refer to step 205, and this embodiment is not described herein.
In the embodiment of the application, the terminal firstly obtains at least one analog card group in a mode of grouping according to the use area, and then the terminal obtains the card type of each analog card in the analog card group. Under the condition that at least two access cards are contained in the analog card group, the composite card can only contain one analog card, so that the terminal determines that the access card corresponding to the use area is a target access card according to the use area where the current position is located. And then the terminal processes the type composite condition of the analog card based on the existence condition of the non-access card with the private parameters, so that the fusion problem of the non-access card with the private parameters is solved, and the fusion difficulty of the non-access parameters is reduced. And then the terminal establishes a composite card by using the simulation cards meeting the type composite conditions in the simulation card group, then the terminal fuses the non-connection parameters of each simulation card contained in the composite card to obtain target non-connection parameters, and finally the terminal performs instruction interaction based on the target non-connection parameters.
In the above embodiment, since the first type non-access card has the privateization parameter, only one first type non-access card can be included in the composite card. However, only one first type of non-access control card does not necessarily exist in the analog card group, so that when the terminal creates at least two composite cards corresponding to the analog cards under the condition that the analog cards meet the type composite conditions, the following two conditions can be included.
1. Under the condition that a single first type of non-access control card exists in the analog card group and the first type of non-access control card and other analog cards in the analog card group meet type composite conditions, creating a composite card corresponding to the first type of access control card and the other analog cards.
The situation that a single first type of non-access card exists in the analog card group, which is the same as the embodiment above, and the situation that the first type of non-access card and other analog cards in the analog card group meet the type composite condition can include the following three types.
First, there are a single first type of non-access card and a single or multiple access cards in the analog card group.
And the second type is that a single first type non-access card, a single or a plurality of access cards and at least one second type non-access card exist in the analog card group.
Third, there are a single first type non-access card and at least one second type non-access card in the analog card group.
In the embodiment of the application, when only one access card exists in the analog card group, the access card can be combined with a non-access card due to different authentication modes, so that the access card can be combined with a single non-access card of a first type, and when at least two access cards exist in the analog card group, the terminal firstly determines a target access card from the at least two access cards and then combines the target access card with the single non-access card of the first type.
2. And under the condition that the target first-type non-access card and other simulation cards in the simulation card group meet the type composite condition, creating a composite card corresponding to the target first-type non-access card and other simulation cards.
The determining method of the target first type non-access card may include at least one of the following modes when at least two first type non-access cards exist in the analog card group.
First, any one of at least two first-type non-access cards is determined as a target first-type non-access card.
For example, when the traffic card a and the traffic card B exist in the analog card group, the terminal may determine the traffic card a as the target first type non-access card or the traffic card B as the target first type non-access card.
Second, based on the current geographic position and the historical use positions corresponding to the at least two first-type non-access cards, determining a target first-type non-access card in the at least two first-type non-access cards, wherein the matching degree of the historical use position corresponding to the target first-type non-access card and the current geographic position is highest.
Wherein the first type of non-access cards may include traffic cards. Although the traffic card has fixed traffic stations, the traffic stations related to the traffic line may have a large number and are respectively dense, and the terminal cannot determine the use area of the traffic card by recording all the traffic stations.
The point of sale corresponding to the traffic card may include only a few specific points according to the usage habits of the user. Therefore, in one possible implementation manner, the terminal may record the historical usage position of the traffic card, and determine the target first type of non-access card by matching the current position with the historical usage position, that is, when the matching degree between the current position of the terminal and the historical usage position of the traffic card is high, determine the traffic card corresponding to the historical usage position as the target first type of non-access card.
Illustratively, as shown in fig. 8, the history use area corresponding to the traffic card a includes areas 1, 2, and 3, and the history use area corresponding to the traffic card B includes areas 4 and 5. When the terminal is currently at position 6, the position 6 is closest to the position 2, so that the terminal is highest in matching with the historical use area corresponding to the traffic card A, and then the terminal determines the traffic card A as a target first-type non-access card.
Third, based on the respective use frequency of at least two first-type non-access cards, determining a target first-type non-access card in the at least two first-type non-access cards, wherein the use frequency of the target first-type non-access card is higher than that of other first-type non-access cards.
Because the higher the frequency of use of the analog card, the higher the possibility that the analog card is used, the terminal determines the first type of non-access card as the target first type of non-access card based on the first type of non-access card with the highest possibility that the frequency of use of the first type of non-access card will be used.
For example, the terminal records the usage times of the traffic card A and the traffic card B in a week, wherein the traffic card A is used for 6 times in a week, the traffic card B is used for 3 times in a week, and the usage frequency of the traffic card A is higher than that of the traffic card B, so the terminal determines that the traffic card A is the target first type of non-access control card.
Fourth, the first type non-access cards with the universal identification in at least two first type non-access cards are determined to be target first type non-access cards.
Because some analog cards may be universal cards with universal table marks, such as multi-city universal traffic cards, in order to achieve better compounding effect, the number of cards participating in compounding is reduced, the non-connection parameter fusion difficulty is reduced, and the terminal can fuse the universal cards preferentially. When the universal card cannot be fused, the terminal fuses with the non-universal analog card.
Illustratively, the traffic cards belong to a first class of non-access cards. Traffic cards typically have corresponding usage cities, such as a city a for the city a and B for the city B. Because some traffic cards are universal traffic cards in multiple cities, and compared with local traffic cards, the traffic cards have wider application areas, so that in order to reduce the number of cards participating in compounding and reduce the non-access parameter fusion difficulty, the terminal preferentially determines the traffic cards as target first-class non-access cards, and determines other local traffic cards as target first-class non-access cards when the traffic cards fail to be compounded.
In addition, the terminal can record the use period of the first type of non-access cards, and according to the use period of the current time, the terminal determines the first type of non-access cards corresponding to the use period as target first type of non-access cards. For example, the terminal determines that the use period corresponding to the traffic card 1 is 7-8 points on the morning by counting the use conditions of the traffic card 1 and the traffic card 2 in one month, the use period of the traffic card 2 is 17-18 points on the afternoon, and the terminal determines the subway card as a target first-type non-access control card when the current time is 17:30.
In the embodiment of the application, in order to reduce the difficulty of fusing the first type of non-access cards with the privately-connected parameters, the terminal creates the composite card based on a single first type of non-access card, and because the number of the first type of non-access cards in the analog card group is one or more, under the condition that a plurality of first type of non-access cards exist in the analog card group, the terminal firstly determines a target first type of non-access card, and then creates the composite card containing the target first type of non-access card under the condition that the target first type of non-access card and other analog cards meet the type composite condition.
In the above embodiment, the instruction interaction method of the analog card is discussed in the case that the analog card group includes the access card. However, there is not necessarily an access card in the analog card group, and in the case where only a non-access card is present in the analog card group, the type composite condition that the analog card in the analog card group needs to satisfy is different from the type composite condition in the case where the access card is present.
Optionally, after the terminal groups the analog cards according to the usage area of the analog cards to obtain the analog card group, the terminal can determine that the access control card does not exist in the analog card group by acquiring the card type of the analog card in the analog card group. And then the terminal divides the non-access cards into a first type of non-access cards with the privately-owned non-access parameters and a second type of non-access cards without the privately-owned non-access parameters according to whether the non-access parameters contain the private parameters. The privately-connected parameters may include privately-connected ATS parameters.
In the case where the non-access card satisfies the type composite condition, the creation of the composite card may be classified into the following two cases.
1. Under the condition that a single first-type non-access card and at least one second-type non-access card exist in the analog card group, creating a composite card corresponding to the single first-type non-access card and the at least one second-type non-access card.
2. And under the condition that at least two second-type non-access cards exist in the analog card group, creating a composite card corresponding to the at least two second-type non-access cards.
After the composite card is created, the terminal performs parameter fusion on the non-connection parameters of the analog card corresponding to the composite card, and the target non-connection parameters of the composite card are obtained.
Optionally, the terminal may fuse the same type of non-access parameters according to the type of non-access parameters. The fusion process of the different types of non-connection parameters is as follows.
1. And determining the UID of the composite card target.
Because the non-access control card does not pass the UID for authentication, the content of the target UID does not influence the card reader to find and interact with the corresponding analog card, and the terminal can determine the UID of any analog card as the target UID.
For example, when the composite card includes the traffic card and the car key, the UID of the traffic card is UID1, and the UID of the car key is UID2, and since determining that UID1 or UID2 is the target UID does not affect card authentication, the terminal may determine UID1 as the target UID of the composite card, or UID2 as the target UID of the composite card.
2. And determining the SAK parameters of the composite card targets.
Because the analog card of the non-access control type is applicable to the same communication protocol to receive the instruction sent by the card reader, the terminal determines SAK corresponding to the communication protocol applicable to the non-access control type as a target SAK parameter. For example, the non-access control type analog cards are all applicable to the ISO14443 protocol, and the SAK parameter corresponding to the ISO14443 protocol is 0x20, so that the 0x20 can be determined as the target SAK parameter first.
3. And determining the target ATQA parameters of the composite card.
Because the analog card of the entrance guard type and the analog card of the non-entrance guard type are applicable to the same two ATQA parameters, namely 0400 and 0800, the terminal can take the common ATQA parameter as the target ATQA parameter of the composite card. For example, the target ATQA parameter may be 0x0400, and for example, the target ATQA parameter may be 0x0800, and all ATQA response readers containing both parameters may be identified.
4. And determining the target ATS parameters of the composite card.
In the first case, a single first type non-access card and at least one second type non-access card exist in the analog card group.
In one possible implementation, the terminal fuses the ATS parameters of the first type of non-access card with the ATS parameters of the second type of non-access card, and retains the privatized portion of the first type of non-access card during the fusion process. For example, the traffic card belongs to a first type of non-access card, the car key belongs to a second type of non-access card, and the car key does not have a privately owned ATS parameter, so that the car key can respond to the instruction sent by the car key card reader based on the ATS parameter of the traffic card. The terminal can thus determine the proprietary ATS parameters of the traffic card as target ATS parameters.
In the second case, at least two second-class non-access cards exist in the analog card group.
For the non-privately-owned ATS parameters, in the process of fusing the ATS parameters, the terminal fuses the same kind of parameters in the ATS parameters.
In some embodiments, the ATS parameters include a wait period parameter and a communication rate parameter. The waiting time length parameter is used for reporting a time length range, namely the longest waiting time, required by the card reader waiting for the terminal to answer to the card reader after the terminal receives the card reader instruction. The communication rate parameter is used for reporting the fastest communication transmission rate supported by the terminal to the card reader.
Illustratively, as shown in fig. 5, the field type included in the ATS response is one in which the latency parameter is located in a portion of bits in the TB (1) byte in the ATS response and the communication rate parameter is located in a portion of bits in the TA (1) byte in the ATS response.
The waiting time length parameter represents the longest time length range of the card reader waiting for the terminal to answer, and the communication rate parameter represents the fastest communication transmission rate supported by the terminal, so that the largest waiting time length parameter in the ATS parameters of the multiple non-access control type analog cards can be determined as the target waiting time length parameter in the target ATS parameters, and the smallest communication rate parameter in the ATS parameters of the multiple non-access control type analog cards is determined as the target communication rate parameter in the target ATS parameters. For example, when the communication rate corresponding to the analog card a is 212kbps and the communication rate corresponding to the analog card B is 424kbps, the communication rate corresponding to the analog card B is faster than the communication rate corresponding to the analog card a, and the terminal determines the communication rate parameter corresponding to the analog card B as the target communication rate parameter among the ATS parameters.
In the embodiment of the application, after the simulated card groups are obtained, the terminal classifies other non-entrance guard cards under the condition that the simulated card groups do not contain entrance guard cards, determines type composite conditions based on the types of at least two non-entrance guard cards, creates composite cards corresponding to at least two non-entrance guard cards under the condition that the non-entrance guard cards meet the type composite conditions, and performs non-connection parameter fusion on non-connection parameters of different types corresponding to the non-entrance guard cards contained in the composite cards to obtain target non-connection parameters. And finally, the terminal realizes instruction interaction with the card reader based on the target non-connection parameters.
In all cases of the above embodiments, at least two analog cards in the analog card group need to satisfy the type composite condition, and then the terminal creates the composite card.
Although the number of cards participating in the compounding is reduced and the non-contact parameter fusion difficulty is reduced in a mode of grouping the analog cards according to the use area, analog cards which meet the type compounding condition and cannot be subjected to non-contact parameter fusion still exist, for example, an access control card with a UID of 7 bytes and a bus card with a UID of 4 bytes cannot obtain a target UID through non-contact parameter fusion.
In the case that the card types of at least two analog cards in the analog card group meet the type composite condition, in order to fuse the non-connection parameters of at least two analog cards in the analog card group, the non-connection parameters of at least two analog cards need to meet a certain parameter composite condition, so that in the case that the card types of at least two analog cards in the analog card group meet the type composite condition, the terminal creates the composite card corresponding to at least two analog cards, and the method can further comprise the following substeps.
1. And acquiring non-connection parameters corresponding to at least two analog cards.
2. And under the condition that the non-connection parameters meet the parameter compounding conditions, creating compound cards corresponding to at least two analog cards.
Since the format of the same type of non-connection parameters of each analog card may not be uniform, the case where the non-connection parameters satisfy the parameter compounding condition may include:
and under the condition that the parameter formats of the same type of non-connection parameters corresponding to the at least two analog cards are consistent, determining that the non-connection parameters meet parameter composite conditions, and creating composite cards corresponding to the at least two analog cards in the analog card group.
Illustratively, the length of the UID of each analog card may be different, the UID of the access card may be 4 bytes, and the UID of the bus card may be 7 bytes, and the UID of the bus card is typically 4 bytes. The entrance guard card is of an entrance guard type, the bus card is of a non-entrance guard type, and the type composite condition is met, however, the 7-byte UID entrance guard card cannot be fused with the 4-byte UID bus card, and the 4-byte UID entrance guard card and the 4-byte UID bus card can be used for creating a composite card corresponding to the 4-byte UID entrance guard card and the bus card due to the fact that the UID format is consistent and meets the parameter composite condition.
In the embodiment of the application, under the condition that at least two analog cards in the analog card group meet the type composite condition, the terminal firstly acquires the non-connection parameters corresponding to the at least two analog cards, then determines whether the non-connection parameters meet the parameter composite condition, and under the condition that the parameter composite condition is met, the terminal creates the composite card corresponding to the at least two analog cards so as to facilitate the subsequent non-connection parameter fusion and obtain the target non-connection parameters.
Because the corresponding usage areas of different analog cards are different, some analog cards have a fixed usage area, for example, the usage area of the access card of a cell is within the scope of the cell, and for example, the usage area of the campus card is within the scope of the school.
However, some analog cards do not have a fixed area of use. For example, the electronic identity card has a plurality of use scenes including high-speed rail traffic, hospital registration and the like, so that the use area of the electronic identity card is not fixed. For another example, an automobile is a vehicle that can travel in a fixed area or can travel across areas, and thus the area of use of the car key may not be fixed.
Alternatively, the terminal may group the analog cards according to the type of the fixed usage area, and then determine the corresponding group of analog cards without the fixed usage area.
In one possible implementation, the terminal divides the analog card having the fixed use area into the analog card groups corresponding to the fixed use areas, and the terminal divides the analog card having the non-fixed use area into the analog card groups of the respective fixed areas because the analog card having the non-fixed use area cannot be divided according to the use areas. And then, the terminal selects the simulation cards meeting the type composite conditions based on the simulation card groups obtained by dividing, so as to create a composite card, then, the non-connection parameters of the simulation cards corresponding to the composite card are fused, the target non-connection parameters of the composite card are obtained, and finally, the terminal performs instruction interaction with the card reader based on the target non-connection parameters.
Schematically, as shown in fig. 9, in the case that the terminal has a plurality of traffic cards, a plurality of access cards and a plurality of car keys, the terminal first divides the analog card groups corresponding to the three cities of a city, B city and C city according to the fixed use areas of the traffic cards and the access cards. The corresponding use areas of the A city traffic card and the A city district access card are A city, the corresponding use areas of the B city traffic card, the B city district access card and the B city company access card are B city, and the corresponding use areas of the C city traffic card 1 and the C city traffic card 2 are C city. In addition, the terminal includes a car key 1 and a car key 2 having non-stationary use areas. The terminal places the car key 1 and the car key 2 into all the analog card sets of the fixed use area. Therefore, the A city simulation card group comprises an A city traffic card, an A city district entrance guard card, a vehicle key 1 and a vehicle key 2, the B city simulation card group comprises a B city traffic card, a B city district entrance guard card, a B city company entrance guard card, a vehicle key 1 and a vehicle key 2, and the C city simulation card group comprises a C city traffic card 1, a C city traffic card 2, a vehicle key 1 and a vehicle key 2.
In the process of creating the composite card, the composite card comprising the A city traffic card, the A city district entrance guard card, the vehicle key 1 and the vehicle key 2 is created by the terminal because the A city district entrance guard card, the vehicle key 1 and the vehicle key 2 meet the type composite conditions of the single Zhang Menjin card, the single first type non-entrance guard card and at least one second type non-entrance guard card. Because the B city traffic card, the B city district entrance guard card, the car key 1 and the car key 2 meet the type composite condition of a single Zhang Menjin card, a single first type non-entrance guard card and at least one second type non-entrance guard card, the terminal creates a composite card comprising the B city traffic card, the B city district entrance guard card, the car key 1 and the car key 2. Since the C city traffic card 2, the car key 1 and the car key 2 satisfy the type composite condition of a single first type non-access card and at least one second type non-access card, the terminal creates a composite card containing the C city traffic card 2, the car key 1 and the car key 2.
Illustratively, the composite card creation process is shown in FIG. 10, which includes the steps of:
Step 1001, grouping analog cards according to the usage area of the analog cards.
Step 1002, obtaining an analog card type in an analog card group.
In step 1003, it is determined whether an access card exists in the analog card group.
In the event that no access card is present in the analog card group, step 1004 is performed.
In the case where there is an access card in the analog card group, step 1011 is performed.
Step 1004, determining whether a first type of non-access card exists in the analog card group.
In the case where a first type of non-access card exists in the analog card group, step 1005 is performed.
In the event that a first type of non-access card does not exist in the analog card group, step 1008 is performed.
Step 1005, determining whether a single first type non-access card exists in the analog card group.
In the case where there is a single non-access card of the first type in the analog card group, step 1006 is performed.
In the event that a single non-access card of the first type does not exist in the analog card group, step 1010 is performed.
Step 1006, determining whether at least one second type of non-access card exists in the analog card group.
Step 1007 is performed in the event that at least one non-access card of the second type is present in the analog card group.
And under the condition that at least one second-type non-access card does not exist in the analog card group, only one first-type non-access card exists in the analog card group, and no composite card is created.
Step 1007, creating a composite card based on the single first type non-access card and at least one second type non-access card.
Step 1008, determining whether at least two second-class non-access cards exist in the analog card group.
In the case where there are at least two non-access cards of the second type in the analog card group, step 1009 is performed.
And under the condition that at least two second-type non-access cards do not exist in the analog card group, the cards in the analog card group do not meet the type composite condition.
Step 1009, creating a composite card based on at least two second type non-access cards.
In step 1010, a target first type of non-access card is determined.
In step 1011, it is determined whether a single Zhang Menjin card exists in the analog card group.
In the event that a single access card is present in the analog card group, step 1012 is performed.
If there is no single Zhang Menjin card in the analog card group, a plurality of access cards are described, and step 1013 is performed.
Step 1012, determining whether a first type of non-access card exists in the analog card group.
In the case of a first type of non-access card present in the analog card group, step 1014 is performed.
In the case that the first type of non-access card does not exist in the analog card group, step 1015 is performed.
In step 1013, a target access card is determined.
Step 1014, determining whether a single non-access card of the first type exists in the analog card group.
In the case where a single non-access card of the first type exists in the analog card group, step 1017 is performed.
In the case where there is no single non-access card of the first type in the analog card group, step 1016 is performed where there are multiple non-access cards of the first type in the analog card group.
Step 1015, determining whether at least one second type of non-access card exists in the analog card group.
Step 1018 is performed in the event that at least one non-access card of the second type is present in the set of analog cards.
And under the condition that at least one second-type non-access card does not exist in the analog card group, only one access card exists in the analog card group, and no composite card is created.
Step 1016, determining a target first type of non-access card.
Step 1017, determining whether at least one second type of non-access card exists in the analog card group.
In case there is at least one non-access card of the second type in the analog card group, step 1019 is performed.
In the event that at least one non-access card of the second type does not exist in the analog card group, step 1020 is performed.
Step 1018, creating a composite card based on the single access card and the at least one second type of non-access card.
Step 1019, creating a composite card based on the single access card, the single first type of non-access card, and the at least one second type of non-access card.
Step 1020, creating a composite card based on a single access card and a single non-access card of a first type.
Since different analog cards have different types, the terminal can also determine whether the analog card has a fixed use area according to the card type.
In one possible embodiment, the terminal classifies card types into a first card type and a second card type, wherein the analog card of the first card type has a fixed use area and the analog card of the second card type has a non-fixed use area.
When the analog card belongs to the first card type, the terminal determines that the analog card has a fixed use area. The first card type may include at least one of an access card and a traffic card. The fixed use area corresponding to the access card can be a district, a company or other area using the access card to punch cards. The fixed use area of the traffic card can be a public traffic station or a corresponding city of the traffic card.
When the analog card belongs to the second card type, the terminal determines that the analog card has a non-stationary use area. The second card type may include at least one of a car key type, an identification card, and a payment card. The vehicle key using area comprises all areas into which a vehicle can drive, the identity card using area comprises all areas needing identity verification, and the payment card using area comprises all areas with payment environments.
Of course, in other possible embodiments, the terminal may also cluster the historical usage areas of the analog card, and determine whether the analog card has a fixed usage area according to the clustering result.
In the embodiment of the application, the terminal groups the analog cards based on the fixed use area, and the analog cards corresponding to the non-fixed use area are divided into the fixed use area groups, so that the analog card group comprises all the analog cards possibly used by the terminal in a certain fixed use area, and then the terminal creates the composite card based on the cards meeting the type composite condition in the analog card group. The terminal reduces the fusion difficulty of non-connection parameters through grouping, and ensures that the analog card contained in the composite card has higher possibility to be used, so that a user does not need to switch in a fixed area to switch the composite card.
After the terminal automatically groups the analog cards according to the use area, the analog card group automatically comprises all the analog cards possibly used for creating the composite card in the fixed use area. Because of the different usage habits of analog cards of different users, users may not be active in a fixed usage area, e.g., users often shuttle between several cities due to work business demands. The analog card grouping performed automatically by the terminal may not be applicable to all users.
Further, the terminal may manually group the terminals by the user to obtain the analog card group under the condition that the type composite condition is ensured to be satisfied.
In one possible implementation manner, the terminal performs type composite condition inspection on the card added by the user into the analog card group, and when the card added by the user does not meet the type composite condition, for example, when the user adds a second access control card into the analog card group, for example, when the user adds a second non-access control card with private non-access parameters, the terminal can prompt the user to replace or reserve the analog card.
In addition, in order to enhance the individualization degree of the manual grouping, in one possible implementation, the user may name the custom analog card group or set a composite card cover.
In the embodiment of the application, the terminal performs type composite condition inspection on the analog card group which is independently created by the user, and provides personalized selection for the user when ensuring that the cards in the analog card group meet the type composite condition, including naming the composite card and replacing the cover of the composite card, thereby improving the personalized degree of the analog card group.
Referring to fig. 11, a block diagram of an instruction interaction device for an analog card according to an exemplary embodiment of the present application is shown. The device comprises:
The grouping module 1101 is configured to group the analog cards based on the usage areas corresponding to the analog cards, so as to obtain at least one analog card group, where different analog card groups correspond to different usage areas;
a creating module 1102, configured to create a composite card corresponding to the analog card group, where the composite card corresponds to at least two analog cards in the analog card group;
A fusion module 1103, configured to perform parameter fusion on the non-connection parameters of the analog card corresponding to the composite card, so as to obtain target non-connection parameters of the composite card;
and the interaction module 1104 is used for carrying out instruction interaction with the card reader based on the target non-connection parameter under the condition that a card reading instruction sent by the card reader is received.
Optionally, the creating module 1102 is further configured to:
Obtaining the card type of the analog card in the analog card group;
And under the condition that the card types of at least two analog cards meet type compounding conditions, creating the compounding card corresponding to the at least two analog cards.
Optionally, the creating module 1102 is further configured to:
Under the condition that a single access control card exists in the simulation card group and the access control card and other non-access control cards in the simulation card group meet the type of composite conditions, creating the composite cards corresponding to the access control card and the other non-access control cards;
And under the condition that the target access card and other non-access cards in the simulation card group meet the type composite condition, creating the composite card corresponding to the target access card and the other non-access cards.
Optionally, the creating module 1102 is further configured to:
under the condition that a single access control card and a single first type of non-access control card exist in the analog card group, creating the composite card corresponding to the access control card and the first type of non-access control card;
Under the condition that a single access card, a single first type non-access card and at least one second type non-access card exist in the analog card group, creating the composite card corresponding to the access card, the first type non-access card and the second type non-access card;
Under the condition that a single access control card and at least one second type of non-access control card exist in the analog card group, creating the composite card corresponding to the access control card and the second type of non-access control card;
The first type of non-access cards have proprietary non-access parameters, the second type of non-access cards do not have proprietary non-access parameters, and the proprietary non-access parameters do not support parameter fusion.
Optionally, the creating module 1102 is further configured to:
and determining a target access card in the at least two access cards based on the current geographic position and the use area corresponding to each of the at least two access cards, wherein the current geographic position is positioned in the use area corresponding to the target access card.
Optionally, the creating module 1102 is further configured to:
under the condition that a single first type of non-access control card exists in the simulation card group and the target access control card and the first type of non-access control card meet the type of composite conditions, creating the composite card corresponding to the target access control card and the first type of non-access control card;
Under the condition that a single first type non-entrance guard card and at least one second type non-entrance guard card exist in the simulation card group, and the target entrance guard card, the first type non-entrance guard card and the second type non-entrance guard card meet the type composite condition, creating the composite card corresponding to the target entrance guard card, the first type non-entrance guard card and the second type non-entrance guard card;
Creating the composite card corresponding to the target access card and the second type of non-access card under the condition that at least one second type of non-access card exists in the simulation card group and the target access card and the second type of non-access card meet the type composite condition;
The first type of non-access cards have proprietary non-access parameters, the second type of non-access cards do not have proprietary non-access parameters, and the proprietary non-access parameters do not support parameter fusion.
Optionally, the creating module 1102 is further configured to:
Creating the composite card corresponding to the first type of access control card and other simulation cards under the condition that a single first type of non-access control card exists in the simulation card group and the first type of non-access control card and the other simulation cards in the simulation card group meet the type composite condition;
Under the condition that at least two first-type non-access cards exist in the analog card group, determining a target first-type non-access card in the at least two first-type non-access cards; under the condition that the target first type non-access control card and other simulation cards in the simulation card group meet the type composite condition, creating the composite card corresponding to the target first type non-access control card and the other simulation cards;
the first type of non-access cards have proprietary non-access parameters, and the proprietary non-access parameters do not support parameter fusion.
Optionally, the creating module 1102 is further configured to:
Determining any one of the at least two first-type non-access cards as the target first-type non-access card;
Determining a target first type non-access card in the at least two first type non-access cards based on a current geographic position and historical use positions corresponding to the at least two first type non-access cards, wherein the historical use positions corresponding to the target first type non-access cards have the highest matching degree with the current geographic position;
Determining a target first-type non-access card in the at least two first-type non-access cards based on the respective use frequency of the at least two first-type non-access cards, wherein the use frequency of the target first-type non-access card is higher than the use frequency of other first-type non-access cards;
and determining a first type non-access card with a universal identifier in the at least two first type non-access cards as the target first type non-access card.
Optionally, the privately-owned non-access parameters include privately-owned ATS parameters, and the first type of non-access card includes a traffic card.
Optionally, the creating module 1102 is further configured to:
acquiring the non-connection parameters corresponding to the at least two analog cards respectively;
and under the condition that the non-connection parameters meet parameter compounding conditions, creating the compound card corresponding to the at least two analog cards.
Optionally, the creating module 1102 is further configured to:
And under the condition that the parameter formats of the same type of non-connection parameters corresponding to the at least two analog cards are consistent, determining that the non-connection parameters meet the parameter compounding conditions, and creating the compounding card corresponding to the at least two analog cards. Optionally, the grouping module 1101 is further configured to:
dividing the analog card into analog card groups corresponding to the fixed use areas under the condition that the analog card has the fixed use areas;
In the case where the analog cards have a non-stationary use area, the analog cards are divided into respective analog card groups.
Referring to fig. 12, a block diagram illustrating a structure of a terminal according to an exemplary embodiment of the present application is shown. The terminal may include one or more of a processor 1201, a memory 1202, and an NFC component 1203.
In the alternative, processor 1201 connects various parts throughout the terminal using various interfaces and lines, and performs various functions of the terminal and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in memory 1202, and invoking data stored in memory 1202.
The Memory 1202 may include a RAM (Random Access Memory ) or a ROM (Read-Only Memory). Memory 1202 may be used to store instructions, programs, code, sets of codes, or sets of instructions.
The NFC component 1203 may include an NFC chip and a SE (Secure Element) component, where the SE component is an optional component, and the terminal does not need to use the SE component when the terminal performs card emulation using HCE (Host-based Card Emulation based card emulation) based on a Host card. The NFC component 1203 may be configured to perform communication between the analog card and the card reader, thereby implementing command interaction between the terminal and the card reader.
The embodiment of the application also provides a computer readable storage medium, which stores at least one instruction, and the at least one instruction is used for being executed by a processor to implement the instruction interaction method of the analog card according to the embodiment.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the instruction interaction method of the analog card provided in the above embodiment.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing description of the preferred embodiments of the present application is not intended to limit the application, but rather, the application is to be construed as limited to the appended claims.