CN113541741A - Analog card switching method and device, electronic equipment and storage medium - Google Patents

Analog card switching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113541741A
CN113541741A CN202110818332.0A CN202110818332A CN113541741A CN 113541741 A CN113541741 A CN 113541741A CN 202110818332 A CN202110818332 A CN 202110818332A CN 113541741 A CN113541741 A CN 113541741A
Authority
CN
China
Prior art keywords
card
analog
target
simulation
identification code
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.)
Granted
Application number
CN202110818332.0A
Other languages
Chinese (zh)
Other versions
CN113541741B (en
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.)
Xian Yep Telecommunication Technology Co Ltd
Original Assignee
Xian Yep Telecommunication 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 Xian Yep Telecommunication Technology Co Ltd filed Critical Xian Yep Telecommunication Technology Co Ltd
Priority to CN202110818332.0A priority Critical patent/CN113541741B/en
Publication of CN113541741A publication Critical patent/CN113541741A/en
Application granted granted Critical
Publication of CN113541741B publication Critical patent/CN113541741B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • H04B5/77
    • 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/0008General problems related to the reading of electronic memory record carriers, independent of its reading method, e.g. power transfer
    • H04B5/70

Abstract

The application provides an analog card switching method, an analog card switching device, electronic equipment and a storage medium, wherein the analog card switching method comprises the following steps: sending a card swiping request to a card reader through an NFC technology; receiving a target identification code sent by the card reader according to the card swiping request, wherein the target identification code is the identification code of the card reader; according to the target identification code, determining a target simulation card corresponding to the target identification code in a plurality of simulation cards simulated by the mobile terminal; and switching the current analog card of the mobile terminal into a target analog card. The target identification code sent by the card reader can be used for quickly determining the corresponding target simulation card in the mobile terminal, so that the operation complexity of a user can be reduced, and the card swiping efficiency is improved.

Description

Analog card switching method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to an analog card switching method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of smart products, NFC (Near Field Communication) functions of electronic products such as smart wristbands, watches, and mobile phones have become popular. Generally, an electronic product with an NFC function can be simulated into various types of simulated cards such as an entrance guard card, a bus card, a bank card, and the like. Each type has a plurality of analog cards, for example, a gate card includes: residential access control, corporate access control, entrance access control, and the like.
When a plurality of analog cards are arranged in an electronic product, a default analog card can be preferentially matched when the card is swiped in the prior art, and when the default analog card cannot be used, the default analog card needs to be manually switched by a user, so that the user operation is complicated, and the problem of low card swiping efficiency is caused.
Disclosure of Invention
The application provides an analog card switching method, an analog card switching device, electronic equipment and a storage medium, which are used for overcoming the problem of low switching efficiency of the conventional analog card.
A first aspect provides an analog card switching method applied to a mobile terminal supporting NFC technology, including:
sending a card swiping request to a card reader through an NFC technology;
receiving a target identification code sent by the card reader according to the card swiping request, wherein the target identification code is the identification code of the card reader;
according to the target identification code, determining a target simulation card corresponding to the target identification code in a plurality of simulation cards simulated by the mobile terminal;
and switching the current analog card of the mobile terminal into a target analog card.
In a possible design of the first aspect, determining a target analog card corresponding to the target identification code among a plurality of analog cards simulated by the mobile terminal according to the target identification code includes:
determining target identification information corresponding to the target identification code based on the corresponding relation between the identification information of the analog card and the identification code;
and determining a target simulation card in the plurality of simulation cards simulated by the mobile terminal according to the target identification information.
In one possible design of the first aspect, the identification information of the emulation card includes at least one of a type of the emulation card, position information of the emulation card, and number information of the emulation card.
In the foregoing possible design of the first aspect, determining the target simulation card among a plurality of simulation cards simulated by the mobile terminal according to the target identification information includes:
determining a first simulation card in the plurality of simulation cards according to the type of the simulation card corresponding to the target identification information;
determining whether the first simulation card is a plurality of first simulation cards, if so, determining a second simulation card in the plurality of first simulation cards according to the position information corresponding to the target identification information, and if not, determining that the first simulation card is the target simulation card;
and determining whether the second simulation card is a plurality of second simulation cards, if so, determining the target simulation card in the plurality of second simulation cards according to the number information corresponding to the target identification information, and if not, determining that the second simulation card is the target simulation card.
In the foregoing possible design of the first aspect, before determining, according to the target identification code, a target analog card corresponding to the target identification code among a plurality of analog cards simulated by the mobile terminal, the method further includes:
determining whether the mobile terminal stores the corresponding relation between the target identification information of the target simulation card and the target identification code;
if not, establishing a corresponding relation between the target identification information of the target simulation card and the target identification code;
and sending the corresponding relation to the card reader.
The second aspect provides another analog card switching method, which is applied to a card reader, and the analog card switching method includes:
receiving a card swiping request sent by a mobile terminal through an NFC technology;
and sending the target identification code of the card reader to the mobile terminal according to the card swiping request, wherein the target identification code is used for simulating the mobile terminal to determine a target simulation card corresponding to the target identification code in a plurality of simulation cards.
In the above possible design of the second aspect, if the mobile terminal does not store the corresponding relationship between the target identification information and the target identification code of the target analog card, the analog card switching method further includes:
and receiving a corresponding relation sent by the mobile terminal, wherein the corresponding relation is the corresponding relation between the target identification information and the target identification code.
A third aspect provides an analog card switching apparatus comprising means for the analog card switching method of any one of the above.
A fourth aspect provides an electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor implementing the method for analog card switching as described in the first or second aspect and various possible designs when executing the program.
A fifth aspect provides a computer-readable storage medium having computer instructions stored thereon, which, when run on a computer, cause the computer to perform the method for simulating card switching of the first or second aspect and each possible design.
A sixth aspect provides a computer program product comprising a computer program stored on a computer readable storage medium from which the computer program can be read by at least one processor, the at least one processor when executing the computer program being operable to perform the analogue card switching method of the first or second aspect and each possible design.
The analog card switching method, the analog card switching device, the electronic device and the storage medium provided by the embodiment of the application comprise the following steps: sending a card swiping request to a card reader through an NFC technology; receiving a target identification code sent by the card reader according to the card swiping request, wherein the target identification code is the identification code of the card reader; according to the target identification code, determining a target simulation card corresponding to the target identification code in a plurality of simulation cards simulated by the mobile terminal; and switching the current analog card of the mobile terminal into a target analog card. The target identification code sent by the card reader can be used for quickly determining the corresponding target simulation card in the mobile terminal, so that the operation complexity of a user can be reduced, and the card swiping efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of an analog card switching method provided in the present application;
fig. 2 is a schematic flowchart of an analog card switching method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of NFC provided in an embodiment of the present application;
fig. 4 is a schematic flowchart of another analog card switching method according to an embodiment of the present disclosure;
fig. 5 is a schematic flowchart of another analog card switching method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an analog card switching device according to an embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of another analog card switching device according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device for executing an analog card switching method according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Before introducing the technical solution of the present application, first, the problems in the prior art and the technical concept process of the present application are introduced in combination with a specific application scenario of the present application.
At present, the problem of low card swiping efficiency caused by manual switching of analog cards by a user is solved. One mode is to adopt a GPS-assisted technology, that is, to establish a corresponding relationship between position information and an analog card, and when a user needs to swipe a card, the GPS technology is used to locate the position of the user to obtain the position information, and then the analog card corresponding to the position information is determined. For example, if the GPS positions of the upper and lower floors of the same building are the same, the GPS-assisted technology cannot accurately determine whether the upper-floor access control analog card or the lower-floor access control analog card, and therefore, the user is required to manually search for the analog card, which causes the problem of low card-reading efficiency. Moreover, the GPS needs to be synchronously started every time the card is swiped, and further the power consumption of the mobile terminal is increased.
In another mode, a polling method is adopted, the mobile terminal sequentially simulates each simulated card, and the identity Information (ID) of each simulated card is sequentially sent to the card reader to be read until the card reader reads the accurate simulated card. Illustratively, the mobile terminal includes a plurality of analog cards, which are an access control card a, an access control card b, an access control card c, an access control card d, a bus card a, a bus card b, a bank card a, a bank card b, and the like. When the card reader is used for identifying the bank card b, the mobile terminal is firstly simulated into an access control card in a polling mode, the identity information of the access control card a is sent to the card reader, after the card reader fails to read, the mobile terminal is simulated into an access control card c, the identity information of the access control card c is sent to the card reader, and the step is circulated until the identity information of the bank card b is sent to the card reader to be successfully read. Therefore, although the polling mode is adopted, the manual switching of the user is avoided, the card reading process of the card reader is a time-consuming process, and the card reader needs to read the card for many times, so that the card reading time of the user is increased, and the card reading efficiency is reduced.
Based on the above problems, the application provides a method and a device for switching analog cards, an electronic device and a storage medium, the card reader and the mobile terminal can communicate with each other through a near field communication technology, when the mobile terminal needs to be simulated into an analog card for swiping the card, the card reader sends a unique target identification code to the mobile terminal, the mobile terminal can determine the unique target analog card in a plurality of analog cards according to the target identification code, so that manual switching operation of a user is avoided, the card reader does not need to read the card for many times, and card swiping efficiency is improved.
Referring to fig. 1, an application scenario of the present application is shown, where 01 is a mobile terminal, and 02 is a card reader. The mobile terminal 01 can be simulated to be an analog card and the card reader 02 can communicate through near field communication NFC. For example, when the card reader 02 is used for entrance control, the mobile terminal 01 may be simulated as an entrance control card, and when the mobile terminal 01 approaches the card reader 02, the card reader 02 reads information of the entrance control card and then controls opening and closing of a door. When the card reader 02 is used on a bus, the mobile terminal 01 can be simulated into a bus card, and when the mobile terminal 01 approaches the card reader 02, the card reader 02 reads the information of the bus card and then deducts the bus card of a user. When the card reader 02 is used for charging or transferring bank cards, the mobile terminal 01 may be simulated as a bank card, and when the mobile terminal 01 approaches the card reader 02, the card reader 02 reads information of the bank card and then performs fee deduction or money transfer on the bank card.
Referring to fig. 2, NFC circuits as shown in fig. 2 need to be arranged in both the mobile terminal 01 and the card reader 02 to implement near field communication; specifically, the NFC circuit includes a micro control unit 10(MCU), a memory 20, an NFC controller 30, and an antenna 40; the mcu 10 is connected to the memory and the NFC controller, and the NFC controller 30 is connected to the antenna 40.
The technical solution of the present application will be described in detail below with reference to specific examples. It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Referring to fig. 3, a flowchart of steps of an analog card switching method provided in an embodiment of the present application is shown, where the analog card switching method is applied to a mobile terminal supporting an NFC technology, and specifically includes the following steps:
and S101, sending a card swiping request to the card reader through the NFC technology.
Wherein, the mobile terminal may execute S101 when detecting that the actual distance from the card reader is smaller than the distance threshold.
In the embodiment of the application, both the mobile terminal and the card reader can actively generate the radio frequency field. The card reader always generates a radio frequency field when being powered, and the mobile terminal generates the radio frequency field when using the analog card function.
When a user opens the analog card function of the mobile terminal, the antenna of the mobile terminal senses a radio frequency signal generated by the card reader, namely, the radio frequency signal enters a radio frequency field range generated by the card reader. When the distance between the mobile terminal and the card reader is smaller than a distance threshold value within a radio frequency field range generated by the card reader, the mobile terminal sends a card swiping request to the card reader through an NFC technology. The card swiping request carries identification information of the mobile terminal, and the distance threshold is used for representing the maximum induction distance of the NFC technology.
In the embodiment of the application, each mobile terminal has its own identification information, and the identification information is used for representing the identity information of the mobile terminal. And sending the identification information to the card reader through an NFC technology so that the card reader returns the target identification code of the card reader to the corresponding mobile terminal.
And S102, receiving the target identification code sent by the card reader according to the card swiping request.
Wherein, the target identification code is the identification code of the card reader. Specifically, the identification code of the card reader is an identification code representing the unique identity of the card reader. The identification code of the card reader is stored in the memory of the card reader or the built-in storage area of the NFC controller.
Further, the identification code of the card reader is stored in the form of characters in the protocol field of the card reader.
S103, according to the target identification code, determining a target simulation card corresponding to the target identification code in the plurality of simulation cards simulated by the mobile terminal.
Specifically, the mobile terminal stores the correspondence between the identification code and the analog card in advance, and after the mobile terminal obtains the target identification code of the card reader, the target analog card corresponding to the target identification code can be determined according to the correspondence between the identification code and the analog card.
And S104, switching the current analog card of the mobile terminal into a target analog card.
When the user starts the analog card function of the mobile terminal, the current analog card is the default analog card, for example, the current analog card may be the analog card used by the user last time, or the analog card with a high historical use frequency or frequency, the current analog card is switched to the target analog card, and the target analog card is the analog card which the user needs to use currently, so that the manual switching operation of the user is avoided, and the card swiping efficiency is improved.
The analog card switching method, the analog card switching device, the electronic device and the storage medium provided by the embodiment of the application comprise the following steps: when the fact that the actual distance between the mobile terminal and the card reader is smaller than a distance threshold value is detected, sending a card swiping request to the card reader through an NFC technology, wherein the card swiping request carries identification information of the mobile terminal, and the distance threshold value is used for representing the maximum induction distance of the NFC technology; receiving a target identification code sent by the card reader according to the card swiping request, wherein the target identification code is the identification code of the card reader; according to the target identification code, determining a target simulation card corresponding to the target identification code in a plurality of simulation cards simulated by the mobile terminal; and switching the current analog card of the mobile terminal into a target analog card. The target identification code sent by the card reader can be used for quickly determining the corresponding target simulation card in the mobile terminal, so that the operation complexity of a user can be reduced, and the card swiping efficiency is improved.
On the basis of the foregoing embodiment, an embodiment of the present application further provides a step flowchart of an analog card switching method, specifically referring to fig. 4, where the analog card switching method is applied to a mobile terminal supporting an NFC technology, and specifically includes the following steps:
s201, sending a card swiping request to a card reader through an NFC technology.
The card swiping request carries identification information of the mobile terminal, and the distance threshold is used for representing the maximum induction distance of the NFC technology. This step is specifically referred to as S101, and is not described herein again.
S202, receiving a target identification code sent by the card reader according to the card swiping request.
Wherein, the target identification code is the identification code of the card reader. This step is specifically referred to as S102, and will not be described herein.
S203, determining whether the mobile terminal stores the corresponding relation between the target identification information and the target identification code of the target analog card.
If the mobile terminal does not store the corresponding relationship between the target identification information of the target analog card and the target identification code, S204 is executed. If the mobile terminal has the corresponding relationship between the target identification information and the target identification code of the target analog card, S206 is executed.
Specifically, the identification information of the emulation card includes identity information and attribute information of the emulation card. It can be understood that the identity information and the attribute information of the analog card and the identification code of the card reader have a corresponding relationship.
And S204, establishing a corresponding relation between the target identification information of the target simulation card and the target identification code.
And S205, sending the corresponding relation to the card reader.
Specifically, the method includes the steps that whether target identification information of a target simulation card corresponding to a target identification code is stored in the mobile terminal or not is determined; if so, indicating that the mobile terminal has created a target simulation card and establishing a corresponding relation between the target simulation card and the target identification code; if not, the mobile terminal is indicated that the mobile terminal receives the target identification code for the first time, the mobile terminal firstly creates a target simulation card, then writes identification information into a protocol field of the target simulation card, and then creates a corresponding relation between the target identification information of the target simulation card and the target identification code.
The mobile terminal side stores identification information of a plurality of analog cards and identification codes of a plurality of card readers; the identification information of the analog card and the identification code of the card reader have a one-to-one correspondence relationship.
In addition, this correspondence is sent to the card reader, where the identification information of the analog card is stored.
Furthermore, the card reader has a unique identification code, and one card reader corresponds to the analog cards of the plurality of mobile terminals, that is, the analog cards of the plurality of mobile terminals can perform information interaction with the card reader. And one mobile terminal is provided with a plurality of analog cards, one analog card corresponds to a plurality of card readers, and one mobile terminal can also interact with the plurality of card readers. Therefore, the corresponding relation between the target identification information of the target simulation card and the target identification code is established, and after the target identification code is subsequently received, the mobile terminal can determine the target identification information corresponding to the target identification code, so as to determine the corresponding target simulation card. The card reader can verify the target simulation card and further execute corresponding operation after receiving the target identification information of the target simulation card due to the fact that the corresponding relation is stored.
In the embodiment of the application, when the mobile terminal receives the target identification code of the card reader for the first time, the target simulation card can be created, then the identification information is written in the reserved field of the target simulation card, and then the corresponding relation between the target identification information and the target identification code is established, so that the target simulation card can be directly determined according to the corresponding relation and the target identification code of the card reader in subsequent use, the manual operation of a user is avoided, and the card swiping efficiency is improved.
S206, determining target identification information corresponding to the target identification code based on the corresponding relation between the identification information of the analog card and the identification code.
The identification information of the analog card comprises at least one item of the type of the analog card, the position information corresponding to the analog card and the number information corresponding to the analog card.
Specifically, identification information of a plurality of analog cards and an identification code of a card reader are stored in the mobile terminal, wherein the identification information of the analog cards and the identification code of the card reader have a corresponding relationship. Therefore, when the target identification code of the card reader is obtained, the target identification information of the analog card corresponding to the target identification code can be determined according to the corresponding relation.
Further, after the user receives the target identification code of the card reader for the first time, the mobile terminal displays prompt information to prompt the user to create a corresponding analog card, the corresponding analog card is created according to the target identification code, and then identity information and attribute information of the analog card are determined; writing the identity information and the attribute information into a protocol field of the analog card to obtain identification information of the analog card; the attribute information of the analog card is written into a reserved field of a protocol field of the analog card in the form of a feature code, the attribute information includes a multi-bit feature code, for example, the attribute information is A11, B1, B12 or C31, and the attribute information is written into the Nth bit to the (N + M) th bit of the protocol field, wherein the Nth bit of the protocol field corresponds to the first bit of the reserved field of the protocol field.
Wherein, different feature codes of different positions of the attribute information represent different attribute information. For example, when the attribute information is a11, the first digit a represents that the type of the analog card is entrance guard, the second digit 1 represents that the position information of the analog card is company, and the third digit 1 represents that the number information of the analog card is 1.
In addition, when the attribute information of the analog card is determined, the type of the card reader corresponding to the analog card is determined. For example, the type of the card reader includes an entrance guard, a bus card or a bank card, and the type of the analog card corresponds to an entrance guard, a bus card or a bank card. Here, a feature code A, B, C or the like may be selected to indicate the type of analog card. In addition, the type of the analog card is not limited to an entrance guard, a bus card or a bank card, and can be other card types conforming to the NFC protocol.
And then determining the position information of the card reader, for example, when the type of the card reader is access control, the position information of the card reader can be company access control, district access control, market access control or elevator access control, and the position information of the corresponding analog card is the same as the position information of the card reader. Here, feature codes 1, 2, 3, etc. may be selected to represent position information of the analog card. Then, the serial number information of the analog card, such as company access 1, company access 2, company access 3, etc., is determined, and here, the feature codes 1, 2, 3, etc. can be selected to represent the serial number information of the analog card.
As described above, the attribute information of the analog card may be represented in the above-described encoding format, or in another encoding format. The attribute information corresponding to the same feature code at the first bit of the reserved field of the protocol field of the analog card is the same, and exemplarily, the attribute information represented by the 1 st bit a in the reserved field is that the type of the analog card is an entrance guard. Attribute information corresponding to the same feature codes after the combination of the first bit to the x-th bit of the reserved field of each analog card is the same, illustratively, A1 all represents company access control, and A11 all represents company access control 1.
In the embodiment of the application, the attribute information of the analog card is determined according to the difference of the card readers, and then the attribute information of the analog card is written into the reserved field of the protocol field of the analog card, so that each analog card in the mobile terminal can be classified, and when the target analog card is determined subsequently, the target analog card can be determined accurately and quickly according to the attribute information.
And S207, determining a target simulation card from the plurality of simulation cards simulated by the mobile terminal according to the target identification information.
The method for determining the target simulation card in the plurality of simulation cards simulated by the mobile terminal according to the target identification information comprises the following steps: determining a first simulation card in the plurality of simulation cards according to the type of the simulation card corresponding to the target identification information;
determining whether the first simulation card is a plurality of first simulation cards, if so, determining a second simulation card in the plurality of first simulation cards according to the position information corresponding to the target identification information, and if not, determining that the first simulation card is the target simulation card;
and determining whether the second simulation card is a plurality of second simulation cards, if so, determining the target simulation card in the plurality of second simulation cards according to the number information corresponding to the target identification information, and if not, determining that the second simulation card is the target simulation card.
Illustratively, the type of the emulation card is represented by a feature code A, B or C, and the feature code corresponding to the type of the emulation card is stored in the first bit of the reserved field of the protocol field. The position information of the analog card is represented by feature codes 1, 2, 3 and the like, and the feature code corresponding to the position information of the analog card is stored in the second bit of the reserved field of the protocol field. The serial number information of the analog card is represented by feature codes 1, 2, 3 and the like, and the feature code corresponding to the serial number information of the analog card is stored in the third bit of the reserved field of the protocol field.
When the target identification information is C12, for a plurality of analog cards in the mobile terminal, training is performed from a to a first bit of a reserved field of a protocol field (i.e., the type of the analog card) until consistent information is matched, the type of the analog card is a (which can represent entrance guard) is inquired, and then the analog card with the type of the analog card a is used as the first analog card. Then, starting to search a second bit of a reserved field of the protocol field (namely position information of the simulation card) in the plurality of first simulation cards, starting from 1 to 9 until corresponding information is matched, inquiring that the position information of the simulation card is 2 (which can represent company entrance guard), and then taking the simulation card with the position information of 2 in the first simulation card as a second simulation card. Then, starting to search a third bit of a reserved field of the protocol field (namely the number information of the analog card) in a plurality of second analog cards, starting from 1 to 9, until corresponding information is matched, inquiring that the number information of the analog card is 3 (which can represent the number 3 of the company entrance guard), and then taking the analog card with the number information of 3 in the second analog card as a target analog card.
In the above, whether the card reader side and the card simulation side need to perform the feature codes of the second bit, the third bit or more depends on the user requirement and the number of the simulation cards, and the user can modify the attribute information of the simulation cards under the appointed authority. When the obtained attribute information only has one-bit feature code, for example, only A, B, C or D, only the first bit of the reserved field is compared, when the attribute information only has two-bit feature codes, for example, the attribute information is a1, a2, B1, B2, B3 or C1, the two bits need to be compared, the first bit is determined by comparison, then the second bit is determined, and so on, the mobile terminal does not need to compare the attribute information of each analog card, and the analog cards only compare feature codes with less attribute information, and do not need to compare the identity information of a large string of character strings, and because the operation speed of the mobile terminal is very fast, the comparison action can be completed instantly, and cannot be found by the user.
And S208, switching the current analog card of the mobile terminal into a target analog card.
The step is specifically referred to S104, and is not described herein again. It should be added that, after S208, the mobile terminal further executes sending the target identification information of the target analog card to the card reader to obtain a corresponding processing result of the card swiping request when the card reader passes the identification information verification.
Specifically, the identification information includes: identity information and attribute information of the simulation card and content information of the simulation card; and sending the identification information to the card reader, and then the card reader can carry out a normal card reading process according to the identity information of the simulation card and the card content of the simulation card. If the card reading is successful, the processing result returned to the mobile terminal is a card reading success result, and if the card reading is failed, the processing result returned to the mobile terminal is a card reading failure result.
Illustratively, when the analog card is an access card, when the identification information of the analog card is sent to the card reader, the control operation of opening the door is executed if the card reader reads the card successfully, the control operation of opening the door is not executed if the card reader fails to read the card, and a processing result of card reading failure is returned to the mobile terminal.
The analog card switching method, the analog card switching device, the electronic device and the storage medium provided by the embodiment of the application comprise the following steps: sending a card swiping request to a card reader through an NFC technology; receiving a target identification code sent by the card reader according to the card swiping request, wherein the target identification code is the identification code of the card reader; according to the target identification code, determining a target simulation card corresponding to the target identification code in a plurality of simulation cards simulated by the mobile terminal; and switching the current analog card of the mobile terminal into a target analog card. The target identification code sent by the card reader can be used for quickly determining the corresponding target simulation card in the mobile terminal, so that the operation complexity of a user can be reduced, and the card swiping efficiency is improved.
On the basis of the foregoing embodiments, an embodiment of the present application further provides a step flow chart of an analog card switching method, specifically referring to fig. 5, where the analog card switching method is applied to a card reader, and specifically includes the following steps:
s301, receiving a card swiping request sent by the mobile terminal through the NFC technology.
The card swiping request carries identification information of the mobile terminal.
In the embodiment of the present application, the card reader also has an NFC function, and both the mobile terminal and the card reader can actively generate a radio frequency field. The card reader always generates a radio frequency field when being powered, and the mobile terminal generates the radio frequency field when using the analog card function.
When a user opens the analog card function of the mobile terminal, the antenna of the mobile terminal senses a radio frequency signal generated by the card reader, namely, the radio frequency signal enters a radio frequency field range generated by the card reader. When the distance between the mobile terminal and the card reader is smaller than a distance threshold value within a radio frequency field range generated by the card reader, the mobile terminal sends a card swiping request to the card reader through an NFC technology. The card swiping request carries identification information of the mobile terminal, and the distance threshold is used for representing the maximum induction distance of the NFC technology.
In the embodiment of the application, each mobile terminal has its own identification information, and the identification information is used for representing the identity information of the mobile terminal. The card reader receives the identification information of the mobile terminal, so that the card reader returns the target identification code of the card reader to the corresponding mobile terminal according to the identification information of the mobile terminal.
S302, according to the card swiping request, the target identification code of the card reader is sent to the mobile terminal.
After the target identification code of the card reader is sent to the mobile terminal, the mobile terminal determines a target simulation card corresponding to the target identification code in a plurality of simulation cards simulated by the mobile terminal according to the target identification code, and switches the current simulation card of the mobile terminal into the target simulation card.
In addition, specific reference is made to S201 to S208, which are not described herein again.
Further, if the mobile terminal does not store the corresponding relationship between the target identification information and the target identification code of the target analog card, the analog card switching method further includes: and receiving a corresponding relation sent by the mobile terminal, wherein the corresponding relation is the corresponding relation between the target identification information and the target identification code. In addition, the card reader can store the corresponding relation and is used when the mobile terminal swipes the card next time.
Specifically, when the card reader sends the target identification code to the mobile terminal for the first time, the mobile terminal creates a target simulation card according to the target identification code, the target simulation card has target identification information, and the corresponding relation between the target identification information of the target simulation card and the target identification code is established. And after the card reader receives the corresponding relation sent by the mobile terminal, the corresponding relation is stored, and then the card reader and the target simulation card are bound. And when the mobile terminal swipes the card by using the target simulation card next time, the card reader can acquire the target identification information of the target simulation card and determine whether to perform response processing.
Further, the identification information includes: identity information, attribute information and content information of the simulation card; the card reader can verify the attribute information in the target simulation card after receiving the target identification information of the target simulation card, and then verify the identity information and the content information of the simulation card after the attribute information is successfully verified. Because the number of characters of the attribute information is small, and the verification process is fast, the verification efficiency of the identification information can be improved by verifying the attribute information.
According to the embodiment of the application, when the card reader receives a card swiping request of the mobile terminal, the target identification code of the card reader is sent to the mobile terminal, the mobile terminal can determine the target simulation card according to the target identification code, then the target identification information of the target simulation card is sent to the card reader, and the card reader carries out corresponding card reading processing. In the application, the card reader usually only needs to read the identification information of the analog card once, and does not need to read the card for many times, that is, a failure result is returned to the mobile terminal after the analog card is failed to be read once, and the mobile terminal switches to another analog card and then enables the analog card to read the card once. Therefore, the card reading frequency of the card reader can be reduced, and the card reading efficiency of the card reader is improved.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
In addition, an analog card switching apparatus is provided in an embodiment of the present application, where the analog card switching apparatus includes a module for implementing the analog card switching method in the foregoing method embodiment.
Specifically, fig. 6 is a schematic structural diagram of an embodiment of an analog card switching device 400 provided in the present application. The analog card switching apparatus 400 is applied to a mobile terminal supporting NFC technology, and may include:
the sending module 401 sends a card swiping request to the card reader through the NFC technology, where the card swiping request carries identification information of the mobile terminal;
the receiving module 402 is configured to receive a target identification code sent by a card reader according to a card swiping request, where the target identification code is an identification code of the card reader;
a determining module 403, configured to determine, according to the target identifier, a target analog card corresponding to the target identifier from among multiple analog cards simulated by the mobile terminal;
a switching module 404, configured to switch a current analog card of the mobile terminal to a target analog card.
In one possible design of the present application, the determining module 403 is specifically configured to: determining target identification information corresponding to the target identification code based on the corresponding relation between the identification information of the analog card and the identification code; and determining a target simulation card in the plurality of simulation cards simulated by the mobile terminal according to the target identification information.
In one possible design of the present application, the identification information of the emulation card includes at least one of a type of the emulation card, position information of the emulation card, and number information of the emulation card.
In one possible design of the present application, determining a target simulation card among a plurality of simulation cards simulated by a mobile terminal according to target identification information includes: determining a first simulation card in the plurality of simulation cards according to the type of the simulation card corresponding to the target identification information; determining whether the first simulation card is a plurality of first simulation cards, if so, determining a second simulation card in the plurality of first simulation cards according to the position information corresponding to the target identification information, and if not, determining that the first simulation card is the target simulation card; and determining whether the second simulation card is a plurality of second simulation cards, if so, determining the target simulation card in the plurality of second simulation cards according to the number information corresponding to the target identification information, and if not, determining that the second simulation card is the target simulation card.
In a possible design of the present application, the analog card switching device 400 is further configured to determine whether the mobile terminal has stored a corresponding relationship between the target identification information of the target analog card and the target identification code; if not, establishing a corresponding relation between the target identification information of the target simulation card and the target identification code.
Referring to fig. 7, a schematic diagram of an analog card switching device 500 provided in an embodiment of the present application, which employs a card reader, includes:
a receiving module 501, configured to receive a card swiping request sent by a mobile terminal through an NFC technology;
the sending module 502 is configured to send the target identification code of the card reader to the mobile terminal according to the card swiping request, where the target identification code is used for the mobile terminal to simulate to determine a target simulated card corresponding to the target identification code among multiple simulated cards.
In a possible design of the present application, if the mobile terminal does not store a corresponding relationship between the target identification information and the target identification code of the target analog card, the analog card switching device is further configured to: and receiving a corresponding relation sent by the mobile terminal, wherein the corresponding relation is the corresponding relation between the target identification information and the target identification code.
The apparatus provided in the embodiment of the present application may be used to execute the method in the embodiments shown in fig. 2 to fig. 5, and the implementation principle and the technical effect are similar, which are not described herein again.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the processing module may be a processing element separately set up, or may be implemented by being integrated in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and a function of the processing module may be called and executed by a processing element of the apparatus. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element here may be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when some of the above modules are implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor that can call program code. As another example, these modules may be integrated together, implemented in the form of a system-on-a-chip (SOC).
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Fig. 8 is a schematic structural diagram of an electronic device for executing an analog card switching method according to an embodiment of the present application. As shown in fig. 8, the electronic device may include: a processor 71, a memory 72, a communication interface 73, and a system bus 74. The memory 72 and the communication interface 73 are connected to the processor 71 through the system bus 74 and complete communication therebetween, the memory 72 is used for storing computer-executable instructions, the communication interface 73 is used for communicating with other devices, and the processor 71 executes the computer-executable instructions to implement the schemes of the embodiments shown in fig. 2 to 5.
The system bus mentioned in fig. 8 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library). The memory may comprise Random Access Memory (RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor may be a general-purpose processor, including a central processing unit CPU, a Network Processor (NP), and the like; but also a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
Optionally, an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-readable storage medium is run on a computer, the computer is caused to perform the method according to the embodiment shown in fig. 2 to 5.
Optionally, an embodiment of the present application further provides a chip for executing the instruction, where the chip is configured to execute the method in the embodiment shown in fig. 2 to 5.
Embodiments of the present application further provide a computer program product, where the computer program product includes a computer program, where the computer program is stored in a computer-readable storage medium, and at least one processor can read the computer program from the computer-readable storage medium, and when the computer program is executed by the at least one processor, the at least one processor can implement the method of the embodiments shown in fig. 2 to 5.
In the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and following related objects are in a relationship of "division". "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of the present application. In the embodiment of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. An analog card switching method is applied to a mobile terminal supporting Near Field Communication (NFC) technology, and is characterized by comprising the following steps:
sending a card swiping request to a card reader through an NFC technology;
receiving a target identification code sent by the card reader according to the card swiping request, wherein the target identification code is the identification code of the card reader;
according to the target identification code, determining a target simulation card corresponding to the target identification code in a plurality of simulation cards simulated by the mobile terminal;
and switching the current simulation card of the mobile terminal into the target simulation card.
2. The analog card switching method according to claim 1, wherein the determining, according to the target identification code, a target analog card corresponding to the target identification code among a plurality of analog cards simulated by the mobile terminal comprises:
determining target identification information corresponding to the target identification code based on the corresponding relation between the identification information of the analog card and the identification code;
and determining the target simulation card in a plurality of simulation cards simulated by the mobile terminal according to the target identification information.
3. The analog card switching method according to claim 2, wherein the identification information of the analog card includes at least one of a type of the analog card, position information of the analog card, and number information of the analog card.
4. The analog card switching method according to claim 3, wherein the determining the target analog card among a plurality of analog cards simulated by the mobile terminal according to the target identification information comprises:
determining a first simulation card in a plurality of simulation cards according to the type of the simulation card corresponding to the target identification information;
determining whether the first simulation card is a plurality of simulation cards, if so, determining a second simulation card in the plurality of first simulation cards according to position information corresponding to the target identification information, and if not, determining that the first simulation card is the target simulation card;
and determining whether the second simulation card is a plurality of second simulation cards, if so, determining the target simulation card in the plurality of second simulation cards according to the number information corresponding to the target identification information, and if not, determining that the second simulation card is the target simulation card.
5. The analog card switching method according to any one of claims 1 to 4, wherein before determining the target analog card corresponding to the target identification code among a plurality of analog cards simulated by the mobile terminal according to the target identification code, the method further comprises:
determining whether the mobile terminal stores the corresponding relation between the target identification information of the target simulation card and the target identification code;
if not, establishing a corresponding relation between the target identification information of the target simulation card and the target identification code;
and sending the corresponding relation to the card reader.
6. An analog card switching method is applied to a card reader, and comprises the following steps:
receiving a card swiping request sent by a mobile terminal through an NFC technology;
and sending the target identification code of the card reader to the mobile terminal according to the card swiping request, wherein the target identification code is used for determining a target analog card corresponding to the target identification code in a plurality of analog cards by the mobile terminal.
7. The method according to claim 6, wherein if the mobile terminal does not store the corresponding relationship between the target identification information of the target analog card and the target identification code, the method further comprises:
and receiving a corresponding relation sent by the mobile terminal, wherein the corresponding relation is the corresponding relation between the identification information and the target identification code.
8. An analog card switching apparatus, characterized in that the analog card switching apparatus comprises a module for implementing the analog card switching method according to any one of claims 1 to 7.
9. An electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the processor implements the analog card switching method of any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium having stored thereon computer instructions which, when run on a computer, cause the computer to perform the analog card switching method of any one of claims 1 to 7.
CN202110818332.0A 2021-07-20 2021-07-20 Analog card switching method and device, electronic equipment and storage medium Active CN113541741B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110818332.0A CN113541741B (en) 2021-07-20 2021-07-20 Analog card switching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110818332.0A CN113541741B (en) 2021-07-20 2021-07-20 Analog card switching method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113541741A true CN113541741A (en) 2021-10-22
CN113541741B CN113541741B (en) 2022-07-08

Family

ID=78100364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110818332.0A Active CN113541741B (en) 2021-07-20 2021-07-20 Analog card switching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113541741B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115175164A (en) * 2022-06-28 2022-10-11 南京欧珀软件科技有限公司 Communication control method and related device
WO2023185731A1 (en) * 2022-04-02 2023-10-05 华为技术有限公司 Nfc-based card swiping method, medium, and electronic device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100082487A1 (en) * 2008-09-26 2010-04-01 Giftango Corporation Systems and methods for managing a virtual card based on geographical information
CN110020569A (en) * 2019-03-11 2019-07-16 华为技术有限公司 Automatically select method, electronic equipment and the communication system of NFC analog card
US10410232B1 (en) * 2016-07-08 2019-09-10 Harold Lueken Systems and methods for prioritizing default payment options in virtual wallets
CN111241856A (en) * 2020-01-09 2020-06-05 广东小天才科技有限公司 Method for selecting NFC analog card and watch
CN111464692A (en) * 2020-03-30 2020-07-28 RealMe重庆移动通信有限公司 Near field communication card determination method and device, storage medium and electronic equipment
CN111784335A (en) * 2020-07-17 2020-10-16 Oppo广东移动通信有限公司 Analog card management method, analog card management device, storage medium, and electronic apparatus
CN112347799A (en) * 2020-10-16 2021-02-09 歌尔科技有限公司 Multi-NFC (near field communication) card switching method and electronic equipment
CN112468975A (en) * 2020-11-30 2021-03-09 中电信用服务有限公司 Management method, device, medium and electronic equipment of analog card

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100082487A1 (en) * 2008-09-26 2010-04-01 Giftango Corporation Systems and methods for managing a virtual card based on geographical information
US10410232B1 (en) * 2016-07-08 2019-09-10 Harold Lueken Systems and methods for prioritizing default payment options in virtual wallets
CN110020569A (en) * 2019-03-11 2019-07-16 华为技术有限公司 Automatically select method, electronic equipment and the communication system of NFC analog card
CN111241856A (en) * 2020-01-09 2020-06-05 广东小天才科技有限公司 Method for selecting NFC analog card and watch
CN111464692A (en) * 2020-03-30 2020-07-28 RealMe重庆移动通信有限公司 Near field communication card determination method and device, storage medium and electronic equipment
CN111784335A (en) * 2020-07-17 2020-10-16 Oppo广东移动通信有限公司 Analog card management method, analog card management device, storage medium, and electronic apparatus
CN112347799A (en) * 2020-10-16 2021-02-09 歌尔科技有限公司 Multi-NFC (near field communication) card switching method and electronic equipment
CN112468975A (en) * 2020-11-30 2021-03-09 中电信用服务有限公司 Management method, device, medium and electronic equipment of analog card

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023185731A1 (en) * 2022-04-02 2023-10-05 华为技术有限公司 Nfc-based card swiping method, medium, and electronic device
CN115175164A (en) * 2022-06-28 2022-10-11 南京欧珀软件科技有限公司 Communication control method and related device

Also Published As

Publication number Publication date
CN113541741B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN113541741B (en) Analog card switching method and device, electronic equipment and storage medium
CN102200923B (en) Method of booting host device from MMC/SD device and associated devices
US20160210632A1 (en) Secured payment method and relevant device and system
CN110351346A (en) A kind of eSIM changes chucking method and relevant device
CN112468975A (en) Management method, device, medium and electronic equipment of analog card
CN110334144A (en) Message methods of exhibiting, device, computer equipment and storage medium
WO2022252561A1 (en) Card swiping method, card controller, electronic device and storage medium
WO2014067547A1 (en) Nfc controller architecture for emulation of multiple nfc-a devices
US9978056B2 (en) Smart card having multiple payment instruments
CN110297764B (en) Vulnerability test model training method and device
CN108632020A (en) Data transmission method for uplink, method of reseptance and device
CN113553870B (en) NFC tag identification method and device, NFC equipment and storage medium
CN107046547B (en) Abnormal operation identification method and device
CN106845180B (en) Verify method, application and the calculating equipment of identity
CN112711955A (en) NFC information transmission method, NFC information transmission device and NFC terminal
CN112822666B (en) Communication method, communication device, electronic equipment and storage medium
CN107633188B (en) Information display method and device and user equipment
CN113196232A (en) Neural network scheduling method and device, computer equipment and readable storage medium
CN115426318A (en) Optimized data transmission method and related device
CN108810243A (en) Information displaying method, device, terminal and computer readable storage medium
CN113225676A (en) Near field communication setting method and device, mobile terminal and storage medium
CN105787735A (en) Payment processing method and device, and terminal
KR101901914B1 (en) System and method for motion authentication using machine learning
CN106788610B (en) Control method and device for near field communication and mobile terminal
CN110609988A (en) Form verification method and 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
GR01 Patent grant
GR01 Patent grant