CN113361293A - Card swiping method, card controller, electronic device and storage medium - Google Patents

Card swiping method, card controller, electronic device and storage medium Download PDF

Info

Publication number
CN113361293A
CN113361293A CN202110614406.9A CN202110614406A CN113361293A CN 113361293 A CN113361293 A CN 113361293A CN 202110614406 A CN202110614406 A CN 202110614406A CN 113361293 A CN113361293 A CN 113361293A
Authority
CN
China
Prior art keywords
card
card application
application programs
application program
applications
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110614406.9A
Other languages
Chinese (zh)
Inventor
王大耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Goodix Technology Co Ltd
Original Assignee
Shenzhen Goodix Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Goodix Technology Co Ltd filed Critical Shenzhen Goodix Technology Co Ltd
Priority to CN202110614406.9A priority Critical patent/CN113361293A/en
Publication of CN113361293A publication Critical patent/CN113361293A/en
Priority to PCT/CN2021/137915 priority patent/WO2022252561A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10297Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves arrangements for handling protocols designed for non-contact record carriers such as RFIDs NFCs, e.g. ISO/IEC 14443 and 18092

Landscapes

  • Engineering & Computer Science (AREA)
  • Toxicology (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention relates to the technical field of near field communication and discloses a card swiping method, a card controller, electronic equipment and a storage medium. When detecting a radio frequency field entering a card reader, the card swiping method of the invention enters a card selecting step, wherein the card selecting step comprises the following steps: selecting a target card application program from the built-in N card application programs; calling a target card application program, and interacting with a card reader by using the target card application program; in the interaction process, when the radio frequency field reset of the card reader is detected, the target card application program is stopped, and the card checking step is repeated until any one of the N card application programs is successfully interacted with the card reader, or the N card application programs are selected in the card checking step and are not successfully interacted. Self-adaptive card swiping can be realized, the reconstruction of a card reader end is not needed, and the cost is reduced; meanwhile, manual card cutting operation is not needed to be carried out on an equipment interface for setting the card application program, and convenience in card swiping is improved.

Description

Card swiping method, card controller, electronic device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of near field communication, in particular to a card swiping method, a card controller, electronic equipment and a storage medium.
Background
In order to realize card-swiping identification of an electronic device integrating multiple card applications of multiple communication protocols, one existing method is as follows: hardware and software upgrading and transformation are carried out on the card reader end, so that the card reader end can identify the card application program corresponding to the protocol from the multiple card application programs of the multiple communication protocols according to different protocol types. The technology focuses on the realization of the card reader end, the current card reader end needs to be replaced completely, and the cost is high; moreover, when there are multiple card applications supporting the same communication protocol, the card reader cannot select a corresponding card application from the multiple card applications supporting the same communication protocol because the card reader cannot distinguish which card application is issued according to the protocol tag.
In order to realize card-swiping identification of an electronic device integrating a plurality of card applications supporting the same communication protocol, another conventional method is as follows: in the process of simulating the card swiping business of the smart card by using the handheld terminal (such as a mobile phone), a user is required to perform a series of operations before swiping the card, wherein the operations are as follows: firstly, lightening a mobile phone screen and entering a card selection program; then, selecting one card for the next card swiping; and finally, the mobile phone is close to the card swiping equipment, and the card swiping is carried out by using the selected card. That is to say, in this way, the user needs to perform the card cutting operation on the device display interface carrying the card application program, which brings some inconvenience to the user when using the simulated smart card to swipe the card, and the card swiping convenience is low.
Disclosure of Invention
The embodiment of the invention aims to provide a card swiping method, a card controller, electronic equipment and a storage medium, which can realize self-adaptive card swiping, do not need to reconstruct a card reader end, and reduce the cost; meanwhile, manual card cutting operation is not needed to be carried out on an equipment interface for setting the card application program, and convenience in card swiping is improved.
In order to solve the above technical problem, an embodiment of the present invention provides a card swiping method applied to a card controller, including: when a radio frequency field entering a card reader is detected, entering a card selecting step, wherein the card selecting step comprises the following steps: according to the priority sequence of N built-in card application programs, selecting one card application program which is not selected from the card application programs which are not selected in the card selecting step and have the highest priority as a target card application program, wherein N is an integer greater than or equal to 2; calling the target card application program, and interacting with the card reader by using the target card application program; in the interaction process, when the card controller detects that the radio frequency field of the card reader is reset, the target card application program is deactivated, and the card selection step is repeated until any one of the N card application programs is successfully interacted with the card reader, or the N card application programs are selected in the card selection step and are not successfully interacted.
The embodiment of the invention also provides another card swiping method, which comprises the following steps: when detecting that the radio frequency field of the card reader enters, entering a protocol confirmation step of the card swiping process, wherein the protocol confirmation step comprises the following steps: selecting a group of card application programs which are not selected in the card swiping process from built-in M groups of card application programs as a target group, wherein the communication protocol types used by any two groups of card application programs in the M groups of card application programs are different, the communication protocol types of all the card application programs in each group of card application programs are the same, and M is an integer greater than or equal to 2; calling any one card application program in the target group, and sending a communication protocol label of the called card application program in the target group to the card reader for the card reader to confirm a protocol; if the protocol validation fails, the called card application programs in the target group are stopped, and the protocol validation step is repeated until the protocol validation of any card application program in any group of card application programs is successful, or the M groups of card application programs are all selected in the card swiping process and all the protocol validation fails; if the protocol is confirmed successfully, performing key value authentication with the card reader by using the called card application program in the target group; if the key value authentication is successful, performing data interaction with the card reader by using the called card application program in the target group; if the radio frequency field reset of the card reader is detected, and the target group comprises N card application programs, wherein N is an integer greater than or equal to 2, the card selection step of the card swiping process is started, and the card selection step comprises the following steps: according to the priority sequence of N card application programs in the target group, selecting a card application program with the highest priority from the card application programs which are not selected in the current card swiping process as a target card application program, wherein N is an integer greater than or equal to 2; calling the target card application program, and performing key value authentication with the card reader by using the target card application program; if the key value authentication is successful, performing data interaction with the card reader by using the target card application program; in the interaction process, when the radio frequency field reset of the card reader is detected, the target card application program is stopped, and the card selection step is repeated until the data interaction between any one of the N card application programs and the card reader is successful, or the N card application programs are selected in the card swiping process and have no data interaction success.
Embodiments of the present invention also provide a card controller, including: at least one processing module; and a memory module communicatively coupled to the at least one processing module; the storage module stores instructions executable by the at least one processing module, and the instructions are executed by the at least one processing module to enable the at least one processing module to execute the first card swiping method.
The embodiment of the invention also provides electronic equipment which comprises at least N card application programs and the card controller, wherein N is an integer greater than or equal to 2.
Embodiments of the present invention also provide a card controller, including: at least one processing module; and a memory module communicatively coupled to the at least one processing module; the storage module stores instructions executable by the at least one processing module, and the instructions are executed by the at least one processing module to enable the at least one processing module to execute the second card swiping method.
An embodiment of the present invention further provides an electronic device, including at least M sets of card applications, and the card controller according to claim 17, wherein M is an integer greater than or equal to 2, communication protocol types used by any two sets of card applications in the M sets of card applications are different, and communication protocol types of all card applications in each set of card applications are the same, at least one set of card applications in the M sets of card applications includes N card applications, and N is an integer greater than or equal to 2.
The embodiment of the invention also provides a computer-readable storage medium, which stores a computer program, wherein the computer program is used for realizing the first card swiping method or the second card swiping method when being executed by the processing module.
The first card swiping method provided by the invention utilizes the characteristic that the radio frequency field of the card reader is reset after the interaction between the card reader and the card application program fails as the switching condition of the card application program. Specifically, when a radio frequency field entering a card reader is detected, a card selecting step is performed, wherein the card selecting step comprises the following steps: according to the priority sequence of the built-in N card application programs, selecting a card application program with the highest priority from the card application programs which are not selected in the card selecting step at this time as a target card application program; and calling a target card application program, interacting with the card reader by using the target card application program, and if the radio frequency field reset of the card reader is detected in the interaction process, knowing that the interaction between the currently called card application program and the card reader fails according to the characteristic of the radio frequency field reset of the card reader after the interaction fails. Therefore, the called target card application program is deactivated, the interaction between another subsequent card application program and the card reader is avoided being influenced, the card selection step is repeated, namely, another card application program which is not selected in the card selection step is called, the other card application program which is not selected in the card selection step is utilized to interact with the card reader until any one of the N card application programs successfully interacts with the card reader, or the N card application programs are selected in the card selection step and are not successfully interacted, so that the automatic card switching application program is realized, the self-adaptive card swiping can be realized, the manual card switching operation on a device interface for setting the card application program is not needed, and the card swiping convenience is improved. In addition, the card end is improved to be suitable for the existing card reader end, so that the card reader end does not need to be reconstructed, and the cost can be reduced.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a schematic flow chart of a card swiping method according to the invention;
FIG. 2 is a schematic flow chart of another card swiping method according to the invention;
FIG. 3 is a schematic diagram of a card controller according to the present invention;
FIG. 4 is a schematic diagram of another card controller according to the present invention;
FIG. 5 is a schematic diagram of an electronic device according to the present invention;
fig. 6 is a schematic structural diagram of another electronic device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
In the conventional various smart cards, such as bus cards, bank cards, medical insurance cards, etc., because the cards contain chips (the chips are integrated with card controllers), the cards can be read by various card readers to swipe the cards. There are two main types of chips commonly used in smart cards, one is a contact card swipe, such as a common card-insertion POS machine. The other type is a non-contact card swiping mode, which comprises a non-contact data transmission control chip (comprising a matched antenna) similar to NFC, such as a common bus card which is close to a card reader for swiping. In a non-contact card swiping scene, the common entity card functions are simulated through electronic equipment (such as a mobile phone), no actual card exists at this time, only an application program of the card is added in the electronic equipment to simulate one intelligent card, so that the simulation of multiple cards and multiple cards can be realized through the cooperation of an NFC chip (a card controller is integrated with the chip) and a safety element in the same electronic equipment, namely the multiple intelligent cards are installed on the mobile phone, and the same electronic equipment can be used in different occasions to realize different behaviors of card swiping authentication, card swiping consumption and the like.
The card swiping method of the invention is applied in a non-contact card swiping scenario, and the mentioned card application program can be understood as an application program of multiple smart cards integrated in an electronic device, such as: a bus card application, an access card application, a bank card application, etc. After understanding the application scenario of the card swiping method and the basic concept of the card application program, the card swiping method of the present invention is specifically described as follows:
the invention relates to a card swiping method, which is applied to a card controller and comprises the following steps: when a radio frequency field entering a card reader is detected, entering a card selecting step, wherein the card selecting step comprises the following steps: according to the priority sequence of the built-in N card application programs, selecting the card application program with the highest priority from the card application programs which are not selected in the card selecting step at this time as a target card application program, wherein N is an integer greater than or equal to 2; calling a target card application program, and interacting with a card reader by using the target card application program; in the interaction process, when the radio frequency field reset of the card reader is detected, the target card application program is stopped, and the card checking step is repeated until any one of the N card application programs is successfully interacted with the card reader, or the N card application programs are selected in the card checking step and are not successfully interacted.
When the interaction between the card reader and the card application program fails, the radio frequency field of the card reader is reset, wherein the radio frequency field reset refers to the process of starting, closing and starting the radio frequency field.
Specifically, when a radio frequency field entering a card reader is detected, a card selecting step is performed, wherein the card selecting step comprises the following steps: according to the priority sequence of the built-in N card application programs, selecting a card application program with the highest priority from the card application programs which are not selected in the card selecting step at this time as a target card application program; and calling the target card application program, interacting with the card reader by using the target card application program, and if the radio frequency field reset of the card reader is detected in the interaction process, namely the radio frequency field of the card reader is detected to go through the process from opening to closing to opening, knowing that the interaction between the currently called card application program and the card reader fails according to the characteristic that the radio frequency field reset of the card reader after the interaction fails. Therefore, the called target card application program is deactivated, the interaction between the subsequent another card application program and the card reader is avoided being influenced, the card selection step is repeated, namely, another card application program which is not selected in the card selection step is called, the card application program which is not selected in the card selection step is utilized to interact with the card reader until any one of the N card application programs successfully interacts with the card reader, or the N card application programs are all selected in the card selection step and are not successfully interacted, so that the card controller automatically switches the card application programs to realize self-adaptive card swiping, the manual card switching operation is not needed to be carried out on an equipment interface for setting the card application programs, and the card swiping convenience is improved. In addition, because the card end is improved, and the card controller of the card end executes the card selection step to realize automatic switching of the card application programs, the card application program switching method and the card application program switching device can be applied to the existing card reader end, can select the card application program to be identified from a plurality of card application programs without modifying the card reader end, and can reduce the cost.
The implementation details of the card swiping method of the present embodiment are specifically described below, and the following description is only provided for the convenience of understanding, and is not necessary for implementing the present embodiment.
The flow diagram of the card swiping method of the invention is shown in figure 1:
step 101: and according to the priority sequence of the built-in N card application programs, selecting the card application program with the highest priority from the card application programs which are not selected in the card selecting step at this time as a target card application program, wherein N is an integer greater than or equal to 2.
Specifically, when the radio frequency field entering the card reader is detected, a target card application program is selected from the N built-in card application programs, and the target card application program is not selected in the current card swiping step after entering the radio frequency field of the card reader, that is, the target card application program does not attempt to interact with the card reader in the current card swiping step after entering the radio frequency field of the card reader. For example: the electronic equipment is internally provided with 5 card application programs, namely a Shenzhen public transport card application program, a Wuhan public transport card application program, an entrance guard card application program, a recruit bank card application program and a medical insurance card application program, and the 5 card application programs are not selected and tried to interact with the card reader in the card swiping step after entering a radio frequency field of the card reader, so that one card application program can be selected from the 5 card application programs as a target card application program. If the Shenzhen pass bus card application program and the entrance guard card application program in the 5 card application programs are selected in the card selecting step, one card application program is selected from the 3 card application programs of the recruitment bank card application program, the Wuhan pass bus card application program and the medical insurance card application program to serve as a target card application program.
Specifically, when the target card application program is selected, the card application program with the highest priority is selected from the card application programs which have not been selected in the card selecting step at this time as the target card application program according to the priority sequence of the built-in N card application programs.
In this embodiment, the following three setting modes of priority order are given:
first, the priority order may be randomly set.
Secondly, setting the priority sequence of the N card applications according to the historical interaction success frequency of each card application in the N card applications, wherein the higher the historical interaction success frequency of the card applications is, the higher the priority of the card applications is.
Specifically, the historical interaction success times of each card application program in the N card application programs are recorded, and the greater the historical interaction success times of one card application program is, the higher the frequency of the use of the card application program is, the greater the probability that the card application program is used by the user is. According to the scheme, the higher the historical interaction success frequency of the card application program is, the higher the priority of the card application program is, namely, when the card is swiped, the card application program with high probability of being used by a user is preferentially utilized as the target card application program to interact with the card reader, and the card swiping efficiency can be greatly improved.
In the above implementation, the card controller automatically sets the priority order of the N card applications according to the historical interaction success number of each card application in the N card applications. In practical application, the card controller can be set by the user on the display interface of the electronic equipment with the card controller, so that personalized requirements of different users can be met.
Thirdly, setting the priority sequence of the N card application programs according to the priority of the radio frequency communication parameter corresponding to each card application program in the N card application programs; wherein, the higher the priority of the radio frequency communication parameter, the higher the priority of the card application program corresponding to the radio frequency communication parameter.
Specifically, the card controller obtains in advance the radio frequency communication parameters corresponding to each of the N card applications to obtain N sets of radio frequency communication parameters. The priority order of the radio frequency communication parameters can be automatically generated by the controller, so that the priority order of the N card application programs can be automatically generated without setting or counting historical data by a user.
The radio frequency communication parameters can be understood as: the communication parameters that are required to establish an air interface connection between the card application and the card reader, that is, the radio frequency communication parameters of the card application are parameters for establishing a communication connection with the card reader. In particular implementations, the radio frequency communication parameters may include, but are not limited to: user Identification (UID), Request response (ATQ), Select Acknowledge (SAK), Select To Select response (ATS), KEY, etc. When setting the priority order for N sets of radio frequency communication parameters, the priority order of the set of radio frequency communication parameters may be determined according to the priority order of any one of the radio frequency communication parameters.
Step 102: and calling the target card application program, and interacting with the card reader by using the target card application program.
Specifically, after a target card application is selected, the target card application is invoked to interact with a card reader using the target card application. Invoking the target card application as referred to herein may be understood as running the target card application in the electronic device. For example, all the 5 card applications including the shenzhen through bus card application, the wuhan through bus card application, the entrance guard card application, the recruit bank card application and the medicare card application are not selected in the current card swiping step and try to interact with the card reader, one card application is selected from the 5 card applications including the shenzhen through bus card application, the wuhan through bus card application, the entrance guard card application, the recruit bank card application and the medicare card application, for example, the shenzhen through bus card application is used as a target card application, the shenzhen through bus card application is called, and the shenzhen through bus card application is used for interacting with the card reader.
It should be noted that, when the target card application program interacts with the card reader in this scheme, the method includes: and carrying out protocol confirmation by using the target card application program and the card reader, carrying out key value authentication by using the target card application program and the card reader after the protocol confirmation is successful, and carrying out data interaction by using the target card application program and the card reader after the key value authentication is successful. And when the protocol validation fails, the key value authentication fails or the data interaction fails, the radio frequency field of the card reader is reset. When the data interaction between the target card application program and the card reader fails after the key value authentication is successful, the data interaction between the target card application program and the card reader can be repeatedly utilized for many times, so that the data interaction failure caused by network reasons is avoided.
Step 103: in the interaction process, judging whether the radio frequency field reset of the card reader is detected, and if so, entering step 104; if the determination is no, the flow ends.
In the card selecting step, when any one card application program fails to interact with the card reader, the card application program can send 4-bit NACK information to the card reader, and the card reader can execute radio frequency field resetting operation when receiving the 4-bit NACK information. In the process of utilizing the target card application program to interact with the card reader, whether the target card application program and the card reader are successfully interacted can be confirmed by judging whether the radio frequency field reset of the card reader is detected, the radio frequency field reset can be understood as the process that the state of a radio frequency field is switched from on to off and then switched on, and if the state of the radio frequency field is detected to undergo the change process of 'on-off-on', the radio frequency field reset of the card reader can be confirmed.
If the radio frequency field of the card reader is reset, it can be determined that the interaction between the card reader and the card application program fails, and at this time, two situations exist, one is that N card application programs have been selected, and the other is that N card application programs also have card application programs which have not been selected in the card selection step. Therefore, when the rf field reset of the card reader is detected, step 104 (deactivating the target card application and determining whether N card applications have been selected in the current card selection step) is performed to distinguish the two cases.
If the radio frequency field of the card reader is not reset, it can be determined that the interaction between the card application program and the card reader is successful, and the process can be ended at this time.
In one example, in order to avoid that the card reading process is immediately ended when the radio frequency field reset of the card reader is not detected, so that the interaction between the card application program and the card reader is not completed, in practical application, the detection of the radio frequency field reset of the card reader needs to be performed once for a certain time period, and the time period can ensure that the whole interaction process between the card application program and the card reader is ended, so that the detected result is more accurate. The time length may be set according to actual needs, and is not specifically limited in this embodiment.
Step 104: and stopping the target card application program, and judging whether the N card application programs are all selected in the card selecting step. When the determination is yes, the flow ends; if the determination is no, the process returns to step 101.
Specifically, after the radio frequency field of the card reader is reset, that is, the card reader and the card application program are determined to fail to interact, the target card application program is deactivated, so that the subsequent interaction between another card application program and the card reader is prevented from being influenced. At this time, whether the N card applications are tried to interact with the card reader in the card selecting step is determined by judging whether the N card applications are selected in the card selecting step.
After it is determined that the interaction between the card reader and the card application program fails, and when the N card application programs are all selected in the card selecting step, it may be determined that a card application program capable of interacting with the card reader does not exist in the N card application programs, and at this time, the card swiping process may be ended.
When a card application program that has not been selected in the current card selection step exists among the N card applications, that is, a card application program that has not been tried to interact with the card reader in the current card selection step exists among the N card applications, the step 101 needs to be performed, and a card application program is continuously selected from other card application programs that have not been selected in the current card selection step among the N card applications as a target card application program.
In one example, after the N card applications are all selected in the step of selecting the card at this time and none of the N card applications are successfully interacted with each other, the method further includes: and outputting the information of the interaction failure. The specific form of outputting the interaction failure information may be displaying a similar character of "interaction failure" on a display interface of the electronic device including the card controller, or may be prompting the interaction failure information to the user through vibration, so as to prompt the user of interaction failure to avoid that the user swipes the card for many times. The above-mentioned presentation form of the information of the interaction failure is only an example, and should not be limited thereto.
In one example, after any one of the N card applications successfully interacts with the card reader, or after the N card applications are all selected in the step of selecting the card at this time and have not successfully interacted with each other, the method further includes: the N card applications are all reset to have not been selected.
Specifically, after any card application program in the N card application programs successfully interacts with the card reader, or the N card application programs are all selected in the card selecting step and are not successfully interacted, the N card application programs are reset to be not selected yet, so that the card application programs are not omitted when the card application programs are used for trying to interact with another card reader, and the accuracy of a card swiping result can be guaranteed.
In this way, the above-mentioned resetting of the N card applications to the non-selected card application can be realized by removing the mark. For example: in the one-time card swiping process, the selected card application program in the N card application programs is marked as 'selected', and when the N card application programs are all marked as 'selected' but all failed to interact, or any one of the N card application programs is successfully interacted with the card reader, the mark on each card application program in the N card application programs is removed. The above-mentioned manner of determining whether the card application is selected in one card swiping process is only an example, and is not limited thereto.
In one example, N card applications all use the same communication protocol, and adaptive card swiping for multiple card applications in the same protocol can be realized in the scheme. For example, the N card applications in this embodiment all use the yula protocol. Of course, if the card reader supporting other protocols also has the characteristic that the rf field is reset when the card application interacts with the card reader, the N card applications in this embodiment may also include a card application using a protocol that does not use a communication protocol.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
The invention also provides another card swiping method, which comprises the following steps: when detecting that the radio frequency field of the card reader enters, entering a protocol confirmation step of the card swiping process, wherein the protocol confirmation step comprises the following steps: selecting a group of card application programs which are not selected in the card swiping process from built-in M groups of card application programs as a target group, wherein the communication protocol types used by any two groups of card application programs in the M groups of card application programs are different, the communication protocol types of all the card application programs in each group of card application programs are the same, and M is an integer greater than or equal to 2; calling any one card application program in the target group, and sending a communication protocol label of the called card application program in the target group to a card reader for the card reader to confirm a protocol; if the protocol validation fails, the called card application programs in the target group are stopped, and the protocol validation step is repeated until the protocol validation of any card application program in any group of card application programs is successful, or the M groups of card application programs are all selected in the card swiping process and all the protocol validation fails; if the protocol is confirmed successfully, performing key value authentication with the card reader by using the called card application program in the target group; if the key value authentication is successful, performing data interaction with the card reader by using the called card application program in the target group; if the radio frequency field reset of the card reader is detected, and the target group comprises N card application programs, wherein N is an integer greater than or equal to 2, the card selection step of the card swiping process is started, and the card selection step comprises the following steps: according to the priority sequence of N card application programs in the target group, selecting a card application program with the highest priority from the card application programs which are not selected in the current card swiping process as a target card application program, wherein N is an integer greater than or equal to 2; calling the target card application program, and performing key value authentication with the card reader by using the target card application program; if the key value authentication is successful, performing data interaction with the card reader by using the target card application program; in the interaction process, when the radio frequency field reset of the card reader is detected, the target card application program is stopped, and the card selection step is repeated until the data interaction between any one of the N card application programs and the card reader is successful, or the N card application programs are selected in the card swiping process and have no data interaction success.
According to the scheme, when a radio frequency field entering the card reader is detected, a protocol confirmation step of the card swiping process is firstly carried out to confirm a communication protocol suitable for which group of card application programs the card reader is suitable for from M groups of card application programs, after a target group suitable for the card reader is confirmed, key value authentication and data interaction are firstly continuously carried out between the called card application programs in the protocol confirmation step and the card reader, if any one step fails, the called card application programs in the target group are indicated to be not suitable with the card reader, and at this time, a card selection step is required. In the card selecting step, the card application program with the highest priority is selected from the card application programs which are not selected in the card swiping process at this time according to the priority order of the N card application programs in the target group to serve as the target card application program. Because the communication protocols in all the card application programs in the target group are the same, after the protocol is confirmed successfully, the protocol authentication step is not needed to be carried out by using the target card application program and the reader, and the key value authentication and data interaction steps are only needed to be carried out by using the target card application program and the reader. Selecting a target card application program from the N card application programs in the target group, wherein the card application program which is not selected in the current card swiping process is selected, performing key value authentication and data interaction with the card reader by using the target card application program, and if the radio frequency field reset of the card reader is detected in the interaction process, knowing that the interaction between the current target card application program and the card reader fails according to the characteristic that the radio frequency field reset of the card reader fails after the key value authentication fails or the data interaction fails. Therefore, the current target card application program is stopped, the card checking step is repeated, namely, another card application program which is not selected in the current card swiping process in the target group is called, and the key value authentication and data interaction are carried out between the other card application program which is not selected in the current card swiping process and the card reader until the data interaction between any one of the N card application programs and the card reader is successful, or the N card application programs are selected in the current card swiping process and have no data interaction success, so that the card controller can automatically switch the card application programs of various protocol types and the multiple card application programs of the same protocol type to realize the self-adaptive card swiping, the manual card switching operation on a device interface for setting the card application program is not needed, and the card swiping convenience is improved. And because the invention is improved at the card end, the card controller of the card end executes the card selection step to realize automatic switching of the card application program, so the invention can be applied to the existing card reader end, can select the card application program to be identified from the card application programs of various protocol types and the card application programs of multiple card application programs of the same protocol type without modifying the card reader end, and can reduce the cost.
The implementation details of the card swiping method of the present embodiment are specifically described below, and the following description is only provided for the convenience of understanding, and is not necessary for implementing the present embodiment.
The flow diagram of the card swiping method of the invention is shown in FIG. 2:
step 201: selecting a group of card application programs which are not selected in the card swiping process from the built-in M groups of card application programs as a target group, wherein the communication protocol types used by any two groups of card application programs in the M groups of card application programs are different, the communication protocol types of all the card application programs in each group of card application programs are the same, and M is an integer greater than or equal to 2.
Specifically, card applications using different protocol types are classified into a group of card applications, such that the communication protocol types of all the card applications in each group of card applications are the same, and the communication protocol types used by any two groups of card applications are different, so as to facilitate confirmation of the protocol types according to different groups in subsequent steps. And selecting a group of card application programs which are not selected in the card swiping process from the M groups of card application programs, wherein if any one card application program in the group of card application programs is selected, the group of card application programs is determined to be selected. That is, any one of a group of card applications that have not been selected in the current card swiping process is selected in the current card swiping process.
It should be noted that the same group of card applications refers to card applications of the same protocol, and may all be card applications of the same function, such as a transportation card application, or card applications of multiple functions.
Specifically, when the target card group application program is selected, according to the priority order of the built-in M card group application programs, a group of card application programs with the highest priority is selected from the plurality of card application programs which have not been selected in the card selection step at this time as the target group.
In this embodiment, the following two setting modes of priority order are given:
first, the priority order may be randomly set.
Secondly, setting the priority sequence of the M groups of card application programs according to the historical interaction success times of each group of card application programs in the M groups of card application programs, wherein the higher the historical interaction success times of the group of card application programs is, the higher the priority of the group of card application programs is.
Specifically, the historical interaction success times of each group of card applications in the M groups of card applications are recorded, and the greater the historical interaction success times of a group of card applications, the higher the frequency of the group of card applications being used is, the greater the probability that the group of card applications is used by the user is. In the scheme, the higher the historical interaction success times of a group of card application programs is, the higher the priority of the group of card application programs is, namely, when the card is swiped, the group of card application programs with higher probability of being used by a user is preferentially utilized as a target group, so that the card swiping efficiency can be greatly improved.
In the above implementation manner, the card controller automatically sets the priority order of the M groups of card applications according to the sum of the historical interaction success times of each card application of each group of card applications in the M groups of card applications. In practical application, the card controller can be set by the user on the display interface of the electronic equipment with the card controller, so that personalized requirements of different users can be met.
Step 202: and calling any one card application program in the target group, and sending the communication protocol label of the called card application program in the target group to the card reader for the card reader to confirm the protocol.
Specifically, any one of the card applications in the target group is called, and the communication protocol tag of the called card application in the target group is used for performing protocol confirmation with the card reader. For example, when the type of protocol used by the called card application in the target group is yula protocol, then a yula tag is sent to the reader for protocol validation.
Step 203: judging whether the protocol confirmation is successful, and if the protocol confirmation is failed, entering the step 204; if the determination is successful, step 205 is entered.
Specifically, if the protocol is successfully confirmed, it indicates that the protocol used by the called card application is adapted to the card reader, and at this time, other steps such as key value authentication using the current target group card application and the card reader are required, that is, step 205 is performed (it is determined whether key value authentication using the called card application and the card reader in the target group is successful). If the protocol validation fails, it indicates that the protocol used by the called card application is not suitable for the card reader, and at this time, the card applications of other groups need to be switched to try, i.e., step 204 is performed (the called card application in the target group is deactivated, and whether the card applications of the M groups are all selected in the card swiping process is judged)
Step 204: stopping the called card application programs in the target group, judging whether the M groups of card application programs are all selected in the card swiping process, and if so, ending the process; if the determination result is no, the process returns to step 201.
Specifically, after the protocol validation fails, the called card application in the target group is deactivated, thereby avoiding affecting the protocol validation between another subsequent card application and the card reader. At this time, whether the M groups of card applications are all selected in the card swiping process is determined by judging whether the M groups of card applications are all confirmed by the protocol attempted by the card reader.
If all the M groups of card applications and the card reader try to perform protocol confirmation, it may be determined that no card application having the same communication protocol as the card reader exists in the M groups of card applications, and at this time, the card swiping process may be ended.
When one or more card applications that have not been selected in the current card swiping process exist in the M groups of card applications, the process returns to step 201 to be executed, and a group of card applications that have not been selected in the current card swiping process is continuously selected from the built-in M groups of card applications to serve as a target group.
Step 205: judging whether key value authentication by using the called card application program in the target group and the card reader is successful, if so, entering a step 206; if the determination fails, step 207 is entered.
Specifically, if the protocol is successfully confirmed, it indicates that the protocol used by the called card application is adapted to the card reader, and at this time, the called card application may be continuously used to perform key value authentication with the card reader, and if the determination is successful, it indicates that data interaction may be performed between the card application and the card reader, that is, step 206 is performed (it is determined whether data interaction between the called card application in the target group and the card reader is successful). If the determination fails, it indicates that the called card application cannot be read by the card reader, and at this time, if there are other card applications in the current target group, it needs to switch other card applications for further confirmation, i.e., step 207 is entered (it is determined whether the number of card applications in the target group is greater than or equal to 2).
Step 206: judging whether the data interaction between the called card application program in the target group and the card reader is successful, and if so, ending the process; if the determination fails, step 207 is entered.
Specifically, after the key value authentication between the called card application program and the card reader is successful, the called card application program in the target group may continue to perform data interaction with the card reader, and if the data interaction is successful, it indicates that the called card application program and the card reader complete the entire interaction process, and at this time, the process may be ended. If the data interaction fails, the other card applications need to be switched for further confirmation, i.e. step 207 is entered (determine whether the number of card applications in the target group is greater than or equal to 2).
Step 207: it is determined whether the number of card applications in the target group is greater than or equal to 2. If yes, go to step 208; if the determination is negative, the flow ends.
Specifically, after the key value authentication between the called card application program in the target group and the card reader fails, or after the data interaction between the called card application program in the target group and the card reader fails, it is further necessary to determine whether or not there are other card application programs in the target group in addition to the called card application program, that is, to determine whether or not the number of the card application programs in the target group is greater than or equal to 2. If the number of the card applications in the target group is greater than or equal to 2, then the other card applications in the target group need to be switched for further confirmation, at this time, step 208 is required (one card application that has not been selected in the current card swiping process is selected from the N card applications in the target group as the target card application, where N is an integer greater than or equal to 2). If the number of the card applications in the target group is only one, since the called card application has failed in the whole interaction process with the card reader, it indicates that there is no card application in the target group that can be read by the card reader, and the process may be ended.
Step 208: and selecting the card application program with the highest priority from the card application programs which are not selected in the current card swiping process as a target card application program according to the priority sequence of the N card application programs in the target group, wherein N is an integer greater than or equal to 2.
Specifically, a target card application is selected from the N card applications in the target group, and the target card application has not been selected after entering the rf field of the card reader, that is, the target card application has not attempted to interact with the card reader during the interaction.
Specifically, when the target card application program is selected, the card application program with the highest priority is selected from the card application programs which have not been selected in the card selecting step at this time as the target card application program according to the priority sequence of the built-in N card application programs.
In this embodiment, the following three setting modes of priority order are given:
first, the priority order may be randomly set.
Secondly, setting the priority sequence of the N card applications according to the historical interaction success frequency of each card application in the N card applications, wherein the higher the historical interaction success frequency of the card applications is, the higher the priority of the card applications is.
Specifically, the historical interaction success times of each card application program in the N card application programs are recorded, and the greater the historical interaction success times of one card application program is, the higher the frequency of the use of the card application program is, the greater the probability that the card application program is used by the user is. According to the scheme, the higher the historical interaction success frequency of the card application program is, the higher the priority of the card application program is, namely, when the card is swiped, the card application program with high probability of being used by a user is preferentially utilized as the target card application program to interact with the card reader, and the card swiping efficiency can be greatly improved.
In the above implementation, the card controller automatically sets the priority order of the N card applications according to the historical interaction success number of each card application in the N card applications. In practical application, the card controller can be set by the user on the display interface of the electronic equipment with the card controller, so that personalized requirements of different users can be met.
Thirdly, setting the priority sequence of the N card application programs according to the priority of the radio frequency communication parameter corresponding to each card application program in the N card application programs; wherein, the higher the priority of the radio frequency communication parameter, the higher the priority of the card application program corresponding to the radio frequency communication parameter.
Specifically, the card controller obtains in advance the radio frequency communication parameters corresponding to each of the N card applications to obtain N sets of radio frequency communication parameters. The priority order of the radio frequency communication parameters can be automatically generated by the controller, so that the priority order of the N card application programs can be automatically generated without setting or counting historical data by a user.
The radio frequency communication parameters can be understood as: the communication parameters that are required to establish an air interface connection between the card application and the card reader, that is, the radio frequency communication parameters of the card application are parameters for establishing a communication connection with the card reader. In particular implementations, the radio frequency communication parameters may include, but are not limited to: user Identification (UID), Request response (ATQ), Select Acknowledge (SAK), Select To Select response (ATS), KEY, etc. When setting the priority order for N sets of radio frequency communication parameters, the priority order of the set of radio frequency communication parameters may be determined according to the priority order of any one of the radio frequency communication parameters.
Step 209: and calling the target card application program, and performing key value authentication with the card reader by using the target card application program.
Specifically, after a target card application is selected, the target card application is invoked to perform key value authentication with a card reader using the target card application. It should be noted that, since it can be determined in the above steps that the communication protocol of the target group is adapted to the card reader, when the target card application program that has not been selected in the current card swiping process in the target group is switched to try to interact with the card reader, a protocol tag does not need to be sent to the card reader, the process of protocol confirmation can be directly skipped, and the key value authentication can be performed directly by using the target card application program and the card reader.
Step 210: judging whether key value authentication by using the target card application program and the card reader is successful, and if so, entering step 211; if the determination fails, step 212 is entered.
Specifically, if the determination is successful, it indicates that the target card application can be used to perform data interaction with the card reader, and then the process proceeds to step 211 (determine whether the data interaction with the card reader using the target card application is successful). If the determination fails, it indicates that the target card application program cannot be read by the card reader, and at this time, if other card application programs that have not been selected yet in the current card swiping process exist in the current target group, the other card application programs that have not been selected yet in the current card swiping process need to be switched for further confirmation, that is, step 212 is entered (the target card application program is deactivated, and it is determined whether N card application programs have been selected in the current card swiping process).
Step 211: judging whether the data interaction between the target card application program and the card reader is successful, and if so, ending the process; if the determination fails, step 212 is entered.
Specifically, after the key value authentication between the target card application program and the card reader is successful, the target card application program and the card reader can be continuously used for data interaction, if the data interaction is successful, the target card application program and the card reader are indicated to complete the whole interaction process, and the process can be ended at this moment. If the data interaction fails, it is necessary to switch to another card application program that has not been selected in the current card swiping process for further confirmation, i.e. step 212 is entered (the target card application program is deactivated, and it is determined whether N card application programs have been selected in the current card swiping process).
Step 212: and stopping the target card application program, and judging whether the N card application programs are all selected in the card swiping process. If yes, the process is ended; if the determination is no, the process returns to step 208.
Specifically, the radio frequency field of the card reader is reset after the key value authentication of the card application program and the card reader fails or the data interaction fails. Therefore, when the radio frequency field reset of the card reader is detected, the failure of key value authentication or data interaction between the card application program and the card reader can be confirmed, and when N card application programs are selected in the card swiping process, the fact that the card application program which can be read by the card reader does not exist in the N card application programs can be confirmed, and the card swiping process can be ended at the moment.
When there is a card application program that has not been selected in the current card swiping process among the N card application programs, that is, there is a card application program that has not been tried to interact with the card reader among the N card application programs, at this time, the step 208 needs to be returned to execute, and one card application program is continuously selected from other card application programs that have not been selected in the current card swiping process among the N card application programs as a target card application program.
In an example, after N card applications are all selected in the card swiping process and none of the N card applications are successfully interacted, or after M groups of card applications are all selected in the card swiping process and all of the M card applications fail to be confirmed, the method further includes: and outputting the information of the interaction failure. The specific form of outputting the interaction failure information may be displaying a character similar to "interaction failure" on a display interface of the electronic device including the card controller, or may be prompting the interaction failure information to the user through vibration, so as to prompt the user that the interaction failure occurs to avoid that the user swipes the card for many times. The above-mentioned presentation form of the information of the interaction failure is only an example, and should not be limited thereto.
In one example, after any one of the N card applications successfully interacts with the card reader, or after the N card applications are all selected in the current card swiping process and have not successfully interacted with each other, the method further includes: the N card applications are all reset to have not been selected.
Specifically, after any one of the N card applications successfully interacts with the card reader, or after the N card applications are all selected in the current card swiping process and have not successfully interacted with each other, the N card applications are reset to be not selected yet, so that the card applications are not omitted when the card applications are used for trying to interact with another card reader, and the accuracy of the card swiping result can be ensured.
In this way, the above-mentioned resetting of the N card applications to the non-selected card application can be realized by removing the mark. For example: in the one-time card swiping process, the selected card application program in the N card application programs is marked as 'selected', and when the N card application programs are all marked as 'selected' but all failed to interact, or any one of the N card application programs is successfully interacted with the card reader, the mark on each card application program in the N card application programs is removed. The above-mentioned manner of determining whether the card application is selected in one card swiping process is only an example, and is not limited thereto.
In one example, after protocol validation of any card application in any card application group succeeds, or after protocol validation fails and all the M card application groups are selected in the card swiping process, the method further includes: and resetting all the M groups of card application programs to be not selected. Therefore, when the M groups of card application programs are used for trying to interact with another card reader, any one group of the M groups of card application programs cannot be omitted, and the accuracy of the card swiping result can be ensured. Specifically, the manner of distinguishing whether any one of the M card applications is selected may also be implemented by setting or removing a flag, which is not described herein again.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
The invention also relates to a card controller, as shown in fig. 3, comprising at least one processing module 301; and a memory module 302 communicatively coupled to the at least one processing module 301; the storage module 302 stores instructions executable by the at least one processing module 301, and the instructions are executed by the at least one processing module 301, so that the at least one processing module 301 can execute the first card swiping method.
The memory module 302 and the processing module 301 are connected by a bus, which may include any number of interconnected buses and bridges, which connect various circuits of one or more of the processing module 301 and the memory module 302. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processing module 301 is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processing module 301.
The processing module 301 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the storage module 302 may be used to store data used by the processing module 301 in performing operations.
The invention also relates to an electronic device, as shown in fig. 4, the electronic device 3 comprises at least N card applications and the above card controller shown in fig. 3, N being an integer greater than or equal to 2.
In one example, the card controller may be disposed within the electronic device 3, and the electronic device 3 may be a smart phone, a smart bracelet, a smart watch, or the like. For example: when the electronic device 3 is a mobile phone, the user takes a bus, picks up the mobile phone to be close to a card reader configured on the bus, and the mobile phone can detect the NFC radio frequency field of the card reader, so as to determine that the mobile phone enters the radio frequency range of the card reader. In a specific implementation, the card controller in the mobile phone detects the NFC radio frequency field of the card reader, so as to determine that the mobile phone enters the radio frequency range of the card reader.
In other examples, the Card controller may also be disposed in an NFC Universal Integrated Circuit Card (UICC), a Micro SD Card, an NFC Embedded Secure Element (eSE), or other devices.
In a specific implementation, the card application may be understood as an application of a plurality of smart cards integrated in the electronic device 3, such as: a bus card application, an access card application, a bank card application, etc.
The invention also relates to another card controller, as shown in fig. 5, comprising at least one processing module 401; and a memory module 402 communicatively coupled to the at least one processing module 401; the storage module 302 stores instructions executable by the at least one processing module 401, and the instructions are executed by the at least one processing module 401, so that the at least one processing module 401 can execute the second card swiping method.
The memory module 402 and the processing module 401 are connected by a bus, which may include any number of interconnected buses and bridges, which connect various circuits of one or more of the processing module 401 and the memory module 402 together. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processing module 401 is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processing module 401.
The processing module 401 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the storage module 402 may be used to store data used by the processing module 401 in performing operations.
The present invention further relates to an electronic device, as shown in fig. 6, where the electronic device 4 includes at least M groups of card applications and a card controller as shown in fig. 5, where M is an integer greater than or equal to 2, communication protocol types used by any two groups of card applications in the M groups of card applications are different, and communication protocol types of all card applications in each group of card applications are the same, at least one group of card applications in the M groups of card applications includes N card applications, and N is an integer greater than or equal to 2.
In one example, the card controller may be disposed within the electronic device 4, and the electronic device 4 may be a smart phone, a smart bracelet, a smart watch, or the like. For example: when the electronic device 4 is a mobile phone, the user takes a bus, picks up the mobile phone to be close to a card reader configured on the bus, and the mobile phone can detect the NFC radio frequency field of the card reader, so as to determine that the mobile phone enters the radio frequency range of the card reader. In a specific implementation, the card controller in the mobile phone detects the NFC radio frequency field of the card reader, so as to determine that the mobile phone enters the radio frequency range of the card reader.
In other examples, the Card controller may also be disposed in an NFC Universal Integrated Circuit Card (UICC), a Micro SD Card, an NFC Embedded Secure Element (eSE), or other devices.
In a specific implementation, the card application may be understood as an application of a plurality of smart cards integrated within the electronic device 4, such as: a bus card application, an access card application, a bank card application, etc.
The invention also relates to a computer-readable storage medium, in which a computer program is stored, which, when being executed by a processing module, implements the first or second card swiping method described above.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by instructing the relevant hardware through a program, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processing module (processor) to execute all or part of the steps of the method described in each embodiment of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (17)

1. A card swiping method is applied to a card controller and comprises the following steps:
when a radio frequency field entering a card reader is detected, entering a card selecting step, wherein the card selecting step comprises the following steps:
according to the priority sequence of N built-in card application programs, selecting a card application program with the highest priority from the card application programs which are not selected in the card selecting step at this time as a target card application program, wherein N is an integer greater than or equal to 2;
calling the target card application program, and interacting with the card reader by using the target card application program;
in the interaction process, when the card controller detects that the radio frequency field of the card reader is reset, the target card application program is deactivated, and the card selection step is repeated until any one of the N card application programs is successfully interacted with the card reader, or the N card application programs are selected in the card selection step and are not successfully interacted.
2. A method as claimed in claim 1, wherein the priority order of the N card applications is preset by:
setting the priority sequence of the N card application programs according to the historical interaction success times of each card application program in the N card application programs, wherein the higher the historical interaction success times of the card application programs is, the higher the priority of the card application programs is.
3. A method as claimed in claim 1, wherein the priority order of the N card applications is preset by:
setting the priority order of the N card application programs according to the priority of the radio frequency communication parameters corresponding to each card application program in the N card application programs; wherein the higher the priority of the radio frequency communication parameter is, the higher the priority of the card application program corresponding to the radio frequency communication parameter is.
4. A method as recited in claim 1, wherein the N card applications all use the same communication protocol.
5. The card swiping method according to claim 1, wherein after any one of the N card applications successfully interacts with the card reader, or after the N card applications are all selected in the current card selecting step and have not successfully interacted, the method further comprises:
resetting all the N card applications to be unselected.
6. The card swiping method according to claim 1, wherein after the N card applications are all selected in the current card selecting step and all are not successfully interacted, the method further comprises:
and outputting the information of the interaction failure.
7. A method of swiping a card, comprising:
when detecting that the radio frequency field of the card reader enters, entering a protocol confirmation step of the card swiping process, wherein the protocol confirmation step comprises the following steps:
selecting a group of card application programs which are not selected in the card swiping process from built-in M groups of card application programs as a target group, wherein the communication protocol types used by any two groups of card application programs in the M groups of card application programs are different, the communication protocol types of all the card application programs in each group of card application programs are the same, and M is an integer greater than or equal to 2;
calling any one card application program in the target group, and sending a communication protocol label of the called card application program in the target group to the card reader for the card reader to confirm a protocol;
if the protocol validation fails, the called card application programs in the target group are stopped, and the protocol validation step is repeated until the protocol validation of any card application program in any group of card application programs is successful, or the M groups of card application programs are all selected in the card selection step and all the protocol validation fails;
if the protocol is confirmed successfully, performing key value authentication with the card reader by using the called card application program in the target group;
if the key value authentication is successful, performing data interaction with the card reader by using the called card application program in the target group;
if the radio frequency field reset of the card reader is detected, and the target group comprises N card application programs, wherein N is an integer greater than or equal to 2, the card selection step of the card swiping process is started, and the card selection step comprises the following steps:
according to the priority sequence of N card application programs in the target group, selecting a card application program with the highest priority from the card application programs which are not selected in the current card swiping process as a target card application program, wherein N is an integer greater than or equal to 2;
calling the target card application program, and performing key value authentication with the card reader by using the target card application program;
if the key value authentication is successful, performing data interaction with the card reader by using the target card application program;
in the interaction process, when the radio frequency field reset of the card reader is detected, the target card application program is stopped, and the card selection step is repeated until the data interaction between any one of the N card application programs and the card reader is successful, or the N card application programs are selected in the card swiping process and have no data interaction success.
8. The card swiping method according to claim 7, wherein the priority order of said N card applications is preset by:
setting the priority sequence of the N card application programs according to the historical interaction success times of each card application program in the N card application programs, wherein the higher the historical interaction success times of the card application programs is, the higher the priority of the card application programs is.
9. The card swiping method according to claim 7, wherein the priority order of said N card applications is preset by:
setting the priority order of the N card application programs according to the priority of the radio frequency communication parameters corresponding to each card application program in the N card application programs; wherein the higher the priority of the radio frequency communication parameter is, the higher the priority of the card application program corresponding to the radio frequency communication parameter is.
10. The card swiping method according to claim 7, wherein after any one of the N card applications successfully interacts with the card reader, or after the N card applications are all selected and have not successfully interacted in the current card swiping process, the method further comprises:
resetting all the N card applications to be unselected.
11. The card swiping method according to claim 7, wherein after any one of the card application programs in any one of the groups of card application programs is successfully confirmed in protocol, or after all the M groups of card application programs are selected in the current card swiping process but all the M groups of card application programs are failed in protocol confirmation, the method further comprises:
and resetting all the M groups of card application programs to be not selected.
12. The card swiping method according to claim 7, wherein after the N card applications are all selected and have not been successfully interacted in the current card swiping process, or after the N card applications are all selected and have failed to be confirmed in the current card swiping process, the method further comprises:
and outputting the information of the interaction failure.
13. A card controller, comprising:
at least one processing module; and the number of the first and second groups,
a memory module communicatively coupled to the at least one processing module; wherein,
the storage module stores instructions executable by the at least one processing module to enable the at least one processing module to perform the card swiping method according to any one of claims 1 to 6.
14. An electronic device comprising at least N card applications, and a card controller as claimed in claim 13, said N being an integer greater than or equal to 2.
15. A card controller, comprising:
at least one processing module; and the number of the first and second groups,
a memory module communicatively coupled to the at least one processing module; wherein,
the storage module stores instructions executable by the at least one processing module to enable the at least one processing module to perform the card swiping method according to any one of claims 7 to 12.
16. An electronic device comprising at least M sets of card applications and a card controller as claimed in claim 15, wherein M is an integer greater than or equal to 2, the communication protocol types used by any two sets of card applications in the M sets of card applications are different, and the communication protocol types of all the card applications in each set of card applications are the same, at least one set of card applications in the M sets of card applications comprises N card applications, and N is an integer greater than or equal to 2.
17. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processing module, implements a card swiping method according to any one of claims 1 to 6, or a card swiping method according to any one of claims 7 to 12.
CN202110614406.9A 2021-06-02 2021-06-02 Card swiping method, card controller, electronic device and storage medium Pending CN113361293A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110614406.9A CN113361293A (en) 2021-06-02 2021-06-02 Card swiping method, card controller, electronic device and storage medium
PCT/CN2021/137915 WO2022252561A1 (en) 2021-06-02 2021-12-14 Card swiping method, card controller, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110614406.9A CN113361293A (en) 2021-06-02 2021-06-02 Card swiping method, card controller, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN113361293A true CN113361293A (en) 2021-09-07

Family

ID=77531308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110614406.9A Pending CN113361293A (en) 2021-06-02 2021-06-02 Card swiping method, card controller, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN113361293A (en)
WO (1) WO2022252561A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115130485A (en) * 2022-07-05 2022-09-30 深圳市汇顶科技股份有限公司 Card reader, card terminal equipment, card swiping method and control unit
WO2022252561A1 (en) * 2021-06-02 2022-12-08 深圳市汇顶科技股份有限公司 Card swiping method, card controller, electronic device and storage medium
CN117176205A (en) * 2023-10-30 2023-12-05 北京紫光青藤微系统有限公司 Control method for NFC device, NFC device and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020569A (en) * 2019-03-11 2019-07-16 华为技术有限公司 Automatically select method, electronic equipment and the communication system of NFC analog card
CN110795949A (en) * 2019-09-25 2020-02-14 维沃移动通信(杭州)有限公司 Card swiping method and device, electronic equipment and medium
CN111464692A (en) * 2020-03-30 2020-07-28 RealMe重庆移动通信有限公司 Near field communication card determination method and device, storage medium and electronic equipment
CN112069848A (en) * 2020-11-12 2020-12-11 深圳市汇顶科技股份有限公司 Card selection method, chip, terminal and storage medium for NFC card simulation mode
CN112347802A (en) * 2020-11-03 2021-02-09 歌尔科技有限公司 Card swiping method, system and device
CN112418368A (en) * 2020-11-25 2021-02-26 Oppo(重庆)智能科技有限公司 NFC card processing method and device, NFC card processing equipment and NFC card processing storage medium
CN112492518A (en) * 2020-12-09 2021-03-12 深圳市欢太科技有限公司 Card determination method and device, electronic equipment and storage medium
US20210136549A1 (en) * 2019-10-31 2021-05-06 Xiaomi Digital Technology Co., Ltd. Method and device for switching nfc card

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014030876A1 (en) * 2012-08-24 2014-02-27 Samsung Electronics Co., Ltd. Method and apparatus for determining item based on interaction environment
CN109146472A (en) * 2017-06-16 2019-01-04 北京橙鑫数据科技有限公司 Recommended method, device and the mobile terminal of card
CN113361293A (en) * 2021-06-02 2021-09-07 深圳市汇顶科技股份有限公司 Card swiping method, card controller, electronic device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020569A (en) * 2019-03-11 2019-07-16 华为技术有限公司 Automatically select method, electronic equipment and the communication system of NFC analog card
CN110795949A (en) * 2019-09-25 2020-02-14 维沃移动通信(杭州)有限公司 Card swiping method and device, electronic equipment and medium
US20210136549A1 (en) * 2019-10-31 2021-05-06 Xiaomi Digital Technology Co., Ltd. Method and device for switching nfc card
CN111464692A (en) * 2020-03-30 2020-07-28 RealMe重庆移动通信有限公司 Near field communication card determination method and device, storage medium and electronic equipment
CN112347802A (en) * 2020-11-03 2021-02-09 歌尔科技有限公司 Card swiping method, system and device
CN112069848A (en) * 2020-11-12 2020-12-11 深圳市汇顶科技股份有限公司 Card selection method, chip, terminal and storage medium for NFC card simulation mode
CN112418368A (en) * 2020-11-25 2021-02-26 Oppo(重庆)智能科技有限公司 NFC card processing method and device, NFC card processing equipment and NFC card processing storage medium
CN112492518A (en) * 2020-12-09 2021-03-12 深圳市欢太科技有限公司 Card determination method and device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022252561A1 (en) * 2021-06-02 2022-12-08 深圳市汇顶科技股份有限公司 Card swiping method, card controller, electronic device and storage medium
CN115130485A (en) * 2022-07-05 2022-09-30 深圳市汇顶科技股份有限公司 Card reader, card terminal equipment, card swiping method and control unit
CN117176205A (en) * 2023-10-30 2023-12-05 北京紫光青藤微系统有限公司 Control method for NFC device, NFC device and storage medium
CN117176205B (en) * 2023-10-30 2024-02-27 北京紫光青藤微系统有限公司 Control method for NFC device, NFC device and storage medium

Also Published As

Publication number Publication date
WO2022252561A1 (en) 2022-12-08

Similar Documents

Publication Publication Date Title
CN113361293A (en) Card swiping method, card controller, electronic device and storage medium
CN112069848B (en) Card selection method, chip, terminal and storage medium for NFC card simulation mode
CN102047748B (en) Method and apparatus for automatic application selection in an electronic device using multiple discovery managers
CN108288008B (en) Card activation method and device
EP2958056B1 (en) Radiofrequency transponder circuit
US9978056B2 (en) Smart card having multiple payment instruments
US10223628B2 (en) Application selection in a mobile terminal
CN112926710A (en) NFC analog card switching method, mobile terminal and computer readable storage medium
US9021504B2 (en) Method and device for automatically selecting an application that can be implemented by said device
US9824246B2 (en) Radio frequency identification tag having input device
KR101265574B1 (en) Rf card apparatus with tag function and control method thereof
KR20200002807A (en) Communication device and method
CN115378569B (en) Method, apparatus, electronic device and storage medium for adjusting phase
EP2717193B1 (en) IC card, portable electronic device, and reader/ writer
EP2367108A2 (en) Portable electronic device, communication device, and command processing method
EP3365833B1 (en) A method performed by an electronic device capable of communicating with a reader with improved self-testing
US20190019073A1 (en) Radio tag reading device and radio tag reading method
US8665070B2 (en) Mobile electronic device
EP2260436A1 (en) Rfid tag apparatus for controlling of identification distance and method of operating rfid information using the apparatus
EP2709286B1 (en) Apparatus and Method For Providing Data Transmission/Reception in a Terminal Using Near Field Communication
CN113837752B (en) Method, device and equipment for automatically switching virtual cards
US20240296437A1 (en) Systems and methods for providing near field communications
EP4068186A1 (en) Nfc device, operating method and computer program
CN109741067B (en) Data processing method and device based on IC card unlocking
CN212435680U (en) Multichannel radio frequency read-write equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210907