Card reading and distributing method and device and mobile phone
By generating a list of application identification requirements and matching it with the application identification supported by the target card, the problem of insufficiently accurate card reading distribution in the IsoDep protocol NFC card in the prior art is solved, and a more accurate card reading distribution and a better card reading experience are achieved.
Patent Information
- Application Number
- CN202411796499.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-28
AI Technical Summary
In the prior art, the NFC card reading distribution of the IsoDep protocol is not accurate enough to accurately distribute card reading events to applications that support the corresponding protocol.
By collecting the application identification requirements of card reader applications, generating a list of application identification requirements, when identifying the target card, determine the application identification supported by the target card, and match the requirements of the card reader application to ensure that the target card is distributed to applications that support their application identification.
It realizes more accurate card reading distribution of IsoDep protocol NFC cards, ensuring that the target card reading application can handle card reading events of the target card, and improves the card reading experience.
Smart Images

Figure CN119721083A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of card reading and distributing systems, for example, to a method and device for card reading and distributing, and a mobile phone. Background Art
[0002] At present, NFC (Near Field Communication) cards are widely used in the market. Most of the bus cards and bank cards used in daily life are NFC cards with the IsoDep (ISO Dependency) protocol, and even some high-end access control systems use IsoDep cards. The IsoDep protocol refers to a communication protocol based on the ISO / IEC 14443-4 standard. Different software can be installed on Android phones to read and trade IsoDep cards, such as using mobile phones to recharge bus cards and swipe cards at MPOS (mobile POS), which greatly facilitates daily life. However, generally, there is more than one card reading application installed on an Android phone. After reading an NFC card, the Android system has a card reading distribution system to decide which application to distribute the card reading event to.
[0003] Android's native card reader distribution mechanism includes a foreground scheduling system and a tag scheduling system. The foreground scheduling system and the tag scheduling system identify the card type mainly based on the NDEF (NFC Data Exchange Format) data type in the card and the card technology protocol type. NDEF matching distribution is prioritized, and then distribution is performed based on the card technology protocol type. Currently supported technology protocol types include: NfcA, NfcB, NfcF, NfcV, IsoDep, Ndef, NdefFormatable, MifareClassic, and MifareUltralight.
[0004] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in the related art:
[0005] For NFC cards with the IsoDep protocol, if the card reader application wants to read IsoDep cards, it needs to add IsoDep to the tech-list when registering with the NFC distribution system. However, since the IsoDep type is still too broad, accurate card reading distribution cannot be achieved.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0007] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0008] The embodiments of the present disclosure provide a method and device for card reading and distribution, and a mobile phone to achieve more accurate card reading and distribution.
[0009] In some embodiments, a method for card reader distribution includes: collecting the card reader application's requirements for application identifiers and generating an application identifier requirement list; when a target card is identified, determining the application identifiers supported by the target card in the application identifier requirement list; matching the application identifiers supported by the target card with the card reader application's requirements for application identifiers to determine the target card reader application; and distributing the target card to the target card reader application.
[0010] Optionally, collecting the card reader application's requirements for application identifiers and generating an application identifier requirement list includes: obtaining the application identifiers that each card reader application declares needs to support; and generating the application identifier requirement list based on all obtained application identifiers.
[0011] Optionally, the application identifiers that the card needs to support are declared in the card reading application in the following manner: in the tag scheduling system, a setting tag is used to declare the application identifiers that the card needs to support; and in the foreground scheduling system, an extended API (Application Programming Interface) interface is called to set the application identifiers that the card needs to support.
[0012] Optionally, a setting tag is used to declare the application identifiers that the card needs to support, including: defining a technology list during the card reading type registration process of the card reading application; setting a setting tag when declaring that the card needs to support multiple application identifiers at the same time, the setting tag includes multiple elements, each element defines an application identifier; or, when declaring that the card only needs to support one of multiple application identifiers, setting multiple setting tags, each setting tag includes an element, and each element defines an application identifier.
[0013] Optionally, the application identifiers supported by the target card are determined in the application identifier requirement list, including: performing select interactions with the target card for each application identifier in the application identifier requirement list; obtaining the select interaction results of the target card for each application identifier; and determining that all application identifiers with successful select interactions are application identifiers supported by the target card.
[0014] Optionally, each application identifier in the application identifier requirement list is selected and interacted with the target card respectively, including: generating a select command corresponding to each application identifier according to each application identifier in the application identifier requirement list; sending each select command to the target card through the NFC service, so that the target card checks whether the application identifier in the select command matches the target card.
[0015] Optionally, the application identifier supported by the target card is matched with the card reader application's requirement for the application identifier to determine the target card reader application, including: determining the application identifier required by each card reader application; when the application identifier supported by the target card includes the application identifier required by the card reader application, determining that the card reader application is successfully matched; and determining the target card reader application among the successfully matched card reader applications.
[0016] Optionally, determining the target card reader application among the successfully matched card reader applications includes: when only one card reader application is successfully matched, determining the card reader application as the target card reader application; or, when multiple card reader applications are successfully matched, popping up a selection box including multiple successfully matched card reader applications, and determining the target card reader application based on the user's selection.
[0017] In some embodiments, the device for card reading and dispensing includes a processor and a memory storing program instructions, and the processor is configured to execute the method for card reading and dispensing as described above when running the program instructions.
[0018] In some embodiments, the mobile phone includes: a mobile phone body, including a card reader distribution system; a device for card reader distribution as described above, which is installed on the mobile phone body and connected to the card reader distribution system.
[0019] The method, device, and mobile phone for card reading and distribution provided by the embodiments of the present disclosure can achieve the following technical effects:
[0020] In the disclosed embodiment, when the NFC service is started, it will scan and collect the application identifiers required by all card reading applications and generate and save a list of application identifier requirements, which includes the application identifier information required by all card reading applications. When the target card is identified, the application identifier supported by the target card will be determined first, and then the application identifier supported by the target card will be matched with the application identifier requirements of the card reading application to determine the target card reading application. Therefore, the target card distributed to the target card reading application can support the application identifier required by the target card reading application, thereby ensuring that the target card reading application can process the card reading event of the target card, thereby achieving more accurate card reading distribution.
[0021] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:
[0023] Figure 1 is a schematic diagram of a method for card reading and distribution provided by an embodiment of the present disclosure;
[0024] Figure 2 is a schematic diagram of another method for card reading and distribution provided by an embodiment of the present disclosure;
[0025] Figure 3 is a schematic diagram of another method for card reading and distribution provided by an embodiment of the present disclosure;
[0026] Figure 4 is a schematic diagram of another method for card reading and distribution provided by an embodiment of the present disclosure;
[0027] Figure 5 is a schematic diagram of another method for card reading and distribution provided by an embodiment of the present disclosure;
[0028] Figure 6 It is a schematic diagram of a device for card reading and distribution provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0030] The terms "first", "second", etc. in the technical solutions described in this application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the disclosed embodiments described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0031] Unless otherwise stated, the term "plurality" means two or more.
[0032] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0033] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0034] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0035] Combination Figure 1 As shown, the embodiment of the present disclosure provides a method for card reading and distribution, the execution subject of the method may be a processor, and the method includes:
[0036] S001, the processor collects the requirements of the card reading application for the application identification, and generates an application identification requirement list.
[0037] S002: When the processor identifies the target card, it determines the application identifiers supported by the target card in the application identifier requirement list.
[0038] S003, the processor matches the application identifier supported by the target card with the requirement of the card reading application for the application identifier, and determines the target card reading application.
[0039] S004, the processor distributes the target card to the target card reading application.
[0040] In the disclosed embodiment, when the NFC service is started, it will scan and collect the application identifiers required by all card reading applications and generate and save a list of application identifier requirements, which includes the application identifier information required by all card reading applications. When the target card is identified, the application identifier supported by the target card will be determined first, and then the application identifier supported by the target card will be matched with the application identifier requirements of the card reading application to determine the target card reading application. Therefore, the target card distributed to the target card reading application can support the application identifier required by the target card reading application, thereby ensuring that the target card reading application can process the card reading event of the target card, thereby achieving more accurate card reading distribution.
[0041] Optionally, the target card includes an NFC card supporting the IsoDep protocol.
[0042] Optionally, collecting the card reader application's requirements for application identifiers and generating an application identifier requirement list includes: obtaining the application identifiers that each card declared by the card reader application needs to support; and generating the application identifier requirement list based on all obtained application identifiers.
[0043] Combination Figure 2 As shown, the embodiment of the present disclosure provides another method for card reading and distribution, including:
[0044] S101, the processor obtains the application program identifiers that each card reader application declares to support.
[0045] S102: The processor generates an application program identification requirement list according to all acquired application program identifications.
[0046] S103: When the target card is identified, the processor determines the application identifiers supported by the target card in the application identifier requirement list.
[0047] S104: The processor matches the application identifier supported by the target card with the requirement of the card reading application for the application identifier, and determines the target card reading application.
[0048] S105: The processor distributes the target card to the target card reading application.
[0049] In this embodiment, the application ID (Applet ID, AID) is a unique identifier of the Java Card application, which can identify and manage different applications on the smart card, wherein Applet is a small application program written in the Java programming language. When the card reader application needs to interact with a specific application on the smart card, it will select the application by sending an instruction containing the application ID. Therefore, in the card reader application, it is necessary to declare the application ID that the card needs to support, so that the card reader application can generate and send instructions corresponding to the application ID.
[0050] Optionally, the application identifiers that the card needs to support are declared in the card reading application in the following manner: in the tag scheduling system, use the setting tag to declare the application identifiers that the card needs to support; and, in the foreground scheduling system, call the extended API interface to set the application identifiers that the card needs to support.
[0051] In this embodiment, the card reader application needs to declare the requirement for card application identification support. The card reader system is mainly divided into a tag scheduling system and a front-end scheduling system. In the tag scheduling system, in addition to registering the tech-list of IsoDep according to the tag scheduling system rules, it is also necessary to use the setting tag, such as <aid-list>Tags declare the application IDs that the card needs to support. The declaration rules support AND and OR semantics. In the foreground scheduling system, when the card reader application is in the foreground, the newly added extended API interface is called to set the expected card application ID list. The declaration rules also support AND and OR logic.
[0052] Optionally, a setting tag is used to declare the application identifiers that the card needs to support, including: defining a technology list during the card reading type registration process of the card reading application; setting a setting tag when declaring that the card needs to support multiple application identifiers at the same time, the setting tag includes multiple elements, each element defines an application identifier; or, when declaring that the card only needs to support one of multiple application identifiers, setting multiple setting tags, each setting tag includes an element, and each element defines an application identifier.
[0053] In this embodiment, during the card reader type registration process of the card reader application, an NFC technology list can be defined by writing XML code. <tech-list>,exist <tech-list>In the definition element <tech>To specify a specific technology type, for example, use "android.nfc.tech.IsoDep" to specify ISO / IEC 14443-4 technology. When declaring that the card needs to support multiple application identifiers at the same time, AND semantics needs to be used. By setting a multiple <aid>Elemental <aid-list>Tags, each <aid>The element defines an application identifier, thereby declaring that the card needs to support both <aid-list>All under the tag <aid>In the case where the declaration card only needs to support one of the multiple application identifiers, it is necessary to implement OR semantics by setting multiple <aid-list>Tags, each <aid-list>The tag includes a <aid>element, each <aid>Elements define an application identifier, thereby declaring that the card only needs to support one of <aid-list>All under the tag <aid>element. <aid>The definition of the application identifier in the element can be implemented by the application identifier code, for example: "A0000006320101050113581058000000", or "A000000632010105535a4b5700000731".
[0054] Optionally, the application identifiers supported by the target card are determined in the application identifier requirement list, including: performing select interactions with the target card for each application identifier in the application identifier requirement list; obtaining the select interaction results of the target card for each application identifier; and determining that all application identifiers with successful select interactions are application identifiers supported by the target card.
[0055] Combination Figure 3 As shown, the embodiment of the present disclosure provides another method for card reading and distribution, including:
[0056] S201: The processor collects requirements of the card reading application for the application program identification and generates an application program identification requirement list.
[0057] S202: When the processor identifies the target card, it selects each application identifier in the application identifier requirement list and interacts with the target card respectively.
[0058] S203: The processor obtains the select interaction result of the target card for each application identifier.
[0059] S204: The processor determines that all application identifiers for which select interactions have been successful are application identifiers supported by the target card.
[0060] S205: The processor matches the application identifier supported by the target card with the requirement of the card reading application for the application identifier, and determines the target card reading application.
[0061] S206: The processor distributes the target card to the target card reading application.
[0062] In this embodiment, after the card is identified as a card, a select interaction is performed for each application identifier in the application identifier requirement list to query whether the card supports a specific application identifier. The NFC service determines the application identifiers supported by the card based on the return result of the select interaction.
[0063] Optionally, each application identifier in the application identifier requirement list is selected and interacted with the target card respectively, including: generating a select command corresponding to each application identifier according to each application identifier in the application identifier requirement list; sending each select command to the target card through the NFC service, so that the target card checks whether the application identifier in the select command matches the target card.
[0064] In this embodiment, for each application identifier in the application identifier requirement list, the NFC service constructs a select command and sends it to the IsoDep card. The select command usually contains the following: CLA (Class Byte), usually 0x00; INS (Instruction Byte), the INS code of the SELECT command is 0xA4; P1 and P2, used to specify the selected mode and indicate the selected file type, for example, P1 = 0x04 and P2 = 0x00 indicate the selection of an application based on the application identifier; data, a byte sequence containing the application identifier; Lc, the length of the data field; Le, the expected response length. After receiving the select command, the IsoDep card checks whether the requested application identifier matches any application in the card. If the card supports the application identifier, it returns a successful status code, usually 9000 (SW1 = 0x90, SW2 = 0x00, in the ISO 7816-4 standard, SW1 and SW2 together constitute a response code to indicate the result of the command execution), indicating a successful selection. If the card does not support the application identifier, it will return an error status code, such as 6A82, indicating that the selection failed.
[0065] Optionally, the application identifier supported by the target card is matched with the card reader application's requirement for the application identifier to determine the target card reader application, including: determining the application identifier required by each card reader application; when the application identifier supported by the target card includes the application identifier required by the card reader application, determining that the card reader application is successfully matched; and determining the target card reader application among the successfully matched card reader applications.
[0066] Combination Figure 4 As shown, the embodiment of the present disclosure provides another method for card reading and distribution, comprising:
[0067] S301: The processor collects the requirements of the card reading application for the application program identification and generates an application program identification requirement list.
[0068] S302: When the processor identifies the target card, it determines the application identifiers supported by the target card in the application identifier requirement list.
[0069] S303: The processor determines an application program identifier required by each card reading application.
[0070] S304: When the application identifier supported by the target card includes the application identifier required by the card reading application, the processor determines that the card reading application is successfully matched.
[0071] S305: The processor determines a target card reading application from the successfully matched card reading applications.
[0072] S306: The processor distributes the target card to the target card reading application.
[0073] In this embodiment, the application identifiers supported by the target card are matched with the requirements of the card reader application for the application identifiers. If the card reader application requires support for multiple application identifiers at the same time, the target card must support these multiple application identifiers at the same time for the match to be successful; if the card reader application requires support for only one of the multiple application identifiers, then the match is successful as long as one of the application identifiers supported by the target card meets the requirements.
[0074] Optionally, determining the target card reader application among the successfully matched card reader applications includes: when only one card reader application is successfully matched, determining the card reader application as the target card reader application; or, when multiple card reader applications are successfully matched, popping up a selection box including multiple successfully matched card reader applications, and determining the target card reader application based on the user's selection.
[0075] In this embodiment, if there is only one successfully matched card reading application, the corresponding application is directly pulled up; if there are multiple successfully matched card reading applications, a selection box needs to pop up to allow the user to manually select the card reading application.
[0076] Optionally, the method for card reading and distribution also includes: when the target card is not identified, using Android's native card reading and distribution mechanism to perform card reading and distribution.
[0077] Combination Figure 5 As shown, the embodiment of the present disclosure provides another method for card reading and distribution, comprising:
[0078] S401: The processor collects the requirements of the card reading application for the application program identification and generates an application program identification requirement list.
[0079] S402: The processor recognizes an NFC card.
[0080] S403, the processor determines whether the NFC card supports the IsoDep protocol, if so, executes S404, if not, executes S407.
[0081] S404: The processor determines the application identifiers supported by the target card in the application identifier requirement list.
[0082] S405: The processor matches the application identifier supported by the target card with the requirement of the card reading application for the application identifier, and determines the target card reading application.
[0083] S406: The processor distributes the target card to the target card reading application.
[0084] S407, the processor uses Android's native card reading distribution mechanism to perform card reading distribution.
[0085] In this embodiment, Android's native card reading distribution mechanism is divided into a foreground scheduling system and a tag scheduling system. The foreground scheduling system is a foreground application that calls the NFC API to register the card type of interest at runtime. If a matching card is read, the card reading event is distributed to the foreground application. If the foreground scheduling system fails to distribute, the tag scheduling system will be used for distribution. The tag scheduling system does not require the application to run in the foreground, but requires the application to register and declare the card type of interest in its AndroidManifest.xml. The NFC service will match the read card with all the card reading applications in the mobile phone. If only one card reading application matches successfully, the corresponding application will be directly pulled up. If multiple applications match successfully, a selection box will pop up for the user to choose.
[0086] By adopting the method for card reading distribution provided by the embodiment of the present disclosure, more accurate card reading distribution can be achieved by obtaining the requirements for application identification declared in the card reading application and matching it with the application identification supported by the target card. For example, when registering the card reading type in the Shenzhentong card reading application, the Shenzhentong card application identification is also registered. When a non-Shenzhentong IsoDep card is read, it will not be distributed to the Shenzhentong APP. It will only be distributed to the Shenzhentong APP if the card supports the Shenzhentong application identification, avoiding the situation where the card is prompted that the card is not supported after the card is read and the application is started, thereby improving the card reading experience.
[0087] Combination Figure 6 As shown, the embodiment of the present disclosure provides a device 300 for card reading and distribution, including a processor (processor) 500 and a memory (memory) 501. Optionally, the device may also include a communication interface (Communication Interface) 502 and a bus 503. Among them, the processor 500, the communication interface 502, and the memory 501 can communicate with each other through the bus 503. The communication interface 502 can be used for information transmission. The processor 500 can call the logic instructions in the memory 501 to execute the method for card reading and distribution of the above embodiment.
[0088] In addition, the logic instructions in the memory 501 described above can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0089] The memory 501 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 500 executes the functional application and data processing by running the program instructions / modules stored in the memory 501, that is, the method for card reading and distribution in the above embodiment is implemented.
[0090] The memory 501 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 501 may include a high-speed random access memory and may also include a non-volatile memory.
[0091] The disclosed embodiments provide a mobile phone, including: a mobile phone body, and the above-mentioned device for card reading and distribution. The mobile phone body includes a card reading and distribution system. The device for card reading and distribution is installed on the mobile phone body and connected to the card reading and distribution system. The installation relationship described here is not limited to placement inside the mobile phone, but also includes installation connections with other components of the mobile phone, including but not limited to physical connections, electrical connections or signal transmission connections, etc. Those skilled in the art can understand that the device for card reading and distribution can be adapted to a feasible mobile phone body, thereby realizing other feasible embodiments.
[0092] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned method for card reading and distribution.
[0093] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0094] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the technical solutions recorded in this application. As used in the technical solutions recorded in this application, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method or device comprising the element. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0095] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0096] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0097] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.< / aid> < / aid> < / aid> < / aid> < / aid> < / aid> < / aid> < / tech>
Claims
1. A method for card reading and distribution, characterized in that: include: Collect the requirements of the card reader application for the application identification and generate an application identification requirement list; When the target card is identified, determining the application identifiers supported by the target card in the application identifier requirement list; Match the application identifiers supported by the target card with the requirements of the card reader application for the application identifier to determine the target card reader application; Distribute the target card to the target card reader application.
2. The method according to claim 1, characterized in that Collect the card reader application's requirements for application identification and generate a list of application identification requirements, including: Get the application ID that each card reader application declares needs to support; Based on all the obtained application identities, a list of application identity requirements is generated.
3. The method according to claim 2, characterized in that Declare the application ID that the card needs to support in the card reader application as follows: In the tag dispatch system, use the set tag to declare the application identifiers that the card needs to support; and, In the foreground scheduling system, call the extended API interface to set the application ID that the card needs to support.
4. The method according to claim 3, characterized in that Use the settings tag to declare the application IDs that the card needs to support, including: During the card reader type registration process of the card reader application, define a technology list; In the case where the card needs to support multiple application identifiers at the same time, a setting tag is set, and the setting tag includes multiple elements, each element defines an application identifier; or, In the case where the declaration card only needs to support one of multiple application identifiers, multiple setting tags are set, each setting tag includes an element, and each element defines an application identifier.
5. The method according to claim 1, characterized in that In the Application Identity Requirements list, identify the application identities that the target card supports, including: Select each application ID in the application ID requirement list and interact with the target card respectively; Get the select interaction result of the target card for each application ID; Make sure that all application IDs for successful select interactions are application IDs supported by the target card.
6. The method according to claim 5, characterized in that Select each application ID in the application ID requirement list and interact with the target card separately, including: According to each application identifier in the application identifier requirement list, a select command corresponding to each application identifier is generated respectively; Each select command is sent to the target card through the NFC service, so that the target card checks whether the application identifier in the select command matches the target card.
7. The method according to any one of claims 1 to 6, characterized in that: Match the application IDs supported by the target card with the card reader application's requirements for application IDs to determine the target card reader application, including: Determine the application ID required for each card reader application; In a case where the application identifier supported by the target card includes the application identifier required by the card reading application, determining that the card reading application is successfully matched; The target card reading application is determined among the successfully matched card reading applications.
8. The method according to claim 7, characterized in that Determine the target card reading application among the successfully matched card reading applications, including: If only one card reader application is matched successfully, the card reader application is determined to be the target card reader application; or, In the case that multiple card reader applications are matched successfully, a selection box including multiple successfully matched card reader applications pops up, and a target card reader application is determined according to the user's selection.
9. A device for card reading and distributing, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the card reading and dispensing method according to any one of claims 1 to 8 when running the program instructions.
10. A mobile phone, characterized in that: include: The mobile phone body, including the card reader distribution system; The device for card reading and distribution as described in claim 9 is installed on the mobile phone body and connected to the card reading and distribution system.