Intelligent card switching method and apparatus, storage medium and electronic device
By setting logical marks in electronic devices and performing anti-collision interactions, the problem of low intelligent card cutting efficiency in the prior art is solved, efficient card switching is achieved, and the service life of the security unit is extended.
Patent Information
- Application Number
- PCT/CN2024/120797
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-09-24
- Publication Date
- 2025-07-03
AI Technical Summary
When switching multiple cards in an electronic device, the prior art needs to deactivate the card in the currently activated state and activate the card in the inactive state, resulting in low intelligent card cutting efficiency.
When the card selection requirement is detected, the target card is selected and logical marks are set, and the near-field communication controller is used for anti-collision interaction, avoiding deactivation and activation operations, and directly sending the target contactless protocol parameters for interaction.
It improves the efficiency of intelligent card cutting, reduces the write flash operation to the security unit, and extends the service life of the security unit.
Smart Images

Figure CN2024120797_03072025_PF_FP_ABST
Abstract
Description
Smart card cutting method, device, storage medium and electronic equipment
[0001] This application claims priority to the Chinese application filed with the China Patent Office on December 29, 2023, with application number 2023118619763 and application name “Smart card cutting method, device, storage medium and electronic device”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of near field communication technology, and in particular to a smart card cutting method, device, storage medium and electronic device. Background Art
[0003] At present, electronic devices with NFC (Near Field Communication, also known as near field communication technology) function (such as mobile phones with NFC function) can be used as NFC cards, that is, electronic devices can simulate contactless radio frequency cards that comply with NFC standards to interact with NFC card readers, which can be used in contactless scenarios such as consumption, transportation and access control. Among them, near field communication technology is evolved from the integration of contactless radio frequency identification and interoperability technology. It combines the functions of inductive card reader, inductive card and point-to-point on a single chip, and can identify and exchange data with compatible devices within a short distance. Correspondingly, when a security chip of an electronic device (such as a secure element (SE) or an embedded secure element (eSE), also known as a security unit) is installed with multiple cards (i.e., NFC cards, also known as virtual cards or smart cards, etc.), and the currently required card is in an inactive state, the relevant technology usually requires deactivating the currently activated card and activating the currently required inactive card to achieve the card switching operation, resulting in low efficiency of smart card switching. Based on this, how to conveniently perform smart card cutting to improve the efficiency of smart card cutting has become a research hotspot.
[0004] Summary of the Invention
[0005] In view of this, the embodiments of the present application provide an intelligent card cutting method, device, storage medium and electronic device to solve the problem that the related technology requires deactivation and activation operations to implement card cutting operations, which involves conflict detection, parameter merging and writing flash (flash memory) and other operations, resulting in low card cutting efficiency; that is, the embodiments of the present application can conveniently perform intelligent card cutting, thereby improving the efficiency of intelligent card cutting.
[0006] According to one aspect of the present application, a smart card cutting method is provided. The method is applied to an electronic device, the electronic device including a card management application, a near-field communication controller, and a security unit, wherein M cards are installed in the security unit, where M is a positive integer. The method comprises:
[0007] When a card selection request is detected, a target card is selected from the M cards by the card management application, and a card switching instruction is sent to the security unit. The card switching instruction carries a target primary application identifier of the target card. One card corresponds to at least one application, and the at least one application corresponding to one card includes a primary application.
[0008] Determining, by the security unit, the target main application identifier according to the card cutting instruction, and setting a logical flag for the target main application identifier in the application identifier set, wherein the logical flag is used to indicate that the target card is in an activated state;
[0009] According to the card cutting instruction, the target contactless protocol parameters of the target card are sent to the near field communication controller, so that the near field communication controller uses the target contactless protocol parameters to perform anti-collision interaction with the card reader.
[0010] According to another aspect of the present application, a smart card cutting device is provided. The device runs on an electronic device, the electronic device including a card management application, a near-field communication controller, and a security unit. The security unit has M cards installed therein, where M is a positive integer. The device includes:
[0011] a sending unit, configured to, upon detecting a card selection request, select a target card from the M cards through the card management application and send a card switching instruction to the security unit, wherein the card switching instruction carries a target primary application identifier of the target card, wherein one card corresponds to at least one application, and the at least one application corresponding to one card includes a primary application;
[0012] a processing unit, configured to determine, through the security unit, the target main application identifier according to the card cutting instruction, and set a logical flag for the target main application identifier in the application identifier set, wherein the logical flag is used to indicate that the target card is in an activated state;
[0013] The sending unit is further configured to send the target contactless protocol parameters of the target card to the near field communication controller according to the card cutting instruction, so that the near field communication controller uses the target contactless protocol parameters to perform anti-collision interaction with the card reader.
[0014] According to another aspect of the present application, an electronic device is provided, which includes one or more processors and one or more memories storing programs, wherein the program includes instructions that, when executed by the one or more processors, cause the one or more processors to perform the above-mentioned method.
[0015] According to another aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above-mentioned method.
[0016] When a card selection request is detected, the present embodiment can select a target card from M cards through a card management application and send a card switching instruction to the security unit. The card switching instruction carries the target primary application identifier of the target card. Each card corresponds to at least one application, and the at least one application corresponding to a card includes a primary application. Based on this, the security unit can determine the target primary application identifier based on the card switching instruction and set a logical flag for the target primary application identifier in the application identifier set. The logical flag is used to indicate that the target card is in an activated state. Furthermore, according to the card switching instruction, the target contactless protocol parameters of the target card can be sent to the near-field communication controller, so that the near-field communication controller uses the target contactless protocol parameters to perform anti-collision interaction with the card reader. As can be seen, the present embodiment does not require deactivation and activation operations to implement the card switching operation, thereby eliminating the need to perform conflict detection, parameter merging, and flash write operations. In other words, the present embodiment can conveniently perform intelligent card switching, thereby improving intelligent card switching efficiency and effectively improving card switching performance. Furthermore, the present embodiment does not require writing to the flash memory at a fixed location in the security unit, effectively avoiding the impact on the flash memory lifespan and increasing the security unit lifespan. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Further details, features and advantages of the present application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0018] FIG1 shows a schematic flow chart of an intelligent card cutting method according to an exemplary embodiment of the present application;
[0019] FIG2 shows a flow chart of another smart card cutting method according to an exemplary embodiment of the present application;
[0020] FIG3 is a schematic diagram showing an intelligent card selection and opening operation according to an exemplary embodiment of the present application;
[0021] FIG4 shows a schematic block diagram of an intelligent card cutting device according to an exemplary embodiment of the present application;
[0022] FIG5 shows a structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present application;
[0023] FIG6 shows a structural block diagram of another exemplary electronic device that can be used to implement the embodiments of the present application. DETAILED DESCRIPTION
[0024] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustrative purposes only and are not intended to limit the scope of protection of the present application.
[0025] It should be understood that the various steps described in the method embodiments of the present application can be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.
[0026] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0027] It should be noted that the modifications of "one" and "multiple" mentioned in this application are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0029] It should be noted that the execution subject of the smart card cutting method provided in the embodiment of the present application can be an electronic device, where the electronic device refers to an NFC electronic device (i.e., an electronic device with NFC function); specifically, the electronic device may include a card management application, a near field communication controller (NFCC) and a security unit, and M cards are installed in the security unit, where M is a positive integer. Among them, the electronic device can be a terminal (Device Host, DH) or a server; accordingly, the terminal mentioned here can include but is not limited to: smart phones, bracelets, tablet computers, laptops, desktop computers, smart watches, smart voice interaction devices, etc. The server mentioned here can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing (cloud computing), cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms, etc.
[0030] Before introducing the embodiments of the present application, a brief introduction to the virtual card simulated by the electronic device is first given:
[0031] Traditional smart cards, such as bus cards, bank cards, and medical insurance cards, contain chips that can be read by various card readers (i.e., card reading devices) for swiping. Common chips used for smart cards are divided into two categories: one is contact-based swiping, such as common card-inserting POS machines (point of sale), and the other is contactless swiping, which contains a contactless data transmission control chip similar to NFC (including a supporting antenna), such as common bus cards that are swiped by approaching a card reader. Simulating the functions of these common physical cards through electronic devices is called a virtual card. In this case, there is no real card. Instead, the electronic device adds relevant card information or programs to "simulate" a smart card. In this way, the same electronic device can realize the simulation of multiple cards through the cooperation of the NFC chip and the security element, which is equivalent to installing multiple smart cards on the electronic device. It can be simply understood that the security element stores information for simulating multiple cards, and the NFC chip connected to it interacts with the external card reader to realize the card swiping function. Through these "simulated cards" (virtual cards), the same electronic device can be used in different occasions to perform card swiping authentication, card swiping consumption and other behaviors of different cards.
[0032] Based on the above description, the present application proposes an intelligent card cutting method. This intelligent card cutting method can be executed by the electronic device mentioned above, that is, the method can be applied to the electronic device. Specifically, the electronic device includes a card management application, a near-field communication controller, and a security unit. The security unit has M cards installed in it, where M is a positive integer. As shown in Figure 1, the intelligent card cutting method may include the following steps S101-S103:
[0033] S101, when a card selection requirement is detected, a target card is selected from M cards through the card management application, and a card cutting instruction is sent to the security unit. The card cutting instruction carries the target main application identifier of the target card. One card corresponds to at least one application, and at least one application corresponding to one card includes a main application.
[0034] The card management application can be used to manage the M cards. It should be understood that the operations performed by the electronic device through the card management application can also be expressed as operations performed by the card management application in the electronic device, and this embodiment of the application does not limit this.
[0035] In an embodiment of the present application, a card management application may support detection of a card selection requirement; optionally, the electronic device may directly detect the card selection requirement through the card management application; or, the electronic device may also detect the card selection requirement through other modules (such as a near field communication controller), and when the card selection requirement is detected, send a card selection requirement notification to the card management application, so that the card management application detects the card selection requirement, thereby enabling the card management application to detect the card selection requirement, and so on; the embodiment of the present application is not limited to this. Optionally, when it is detected that the electronic device enters the radio frequency range of the card reader device, it can be determined that a card swiping requirement is detected, thereby determining that a card selection requirement is detected. Optionally, the card reader device mentioned here can be any NFC card reader device.
[0036] Optionally, when selecting a target card from M cards, a card may be randomly selected from the M cards and used as the target card; alternatively, the M cards may be sorted, and the target card may be selected from the M cards according to the sorting result, etc.; this embodiment of the application is not limited to this. Optionally, the M cards may be sorted by installation time, or by card swipe frequency, etc.; this embodiment of the application is not limited to this.
[0037] It should be noted that the target primary application identifier can be the application identifier (i.e., a fully matching application identifier, also known as a global application identifier) of the primary application in at least one application corresponding to the target card (i.e., the primary application corresponding to the target card). Optionally, an application identifier can be a numeric identifier or a string identifier, etc., which is not limited in this embodiment of the present application.
[0038] Optionally, the main application corresponding to the target card can be any application in the at least one application corresponding to the target card, such as a designated application or the first installed application in the at least one application corresponding to the target card, etc., and the embodiments of the present application do not limit this. For example, when the number of applications corresponding to the target card is one, it can be determined that the application corresponding to the target card is the main application corresponding to the target card, that is, the main application corresponding to the target card can be directly determined through the application corresponding to the target card; when the number of applications corresponding to the target card is multiple, the main application corresponding to the target card can be determined based on the main application indication identifier. In this case, there is an application with a main application indication identifier in the applications corresponding to the target card; wherein, the main application indication identifier can correspond to the above-mentioned designated application, or can correspond to the above-mentioned first installed application, etc., and the embodiments of the present application do not limit this. Optionally, both the designated application and the main application indication identifier can be set according to experience, or can be set according to actual needs, and the embodiments of the present application do not limit this.
[0039] Optionally, the communication path between the card management application and the security unit may be SPI (Serial Peripheral Interface, a type of contact channel) or Apdu Gate (another type of contact channel), etc., which is not limited in the embodiments of the present application.
[0040] S102: Determine the target main application identifier according to the card cutting instruction through the security unit, and set a logical mark for the target main application identifier in the application identifier set, where the logical mark is used to indicate that the target card is in an activated state.
[0041] It should be noted that the operations performed by the electronic device through the security unit can also be expressed as operations performed by the security unit in the electronic device, and the embodiments of the present application are not limited to this.
[0042] In an embodiment of the present application, after the security unit receives the card cutting instruction sent by the card management application, the security unit in the electronic device can determine the target main application identifier based on the target main application identifier carried by the card cutting instruction.
[0043] Optionally, the application identifier set may include the application identifier of each application corresponding to each card in the M cards. In other words, the application identifier set may include the application identifier of each application in at least one application corresponding to any card. Optionally, the logical tag may be a numerical tag or an alphabetic tag, etc., which is not limited in this embodiment of the application.
[0044] In one embodiment, when setting a logical tag for a target main application identifier in an application identifier set, the target main application identifier in the application identifier set can be marked with a logical tag, that is, a logical tag corresponding to the target main application identifier can be added to achieve the setting of a logical tag for the target main application identifier. In this case, when there are multiple marked application identifiers in the application identifier set, one application identifier can correspond to one logical tag. Optionally, the logical tags corresponding to each marked application identifier can be the same or different, and this embodiment of the present application is not limited to this.
[0045] In another embodiment, when setting a logical tag for the target main application identifier in the application identifier set, a key-value pair can be constructed using the logical tag and the target main application identifier, and at this time the key-value pair can be a one-to-many relationship, the key (keyword) can be a logical tag, the value (value) can be empty or at least one application identifier (such as including the target main application identifier); based on this, the target main application identifier can be added to the tag value corresponding to the logical tag, that is, added to the value, to achieve the setting of the logical tag for the target main application identifier, and so on.
[0046] S103 , according to the card cutting instruction, sending the target contactless protocol parameters of the target card to the near field communication controller, so that the near field communication controller uses the target contactless protocol parameters to perform anti-collision interaction with the card reader.
[0047] In an embodiment of the present application, the target contactless protocol parameters can be sent to the near-field communication controller as parameters for -3 layer anti-collision; specifically, the electronic device can send the target contactless protocol parameters to the card reader device through the near-field communication controller, so that the card reader device uses the target contactless protocol parameters to perform -3 layer anti-collision verification (i.e., anti-collision verification), thereby realizing anti-collision interaction with the card reader device through the near-field communication controller using the target contactless protocol parameters.
[0048] Optionally, the contactless protocol parameters may include but are not limited to: UID (User Identification), SAK / SEL_RES (a card type), ATS (Answer To Select), ATQA (card type returned in response) and other card identification and card type identification related parameters. The card reader can determine whether the anti-collision is successful by verifying the received contactless protocol parameters.
[0049] It should be noted that the card swiping verification method may be different depending on the card type. Optionally, the card type includes a first type and a second type. The first type of card swiping verification may only include anti-collision verification, such as an ordinary access card; the second type of card swiping verification may include anti-collision verification and verification of data to be verified, such as an encrypted access card, a bank card, a transportation card, etc. For the first type of card, the card reader device can determine whether the card swiping is successful based on whether the anti-collision verification is successful, thereby determining whether the smart card selection is successful; for the second type of card, due to the need for encryption, decryption, consumption and other data verification, the card reader device will continue to perform encryption, decryption, consumption and other data verification when determining that the anti-collision verification is successful, and can send a data acquisition instruction to obtain the data to be verified, etc., thereby determining the final card swiping result; in the case of failure of the anti-collision verification, it can be directly determined that the card swiping has failed. Among them, the method for determining the data to be verified can be seen as shown below, and the embodiments of this application will not be repeated again.
[0050] When a card selection request is detected, the present embodiment can select a target card from M cards through a card management application and send a card switching instruction to the security unit. The card switching instruction carries the target primary application identifier of the target card. Each card corresponds to at least one application, and the at least one application corresponding to a card includes a primary application. Based on this, the security unit can determine the target primary application identifier based on the card switching instruction and set a logical flag for the target primary application identifier in the application identifier set. The logical flag is used to indicate that the target card is in an activated state. Furthermore, according to the card switching instruction, the target contactless protocol parameters of the target card can be sent to the near-field communication controller, so that the near-field communication controller uses the target contactless protocol parameters to perform anti-collision interaction with the card reader. As can be seen, the present embodiment does not require deactivation and activation operations to implement the card switching operation, thereby eliminating the need to perform conflict detection, parameter merging, and flash write operations. In other words, the present embodiment can conveniently perform intelligent card switching, thereby improving intelligent card switching efficiency and effectively improving card switching performance. Furthermore, the present embodiment does not require writing to the flash memory at a fixed location in the security unit, effectively avoiding the impact on the flash memory lifespan and increasing the lifespan of the security unit.
[0051] Based on the above description, the present embodiment further proposes a more specific smart card cutting method. Accordingly, the smart card cutting method can be executed by the electronic device mentioned above, that is, the method can be applied to the electronic device; specifically, the electronic device includes a card management application, a near-field communication controller, and a security unit, wherein M cards are installed in the security unit, where M is a positive integer. Referring to FIG. 2 , the smart card cutting method may include the following steps S201-S205:
[0052] S201, when a card selection requirement is detected, a target card is selected from M cards through the card management application, and a card cutting instruction is sent to the security unit. The card cutting instruction carries the target main application identifier of the target card. One card corresponds to at least one application, and at least one application corresponding to one card includes a main application.
[0053] Optionally, the card switching instruction may be a contactless parameter acquisition instruction or a contactless parameter setting instruction, which is not limited in this embodiment of the present application.
[0054] S202: Determine the target main application identifier according to the card cutting instruction through the security unit, and set a logical mark for the target main application identifier in the application identifier set, where the logical mark is used to indicate that the target card is in an activated state.
[0055] It should be understood that regardless of whether the card cutting instruction is a contactless parameter acquisition instruction or a contactless parameter setting instruction, the electronic device can determine the target main application identifier according to the card cutting instruction through the security unit and set a logical mark for the target main application identifier in the application identifier set.
[0056] S203: sending the target contactless protocol parameters of the target card to the near field communication controller according to the card cutting instruction, so that the near field communication controller uses the target contactless protocol parameters to perform anti-collision interaction with the card reader.
[0057] In one embodiment, the card cutting instruction is a contactless parameter setting instruction, which is used to instruct the security unit to send target contactless protocol parameters to the near-field communication controller. Based on this, the electronic device can determine the target contactless protocol parameters of the target card through the security unit according to the contactless parameter setting instruction and send the target contactless protocol parameters to the near-field communication controller. In this case, the target contactless protocol parameters can be sent by the security unit to the near-field communication controller.
[0058] In another embodiment, the card cutting instruction is a contactless parameter acquisition instruction, which is used to instruct the security unit to return the target contactless protocol parameters to the card management application; based on this, the electronic device can determine the target contactless protocol parameters of the target card according to the contactless parameter acquisition instruction through the security unit, and return the target contactless protocol parameters to the card management application; then correspondingly, the electronic device can send the target contactless protocol parameters to the near field communication controller through the card management application. In this case, the target contactless protocol parameters can be those sent by the card management application to the near field communication controller. It can be seen that the intelligent card cutting method of the present application controls the timing and method of card cutting through the terminal's card management application.
[0059] Optionally, when determining the target contactless protocol parameters of the target card, the contactless protocol parameters of the main application corresponding to the target card can be determined based on the target main application identifier, and the contactless protocol parameters of the main application corresponding to the target card can be used as the target contactless protocol parameters; or, the contactless protocol parameters of each application in at least one application corresponding to a card are the same, then a card can correspond to the contactless protocol parameters of the corresponding application, that is, the card identifier of a card can correspond to a contactless protocol parameter. In this case, the card identifier of the target card can be determined based on the target main application identifier, and the contactless protocol parameters corresponding to the card identifier of the target card can be used as the target contactless protocol parameters; or, the card cutting instruction can also carry the card identifier of the target card, then the card identifier of the target card can be determined according to the card cutting instruction, and the contactless protocol parameters corresponding to the card identifier of the target card can be used as the target contactless protocol parameters, and so on; the embodiments of the present application are not limited to this.
[0060] S204: Detect, through the card management application, whether the anti-collision interaction under the target contactless protocol parameters fails.
[0061] In an embodiment of the present application, the electronic device can use the card management application to detect whether the anti-collision interaction under the target contactless protocol parameters fails at intervals of a preset waiting time starting from the start of the waiting time; optionally, the preset waiting time can be set according to experience or according to actual needs, and the embodiment of the present application does not limit this.
[0062] Optionally, the above-mentioned start waiting time can be the time when the card management application sends the target contactless protocol parameters to the near-field communication controller, the time when the card management application sends the card cutting instruction, the time when the security unit sends the target contactless protocol parameters to the near-field communication controller, etc.; the embodiments of the present application are not limited to this.
[0063] Specifically, the specific implementation process of the above-mentioned detection of whether the anti-collision interaction under the target contactless protocol parameters has failed may include: determining whether the security unit receives the instruction to obtain the data to be verified sent by the card reader device, and / or determining whether the card swipe is successful; if it is determined that the security unit receives the instruction to obtain the data to be verified sent by the card reader device or determines that the card swipe is successful, it can be determined that the anti-collision interaction under the target contactless protocol parameters has been detected to be successful; if it is determined that the security unit does not receive the instruction to obtain the data to be verified and determines that the card swipe is not successful, it can be determined that the anti-collision interaction under the target contactless protocol parameters has failed. Optionally, when the card management application determines the card swipe result (such as card swipe success or card swipe failure), it can be directly detected by the card management application, or it can be detected by other modules in the electronic device to send the card swipe result to the card management application, etc.; that is, the card management application can determine whether the card swipe is successful based on various opportunity data, and the embodiments of the present application are not limited to this.
[0064] The instruction for obtaining the data to be verified may be a layer-4 instruction sent by the card reader to implement layer-4 instruction interaction. Optionally, the instruction for obtaining the data to be verified may be an APDU (information unit transmitted between the smart card and the card reader) instruction, or a protocol-private instruction CMD_x, etc., which is not limited in this embodiment of the present application. Optionally, the instruction for obtaining the data to be verified may include, but is not limited to: application selection instructions, triple authentication instructions for encrypted access control, and various consumption instructions, etc.; this embodiment of the present application does not limit this.
[0065] S205: If anti-collision interaction failure is detected, a card to be verified is selected from the M cards, and the target card is updated with the card to be verified, thereby triggering the execution of sending a card cutting instruction to the security unit through the card management application.
[0066] When the anti-collision interaction under the target contactless protocol parameters is successful, the card reader device supports sending a data acquisition instruction to be verified for data verification. Specifically, the card reader device can support sending the data acquisition instruction to be verified to the near field communication controller.
[0067] In an embodiment of the present application, a data acquisition instruction to be verified may include a local application identifier to be matched, and the data acquisition instruction to be verified is used to request data to be verified for the application indicated by the local application identifier to be matched, wherein a local application identifier corresponds to at least one application identifier, and the application identifier corresponding to a local application identifier includes the corresponding local application identifier (i.e., a local application identifier may be a partial identifier in the corresponding application identifier), and the application indicated by the local application identifier to be matched includes the application indicated by each application identifier corresponding to the local application identifier to be matched; the security unit supports receiving the data acquisition instruction to be verified, that is, after the near field communication controller receives the data acquisition instruction to be verified sent by the card reader, the near field communication controller may send the data acquisition instruction to be verified to the security unit so that the security unit receives the data acquisition instruction to be verified. In addition, the above-mentioned logical tag supports the application identifiers for indicating each application corresponding to the target card. This is because the logical tag corresponds to the target main application identifier, which is the application identifier of the main application corresponding to the target card. Therefore, based on the correspondence between the target card and at least one application, when the target main application identifier is marked with a logical tag, the logical tag can support the application identifiers for indicating each application corresponding to the target card.
[0068] Furthermore, after the security unit receives the instruction to obtain the data to be verified, the electronic device can determine, through the security unit, at least one matching application identifier that matches the local application identifier to be matched from the application identifier set, and each matching application identifier in the at least one matching application identifier includes the local application identifier to be matched; specifically, for any application identifier in the application identifier set, if any application identifier includes the local application identifier to be matched, then the any application identifier can be used as a matching application identifier that matches the local application identifier to be matched, so as to determine at least one matching application identifier that matches the local application identifier to be matched.
[0069] Based on this, an application identifier to be verified indicated by a logical tag can be determined from at least one matching application identifier; that is, for any matching application identifier among the at least one matching application identifier, it can be determined whether any matching application identifier is set with a logical tag, that is, it can be determined whether any matching application identifier is an application identifier indicated by the logical tag. If it is determined that any matching application identifier is an application identifier indicated by the logical tag, then any matching application identifier will be used as an application identifier to be verified to achieve the determination of an application identifier to be verified indicated by the logical tag.
[0070] Accordingly, the electronic device can determine the data to be verified for the application indicated by the application identifier to be verified through the security unit, and send the data to be verified to the card reader for data verification. The data to be verified can then be sent to the near-field communication controller, so that the near-field communication controller sends the data to be verified to the card reader for data verification. The data to be verified can be balance information (for example, to verify whether the balance is greater than or equal to the amount required for swiping the card), a card swiping password (to verify whether the card swiping password is correct), etc.; this is not limited in the present embodiment.
[0071] Furthermore, after the security unit detects a verification failure of the data to be verified, the electronic device can determine, through the security unit, an updated application identifier to be verified, indicated by a logical tag, from at least one matching application identifier. The updated application identifier to be verified is an application identifier that has not been selected from the at least one matching application identifier. The updated application identifier to be verified is then used to update the application identifier to trigger the execution of determining the data to be verified for the application indicated by the application identifier to be verified, thereby determining the updated data to be verified for the application indicated by the application identifier to be verified. It should be noted that when determining to update the application identifier to be verified, if no application identifier has been selected from the at least one matching application identifier, that is, if all matching application identifiers in the at least one matching application identifier have been selected, the determination of updating the application identifier to be verified can be stopped. In this case, the Layer-4 instruction interaction fails. In this case, the card management application can detect that the card swipe failed. Thus, the security unit can sequentially determine an application identifier to be verified from the at least one matching application identifier until the card swipe is successful or all matching application identifiers in the at least one matching application identifier have been selected.
[0072] In an embodiment of the present application, the electronic device can detect whether the verification of the data to be verified has failed through the security unit. Optionally, the electronic device can determine whether the card swiping is successful through the security unit after the security unit sends the data to be verified, at intervals of a preset verification detection time. If it is determined that the card swiping is successful, it can be determined that the verification of the data to be verified is successful. If it is determined that the card swiping fails, it can be determined that the verification of the data to be verified has failed. Optionally, the electronic device can determine whether the card swiping is successful through the card management application, and the security unit can determine whether the card swiping is successful through the card swiping result determined by the card management application (such as card swiping success or card swiping failure). Optionally, the preset verification detection time can be set according to experience or according to actual needs, and this embodiment of the present application does not limit this. Optionally, the security unit can also receive verification failure indication information sent by the card reading device. In this case, the security unit can detect that the verification of the data to be verified has failed, and so on.
[0073] Optionally, the electronic device can also detect the smart card selection activation operation through the card management application. The smart card selection activation operation supports setting the smart card selection function to the on state; when the smart card selection function is in the on state, the card management application supports detecting the card selection demand. Based on this, when the smart card selection activation operation is detected, the card management application can be triggered to detect the card selection demand; then correspondingly, when the card selection demand is detected, the target card can be triggered to be determined from M cards, and so on. Based on this, when the smart card selection function is in the on state, the card management application supports detecting the card selection demand, that is, the electronic device can detect the card selection demand through the card management application; when the smart card selection function is in the off state, the card management application does not support detecting the card selection demand, that is, the electronic device cannot detect the card selection demand through the card management application.
[0074] In one embodiment, the card management application may be provided with a smart card selection switch button, which can be used to perform smart card selection on / off operations; specifically, the smart card selection switch button can be used to set the state of the smart card selection function (e.g., on / off state). In this case, the user can perform the smart card selection on / off operation using the smart card selection switch button, and the electronic device can detect the user's smart card selection on / off operation through the card management application.
[0075] For example, as shown in FIG3 , the electronic device may display a smart card selection switch button 301 in the application interface of the card management application. In this case, the user may perform a smart card selection start operation on the smart card selection switch button 301 to turn on the smart card selection function, thereby turning on the smart card selection function.
[0076] Optionally, the smart card selection activation operation can be a click operation on the smart card selection switch button, a long press operation (i.e., an operation where the pressing time is longer than a preset pressing time), a sliding operation, etc.; this embodiment of the application does not limit this. Optionally, the preset time can be set based on experience or actual needs, and this embodiment of the application does not limit this.
[0077] In another embodiment, the electronic device may support voice input and enable the smart card selection operation via voice input. In this case, the user can activate the smart card selection operation via voice input in the card management application, so that the card management application detects the smart card selection activation operation by receiving the voice command for the smart card selection activation operation. Correspondingly, the user can also deactivate the smart card selection operation via voice input, and so on.
[0078] Furthermore, the electronic device can determine the contactless state management state through the security unit, where the contactless state management state supports either a contactless state management-on state or a contactless state management-off state. If the contactless state management state is the contactless state management-on state, the electronic device triggers the execution of determining the target main application identifier according to the card switching instruction and sets a logical flag for the target main application identifier in the application identifier set. Correspondingly, if the contactless state management state is the contactless state management-off state, the electronic device does not trigger the execution of determining the target main application identifier according to the card switching instruction, and so on. In other words, before issuing the corresponding card switching instruction, the security unit can first determine whether the contactless state management state is the contactless state management-on state.
[0079] Optionally, the security unit may be provided with a contactless state management switch flag, which may be used to indicate the contactless state management state. In this case, the security unit may receive an enable instruction sent by the card management application and, in response to the enable instruction, set the contactless state management switch flag to contactless state management enable state indication information. The contactless state management enable state indication information may be used to indicate that the contactless state management state is enabled, i.e., the contactless state management state may be the contactless state management enabled state. Accordingly, the security unit may receive a disable instruction sent by the card management application and, in response to the disable instruction, set the contactless state management switch flag to contactless state management disable state indication information. The contactless state management disable state indication information may be used to indicate that the contactless state management state is disabled, i.e., the contactless state management state may be the contactless state management disabled state, etc. Optionally, both the contactless state management enable state indication information and the contactless state management disable state indication information may be set based on experience or actual needs, and this is not limited in the embodiments of the present application.
[0080] Optionally, when the card management application detects a smart card selection on operation, it can determine that a contactless status management on operation is detected, thereby sending an on instruction to the security unit; when the card management application detects a smart card selection off operation, it can determine that a contactless status management off operation is detected, thereby sending a off instruction to the security unit, and so on.
[0081] From the above, it can be seen that when the contactless state management switch mark bit is in the on state (that is, the contactless state management switch mark bit is the contactless state management on state indication information), and the application identifier of the corresponding application is set with a logical mark, it can be determined that the corresponding application meets the logical activation condition, and thus it can be determined that the corresponding card of the corresponding application is in the activated state; based on this, the embodiment of the present application does not require the write flash operation of the security unit, and can also achieve the same effect that the contactless state of the application is in the actual activated state.
[0082] In an embodiment of the present application, the electronic device may also determine whether the logical tag is invalid through the security unit; if it is determined that the logical tag is invalid, the logical tag is deleted. Optionally, the security unit may determine the setting time of the logical tag, and when the setting time is greater than a preset setting time threshold, the logical tag may be determined to be invalid; or, when the target card fails to be swiped, the logical tag may be determined to be invalid, and the logical tag corresponding to the target main application identifier of the target card may be determined to be invalid, and so on; this embodiment of the present application is not limited to this. Optionally, the preset setting time threshold may be set according to experience or according to actual needs, and this embodiment of the present application is not limited to this.
[0083] In an embodiment of the present application, upon detecting a card selection request, a card management application can select a target card from M cards and send a card switching instruction to a security unit. The card switching instruction carries a target primary application identifier of the target card. Each card corresponds to at least one application, and the at least one application corresponding to a card includes a primary application. The security unit can also determine the target primary application identifier based on the card switching instruction and set a logical flag for the target primary application identifier in the application identifier set, the logical flag being used to indicate that the target card is in an active state. Based on this, the target contactless protocol parameters of the target card can be sent to a near-field communication controller in accordance with the card switching instruction, so that the near-field communication controller uses the target contactless protocol parameters to perform anti-collision interaction with a card reader. Furthermore, the card management application can detect whether the anti-collision interaction under the target contactless protocol parameters has failed. If the anti-collision interaction fails, a card to be verified is selected from the M cards and the target card is updated with the card to be verified, thereby triggering the card switching instruction sent by the card management application to the security unit. If the anti-collision interaction under the target contactless protocol parameters is successful, the card reader supports sending a data acquisition instruction to be verified for data verification. It can be seen that the embodiment of the present application can conveniently perform intelligent card cutting, thereby improving the efficiency of intelligent card cutting; and, when a card selection requirement is detected, a target card can be selected from M cards or the target card can be updated when the anti-collision interaction fails, so as to realize the intelligent card selection function, thereby effectively improving the intelligent card selection performance and enhancing the user experience; in addition, during the intelligent card selection process, there is no need to perform operations such as writing to the flash each time the card is cut, thereby avoiding repeated writing operations of the security unit, which can ensure the flash life of the security unit and extend the service life of the security unit.
[0084] Based on the description of the relevant embodiments of the above-mentioned smart card cutting method, the embodiments of the present application further propose a smart card cutting device, which can be a computer program (including program code) running in an electronic device, the electronic device including a card management application, a near field communication controller, and a security unit, and the security unit is installed with M cards, where M is a positive integer; as shown in Figure 4, the smart card cutting device may include a sending unit 401 and a processing unit 402. The smart card cutting device can execute the smart card cutting method shown in Figure 1 or Figure 2, that is, the smart card cutting device can run the above-mentioned units:
[0085] The sending unit 401 is configured to, upon detecting a card selection request, select a target card from the M cards through the card management application and send a card switching instruction to the security unit, wherein the card switching instruction carries a target primary application identifier of the target card. One card corresponds to at least one application, and the at least one application corresponding to one card includes a primary application.
[0086] The processing unit 402 is configured to determine the target main application identifier according to the card cutting instruction through the security unit, and set a logical flag for the target main application identifier in the application identifier set, wherein the logical flag is used to indicate that the target card is in an activated state;
[0087] The sending unit 401 is further configured to send the target contactless protocol parameters of the target card to the near field communication controller according to the card cutting instruction, so that the near field communication controller uses the target contactless protocol parameters to perform anti-collision interaction with the card reader.
[0088] In one embodiment, the card cutting instruction is a contactless parameter setting instruction, which is used to instruct the security unit to send the target contactless protocol parameters to the near field communication controller; when the sending unit 401 sends the target contactless protocol parameters of the target card to the near field communication controller according to the card cutting instruction, it can be specifically used to:
[0089] The target contactless protocol parameters of the target card are determined by the security unit according to the contactless parameter setting instruction, and the target contactless protocol parameters are sent to the near field communication controller.
[0090] In another embodiment, the card cutting instruction is a contactless parameter acquisition instruction, which is used to instruct the security unit to return the target contactless protocol parameters to the card management application; when the sending unit 401 sends the target contactless protocol parameters of the target card to the near field communication controller according to the card cutting instruction, it can be specifically used to:
[0091] determining, by the security unit, target contactless protocol parameters of the target card according to the contactless parameter acquisition instruction, and returning the target contactless protocol parameters to the card management application;
[0092] The target contactless protocol parameters are sent to the near field communication controller via the card management application.
[0093] In another embodiment, the processing unit 402 may be further configured to:
[0094] detecting, by the card management application, whether anti-collision interaction under the target contactless protocol parameters fails;
[0095] If anti-collision interaction failure is detected, a card to be verified is selected from the M cards, and the target card is updated with the card to be verified, thereby triggering the execution of sending a card cutting instruction to the security unit through the card management application;
[0096] Wherein, when the anti-collision interaction under the target contactless protocol parameters is successful, the card reading device supports sending a to-be-verified data acquisition instruction to perform data verification.
[0097] In another embodiment, the instruction for obtaining data to be verified includes a local application identifier to be matched, the instruction for obtaining data to be verified is used to request data to be verified for the application indicated by the local application identifier to be matched, one local application identifier corresponds to at least one application identifier, the application identifier corresponding to one local application identifier includes the corresponding local application identifier, and the application indicated by the local application identifier to be matched includes the application indicated by each application identifier corresponding to the local application identifier to be matched; the security unit supports receiving the instruction for obtaining data to be verified, and the logical tag supports indicating the application identifiers of each application corresponding to the target card; the processing unit 402 may further be used to:
[0098] After the security unit receives the instruction to obtain the data to be verified, the security unit determines, from the set of application identifiers, at least one matching application identifier that matches the local application identifier to be matched, each matching application identifier in the at least one matching application identifier includes the local application identifier to be matched;
[0099] Determining an application identifier to be verified indicated by the logical tag from the at least one matching application identifier;
[0100] Determining the data to be verified of the application indicated by the to-be-verified application identifier;
[0101] The sending unit 401 may also be used to:
[0102] The data to be verified is sent to the card reading device for data verification.
[0103] In another embodiment, the processing unit 402 may be further configured to:
[0104] After the security unit detects that the verification of the data to be verified fails, the security unit determines, from the at least one matching application identifier, an updated application identifier to be verified indicated by the logic tag;
[0105] The updated application identifier to be verified is adopted to update the application identifier to be verified, so as to trigger the execution of determining the data to be verified of the application indicated by the application identifier to be verified.
[0106] In another embodiment, the processing unit 402 may be further configured to:
[0107] detecting, by the card management application, a smart card selection activation operation, wherein the smart card selection activation operation supports setting the smart card selection function to an activated state; and when the smart card selection function is activated, the card management application supports detecting a card selection requirement;
[0108] When the smart card selection start operation is detected, the card management application is triggered to detect the card selection requirement.
[0109] In another embodiment, the processing unit 402 may be further configured to:
[0110] Determining a contactless state management state by the security unit, wherein the contactless state management state supports a contactless state management on state or a contactless state management off state;
[0111] If the contactless state management state is the contactless state management enabled state, the step of determining the target main application identifier according to the card switching instruction is triggered, and a logic mark is set for the target main application identifier in the application identifier set.
[0112] In another embodiment, the processing unit 402 may be further configured to:
[0113] Determining whether the logic flag is invalid by the safety unit;
[0114] If it is determined that the logical mark is invalid, the logical mark is deleted.
[0115] According to one embodiment of the present application, each step involved in the method shown in Figure 1 or Figure 2 can be performed by each unit in the intelligent card cutting device shown in Figure 4. For example, steps S101 and S103 shown in Figure 1 can be performed by the sending unit 401 shown in Figure 4, and step S102 can be performed by the processing unit 402 shown in Figure 4. For another example, steps S201 and S203 shown in Figure 2 can be performed by the sending unit 401 shown in Figure 4, and steps S202, S204, and S205 can be performed by the processing unit 402 shown in Figure 4, and so on.
[0116] According to another embodiment of the present application, each unit in the intelligent card cutting device shown in Figure 4 can be separately or completely combined into one or several other units to form a unit, or one (or some) of the units can be further divided into multiple functionally smaller units to form a unit, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, any intelligent card cutting device can also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0117] According to another embodiment of the present application, a computer program (including program code) capable of executing the steps involved in the corresponding method shown in Figure 1 or Figure 2 can be run on a general electronic device such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), a random access memory (RAM), and a read-only memory (ROM), to construct a smart card cutting device as shown in Figure 4 and implement the smart card cutting method of the embodiment of the present application. The computer program can be recorded on a computer storage medium, for example, and loaded into the above-mentioned electronic device through the computer storage medium and run therein.
[0118] When a card selection request is detected, the present embodiment can select a target card from M cards through a card management application and send a card switching instruction to the security unit. The card switching instruction carries the target primary application identifier of the target card. Each card corresponds to at least one application, and the at least one application corresponding to a card includes a primary application. Based on this, the security unit can determine the target primary application identifier based on the card switching instruction and set a logical flag for the target primary application identifier in the application identifier set. The logical flag is used to indicate that the target card is in an activated state. Furthermore, according to the card switching instruction, the target contactless protocol parameters of the target card can be sent to the near-field communication controller, so that the near-field communication controller uses the target contactless protocol parameters to perform anti-collision interaction with the card reader. As can be seen, the present embodiment does not require deactivation and activation operations to implement the card switching operation, thereby eliminating the need to perform conflict detection, parameter merging, and flash write operations. In other words, the present embodiment can conveniently perform intelligent card switching, thereby improving intelligent card switching efficiency and effectively improving card switching performance. Furthermore, the present embodiment does not require writing to the flash memory at a fixed location in the security unit, effectively avoiding the impact on the flash memory lifespan and increasing the security unit lifespan.
[0119] Based on the description of the above method embodiments and apparatus embodiments, the exemplary embodiments of the present application further provide an electronic device, comprising: one or more processors; and one or more memories communicatively connected to the one or more processors. The one or more memories store a computer program executable by the one or more processors, and when the computer program is executed by the one or more processors, the electronic device performs the method according to the embodiment of the present application.
[0120] The exemplary embodiments of the present application further provide a more specific electronic device, as shown in FIG5 , the electronic device may include an application processor 501 and a security unit processor 502 ;
[0121] The application processor 501 is configured to, upon detecting a card selection request, select a target card from the M cards through the card management application and send a card switching instruction to the security unit, wherein the card switching instruction carries a target primary application identifier of the target card. One card corresponds to at least one application, and the at least one application corresponding to one card includes a primary application.
[0122] The security unit processor 502 is configured to determine the target main application identifier according to the card cutting instruction through the security unit, and set a logical flag for the target main application identifier in the application identifier set, wherein the logical flag is used to indicate that the target card is in an activated state;
[0123] The application processor 501 or the security unit processor 502 is further configured to send the target contactless protocol parameters of the target card to the near field communication controller according to the card cutting instruction, so that the near field communication controller uses the target contactless protocol parameters to perform anti-collision interaction with the card reader.
[0124] An exemplary embodiment of the present application further provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform a method according to an embodiment of the present application.
[0125] An exemplary embodiment of the present application further provides a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, it is used to cause the computer to perform the method according to the embodiment of the present application.
[0126] With reference to Figure 6, the structural block diagram of the electronic device 600 that can be used as the server or client of the present application will now be described, which is an example of a hardware device that can be applied to various aspects of the present application. The electronic device is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0127] As shown in Figure 6, electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In RAM 603, various programs and data required for the operation of electronic device 600 can also be stored. Computing unit 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0128] Multiple components within electronic device 600 are connected to I / O interface 605, including an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. Input unit 606 can be any type of device capable of inputting information into electronic device 600. Input unit 606 can receive input numeric or character information and generate key input signals related to user settings and / or function control of the electronic device. Output unit 607 can be any type of device capable of presenting information and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. Storage unit 608 may include, but is not limited to, a magnetic disk or an optical disk. Communication unit 609 allows electronic device 600 to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunication networks and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0129] The computing unit 601 can be various general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above. For example, in some embodiments, the smart card cutting method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. In some embodiments, the computing unit 601 can be configured to perform the smart card cutting method in any other appropriate manner (e.g., by means of firmware).
[0130] The program code for implementing the methods of the present application can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow charts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0131] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0132] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., a magnetic disk, an optical disk, a memory, a programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0133] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0134] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0135] Computer systems may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The client and server relationship arises through computer programs running on the respective computers and having a client-server relationship to each other.
[0136] Furthermore, it should be understood that what is disclosed above is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. An intelligent card cutting method, characterized in that, The method is applied to an electronic device, which includes a card management application, a near field communication controller, and a security unit. There are M cards installed in the security unit, where M is a positive integer. The method includes: When a card selection requirement is detected, the card management application selects a target card from the M cards and sends a card switching instruction to the security unit. The card switching instruction carries the target master application identifier of the target card. One card corresponds to at least one application, and at least one application corresponding to one card includes a master application. Through the security unit, the target master application identifier is determined according to the card switching instruction, and a logical flag is set for the target master application identifier in the application identifier set. The logical flag is used to indicate that the target card is in an active state. According to the card switching instruction, the target non-contact protocol parameters of the target card are sent to the near field communication controller, so that the near field communication controller uses the target non-contact protocol parameters to perform anti-collision interaction with a card reading device.
2. The method according to claim 1, characterized in that, The card switching instruction is a non-contact parameter setting instruction, which is used to guide the security unit to send the target non-contact protocol parameters to the near field communication controller. The step of sending the target non-contact protocol parameters of the target card to the near field communication controller according to the card switching instruction includes: Through the security unit, the target non-contact protocol parameters of the target card are determined according to the non-contact parameter setting instruction, and the target non-contact protocol parameters are sent to the near field communication controller.
3. The method according to claim 1, characterized in that The card switching instruction is a non-contact parameter acquisition instruction, which is used to guide the security unit to return the target non-contact protocol parameters to the card management application. The step of sending the target non-contact protocol parameters of the target card to the near field communication controller according to the card switching instruction includes: Through the security unit, the target non-contact protocol parameters of the target card are determined according to the non-contact parameter acquisition instruction, and the target non-contact protocol parameters are returned to the card management application; Through the card management application, the target non-contact protocol parameters are sent to the near field communication controller.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Through the card management application, it is detected whether the anti-collision interaction under the target non-contact protocol parameters fails. If it is detected that the anti-collision interaction fails, a card to be verified is selected from the M cards, and the target card is updated with the card to be verified, thereby triggering the execution of sending the card switching instruction to the security unit by the card management application. Wherein, when the anti-collision interaction under the target non-contact protocol parameters is successful, the card reading device supports sending a pending verification data acquisition instruction for data verification.
5. The method according to claim 4, wherein The instruction for obtaining data to be verified includes a local application identifier to be matched. The instruction for obtaining data to be verified is used to request the data to be verified of the application indicated by the local application identifier to be matched. One local application identifier corresponds to at least one application identifier. The security unit supports receiving the instruction for obtaining data to be verified, and the logical tag support is used to indicate the application identifiers of each application corresponding to the target card. The method further includes: After the security unit receives the instruction for obtaining data to be verified, at least one matching application identifier that matches the local application identifier to be matched is determined from the set of application identifiers by the security unit. Each matching application identifier in the at least one matching application identifier includes the local application identifier to be matched. One application identifier to be verified indicated by the logical tag is determined from the at least one matching application identifier. The data to be verified of the application indicated by the application identifier to be verified is determined, and the data to be verified is sent to the card reader device for data verification.
6. The method according to claim 5, wherein The method further includes: After the security unit detects that the data verification of the data to be verified fails, one updated application identifier to be verified indicated by the logical tag is determined from the at least one matching application identifier by the security unit. The application identifier to be verified is updated by using the updated application identifier to be verified, so as to trigger the execution of determining the data to be verified of the application indicated by the application identifier to be verified.
7. The method according to any one of claims 1 to 3, characterized in that The method further includes: The card management application detects an intelligent card selection opening operation. The intelligent card selection opening operation supports setting the intelligent card selection function to an open state. When the intelligent card selection function is in the open state, the card management application supports detecting a card selection requirement. When the intelligent card selection opening operation is detected, the execution of detecting the card selection requirement by the card management application is triggered.
8. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The security unit determines a non-contact status management state. The non-contact status management state supports being a non-contact status management open state or a non-contact status management closed state. If the non-contact status management state is the non-contact status management open state, then the execution of determining the target main application identifier according to the card switching instruction and setting a logical tag for the target main application identifier in the set of application identifiers is triggered.
9. The method according to any one of claims 1 to 3, characterized in that The method further includes: The security unit determines whether the logical tag fails. If it is determined that the logical tag fails, the logical tag is deleted.
10. An intelligent card cutting device, characterized in that, The device runs on an electronic device. The electronic device includes a card management application, a near field communication controller, and a security unit. M cards are installed in the security unit, and M is a positive integer. The device includes: A sending unit, configured to select a target card from the M cards through the card management application when a card selection requirement is detected, and send a card switching instruction to the security unit. The card switching instruction carries the target main application identifier of the target card. One card corresponds to at least one application, and at least one application corresponding to one card includes a main application. A processing unit, configured to determine the target master application identifier according to the card switching instruction through the security unit, and set a logical flag for the target master application identifier in the application identifier set, where the logical flag is used to indicate that the target card is in an active state; The sending unit is further configured to send the target non-contact protocol parameters of the target card to the near field communication controller according to the card switching instruction, so that the near field communication controller performs anti-collision interaction with the card reading device by using the target non-contact protocol parameters.
11. An electronic device, characterized in that, Comprising: One or more processors; And One or more memories storing programs, Wherein, the program includes instructions, and when the instructions are executed by the one or more processors, the one or more processors are caused to execute the method according to any one of claims 1-9.
12. The electronic device according to claim 11, wherein Comprising: An application processor, configured to select a target card from the M cards through the card management application when a card selection requirement is detected, and send a card switching instruction to the security unit, where the card switching instruction carries the target master application identifier of the target card, one card corresponds to at least one application, and at least one application corresponding to one card includes a master application; A security unit processor, configured to determine the target master application identifier according to the card switching instruction through the security unit, and set a logical flag for the target master application identifier in the application identifier set, where the logical flag is used to indicate that the target card is in an active state; The application processor or the security unit processor is further configured to send the target non-contact protocol parameters of the target card to the near field communication controller according to the card switching instruction, so that the near field communication controller performs anti-collision interaction with the card reading device by using the target non-contact protocol parameters.
13. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause a computer to execute the method according to any one of claims 1-9.
Citation Information
Patent Citations
NFC card switching method and device
CN110781699A
Simulation card switching method and device for near field communication, electronic equipment and storage medium
CN114466337A
Card switching method and device based on near field communication
CN115618899A
Intelligent card switching method and device, storage medium and electronic equipment
CN117811617A
Method and device for configuring a NFC smart card
EP3817414A1