CN117155427B - Application running method for NFC device, NFC device and storage medium - Google Patents

Application running method for NFC device, NFC device and storage medium Download PDF

Info

Publication number
CN117155427B
CN117155427B CN202311413165.7A CN202311413165A CN117155427B CN 117155427 B CN117155427 B CN 117155427B CN 202311413165 A CN202311413165 A CN 202311413165A CN 117155427 B CN117155427 B CN 117155427B
Authority
CN
China
Prior art keywords
card reader
identity information
nfc
application
characteristic parameters
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.)
Active
Application number
CN202311413165.7A
Other languages
Chinese (zh)
Other versions
CN117155427A (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.)
Beijing Unigroup Tsingteng Microsystems Co Ltd
Original Assignee
Beijing Unigroup Tsingteng Microsystems 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 Beijing Unigroup Tsingteng Microsystems Co Ltd filed Critical Beijing Unigroup Tsingteng Microsystems Co Ltd
Priority to CN202311413165.7A priority Critical patent/CN117155427B/en
Publication of CN117155427A publication Critical patent/CN117155427A/en
Application granted granted Critical
Publication of CN117155427B publication Critical patent/CN117155427B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The disclosure relates to the technical field of near field communication, and discloses an application running method for NFC equipment, the NFC equipment and a storage medium. The NFC device comprises a device host, an NFC controller and an NFC execution environment, and the application running method comprises the following steps: the NFC controller acquires characteristic parameters of the card reader and sends the characteristic parameters of the card reader to the equipment host; the equipment host determines corresponding application identity information based on the characteristic parameters of the card reader, and sends the application identity information to the NFC execution environment; and activating a target application corresponding to the application identity information by the NFC execution environment, and interacting with the card reader based on the target application. The device host takes the characteristic parameters of the card reader as the basis, and can more accurately determine the target application of the interaction supported by the card reader, thereby improving the accuracy of the application selection result.

Description

Application running method for NFC device, NFC device and storage medium
Technical Field
The present disclosure relates to the field of near field communication technology, for example, to an application running method for an NFC device, and a storage medium.
Background
NFC (Near Field Communication ) is a short-range high-frequency wireless communication technology, and devices using the NFC technology can exchange data in the vicinity of each other. NFC devices include Device Hosts (DH), NFC controllers (NFCCs), and NFC execution environments (NFC Execution Environment, NFCEEs), among others.
The NFC controller is mainly responsible for communicating with other NFC devices (such as a card Reader, i.e. NFC Reader) by controlling radio frequency transceiving, and can also be used as a communication relay of an NFC execution environment. The NFC execution environment is deployed with applications (such as virtual cards), and after the NFC execution environment activates the corresponding applications, the NFC execution environment interacts with other NFC devices based on the activated applications.
Under the condition that a plurality of applications are deployed in the NFC execution environment, a target application needed in the current interaction scene is needed to be selected from the plurality of applications, and after the target application is activated by the NFC execution environment, interaction is carried out with other NFC terminals based on the target application. In the related art, a device host selects a target application required in a current interaction scene from a plurality of applications based on configured card selection software, however, the card selection software in the prior art generally selects the target application required in the current interaction scene from a plurality of applications in an NFC execution environment based on electronic fence information, geographic position information and the like, and the selected target application is not suitable for the current interaction scene easily in the selection application mode, so that the accuracy of an application selection result is low, and the user experience is affected.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview, and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended as a prelude to the more detailed description that follows.
The embodiment of the disclosure provides an application running method for NFC equipment, NFC equipment and storage medium, which can improve the accuracy of application selection results.
According to a first aspect of the present disclosure, there is provided an application running method for an NFC device, the NFC device including a device host, an NFC controller, and an NFC execution environment, the application running method for the NFC device including:
the NFC controller acquires characteristic parameters of the card reader and sends the characteristic parameters of the card reader to the equipment host;
the equipment host determines corresponding application identity information based on the characteristic parameters of the card reader, and sends the application identity information to the NFC execution environment;
And activating a target application corresponding to the application identity information by the NFC execution environment, and interacting with the card reader based on the target application.
In some embodiments, the NFC controller obtains a characteristic parameter of the card reader, including:
the NFC controller records radio frequency event log information of the card reader during communication with the card reader;
the NFC controller determines characteristic parameters of the card reader based on the radio frequency event log information.
In some embodiments, the radio frequency event log information includes at least one of: original working time information of the radio frequency carrier wave, original attribute information of the polling instruction and the card searching instruction.
In some embodiments, the characteristic parameters of the card reader include at least one of: working time information of a radio frequency field, working characteristic information of a polling instruction and card reader identity information.
In some embodiments, the device host determines corresponding application identity information based on the feature parameters of the card reader, including:
the equipment host determines application identity information corresponding to the characteristic parameters of the card reader in a local information base, wherein the local information base comprises one or more groups of characteristic parameters with mapping relation and application identity information.
In some embodiments, the characteristic parameters of the card reader include card reader identity information and other characteristic information; the equipment host determines application identity information corresponding to the characteristic parameters of the card reader in a local information base, and comprises the following steps:
The equipment host matches the card reader identity information with characteristic parameters contained in the local information base;
under the condition that the equipment host is matched with a first target characteristic parameter containing card reader identity information from a local information base, determining application identity information with a mapping relation with the first target characteristic parameter as application identity information corresponding to the characteristic parameter of the card reader;
under the condition that the equipment host is not matched with the first target characteristic parameters containing card reader identity information from the local information base, matching other characteristic information with the characteristic parameters contained in the local information base;
under the condition that the equipment host determines a second target characteristic parameter meeting a preset matching condition from the local information base, determining application identity information with a mapping relation with the second target characteristic parameter as application identity information corresponding to the characteristic parameter of the card reader.
In some embodiments, before the NFC controller obtains the characteristic parameters of the card reader, the method further includes: and the equipment host updates the local information base based on the cloud information base in the server.
In some embodiments, the characteristic parameters of the card reader include card reader identity information;
The card reader identity information is carried in a card searching instruction of the card reader;
or the card searching instruction of the card reader comprises a standard card searching instruction and a private card searching instruction which are alternately sent according to a preset mixing proportion, and the identity information of the card reader is carried in the private card searching instruction.
According to a second aspect of the present disclosure, there is provided an NFC device, characterized in that the NFC device includes a device host, an NFC controller, and an NFC execution environment;
the NFC controller is configured to: acquiring characteristic parameters of a card reader, and sending the characteristic parameters of the card reader to a device host;
the device host is configured to: determining corresponding application identity information based on the characteristic parameters of the card reader, and sending the application identity information to an NFC execution environment;
the NFC execution environment is configured to: and activating the target application corresponding to the application identity information, and interacting with the card reader based on the target application.
According to a third aspect of the present disclosure, there is provided a computer-readable storage medium storing program instructions that, when executed, are configured to cause a computer to perform the application running method for NFC devices provided in the first aspect of the present disclosure.
The application running method for the NFC device, the NFC device and the storage medium provided by the embodiment of the disclosure can realize the following technical effects:
According to the embodiment of the disclosure, the NFC controller is utilized to acquire the characteristic parameters of the card reader by means of the capability of the NFC controller to carry out radio frequency communication with the card reader. The characteristic parameters of different types of readers are often different, and the characteristic parameters of each type of reader are often unique. Under the condition, the device host machine can more accurately determine the target application of interaction supported by the card reader by taking the characteristic parameters of the card reader as the basis, thereby improving the accuracy of the application selection result.
The foregoing general description and the following description are exemplary and explanatory only and are not intended to limit the present disclosure.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which like reference numerals refer to similar elements, and in which:
fig. 1 is a schematic diagram of an NFC device provided by an embodiment of the present disclosure;
fig. 2 illustrates an application scenario schematic diagram of an NFC device provided by an embodiment of the present disclosure;
fig. 3 is an application running method for an NFC device provided in an embodiment of the present disclosure;
Fig. 4 is another application running method for an NFC device provided by an embodiment of the present disclosure;
fig. 5 is another application running method for an NFC device provided by an embodiment of the present disclosure;
fig. 6 is another application running method for an NFC device provided by an embodiment of the present disclosure;
fig. 7 is another application running method for an NFC device provided in an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and techniques of the disclosed embodiments can be understood in more detail, a more particular description of the embodiments of the disclosure, briefly summarized below, may be had by reference to the appended drawings, which are not intended to be limiting of the embodiments of the disclosure. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may still be practiced without these details. In other instances, well-known structures and devices may be shown simplified in order to simplify the drawing.
The terms first, second and the like in the description and in the claims of the embodiments of the disclosure and in the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe embodiments of the present disclosure. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion.
The term "plurality" means two or more, unless otherwise indicated.
In the embodiment of the present disclosure, the character "/" indicates that the front and rear objects are an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes an object, meaning that there may be three relationships. For example, a and/or B, represent: a or B, or, A and B.
The term "corresponding" may refer to an association or binding relationship, and the correspondence between a and B refers to an association or binding relationship between a and B.
NFC (Near Field Communication ) is a short-range high-frequency wireless communication technology, and devices using the NFC technology exchange data in the vicinity of each other. NFC devices include Device Hosts (DH), NFC controllers (NFCCs), and NFC execution environments (NFC Execution Environment, NFCEEs), among others.
The NFC controller is mainly responsible for communicating with other NFC devices (such as card readers) through controlling radio frequency transceiving, and can also be used as communication transfer of an NFC execution environment. The NFC execution environment is deployed with applications (such as virtual cards), and after the NFC execution environment activates the corresponding applications, the NFC execution environment interacts with other NFC devices based on the activated applications.
Under the condition that a plurality of applications are deployed in the NFC execution environment, a target application needed in the current interaction scene is needed to be selected from the plurality of applications, and after the target application is activated by the NFC execution environment, interaction is carried out with other NFC terminals based on the target application. In the related art, a device host selects a target application required in a current interaction scene from a plurality of applications based on configured card selection software, however, the card selection software in the prior art generally selects the target application required in the current interaction scene from a plurality of applications in an NFC execution environment based on electronic fence information, geographic position information and the like, and the selected target application is not suitable for the current interaction scene easily in the selection application mode, so that the accuracy of an application selection result is low, and the user experience is affected.
The embodiment of the disclosure provides an NFC device, which can improve the accuracy of application selection results. The NFC device may be a mobile terminal, a computer, etc., and the mobile device may include, for example, a cell phone, a wearable device, a virtual reality device, etc., or any combination thereof, where the wearable device includes, for example: smart watches, smart bracelets, pedometers, etc.
As shown in connection with fig. 1, the NFC Device 100 includes a Device Host 101 (DH), an NFC Controller 102 (NFCC), and an NFC execution environment 103 (NFC Execution Environment, NFCEE), where the NFC Controller 102 is communicatively connected to the Device Host 101 and the NFC execution environment 103 through respective interfaces, respectively.
The device host 101 may execute a set of control programs, such as NFC Service programs, for controlling the operation of the NFC controller 102. The control program encapsulates the capability to control the NFC controller 102, provides a software interface for upper layer application software to control the NFC controller 102, and communicates directly with the NFC controller 102 through a hardware interface.
The operation modes of the NFC controller 102 include a Spy mode and a card analog mode. In the case where the NFC controller 102 is operating in the Spy mode, the NFC controller 102 only listens for signals from the Reader 200 (NFC Reader), but does not respond. In the case where the NFC controller 102 is operating in the card emulation mode, the NFC controller 102 listens for signals from the reader 200 and responds according to the interoperation protocol to complete the complete card emulation function.
One or more applications are deployed in the NFC execution environment 103, and the applications deployed in the NFC execution environment 103 may be virtual cards, such as bank cards, bus cards, subway cards, entrance cards, attendance cards, membership cards, parking cards, elevator cards, and the like.
The NFC execution environment 103 and the NFC controller 102 may be separate and connected through a physical interface, and the NFC execution environment 103 and the NFC controller 102 may be physically integrated. The NFC execution environment 103 enables communication with the card reader 200 through the NFC controller 102 based on the running application, thereby performing an interaction procedure with the card reader 200.
Fig. 2 shows a schematic diagram of an application scenario of the NFC device 100 provided in an embodiment of the present disclosure, where the application scenario includes the NFC device 100 and the card reader 200 as shown in fig. 2. The controller in NFC device 100 may be in radio frequency communication with reader 200. The NFC execution environment 103 may interact with the reader 200 in case of running an application.
Specifically, the NFC controller 102 may acquire the feature parameters of the card reader 200 and send the feature parameters to the device host 101, where the device host 101 determines corresponding application identity information based on the feature parameters of the card reader 200, so as to instruct the NFC execution environment 103 to activate a target application corresponding to the application identity information, so that the NFC execution environment 103 can interact with the card reader 200 based on the target application. Optionally, the application identity information comprises an application identifier (Application Identifier, AID).
In some embodiments, the device host 101 maintains a local information base, where the local information base includes one or more sets of feature parameters and application identity information that have a mapping relationship. The characteristic parameters in the local information repository refer to characteristic parameters of the card reader 200, and the application identity information in the local information repository refers to identity information for applications deployed in the NFC execution environment 103 of the NFC device 100. It should be noted that, for a set of feature parameters and application identity information having a mapping relationship, the card reader 200 having the feature parameters therein may interact with an application indicated by the application identity information mapped by the feature parameters.
In some embodiments, the information in the local information repository may be written by a user into the device host 101. Alternatively, the information in the local information repository may be sent by other devices to the device host 101.
In some embodiments, the application scenario shown in fig. 2 includes a server 300, where the server 300 maintains a cloud information base, and the cloud information base includes one or more sets of feature parameters and application identity information that have a mapping relationship. The characteristic parameters in the cloud information base refer to characteristic parameters of the card reader 200, and the application identity information in the cloud information base refers to identity information of an application deployed in the NFC execution environment 103 of the NFC device 100.
The server 300 may send information in the cloud information base (such as feature parameters with mapping relation and application identity information) to the device host 101, and the device host 101 stores the received information in the local information base.
Optionally, the Server 300 is deployed with a set of service software (Server), and the cloud information base is managed by the service software. The device host 101 of the NFC device 100 is deployed with a Client program (Client) that is compatible with the service software. The service software may provide the ability to maintain (e.g., update data, manage, authorize, etc.) cloud databases while providing data querying and synchronization services for client programs.
The service software provides an interface for updating and maintaining the cloud database, and also provides an interface for accessing the cloud database by the client program. The client program in the device host 101 may communicate with the service software in the server 300 by way of a combination of one or more communication means including, but not limited to, mobile communication network, bluetooth, wireless internet access (Wireless Fidelity, wi-Fi), etc.
The client program in the device host 101 may periodically or aperiodically synchronize information (such as feature parameters and application identity information having a mapping relationship) pulled from a cloud database maintained by the service software of the server 300 to a local information base. The service software of the server 300 may also actively push information (e.g., feature parameters and application identity information having a mapping relationship) to the client program in the device host 101 to enable the client program to synchronize the information to the local information repository.
Here, in fig. 1 and 2, the connection lines in solid lines represent physical communication interfaces, and the connection lines in solid lines represent logical communication paths. The following describes an application running method for an NFC device provided in an embodiment of the present disclosure in connection with the NFC device shown in fig. 1 and fig. 2.
In conjunction with the NFC device shown in fig. 1 and fig. 2, an embodiment of the present disclosure provides an application running method for an NFC device, as shown in fig. 3, where the application running method for an NFC device includes the following steps:
s301, the NFC controller obtains characteristic parameters of the card reader and sends the characteristic parameters of the card reader to the equipment host.
Here, the characteristic parameters of different types of card readers are typically different, and the characteristic parameters of each type of card reader are typically unique. The characteristic parameters of the card reader are obtained by analyzing radio frequency signals generated by the card reader through the NFC controller. In particular, the NFC controller may be in radio frequency communication with the reader when the NFC device is in proximity to the reader. The NFC controller collects radio frequency signals of the card reader during communication with the card reader, obtains characteristic parameters of the card reader based on the collected information, and sends the obtained characteristic parameters to the equipment host.
In some embodiments, the device host may control the NFC controller to operate in the Spy mode, collect radio frequency signals of the card reader in the Spy mode, obtain feature parameters of the card reader based on the collected information, and send the obtained feature parameters to the device host.
S302, the equipment host determines corresponding application identity information based on the characteristic parameters of the card reader, and sends the application identity information to the NFC execution environment.
The application identity information refers to identity information for an application deployed in an NFC execution environment of the NFC device. It will be appreciated that each card reader supports interaction with a corresponding application. For example, the bus reader at land A may support interaction with a virtual bus card at land A, or the access reader at land B may support interaction with a virtual access card at land B. The embodiment of the disclosure can correlate the characteristic parameters of the card reader with the application identity information of the application supported by the card reader in advance, and in this case, the corresponding application identity information can be determined based on the characteristic parameters of the card reader.
In some embodiments, the device host is deployed with a local information base, where the local information base includes one or more sets of feature parameters and application identity information that have a mapping relationship. The device host can determine application identity information corresponding to the characteristic parameters of the card reader in the local information base.
In some embodiments, the server is deployed with a cloud information base, where the cloud information base includes one or more sets of feature parameters and application identity information that have a mapping relationship. The device host can send the characteristic parameters of the card reader to the server, the server determines application identity information corresponding to the characteristic parameters of the card reader in the cloud information base, and then the determined application identity information is returned to the device host.
In some embodiments, after determining the application identity information, the device host sends the application identity information to the NFC controller, which forwards the application identity information to the NFC execution environment.
S303, activating a target application corresponding to the application identity information by the NFC execution environment, and interacting with a card reader based on the target application.
For ease of understanding and description, embodiments of the present disclosure define an application indicated by application identity information determined by a host device as a target application. It will be appreciated that the reader supports interaction with the target application. After receiving the application identity information, the NFC execution environment determines a target application corresponding to the application identity information and activates the target application. And under the condition that the target application is in an activated state, the NFC execution environment communicates with the card reader through the NFC controller, and interacts with the card reader based on the target application.
In some embodiments, in a case that the target application is activated, the device host controls the NFC controller to operate in the card emulation mode, and the NFC controller interacts with the card reader to complete radio frequency link activation, so that the NFC execution environment can communicate with the card reader through the NFC controller. The NFC controller may forward the application layer instructions subsequently sent by the card reader to the NFC execution environment so that the NFC execution environment interacts with the card reader based on the target application and the application layer instructions.
According to the application running method for the NFC equipment, the NFC controller is utilized to acquire the characteristic parameters of the card reader by means of the capability that the NFC controller can conduct radio frequency communication with the card reader. The characteristic parameters of different types of readers are often different, and the characteristic parameters of each type of reader are often unique. Under the condition, the device host machine can more accurately determine the target application of interaction supported by the card reader by taking the characteristic parameters of the card reader as the basis, thereby improving the accuracy of the application selection result.
In some embodiments, the NFC controller obtains a characteristic parameter of the card reader, including: the NFC controller records radio frequency event log information of the card reader during communication with the card reader; the NFC controller determines characteristic parameters of the card reader based on the radio frequency event log information. The radio frequency event log information comprises various types of events of the card reader during communication, and based on the radio frequency event log information, characteristic parameters of multiple dimensions of the card reader can be more comprehensively analyzed, so that reliability of the characteristic parameters is improved, and the characteristic parameters can be more accurately characterized by the characteristics of the card reader.
In some embodiments, the device host determines corresponding application identity information based on the feature parameters of the card reader, including: the equipment host determines application identity information corresponding to the characteristic parameters of the card reader in a local information base, wherein the local information base comprises one or more groups of characteristic parameters with mapping relation and application identity information. The local information base is preset in the equipment host, and the application identity information corresponding to the characteristic parameters of the card reader can be accurately and rapidly determined based on the matching of the characteristic parameters of the card reader and the characteristic parameters in the local information base, so that the efficiency of determining the application identity information is improved.
In connection with the NFC device shown in fig. 1 and fig. 2, another application running method for an NFC device is provided in an embodiment of the present disclosure, as shown in fig. 4, where the application running method for an NFC device includes the following steps:
s401, the NFC controller records radio frequency event log information of the card reader during communication with the card reader.
In some embodiments, the radio frequency event log information includes at least one of: original working time information of the radio frequency carrier wave, original attribute information of the polling instruction and the card searching instruction.
Optionally, the original working time information of the radio frequency carrier includes at least one of a time stamp of starting to transmit the radio frequency carrier of the reader and a time stamp of stopping transmission of the radio frequency carrier of the reader.
Optionally, the original attribute information of the polling instructions includes at least one of a timestamp of each polling instruction received, a type of modem technology employed by each polling instruction, a type of each polling instruction, and a parameter of each polling instruction.
S402, the NFC controller determines characteristic parameters of the card reader based on the radio frequency event log information.
In some embodiments, the characteristic parameters of the card reader include at least one of: working time information of a radio frequency field, working characteristic information of a polling instruction and card reader identity information.
Optionally, the NFC controller may determine the working time information of the radio frequency field based on the original working time information of the radio frequency carrier. The on-time information of the rf field includes at least one of a duration of turning on the rf field to turning off the rf field, and a sustain time of turning off the rf field.
Optionally, the NFC controller may determine the operating characteristic information of the polling command based on the original attribute information of the polling command. The operational characteristic information of the polling command includes at least one of a time interval from when the radio frequency field is turned on to when the first polling command is transmitted, a type of modem technology used by the first polling command, a total number of types of modem technologies of the polling command, a time interval between the plurality of polling commands, and a transmission order of the type of modem technology corresponding to the polling command.
It should be noted that, the card reader identity information is used to identify the type of the card reader, and the card reader identity information may be a unique identification within a specific use range, such as global unique, industry unique, etc. The card reader identity information may contain one or more of, for example, a manufacturer code, a device operator code, an identification code of an application currently being used by the device, etc.
Optionally, the NFC controller may determine card reader identity information based on the card seeking instruction.
The card seeking instruction is REQA/WUPA, REQB, etc. defined by industry standards. In some embodiments, the software protocol of the card reader may be modified to add card reader identity information to the original card seeking instruction of the software protocol. That is, the card reader identity information in the embodiment of the disclosure is carried in the card searching instruction of the card reader. Specifically, the embodiment of the disclosure may additionally add N bytes of card reader identity information after a standard card searching instruction, where N is an integer not less than 1, and the specific value of N depends on the data of the card reader type. Under the condition that the card reader identity information is carried in a card searching instruction of the card reader, the NFC controller can extract the card reader identity information from the card searching instruction of the card reader.
In some embodiments, the embodiments of the present disclosure may modify a software protocol of a card reader, and add a private card-seeking instruction to the software protocol on the basis that the software protocol includes a standard card-seeking instruction, where card reader identity information is carried in the private card-seeking instruction. That is, in some embodiments, the card-seeking instruction of the card reader includes a standard card-seeking instruction and a private card-seeking instruction, where the standard card-seeking instruction includes unchanged information, and the private card-seeking instruction carries the card-reader identity information.
When the NFC controller is communicated with the card reader, the card reader alternately sends standard card searching instructions and private card searching instructions according to a preset mixing proportion. For example, the mixing ratio may be 3: and 1, after each card reader continuously transmits 3 standard card searching instructions, transmitting 1 private card searching instruction. Under the condition that the card reader identity information is carried in a private card searching instruction of the card reader, the NFC controller can extract the card reader identity information from the private card searching instruction of the card reader.
S403, the NFC controller sends the characteristic parameters of the card reader to the device host.
S404, the equipment host determines corresponding application identity information based on the characteristic parameters of the card reader, and sends the application identity information to the NFC execution environment.
S405, activating a target application corresponding to the application identity information by the NFC execution environment, and interacting with a card reader based on the target application.
In connection with the NFC device shown in fig. 1 and fig. 2, an embodiment of the present disclosure provides an application running method for an NFC device, as shown in fig. 5, including the following steps:
s501, the NFC controller acquires the characteristic parameters of the card reader and sends the characteristic parameters of the card reader to the equipment host.
S502, the equipment host determines application identity information corresponding to the characteristic parameters of the card reader in a local information base.
According to the embodiment of the disclosure, a local information base is preset in a device host, characteristic parameters of a card reader are matched with characteristic parameters in the local information base, and target characteristic parameters matched with the characteristic parameters of the card reader are determined in the local information base. And determining the application identity information with the association relation with the target characteristic parameters as the application identity information corresponding to the characteristic parameters of the card reader.
S503, the device host sends the application identity information to the NFC execution environment.
S504, activating a target application corresponding to the application identity information by the NFC execution environment, and interacting with a card reader based on the target application.
In some embodiments, the characteristic parameters of the reader include reader identity information and other characteristic information, wherein the other characteristic information includes at least one of operating time information of the radio frequency field, operating characteristic information of the polling instruction.
The equipment host determines application identity information corresponding to the characteristic parameters of the card reader in a local information base, and comprises the following steps: the equipment host matches the card reader identity information with characteristic parameters contained in the local information base; under the condition that the equipment host is matched with a first target characteristic parameter containing card reader identity information from a local information base, determining application identity information with a mapping relation with the first target characteristic parameter as application identity information corresponding to the characteristic parameter of the card reader; under the condition that the equipment host is not matched with the first target characteristic parameters containing card reader identity information from the local information base, matching other characteristic information with the characteristic parameters contained in the local information base; under the condition that the equipment host determines a second target characteristic parameter meeting a preset matching condition from the local information base, determining application identity information with a mapping relation with the second target characteristic parameter as application identity information corresponding to the characteristic parameter of the card reader.
Because the card reader identity information has determined uniqueness, the card reader identity information is preferentially matched with the characteristic parameters in the local information base, so that the application identity information corresponding to the characteristic parameters of the card reader can be accurately and rapidly determined, and the efficiency of determining the application identity information is improved. Under the condition that the application identity information is not determined based on the card reader identity information, matching is continuously carried out on the basis of other characteristic information of the card reader and characteristic parameters in a local information base, so that the application identity information is matched in other dimensions, and the subsequent interaction flow can be started normally.
In conjunction with the NFC device shown in fig. 1 and fig. 2, an embodiment of the present disclosure provides an application running method for an NFC device, as shown in fig. 6, where the application running method for an NFC device includes the following steps:
s601, the NFC controller acquires card reader identity information and other characteristic information of a card reader, and sends the card reader identity information and the other characteristic information to the equipment host.
S602, the equipment host matches the card reader identity information with the characteristic parameters contained in the local information base.
In S602, the device host determines whether each feature parameter of the local information base includes card reader identity information of the current card reader. For ease of understanding and description, embodiments of the present disclosure define a feature parameter that includes card reader identity information of a current card reader as a first target feature parameter. After S602, S603 or S604 may be performed.
S603, under the condition that the equipment host is matched with the first target characteristic parameter containing the card reader identity information from the local information base, determining the application identity information with the mapping relation with the first target characteristic parameter as the application identity information corresponding to the characteristic parameter of the card reader.
After S603, S606 is executed.
And S604, under the condition that the device host does not match the first target characteristic parameters containing the card reader identity information from the local information base, matching other characteristic information with the characteristic parameters contained in the local information base.
S605, under the condition that the equipment host determines a second target characteristic parameter meeting a preset matching condition from the local information base, determining application identity information with a mapping relation with the second target characteristic parameter as application identity information corresponding to the characteristic parameter of the card reader.
For ease of understanding and description, the embodiments of the present disclosure define the feature parameters that meet the preset matching conditions as the second target feature parameters.
Here, the preset matching condition may be determined according to an actual design. For example, in the process of matching other feature information with feature parameters contained in the local information base, matching scores of the other feature information with each feature parameter in the local information base may be determined. The preset matching condition may be that the matching score is the largest, or the matching score is greater than a preset matching score threshold. It will be appreciated that the closer the other feature information is to a particular feature parameter, the greater the matching score of the other feature information to that feature parameter.
It will be appreciated that other characteristic information includes one or more items of sub-characteristic information. For example, the sub-feature information may be the operating time information of the radio frequency field, the operating feature information of the polling command. Alternatively, the sub-feature information may be a duration of turning on the rf field to turning off the rf field, a duration of turning off the rf field, a time interval of turning on the rf field to transmitting the first polling command, a type of modem technology used by the first polling command, a total number of types of modem technologies of the polling command, a time interval between the polling commands, a transmission order of the types of modem technologies corresponding to the polling command, and the like.
In the process of matching other characteristic information with the characteristic parameters contained in the local information base, for each characteristic parameter in the local information base, the matching sub-scores of the other characteristic information and the characteristic parameters in the local information base can be determined, and the matching scores of the other characteristic information and the characteristic parameters in the local information base are determined based on the matching sub-scores.
Alternatively, the sum of the matching sub-scores of the respective sub-feature information may be used as the matching score of the other feature information with the feature parameters in the local information base.
Optionally, a corresponding weight may be set for each piece of sub-feature information, the sub-feature information is matched with the sub-score and the weight thereof to determine a weighted average, and the weighted average is used as the matching score of other piece of feature information and the feature parameters in the local information base.
After S605, S606 is executed.
S606, the device host sends the application identity information to the NFC execution environment.
S607, the NFC execution environment activates a target application corresponding to the application identity information, and interacts with the card reader based on the target application.
In some embodiments, before the NFC controller obtains the characteristic parameters of the card reader, the method further includes: and the equipment host updates the local information base based on the cloud information base in the server.
In conjunction with the NFC device shown in fig. 1 and fig. 2, an embodiment of the present disclosure provides an application running method for an NFC device, as shown in fig. 7, where the application running method for an NFC device includes the following steps:
s701, the equipment host updates a local information base based on the cloud information base in the server.
Optionally, the client program in the device host synchronizes the information (such as the feature parameters with the mapping relationship and the application identity information) from the cloud database maintained by the service software of the server to the local information base, so as to complete updating the local information base.
Optionally, the service software of the server may actively push information (such as feature parameters with mapping relation and application identity information) in the cloud information base to the client program in the device host, so that the client program synchronizes the information to the local information base.
S702, the NFC controller obtains the characteristic parameters of the card reader and sends the characteristic parameters of the card reader to the equipment host.
S703, the equipment host determines application identity information corresponding to the characteristic parameters of the card reader in the local information base.
S704, the device host sends the application identity information to the NFC execution environment.
S705, activating a target application corresponding to the application identity information by the NFC execution environment, and interacting with a card reader based on the target application.
In some embodiments, the NFC device further comprises a memory (not shown in the figures). The device host may invoke logic instructions in the memory to perform the application running method for the NFC device of the corresponding embodiment described above. The NFC controller may invoke logic instructions in the memory to perform the application running method for the NFC device of the corresponding embodiment described above. The NFC execution environment may call logic instructions in the memory to perform the application running method for the NFC device of the above-described respective embodiments.
The logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product.
The memory is used as a computer readable storage medium for storing a software program, a computer executable program, and program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor executes the functional application and the data processing by executing the program instructions/modules stored in the memory, that is, implements the application running method for the NFC device of the above corresponding embodiment.
The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the terminal device, etc. Further, the memory may include a high-speed random access memory, and may also include a nonvolatile memory.
Embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions configured to perform the above-described application running method for an NFC device.
Embodiments of the present disclosure may be embodied in a software product stored on a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of a method according to embodiments of the present disclosure. While the aforementioned storage medium may be a non-transitory storage medium, such as: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, or the like, which can store program codes.
The above description and the drawings illustrate embodiments of the disclosure sufficiently to enable those skilled in the art to practice them. Other embodiments may involve structural, logical, electrical, process, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in, or substituted for, those of others. Moreover, the terminology used in the present disclosure is for the purpose of describing embodiments only and is not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a," "an," and "the" (the) are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this disclosure is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, when used in this disclosure, the terms "comprises," "comprising," and/or variations thereof, mean the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising one …" does not exclude the presence of other like elements in a process, method or apparatus comprising such elements. In this context, each embodiment may be described with emphasis on the differences from the other embodiments, and the same similar parts between the various embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method sections disclosed in the embodiments, the description of the method sections may be referred to for relevance.
Those of skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. The skilled artisan may use different methods for each particular application to achieve the described functionality, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the embodiments disclosed herein, the disclosed methods, articles of manufacture (including but not limited to devices, apparatuses, etc.) may be practiced in other ways. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the units may be merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form. The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to implement the present embodiment. In addition, each functional unit in the embodiments of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than that disclosed in the description, and sometimes no specific order exists between different operations or steps. For example, two consecutive operations or steps may actually be performed substantially in parallel, they may sometimes be performed in reverse order, which may be dependent on the functions involved. Each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (8)

1. An application running method for an NFC device, where the NFC device includes a device host, an NFC controller, and an NFC execution environment, and the method is characterized by comprising:
the NFC controller acquires characteristic parameters of a card reader and sends the characteristic parameters of the card reader to the equipment host;
the equipment host determines corresponding application identity information based on the characteristic parameters of the card reader and sends the application identity information to the NFC execution environment;
the NFC execution environment activates a target application corresponding to the application identity information, and interacts with the card reader based on the target application;
the characteristic parameters of the card reader comprise card reader identity information;
the card reader identity information is carried in a standard card searching instruction of the card reader; or the card searching instruction of the card reader comprises a standard card searching instruction and a private card searching instruction which are alternately sent according to a preset mixing proportion, and the identity information of the card reader is carried in the private card searching instruction;
the equipment host determines corresponding application identity information based on the characteristic parameters of the card reader, and the equipment host comprises: the equipment host matches the card reader identity information with characteristic parameters contained in a local information base, wherein the local information base contains one or more groups of characteristic parameters with mapping relation and application identity information; and under the condition that the equipment host is matched with the first target characteristic parameter containing the identity information of the card reader from the local information base, determining the application identity information with the mapping relation with the first target characteristic parameter as the application identity information corresponding to the characteristic parameter of the card reader.
2. The application running method according to claim 1, wherein the NFC controller obtains characteristic parameters of a card reader, including:
the NFC controller records radio frequency event log information of a card reader during communication with the card reader;
and the NFC controller determines characteristic parameters of the card reader based on the radio frequency event log information.
3. The application running method according to claim 2, wherein the radio frequency event log information includes at least one of: original working time information of the radio frequency carrier wave, original attribute information of the polling instruction and the card searching instruction.
4. The application running method according to claim 2, wherein the characteristic parameters of the card reader include at least one of: operating time information of the radio frequency field and operating characteristic information of the polling command.
5. The application running method according to any one of claims 1 to 4, wherein the characteristic parameters of the card reader include card reader identity information and other characteristic information; the equipment host determines corresponding application identity information based on the characteristic parameters of the card reader, and the equipment host comprises:
the equipment host matches the card reader identity information with characteristic parameters contained in the local information base;
Under the condition that the equipment host is matched with a first target characteristic parameter containing the identity information of the card reader from the local information base, determining the application identity information with a mapping relation with the first target characteristic parameter as the application identity information corresponding to the characteristic parameter of the card reader;
under the condition that the equipment host does not match with the first target characteristic parameters containing the card reader identity information from the local information base, matching the other characteristic information with the characteristic parameters contained in the local information base;
and under the condition that the equipment host determines a second target characteristic parameter meeting a preset matching condition from the local information base, determining application identity information with a mapping relation with the second target characteristic parameter as application identity information corresponding to the characteristic parameter of the card reader.
6. The application running method according to any one of claims 1 to 4, further comprising, before the NFC controller acquires the characteristic parameters of the card reader: and the equipment host updates the local information base based on the cloud information base in the server.
7. An NFC device, comprising: the NFC device comprises a device host, an NFC controller and an NFC execution environment;
The NFC controller is configured to: acquiring characteristic parameters of a card reader, and sending the characteristic parameters of the card reader to the equipment host;
the device host is configured to: determining corresponding application identity information based on the characteristic parameters of the card reader, and sending the application identity information to the NFC execution environment;
the NFC execution environment is configured to: activating a target application corresponding to the application identity information, and interacting with the card reader based on the target application;
the characteristic parameters of the card reader comprise card reader identity information;
the card reader identity information is carried in a card searching instruction of the card reader; or the card searching instruction of the card reader comprises a standard card searching instruction and a private card searching instruction which are alternately sent according to a preset mixing proportion, and the identity information of the card reader is carried in the private card searching instruction;
the determining the corresponding application identity information based on the characteristic parameters of the card reader comprises the following steps: the equipment host matches the card reader identity information with characteristic parameters contained in a local information base, wherein the local information base contains one or more groups of characteristic parameters with mapping relation and application identity information; and under the condition that the equipment host is matched with the first target characteristic parameter containing the identity information of the card reader from the local information base, determining the application identity information with the mapping relation with the first target characteristic parameter as the application identity information corresponding to the characteristic parameter of the card reader.
8. A computer-readable storage medium storing program instructions that, when executed, cause a computer to perform the application running method for an NFC device according to any one of claims 1 to 6.
CN202311413165.7A 2023-10-30 2023-10-30 Application running method for NFC device, NFC device and storage medium Active CN117155427B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311413165.7A CN117155427B (en) 2023-10-30 2023-10-30 Application running method for NFC device, NFC device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311413165.7A CN117155427B (en) 2023-10-30 2023-10-30 Application running method for NFC device, NFC device and storage medium

Publications (2)

Publication Number Publication Date
CN117155427A CN117155427A (en) 2023-12-01
CN117155427B true CN117155427B (en) 2024-02-23

Family

ID=88906440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311413165.7A Active CN117155427B (en) 2023-10-30 2023-10-30 Application running method for NFC device, NFC device and storage medium

Country Status (1)

Country Link
CN (1) CN117155427B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312934A (en) * 2021-05-26 2021-08-27 维沃移动通信有限公司 NFC analog card selection method and device, electronic equipment and storage medium
CN114363869A (en) * 2020-10-13 2022-04-15 恩智浦有限公司 NFC device and operation method thereof
CN114928828A (en) * 2022-05-07 2022-08-19 Oppo广东移动通信有限公司 Scene recognition method, device, terminal and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8342415B2 (en) * 2010-03-17 2013-01-01 Inside Secure Method of conducting a transaction using an NFC device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363869A (en) * 2020-10-13 2022-04-15 恩智浦有限公司 NFC device and operation method thereof
CN113312934A (en) * 2021-05-26 2021-08-27 维沃移动通信有限公司 NFC analog card selection method and device, electronic equipment and storage medium
CN114928828A (en) * 2022-05-07 2022-08-19 Oppo广东移动通信有限公司 Scene recognition method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN117155427A (en) 2023-12-01

Similar Documents

Publication Publication Date Title
CN105472546B (en) Near field communication method and mobile terminal
CN106100721A (en) Method, server, remote controller and the system that unmanned plane and remote controller are matched
CN102882944A (en) Information processing method, priority level information sending method and devices
CN105657644B (en) A kind of data main card setting method and terminal
CN108781342A (en) Virtual SIM card distribution, the method and relevant device for accessing network
CN113050735B (en) Method and device for controlling wine cabinet and intelligent wine cabinet
JP2002312145A5 (en)
CN105591672A (en) NFC-based communication method and device
CN110912805B (en) Message reading state synchronization method, terminal, server and system
CN103701653A (en) Processing method for interface hot plugging and unplugging configuration data and network configuration server
CN110276243A (en) Score mapping method, face comparison method, device, equipment and storage medium
CN111063183B (en) Bluetooth-based electric energy meter statistical method and device and storage medium
CN117155427B (en) Application running method for NFC device, NFC device and storage medium
CN112910741B (en) Interface testing method and device, computer equipment and storage medium
CN110275913A (en) Data furnishing method, device and storage medium and electronic device
CN108805512B (en) Attendance information recording method, equipment and system thereof
CN106375551B (en) Information interaction method, device and terminal
CN103379015A (en) Website server and IM client data transmission method, apparatus and system
CN104717599A (en) NFC event reporting method for mobile terminal and device
CN114513380B (en) Method and device for controlling household electrical appliance, household electrical appliance and storage medium
CN111161732B (en) Voice acquisition method and device, electronic equipment and storage medium
CN115687223A (en) Method and device for serial port communication of embedded equipment, embedded equipment and storage medium
KR20180011609A (en) System for providing treasure based of Augmented Reality, and method for providing real treasure using the same
CN107666495B (en) Disaster recovery method and terminal for application
CN112491986B (en) Method, device and system for distributing commands in distributed system

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