CN113312934A - NFC analog card selection method and device, electronic equipment and storage medium - Google Patents

NFC analog card selection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113312934A
CN113312934A CN202110578633.0A CN202110578633A CN113312934A CN 113312934 A CN113312934 A CN 113312934A CN 202110578633 A CN202110578633 A CN 202110578633A CN 113312934 A CN113312934 A CN 113312934A
Authority
CN
China
Prior art keywords
nfc
target
card
simulation
command sequence
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
CN202110578633.0A
Other languages
Chinese (zh)
Other versions
CN113312934B (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202110578633.0A priority Critical patent/CN113312934B/en
Publication of CN113312934A publication Critical patent/CN113312934A/en
Application granted granted Critical
Publication of CN113312934B publication Critical patent/CN113312934B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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/10019Methods 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 resolving collision on the communication channels between simultaneously or concurrently interrogated record carriers.
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • General Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method and a device for selecting an NFC analog card, electronic equipment and a storage medium, and belongs to the technical field of communication. The NFC analog card selection method comprises the following steps: under the condition that the simulation function of the NFC card is in a closed state and a signal sent by a target NFC card reader is detected, receiving a target command sequence sent by the target NFC card reader in a target time period; and under the condition that the target command sequence is matched with the stored target information, setting a target NFC simulation card corresponding to the target information as a default NFC simulation card and starting an NFC card simulation function.

Description

NFC analog card selection method and device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of communication, and particularly relates to a method and a device for selecting an NFC analog card, electronic equipment and a storage medium.
Background
Near Field Communication (NFC) is a short-range wireless Communication technology. NFC has three application modes, namely a card reader mode, a peer-to-peer module, and a card emulation mode.
The card emulation mode refers to emulation of an electronic device having an NFC function into a contactless radio frequency card (referred to as an "NFC emulated card" for short) that conforms to NFC-related standards. In the card emulation mode, the electronic device may be emulated as multiple NFC emulated cards, but one of the NFC emulated cards is activated at a time to use for data interaction with the target NFC reader.
In a case where the electronic device can be emulated into a plurality of NFC emulated cards, a user typically selects, manually, one NFC emulated card to be emulated in a target scenario on the electronic device and activates the NFC emulated card. In the case where the number of NFC emulated cards that the electronic device can be emulated is large, the time consuming selection of an NFC emulated card is large.
In summary, the existing NFC analog card selection method is cumbersome to operate and low in efficiency.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for selecting an NFC emulated card, an electronic device, and a storage medium, which can solve the problem of low selection efficiency of an NFC emulated card.
In a first aspect, an embodiment of the present application provides an NFC emulated card selection method, where the method includes:
under the condition that the simulation function of the NFC card is in a closed state and a signal sent by a target NFC card reader is detected, receiving a target command sequence sent by the target NFC card reader in a target time period;
and under the condition that the target command sequence is matched with the stored target information, setting a target NFC simulation card corresponding to the target information as a default NFC simulation card and starting an NFC card simulation function.
In a second aspect, an embodiment of the present application provides an NFC emulated card selection apparatus, where the apparatus includes:
the receiving module is used for receiving a target command sequence sent by a target NFC card reader in a target time period under the conditions that the simulation function of the NFC card is in a closed state and a signal sent by the target NFC card reader is detected;
and the selection module is used for setting the target NFC simulation card corresponding to the target information as a default NFC simulation card and starting the NFC card simulation function under the condition that the target command sequence is matched with the stored target information.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, the target NFC simulation card is set as the default NFC simulation card and the NFC card simulation function is started based on the target command sequence through the received target command sequence sent by the target NFC card reader, the steps are simple, the target NFC simulation card which can be correctly identified and read by the target NFC card reader can be rapidly and conveniently determined, and the target NFC simulation card is activated, so that the card swiping action is completed, and the selection efficiency of the NFC simulation card can be improved.
Drawings
Fig. 1 is a schematic flowchart of an NFC emulated card selection method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an NFC analog card selection apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 4 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The NFC emulated card selection method, the apparatus, the electronic device, and the storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Fig. 1 is a schematic flowchart of an NFC emulated card selection method provided in an embodiment of the present application. The NFC emulated card selection method provided in the embodiment of the present application is described below with reference to fig. 1. As shown in fig. 1, the method includes:
step 101, receiving a target command sequence sent by a target NFC card reader within a target time period when the NFC card simulation function is in an off state and a signal sent by the target NFC card reader is detected.
Optionally, the NFC emulated card selection method provided in the embodiment of the present application is applicable to an NFC emulated card selection device.
Alternatively, the NFC analog card selection device may be an electronic device with an NFC function, such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a smart band, or a smart watch.
Before step 101, the NFC emulated card selection device may detect the state of its own NFC card emulation function.
Under the condition that the NFC card emulation function of the device is turned on, the NFC card emulation selection device may turn off the NFC card emulation function of the device in response to the second input after receiving the second input of the user, so that the NFC card emulation function of the device is in a turned-off state.
Under the condition that the self NFC card simulation function is in the closed state, the NFC simulation card selection device can further detect signals sent by the target NFC card reader.
It should be noted that the target NFC reader continuously and regularly sends out a signal under the normal power-on operation condition. The signal is a field strength signal.
The signal emitted by the target NFC reader may include the following commands defined by the ISO14443 protocol:
FIELD ON
REQA:REQuest command,Type A
REQB:REQuest command,Type B
REQF:REQuest command,Type F
FIELD OFF
the commands all belong to the card searching command.
Optionally, the target NFC card reader may be a card reader in the form of a pos (point of sales) machine or the like.
The NFC emulated card selection device may detect a signal sent by the target NFC card reader when a distance between the NFC emulated card selection device and the target NFC card reader is less than a first distance threshold.
A first distance threshold, corresponding to the target NFC reader, is determined by the target NFC reader.
In the case where the signal emitted by the target NFC card reader is not detected, the NFC emulated card selection device may continue to detect the signal emitted by the target NFC card reader.
When a signal sent by the target NFC card reader is detected, the NFC analog card selection device may start receiving and analyzing the signal sent by the target NFC card reader until the time length for receiving the signal reaches a preset time length, so as to obtain a plurality of commands.
And the target time period is a time period with the time when the NFC card simulation function is in the closed state and the signal sent by the target NFC card reader is detected as the starting time and the time length is the preset time length.
The preset time period can be preset according to actual conditions, for example, 100 ms. The embodiment of the present application is not particularly limited to a specific value of the preset duration.
Based on the respective commands obtained for the target time period, a target command sequence may be obtained.
Optionally, each command obtained in the target time period exhibits periodicity, and each command in one complete period may be extracted to obtain a target command sequence.
For example, the commands obtained in the target time period are: FILED ON- > REQA- > REQB- > REQA- > FILLED OFF- > FILLED ON- > REQA- > REQB- > REQA- > FILLED OFF; one full cycle of commands includes FILED ON- > REQA- > REQB- > REQA- > FILED OFF, so the target command sequence is FILED ON- > REQA- > REQB- > REQA- > FILED OFF.
And 102, under the condition that the target command sequence is matched with the stored target information, setting a target NFC simulation card corresponding to the target information as a default NFC simulation card and starting an NFC card simulation function.
Optionally, the card searching instruction issued by different target NFC card readers is formed by combining different commands, and the target command sequence may characterize the target NFC card reader.
For example, the target NFC reader a issues various commands in the following order: FILED ON- > REQA- > REQB- > REQA- > FILLED OFF- > FILLED ON- > REQA- > REQB- >
REQA- > FILED OFF; the target NFC card reader B issues the commands in the following order: FIELD ON- > REQA- > REQA- > FIELD OFF- > FIELD ON- > REQA- > REQA- > FIELD OFF; therefore, the card searching commands sent by the target NFC card reader A and the target NFC card reader B are combined by different commands, so that different target NFC card readers can be distinguished through a target command sequence.
Alternatively, based on the target command sequence, a feature describing a combination formed by each command in the target command sequence, for example, a combination manner of the commands, may be extracted as feature information of the target NFC card reader that issued the target command sequence.
The target information may be characteristic information of a sample NFC reader of some type.
The type of the target NFC reader may be represented by the type of NFC emulated card that the target NFC reader can read.
The type of the NFC emulated card may include, but is not limited to, a public transportation card in a city, an entrance guard card in a certain area (e.g., a cell, a unit, or an office building), a bank card issued by a certain bank, an identification card, a social security card, a membership card issued by a certain merchant, and the like.
Alternatively, the target information may be stored in advance in a database of the NFC emulated card selection device. In addition to the target information, the database may also store other types of characteristic information of the sample NFC reader. And the stored characteristic information of each type of sample NFC card reader and the simulated NFC simulation card which can be identified and read by the sample NFC card reader are bound in advance, and have a one-to-one correspondence relationship.
It should be noted that the characteristic information of each type of sample NFC card reader may be collected by the NFC analog card selection device and then stored; or the NFC analog card selection device collects the data and sends the data to the NFC analog card selection device, and the data is stored by the NFC analog card selection device.
And matching the characteristic information of the target NFC card reader with the characteristic information of each sample NFC card reader. And the characteristic information of the sample NFC card reader matched with the characteristic information of the target NFC card reader is the target information. After determining that the characteristic information of the target NFC card reader matches the target information, it may be determined that the type of the target NFC card reader is the same as the type of the sample NFC card reader corresponding to the target information, and the simulated NFC emulated card bound to the target information is the target NFC emulated card.
The target NFC simulation card is an NFC simulation card which can be identified and read by the target NFC card reader. The target NFC emulated card is an NFC emulated card which needs to be activated by the NFC emulated card selection device by a user in a scene of using the target NFC card reader.
After the target NFC emulated card is determined, the target NFC emulated card corresponding to the target information may be set as a default NFC emulated card and an NFC card emulation function of the NFC emulated card selection device is started.
The target NFC emulated card corresponding to the target information is set as a default NFC emulated card, which may be referred to as an active target NFC emulated card. After the target NFC simulation card corresponding to the target information is set as the default NFC simulation card, under the condition that the NFC card simulation function of the NFC simulation card selection device is in the on state, the NFC card simulated by the NFC simulation card selection device is the target NFC simulation card, namely the NFC simulation card selection device simulates the target NFC simulation card, so that the target NFC card reader can perform near field communication with the NFC simulation card selection device, and the card swiping action is completed.
Optionally, when the feature information of the target NFC card reader is not matched with the feature information of any sample NFC card reader stored in advance, the default NFC emulated card may be kept unchanged, and the NFC card emulation function may be turned on.
According to the NFC simulation card selection method provided by the embodiment of the application, the target NFC simulation card can be automatically determined and selected to be set as the default NFC simulation card, the whole card swiping process is noninductive to operate, and the card swiping experience of a user can be improved. In addition, the process of determining and activating the target NFC simulation card only relates to the process of searching the card in the normal interaction in the ISO1443 standard, and does not relate to the interaction of the ISO1443-3 layer and the interaction of the ISO14443-4 layer, so that the process of selecting the target NFC simulation card is more convenient and simpler.
According to the embodiment of the application, the target command sequence sent by the received target NFC card reader is used, the target NFC simulation card is automatically selected to be the default NFC simulation card and the NFC card simulation function is started based on the target command sequence, the steps are simple, the target NFC simulation card which can be correctly identified and read by the target NFC card reader can be rapidly and conveniently determined, the target NFC simulation card is activated, the card swiping action is completed, and the selection efficiency of the NFC simulation card can be improved.
Optionally, when the target command sequence is matched with stored target information, setting a target NFC emulated card corresponding to the target information as a default NFC emulated card and starting an NFC card emulation function, including: and acquiring the characteristic information of the target NFC card reader based on the target command sequence.
Wherein the characteristic information comprises the type of each command and the time interval between every two adjacent commands.
Alternatively, the target command sequence is a sequence formed by a plurality of commands in a specific order, and the type of each command included in the target command sequence and the time interval between every two adjacent commands may be obtained.
The card searching instructions sent by different target NFC card readers are formed by combining different commands, and the time intervals between the commands are also different for different target NFC card readers, and the types of the commands included in the target command sequence and the time intervals between every two adjacent commands can be used as the characteristic information of the target NFC card reader.
Optionally, under the condition that the feature information is matched with the target information, setting the target NFC emulated card corresponding to the target information as a default NFC emulated card and starting an NFC card emulation function.
Optionally, the target information may include types of commands included in a target command sequence issued by an NFC reader based on a certain sample received within the target time period and a time interval between every two adjacent commands.
And matching the characteristic information of the target NFC card reader with the characteristic information of each sample NFC card reader. The characteristic information of the target NFC card reader is matched with the target information, the type of the target NFC card reader can be determined to be the same as that of a sample NFC card reader corresponding to the target information, and the simulated NFC simulation card bound with the target information is the target NFC simulation card.
After the target NFC emulated card is determined, the target NFC emulated card corresponding to the target information may be set as a default NFC emulated card, and an NFC card emulation function of the NFC emulated card selection device is started.
In the embodiment of the application, the matching of the characteristic information can reach the time consumption of millisecond level, the time consumption for selecting the target NFC simulation card can be greatly shortened, and good experience of noninductive rapid card selection is achieved.
According to the embodiment of the application, the types of the commands included in the target command sequence and the time interval between every two adjacent commands are used as the characteristic information of the target NFC card reader and are matched with the prestored characteristic information of various sample NFC card readers, the target NFC simulation card bound with the matched target information is determined as the default NFC simulation card, and the NFC card simulation function is started, so that the characteristics of the target NFC card reader can be more accurately characterized by the obtained characteristic information of the target NFC card reader, the type of the target NFC card reader can be more accurately determined, the target NFC simulation card can be more quickly and accurately determined, and the selection efficiency of the NFC simulation card can be improved.
Optionally, acquiring feature information of the target NFC card reader based on the target command sequence includes: the type, sequence and time stamp of each command in the target command sequence are obtained.
Optionally, the type of command may include FIELD ON, REQA, REQB, REQF, and FIELD OFF.
The order of the commands refers to the precedence relationship among the commands in the target command sequence.
For each command in the target command sequence, the timestamp of the command may be obtained by parsing the target field in the command.
The time stamp of the command can characterize the issuing time of the command.
The time interval between every two adjacent commands is obtained based on the order and time stamp of the commands.
Optionally, the time interval between each command and the previous command may be obtained based on the order of the commands and the timestamps.
Optionally, the card seeking instruction issued by different target NFC card readers is formed by combining different commands, and the time interval between the commands is also different for different target NFC card readers, and the target NFC card reader may be characterized by combining the order of the commands in the first command sequence and the time interval between the commands.
According to the method and the device, the types of the commands included in the target command sequence and the time interval between every two adjacent commands are obtained through the types, the sequence and the time stamps of the commands in the target command sequence to serve as the characteristic information of the target NFC card reader, and the obtained characteristic information of the target NFC card reader can more accurately represent the characteristics of the target NFC card reader, so that the types of the target NFC card reader can be more accurately determined, the target NFC simulation card can be more quickly and accurately determined, and the selection efficiency of the NFC simulation card can be improved.
Optionally, in a case that the NFC card emulation function is in an off state and a signal sent by the target NFC card reader is detected, after receiving a target command sequence sent by the target NFC card reader within a target time period, the method further includes: in the event that the target command sequence does not match the stored target information, a first input by the user is received.
Optionally, the feature information of the target NFC reader is matched with the feature information of each sample NFC reader. Under the condition that the characteristic information of the target NFC card reader is not matched with the characteristic information of each sample NFC card reader, the target command sequence can be determined to be not matched with the stored target information, the type of the target NFC card reader is different from that of each sample NFC card reader, and any one NFC simulation card in the card library of the NFC simulation card selection device cannot be identified and read by the target NFC card reader. The target NFC reader may also be used as a sample NFC reader for subsequent NFC emulated card selection.
Optionally, the first input is for adding a new NFC emulated card to the card library of the NFC emulated card selection device. The new NFC emulation card can be read by the target NFC card reader.
Optionally, the NFC emulated card determined based on the first input is bound to the target command sequence.
Optionally, the feature information of the target NFC card reader may be acquired based on the target command sequence, stored in the database of the NFC emulated card selection device, and corresponded to the new NFC emulated card, so as to implement the binding between the target command sequence and the new NFC emulated card.
According to the embodiment of the application, under the condition that the target command sequence is not matched with the stored target information, the NFC simulation card determined based on the first input of the user is bound with the target command sequence, the card library of the NFC simulation card selection device can be updated, the NFC simulation card selection process behind the NFC simulation card user which can be identified by the NFC simulation card can be used, and the application range of the NFC simulation card selection method can be widened.
Optionally, before activating the target NFC emulated card and turning on the NFC card emulation function based on the feature information of the target NFC card reader, the method includes: and under the condition that the NFC card simulation function is in an off state and a signal sent by the sample NFC reader is detected, receiving a target command sequence sent by the sample NFC reader in a target time period.
Optionally, when the NFC card simulation function of the user is in an off state, the user may move the NFC simulated card selection device to the sample NFC card reader, and in the moving process, the NFC simulated card selection device may further detect a signal sent by the target NFC card reader.
The NFC emulated card selection device may detect a signal emitted by the sample NFC reader if the distance between the NFC emulated card selection device and the sample NFC reader is less than a second distance threshold.
A first distance threshold, corresponding to the sample NFC reader, is determined by the sample NFC reader.
Under the condition that the signal sent by the sample NFC card reader is detected, the NFC simulation card selection device can begin to receive and analyze the signal sent by the sample NFC card reader until the time length for receiving the signal reaches the preset time length, and a plurality of commands are obtained.
Based on the commands obtained in the target time period, a target command sequence sent by the sample NFC card reader can be obtained.
Based on the target command sequence issued by the sample NFC reader, the characteristic information of the sample NFC reader may be obtained.
The step of obtaining the characteristic information of the sample NFC card reader based on the target command sequence sent by the sample NFC card reader is similar to the step of obtaining the characteristic information of the target NFC card reader based on the target command sequence sent by the target NFC card reader, and is not repeated here.
And storing the characteristic information of the sample NFC card reader in a database of the NFC simulation card selection device, and binding the characteristic information of the sample NFC card reader with a predetermined NFC simulation card which can be identified and read by the sample NFC card reader. The sample NFC card reader can read the NFC simulation card to be stored in a card library of the NFC simulation card selection device.
By repeating the steps, the NFC analog card which can be read by each type of sample NFC card reader can be bound with the characteristic information of the sample NFC card reader.
Optionally, the sample NFC card reader may be various types of target NFC card readers on the market, and the NFC analog card selection method provided in the embodiment of the present application has better universality.
According to the embodiment of the application, the characteristic information of the sample NFC card reader is acquired, stored and bound with the characteristic information of the sample NFC card reader and the NFC simulation card which can be identified by the sample NFC card reader, so that the characteristic information of the sample NFC card reader can be stored more conveniently and rapidly, the type of the target NFC card reader can be determined more conveniently, the target NFC simulation card can be determined more rapidly and accurately, and the selection efficiency of the NFC simulation card can be improved.
It should be noted that, in the NFC emulated card selection method provided in the embodiment of the present application, the execution main body may be an NFC emulated card selection device, or the execution main body is a control module in the NFC emulated card selection device, configured to execute the NFC emulated card selection method. In the embodiment of the present application, an NFC emulated card selection device performs an NFC emulated card selection method as an example, which illustrates the NFC emulated card selection device provided in the embodiment of the present application.
Fig. 2 is a schematic structural diagram of an NFC analog card selection apparatus according to an embodiment of the present application. Based on the content of any of the above embodiments, as shown in fig. 2, the apparatus includes a receiving module 201 and a selecting module 202, where:
a receiving module 201, configured to receive a target command sequence sent by a target NFC card reader within a target time period when an NFC card simulation function is in an off state and a signal sent by the target NFC card reader is detected;
the selecting module 202 is configured to, when the target command sequence matches the stored target information, set a target NFC emulated card corresponding to the target information as a default NFC emulated card and start an NFC card emulation function.
Optionally, the receiving module 201 and the selecting module 202 are electrically connected.
The receiving module 201 may detect a state of its own NFC card simulation function; under the condition that the NFC card simulation function of the receiving module 201 is in an off state, the receiving module 201 may further detect a signal sent by a target NFC card reader; under the condition that a signal sent by a target NFC card reader is detected, the receiving module 201 may start to receive and analyze the signal sent by the target NFC card reader until the time length for receiving the signal reaches a preset time length, so as to obtain a plurality of commands; based on the respective commands obtained for the target time period, the receiving module 201 may obtain a target command sequence.
The selection module 202 may extract, based on the target command sequence, a feature describing a combination formed by each command in the target command sequence, for example, a combination manner of the commands, as feature information of the target NFC card reader that issued the target command sequence.
The selection module 202 may further match the feature information of the target NFC card reader with the target information, and determine the target NFC emulated card corresponding to the target information as a default NFC emulated card and start an NFC card emulation function when the feature information of the target NFC card reader matches with the stored target information.
The target NFC simulation card is an NFC simulation card which can be identified and read by the target NFC card reader. The target NFC emulated card is an NFC emulated card which needs to be activated by the NFC emulated card selection device by a user in a scene of using the target NFC card reader.
Optionally, the selection module 202 comprises:
the characteristic acquisition sub-module is used for acquiring characteristic information of the target NFC card reader based on the target command sequence;
the card selection sub-module is used for setting the target NFC simulation card corresponding to the target information as a default NFC simulation card and starting an NFC card simulation function under the condition that the characteristic information is matched with the target information;
wherein the characteristic information comprises the type of each command and the time interval between every two adjacent commands.
Optionally, the feature obtaining sub-module includes:
the first acquisition unit is used for acquiring the type, the sequence and the time stamp of each command in the target command sequence;
and the second acquisition unit is used for acquiring the time interval between every two adjacent commands based on the sequence and the time stamp of each command.
Optionally, the apparatus further comprises:
the input module is used for receiving a first input of a user under the condition that the target command sequence is not matched with the stored target information;
and the binding module is used for binding the NFC simulation card determined based on the first input with the target command sequence.
According to the embodiment of the application, the target command sequence sent by the received target NFC card reader is used, the target NFC simulation card is automatically selected to be the default NFC simulation card and the NFC card simulation function is started based on the target command sequence, the steps are simple, the target NFC simulation card which can be correctly identified and read by the target NFC card reader can be rapidly and conveniently determined, the target NFC simulation card is activated, the card swiping action is completed, and the selection efficiency of the NFC simulation card can be improved.
The NFC analog card selection device in the embodiment of the present application may be a device, or may also be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The NFC emulated card selection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The NFC analog card selection device provided in the embodiment of the present application can implement each process implemented in the method embodiment of fig. 1, and is not described here again to avoid repetition.
Optionally, as shown in fig. 3, an electronic device 300 is further provided in this embodiment of the present application, and includes a processor 301, a memory 302, and a program or an instruction stored in the memory 302 and capable of being executed on the processor 301, where the program or the instruction is executed by the processor 301 to implement each process of the above embodiment of the NFC emulated card selection method, and can achieve the same technical effect, and in order to avoid repetition, it is not described here again.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 4 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present application.
The electronic device 400 includes, but is not limited to: radio unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, and processor 410.
Those skilled in the art will appreciate that the electronic device 400 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 4 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The radio frequency unit 401 is configured to receive a target command sequence sent by a target NFC card reader within a target time period when an NFC card simulation function is in an off state and a signal sent by the target NFC card reader is detected;
and the processor 410 is configured to set the target NFC emulated card corresponding to the target information as a default NFC emulated card and start an NFC card emulation function, when the target command sequence matches with the stored target information.
According to the embodiment of the application, the target command sequence sent by the received target NFC card reader is used, the target NFC simulation card is automatically selected to be the default NFC simulation card and the NFC card simulation function is started based on the target command sequence, the steps are simple, the target NFC simulation card which can be correctly identified and read by the target NFC card reader can be rapidly and conveniently determined, the target NFC simulation card is activated, the card swiping action is completed, and the selection efficiency of the NFC simulation card can be improved.
Optionally, the processor 410 is further configured to obtain feature information of the target NFC card reader based on the target command sequence; under the condition that the characteristic information is matched with the target information, setting a target NFC simulation card corresponding to the target information as a default NFC simulation card and starting an NFC card simulation function;
wherein the characteristic information comprises the type of each command and the time interval between every two adjacent commands.
Optionally, the processor 410 is further configured to obtain a type, an order, and a timestamp of each command in the target command sequence; the time interval between every two adjacent commands is obtained based on the order and time stamp of the commands.
Optionally, a user input unit 407, configured to receive a first input of a user if the target command sequence does not match the stored target information;
the processor 410 is further configured to bind the NFC emulated card determined based on the first input with the target command sequence.
It should be understood that in the embodiment of the present application, the input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 407 includes a touch panel 4071 and other input devices 4072. A touch panel 4071, also referred to as a touch screen. The touch panel 4071 may include two parts, a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 409 may be used to store software programs as well as various data including, but not limited to, target applications and operating systems. The processor 410 may integrate an application processor, which primarily handles operating system, user interface, and target applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the processes of the embodiment of the NFC analog card selection method are implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the above embodiment of the NFC analog card selection method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An NFC emulation card selection method, comprising:
under the condition that the simulation function of the NFC card is in a closed state and a signal sent by a target NFC card reader is detected, receiving a target command sequence sent by the target NFC card reader in a target time period;
and under the condition that the target command sequence is matched with the stored target information, setting a target NFC simulation card corresponding to the target information as a default NFC simulation card and starting an NFC card simulation function.
2. The method for selecting the NFC emulated card according to claim 1, wherein the setting the target NFC emulated card corresponding to the target information as a default NFC emulated card and starting an NFC card emulation function when the target command sequence matches with the stored target information includes:
acquiring characteristic information of the target NFC card reader based on the target command sequence;
under the condition that the characteristic information is matched with the target information, setting a target NFC simulation card corresponding to the target information as a default NFC simulation card and starting an NFC card simulation function;
wherein the characteristic information includes a type of each of the commands and a time interval between every two adjacent ones of the commands.
3. The NFC emulated card selection method of claim 2, wherein the obtaining feature information for the target NFC reader based on the target command sequence comprises:
acquiring the type, sequence and time stamp of each command in the target command sequence;
and acquiring the time interval between every two adjacent commands based on the sequence and the time stamp of each command.
4. The NFC emulated card selection method of any of claims 1 to 3, wherein in case the NFC card emulation function is in an off state and a signal issued by a target NFC reader is detected, after receiving a target command sequence issued by the target NFC reader within a target time period, the method further comprises:
receiving a first input of a user in case the target command sequence does not match the stored target information;
binding the NFC emulated card determined based on the first input with the target command sequence.
5. An NFC emulation card selection device, comprising:
the receiving module is used for receiving a target command sequence sent by a target NFC card reader in a target time period under the conditions that the simulation function of the NFC card is in a closed state and a signal sent by the target NFC card reader is detected;
and the selection module is used for setting the target NFC simulation card corresponding to the target information as a default NFC simulation card and starting the NFC card simulation function under the condition that the target command sequence is matched with the stored target information.
6. The NFC analog card selection device of claim 5, wherein the selection module comprises:
the characteristic obtaining sub-module is used for obtaining the characteristic information of the target NFC card reader based on the target command sequence;
the card selection sub-module is used for setting a target NFC simulation card corresponding to the target information as a default NFC simulation card and starting an NFC card simulation function under the condition that the characteristic information is matched with the target information;
wherein the characteristic information includes a type of each of the commands and a time interval between every two adjacent ones of the commands.
7. The NFC analog card selection device of claim 6, wherein the feature capture sub-module comprises:
the first acquisition unit is used for acquiring the type, the sequence and the time stamp of each command in the target command sequence;
and the second acquisition unit is used for acquiring the time interval between every two adjacent commands based on the sequence and the time stamp of each command.
8. The NFC emulated card selection apparatus of any of claims 5 to 7, further comprising:
the input module is used for receiving a first input of a user under the condition that the target command sequence does not match with the stored target information;
and the binding module is used for binding the NFC simulation card determined based on the first input with the target command sequence.
9. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the NFC emulated card selection method of any one of claims 1-4.
10. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the NFC emulated card selection method of any of claims 1-4.
CN202110578633.0A 2021-05-26 2021-05-26 NFC analog card selection method and device, electronic equipment and storage medium Active CN113312934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110578633.0A CN113312934B (en) 2021-05-26 2021-05-26 NFC analog card selection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110578633.0A CN113312934B (en) 2021-05-26 2021-05-26 NFC analog card selection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113312934A true CN113312934A (en) 2021-08-27
CN113312934B CN113312934B (en) 2023-04-25

Family

ID=77375051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110578633.0A Active CN113312934B (en) 2021-05-26 2021-05-26 NFC analog card selection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113312934B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780018A (en) * 2021-09-06 2021-12-10 珠海格力电器股份有限公司 Data input method, electronic device, device and readable storage medium
CN113840279A (en) * 2021-09-22 2021-12-24 Oppo广东移动通信有限公司 Analog card activation method, device, terminal and storage medium
CN115175164A (en) * 2022-06-28 2022-10-11 南京欧珀软件科技有限公司 Communication control method and related device
CN115623118A (en) * 2022-11-22 2023-01-17 荣耀终端有限公司 Near field communication control method and electronic equipment
CN117155427A (en) * 2023-10-30 2023-12-01 北京紫光青藤微系统有限公司 Application running method for NFC device, NFC device and storage medium
CN113780018B (en) * 2021-09-06 2024-06-07 珠海格力电器股份有限公司 Data writing method, electronic device, device and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110226853A1 (en) * 2010-03-17 2011-09-22 Inside Contactless Method of conducting a transaction using an nfc device
CN105491243A (en) * 2016-01-18 2016-04-13 努比亚技术有限公司 NFC mobile terminal and NFC simulation card switching control method
CN108288008A (en) * 2018-02-08 2018-07-17 飞天诚信科技股份有限公司 A kind of method and device of card activation
CN109257071A (en) * 2017-07-12 2019-01-22 深圳如探索科技有限公司 Apparatus control method, device and equipment
CN110020569A (en) * 2019-03-11 2019-07-16 华为技术有限公司 Automatically select method, electronic equipment and the communication system of NFC analog card
WO2020109518A1 (en) * 2018-11-30 2020-06-04 Stmicroelectronics (Rousset) Sas Fast nfc processing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110226853A1 (en) * 2010-03-17 2011-09-22 Inside Contactless Method of conducting a transaction using an nfc device
CN105491243A (en) * 2016-01-18 2016-04-13 努比亚技术有限公司 NFC mobile terminal and NFC simulation card switching control method
CN109257071A (en) * 2017-07-12 2019-01-22 深圳如探索科技有限公司 Apparatus control method, device and equipment
CN108288008A (en) * 2018-02-08 2018-07-17 飞天诚信科技股份有限公司 A kind of method and device of card activation
WO2020109518A1 (en) * 2018-11-30 2020-06-04 Stmicroelectronics (Rousset) Sas Fast nfc processing
CN110020569A (en) * 2019-03-11 2019-07-16 华为技术有限公司 Automatically select method, electronic equipment and the communication system of NFC analog card

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113780018A (en) * 2021-09-06 2021-12-10 珠海格力电器股份有限公司 Data input method, electronic device, device and readable storage medium
CN113780018B (en) * 2021-09-06 2024-06-07 珠海格力电器股份有限公司 Data writing method, electronic device, device and readable storage medium
CN113840279A (en) * 2021-09-22 2021-12-24 Oppo广东移动通信有限公司 Analog card activation method, device, terminal and storage medium
CN113840279B (en) * 2021-09-22 2024-05-14 Oppo广东移动通信有限公司 Analog card activation method, device, terminal and storage medium
CN115175164A (en) * 2022-06-28 2022-10-11 南京欧珀软件科技有限公司 Communication control method and related device
CN115623118A (en) * 2022-11-22 2023-01-17 荣耀终端有限公司 Near field communication control method and electronic equipment
CN115623118B (en) * 2022-11-22 2023-10-20 荣耀终端有限公司 Near field communication control method and electronic equipment
CN117155427A (en) * 2023-10-30 2023-12-01 北京紫光青藤微系统有限公司 Application running method for NFC device, NFC device and storage medium
CN117155427B (en) * 2023-10-30 2024-02-23 北京紫光青藤微系统有限公司 Application running method for NFC device, NFC device and storage medium

Also Published As

Publication number Publication date
CN113312934B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN113312934B (en) NFC analog card selection method and device, electronic equipment and storage medium
CN106327185B (en) Starting method of payment application and mobile terminal
CN104392502B (en) A kind of Work attendance method of the Quick Response Code attendance checking system based on smart mobile phone
CN111901896A (en) Information sharing method, information sharing device, electronic equipment and storage medium
CN104813298A (en) Near field communication method and apparatus using sensor context
CN112394864B (en) Information acquisition method and device, computer equipment and storage medium
JP2019504566A (en) Information image display method and apparatus
CN109992965A (en) Process handling method and device, electronic equipment, computer readable storage medium
CN107765853A (en) Using method for closing, device, storage medium and electronic equipment
CN112468975A (en) Management method, device, medium and electronic equipment of analog card
CN112486444A (en) Screen projection method, device, equipment and readable storage medium
CN112486387A (en) Application program control method and device
CN113128244A (en) Scanning method and device and electronic equipment
CN111859322A (en) Identity verification method and device and electronic equipment
TW201642677A (en) System and method for dynamic management of context awareness service to multiple users
JP2019523466A (en) Method and apparatus for unlocking terminal screen
CN113163256B (en) Method and device for generating operation flow file based on video
CN111859356B (en) Application program login method and device
CN115409869A (en) Snow field trajectory analysis method and device based on MAC tracking
CN112287713A (en) Two-dimensional code identification method and device
CN114020391A (en) Information display method and device, electronic equipment and readable storage medium
CN113342825A (en) Buried point data processing method, buried point data processing device, buried point data processing equipment and computer readable storage medium
CN109062403B (en) PDA equipment
JP2017528841A (en) Method, apparatus and system for displaying usage history
CN112287131A (en) Information interaction method and information interaction device

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