Intelligent card cutting method, device, storage medium and electronic device
By directly selecting the target card in the intelligent card cutting method and sending the card cutting instruction, the problem of low intelligent card cutting efficiency in the existing technology is solved, efficient card switching and anti-collision interaction are achieved, and the service life of the security unit is extended.
Patent Information
- Application Number
- CN202311861976.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2043-12-29
AI Technical Summary
The prior art requires deactivation and activation operations in intelligent card cutting operation, resulting in low efficiency of conflict detection, parameter merging and other steps.
When the card selection requirement is detected through the card management application, select the target card and send the card cutting command, determine the target main application identifier and set the logical mark, send the target contactless protocol parameters to the near field communication controller, and realize the card reading device Anti-conflict interaction, avoid deactivation and activation operations.
Improves the efficiency of smart card cutting, reduces the write flash operation to the security unit, extends its lifespan, and simplifies the card cutting process.
Smart Images

Figure CN117811617B_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] At present, electronic devices with NFC (Near Field Communication, near-field wireless communication technology, also known as near-field communication technology) function (such as mobile phones with NFC function) can be simulated as NFC cards for use, that is, electronic devices can simulate contactless radio frequency cards that comply with NFC standards so as to interact with NFC card reading devices, 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 interconnection technology, combining inductive card readers, inductive cards and point-to-point functions on a single chip, and can identify and exchange data with compatible devices within a short distance. Then, accordingly, when a security chip of an electronic device (such as a secure element (Secure Element, SE) or an embedded secure element (embedded Secure Element, eSE, etc., 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 needs to deactivate the currently activated card and activate the currently required card that is not in the activated state, thereby realizing the card cutting operation, resulting in low efficiency of smart card cutting. Based on this, how to conveniently perform intelligent card cutting to improve the efficiency of intelligent card cutting has become a research hotspot. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a smart card cutting method, device, storage medium and electronic device to solve the problem that the related technology needs to implement the card cutting operation through deactivation operation and activation operation, which will involve conflict detection, parameter merging and writing flash (flash memory) and other operations, resulting in low card cutting efficiency. In other words, the embodiments of the present application can conveniently perform smart card cutting, thereby improving the efficiency of smart card cutting.
[0004] According to one aspect of the present application, a smart card cutting method is provided, the method being applied to an electronic device, the electronic device comprising 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 comprising:
[0005] When a card selection requirement 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, wherein the card switching instruction carries a target main application identifier of the target card, and one card corresponds to at least one application, and the at least one application corresponding to one card includes one main application;
[0006] Determine the target main application identifier according to the card cutting instruction through the security unit, and set a logic mark for the target main application identifier in the application identifier set, wherein the logic mark is used to indicate that the target card is in an activated state;
[0007] 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 reading device.
[0008] According to another aspect of the present application, a smart card cutting device is provided, the device running on an electronic device, the electronic device comprising a card management application, a near field communication controller and a security unit, the security unit having M cards installed therein, M being a positive integer; the device comprising:
[0009] 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, wherein the card switching instruction carries a target main 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 one main application;
[0010] a processing unit, configured to determine the target main application identifier according to the card cutting instruction through the security unit, and set a logic mark for the target main application identifier in the application identifier set, wherein the logic mark is used to indicate that the target card is in an activated state;
[0011] The sending unit is further used 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 adopts the target contactless protocol parameters to perform anti-collision interaction with the card reader.
[0012] 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.
[0013] 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.
[0014] In the embodiment of the present application, when the card selection requirement is detected, the target card can be 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. Based on this, the target main application identifier can be determined by the security unit according to the card cutting instruction, and a logical mark is set for the target main application identifier in the application identifier set, and the logical mark is used to indicate that the target card is in an activated state. Further, according to the card cutting 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. It can be seen that the embodiment of the present application does not need to implement the card cutting operation through deactivation and activation operations, so there is no need to perform conflict detection, parameter merging, and flash writing operations. That is to say, the embodiment of the present application can conveniently perform intelligent card cutting, thereby improving the efficiency of intelligent card cutting, and effectively improving the performance of card cutting; and accordingly, the embodiment of the present application does not need to write flash to a fixed position of the security unit, thereby effectively avoiding the impact on the life of the flash, so as to increase the life of the security unit. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] 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:
[0016] Figure 1 A schematic diagram of a process of a smart card cutting method according to an exemplary embodiment of the present application is shown;
[0017] Figure 2 A schematic diagram showing a process flow of another smart card cutting method according to an exemplary embodiment of the present application is shown;
[0018] Figure 3 A schematic diagram showing a smart card selection opening operation according to an exemplary embodiment of the present application is shown;
[0019] Figure 4 A schematic block diagram of a smart card cutting device according to an exemplary embodiment of the present application is shown;
[0020] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present application is shown;
[0021] Figure 6A structural block diagram of another exemplary electronic device that can be used to implement the embodiments of the present application is shown. DETAILED DESCRIPTION
[0022] The embodiments of the present application will be described in more detail below 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 being 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 only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0023] It should be understood that the various steps described in the method implementation of the present application can be performed in different orders and / or performed in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.
[0024] 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". 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.
[0025] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0026] 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.
[0027] 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 (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, and the like. 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 (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms, and the like.
[0028] Before introducing the embodiments of the present application, a virtual card simulated by an electronic device is briefly introduced:
[0029] Traditional smart cards, such as bus cards, bank cards, and medical insurance cards, can be read by various card readers (i.e., card reading devices) to swipe cards because they contain chips. There are two common types of chips used for smart cards: one is contact swiping, such as the common card insertion POS (point of sale) machine, and the other is contactless swiping, which contains a contactless data transmission control chip similar to NFC (including a matching antenna), such as the common bus card that is swiped by approaching the card reader. The simulation of these common physical card functions through electronic devices is called a virtual card. At this time, there is no real card. It is just that the relevant information or program of the card is added to the electronic device to "simulate" a smart card. In this way, the same electronic device can realize the simulation of multiple cards and multiple cards through the cooperation of NFC chips and security elements, 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.
[0030] Based on the above description, the embodiment of the present application proposes a smart card cutting method, which 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, and M cards are installed in the security unit, where M is a positive integer. Figure 1 As shown, the smart card cutting method may include the following steps S101-S103:
[0031] 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.
[0032] 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 represented as operations performed by the card management application in the electronic device, and the embodiments of the present application do not limit this.
[0033] In the embodiments of the present application, the card management application may support the detection of the 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, the card selection requirement notification is sent 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 embodiments of the present application are 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 the card swipe requirement is detected, thereby determining that the card selection requirement is detected. Optionally, the card reader device mentioned here can be any NFC card reader device.
[0034] Optionally, when selecting a target card from M cards, a card may be randomly selected from the M cards and the randomly selected card may be used as the target card; or, 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 present application does not limit this. Optionally, the M cards may be sorted according to the installation time, or the M cards may be sorted according to the card swiping frequency, etc.; this embodiment of the present application does not limit this.
[0035] It should be noted that the target main application identifier can be the application identifier (i.e., a fully matching application identifier, also known as a global application identifier) of the main application in at least one application corresponding to the target card (i.e., the main application corresponding to the target card). Optionally, an application identifier can be a digital identifier or a string identifier, etc., which is not limited in the embodiments of the present application.
[0036] Optionally, the main application corresponding to the target card can be any application in at least one application corresponding to the target card, such as a designated application or the first installed application in at least one application corresponding to the target card, etc., and the embodiments of the present application do not limit this. Exemplarily, 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 by 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.
[0037] 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.
[0038] S102, determining the target main application identifier according to the card cutting instruction through the security unit, and setting a logical mark for the target main application identifier in the application identifier set, wherein the logical mark is used to indicate that the target card is in an activated state.
[0039] 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, which is not limited in the embodiments of the present application.
[0040] 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.
[0041] Optionally, the application identification set may include the application identification of each application corresponding to each card in the M cards, that is, the application identification set may include the application identification of each application in at least one application corresponding to any card. Optionally, the logical tag may be a digital tag or an alphabetic tag, etc., which is not limited in the embodiments of the present application.
[0042] 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.
[0043] In another implementation, when setting a logical tag for a target main application identifier in an 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 can be a logical tag, the 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.
[0044] 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 adopts the target contactless protocol parameters to perform anti-collision interaction with the card reading device.
[0045] 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 achieving anti-collision interaction with the card reader device through the near field communication controller using the target contactless protocol parameters.
[0046] 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 device can determine whether anti-collision is successful by verifying the received contactless protocol parameters.
[0047] 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 ordinary access control cards; the second type of card swiping verification may include anti-collision verification and verification of data to be verified, such as encrypted access control cards, bank cards, transportation cards, 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 verifications when determining that the anti-collision verification is successful, that is, it 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.
[0048] In the embodiment of the present application, when the card selection requirement is detected, the target card can be 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. Based on this, the target main application identifier can be determined by the security unit according to the card cutting instruction, and a logical mark is set for the target main application identifier in the application identifier set, and the logical mark is used to indicate that the target card is in an activated state. Further, according to the card cutting 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. It can be seen that the embodiment of the present application does not need to implement the card cutting operation through deactivation and activation operations, so there is no need to perform conflict detection, parameter merging, and flash writing operations. That is to say, the embodiment of the present application can conveniently perform intelligent card cutting, thereby improving the efficiency of intelligent card cutting, and effectively improving the performance of card cutting; and accordingly, the embodiment of the present application does not need to write flash to a fixed position of the security unit, thereby effectively avoiding the impact on the life of the flash, so as to increase the life of the security unit.
[0049] Based on the above description, the embodiment of the present application also 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, and M cards are installed in the security unit, where M is a positive integer. Figure 2 The smart card cutting method may include the following steps S201-S205:
[0050] 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 one main application.
[0051] Optionally, the card cutting 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.
[0052] S202, determining the target main application identifier according to the card cutting instruction through the security unit, and setting a logical mark for the target main application identifier in the application identifier set, wherein the logical mark is used to indicate that the target card is in an activated state.
[0053] It should be understood that no matter 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.
[0054] 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 adopts the target contactless protocol parameters to perform anti-collision interaction with the card reading device.
[0055] In one embodiment, the card cutting instruction is a contactless parameter setting instruction, and the contactless parameter setting instruction is used to instruct the security unit to send the 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.
[0056] In another embodiment, the card cutting instruction is a contactless parameter acquisition instruction, and the contactless parameter acquisition instruction 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 through the security unit according to the contactless parameter acquisition instruction, 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 sent to the near field communication controller by the card management application. It can be seen that the smart card cutting method of the present application controls the timing and method of card cutting through the terminal's card management application.
[0057] 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; alternatively, 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 which 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; alternatively, 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.
[0058] S204, detecting, through the card management application, whether the anti-collision interaction under the target contactless protocol parameters fails.
[0059] In an embodiment of the present application, the electronic device may, through a card management application, 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 may be set according to experience or according to actual needs, and the embodiment of the present application is not limited to this.
[0060] Optionally, the above-mentioned start waiting time may be the time when the card management application sends the target contactless protocol parameters to the near field communication controller, or the time when the card management application sends the card cutting instruction, or 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.
[0061] Specifically, the specific implementation process of the above-mentioned detection of whether the anti-collision interaction under the target contactless protocol parameters fails may include: determining whether the security unit receives the to-be-verified data acquisition instruction 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 to-be-verified data acquisition instruction 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 is detected to be successful; if it is determined that the security unit does not receive the to-be-verified data acquisition instruction and determines that the card swipe is not successful, it can be determined that the anti-collision interaction under the target contactless protocol parameters fails to be detected. Optionally, when the card management application determines the card swiping result (such as the card swiping success or card swiping failure), it can be detected directly by the card management application, or it can be detected by other modules in the electronic device to send the card swiping result to the card management application, etc.; that is, the card management application can determine whether the card swiping is successful based on various opportunity data, and the embodiments of the present application are not limited to this.
[0062] Among them, the instruction to obtain the data to be verified can be a -4 layer instruction sent by the card reader to realize the -4 layer instruction interaction. Optionally, the instruction to obtain the data to be verified can 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 the embodiment of the present application. Optionally, the instruction to obtain the data to be verified can include but is not limited to: application selection instructions, triple authentication instructions for encrypted access control, and various consumption instructions, etc.; the embodiment of the present application does not limit this.
[0063] S205, if it is detected that the anti-collision interaction fails, a card to be verified is selected from the M cards, and the card to be verified is used to update the target card, thereby triggering the execution of sending a card cutting instruction to the security unit through the card management application.
[0064] When the anti-collision interaction under the target contactless protocol parameters is successful, the card reader device supports sending a to-be-verified data acquisition instruction for data verification. Specifically, the card reader device can support sending the to-be-verified data acquisition instruction to the near field communication controller.
[0065] In an embodiment of the present application, the instruction for obtaining data to be verified may include 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, a local application identifier corresponds to at least one application identifier, an application identifier corresponding to a local application identifier includes a 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 instruction for obtaining data to be verified, that is, after the near field communication controller receives the instruction for obtaining data to be verified sent by the card reader, the near field communication controller may send the instruction for obtaining data to be verified to the security unit, so that the security unit receives the instruction for obtaining data to be verified. In addition, the above-mentioned logical tag supports the application identifiers for indicating each application corresponding to the target card, because the logical tag corresponds to the target main application identifier, and the target main application identifier is the application identifier of the main application corresponding to the target card, then based on the correspondence between the target card and at least one application, when the target main application identifier is marked by the logical tag, the logical tag can support the application identifiers for indicating each application corresponding to the target card.
[0066] 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 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.
[0067] 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, so as to determine an application identifier to be verified indicated by the logical tag.
[0068] Then, correspondingly, the electronic device can determine the data to be verified of 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, and then send the data to be verified 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 (such as verifying whether the balance is greater than or equal to the amount required for swiping the card), or a card swiping password (to verify whether the card swiping password is correct), etc.; the embodiment of the present application does not limit this.
[0069] Further, after the security unit detects that the verification of the data to be verified fails, the electronic device can determine an updated application identifier to be verified indicated by the logic mark from at least one matching application identifier through the security unit, and update the application identifier to be verified to an application identifier that has not been selected in at least one matching application identifier; and use the updated application identifier to be verified 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, and the data to be verified of the application indicated by the updated application identifier to be verified can be determined. It should be noted that when determining to update the application identifier to be verified, if there is no application identifier that has not been selected in at least one matching application identifier, that is, after all matching application identifiers in at least one matching application identifier are selected, the determination to update the application identifier to be verified can be stopped, and at this time, the -4 layer instruction interaction fails. In this case, the card management application can detect that the card swiping fails. It can be seen that the security unit can determine an application identifier to be verified from at least one matching application identifier in turn until the card swiping is successful or all matching application identifiers in at least one matching application identifier are selected.
[0070] In an embodiment of the present application, the electronic device can detect whether the verification of the data to be verified fails through the security unit. Optionally, the electronic device can determine whether the card is successfully swiped through the security unit after the security unit sends the data to be verified, and the preset verification detection time interval. If it is determined that the card is successfully swiped, it can be determined that the verification of the data to be verified is successful. If it is determined that the card is failed, it can be determined that the verification of the data to be verified fails; Optionally, the electronic device can determine whether the card is successfully swiped through the card management application, and the security unit can determine whether the card is successfully swiped through the card management application. The result of the card swiping (such as successful or failed card swiping) determined by the card management application determines whether the card is successfully swiped; Optionally, the preset verification detection time can be set according to experience or according to actual needs, and the embodiment of the present application does not limit this. Optionally, the security unit can also receive verification failure indication information sent by the card reader device. In this case, the security unit can detect that the verification of the data to be verified fails, and so on.
[0071] Optionally, the electronic device can also detect the smart card selection activation operation through the card management application, and 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 determined from M cards. The card management application can be triggered to determine the target card 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.
[0072] In one embodiment, the card management application may be provided with a smart card selection switch button, which can be used to perform a smart card selection on operation and a smart card selection off operation; specifically, the smart card selection switch button can be used to set the state of the smart card selection function (such as an on state or an off state). In this case, the user can perform a smart card selection on operation through the smart card selection switch button, and the electronic device can detect the smart card selection on operation performed by the user through the card management application.
[0073] For example, Figure 3 As shown, the electronic device can display a smart card selection switch button 301 in the application interface of the card management application. In this case, the user can 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.
[0074] Optionally, the smart card selection on-off operation may be a click operation on the smart card selection switch button, or a long press operation (i.e., an operation in which the pressing time is longer than a preset pressing time), or a sliding operation, etc.; this embodiment of the present application does not limit this. Optionally, the preset time can be set according to experience or according to actual needs, and this embodiment of the present application does not limit this.
[0075] In another implementation, the electronic device may support voice input, and support the smart card selection opening operation by voice input. In this case, the user may perform the smart card selection opening operation by voice input in the card management application, so that the card management application detects the smart card selection opening operation by receiving the voice instruction for the smart card selection opening operation. Accordingly, the user may also perform the smart card selection closing operation by voice input, and so on.
[0076] Furthermore, the electronic device can determine the contactless state management state through the security unit, and the contactless state management state supports the contactless state management on state or the contactless state management off state; if the contactless state management state is the contactless state management on state, then the target main application identifier is determined according to the card switching instruction, and a logical mark is set 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, then the target main application identifier is determined according to the card switching instruction, and the execution is not triggered, etc. In other words, before the corresponding card switching instruction, the security unit can first determine whether the contactless state management state is the contactless state management on state.
[0077] 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 opening instruction sent by the card management application, and respond to the opening instruction, thereby setting the contactless state management switch flag to the contactless state management opening state indication information, and the contactless state management opening state indication information may be used to indicate the contactless state management opening state, that is, at this time, the contactless state management state may be the contactless state management opening state. Then correspondingly, the security unit may receive a closing instruction sent by the card management application, and respond to the closing instruction, thereby setting the contactless state management switch flag to the contactless state management closing state indication information, and the contactless state management closing state indication information may be used to indicate the contactless state management closing state, that is, at this time, the contactless state management state may be the contactless state management closing state, and so on. Optionally, the contactless state management opening state indication information and the contactless state management closing state indication information may be set according to experience or according to actual needs, and the embodiments of the present application do not limit this.
[0078] Optionally, when the card management application detects a smart card selection start operation, it can determine that a contactless status management start operation has been detected, thereby sending a start instruction to the security unit; when the card management application detects a smart card selection close operation, it can determine that a contactless status management close operation has been detected, thereby sending a close instruction to the security unit, and so on.
[0079] From the above, it can be seen that when the contactless status management switch mark bit is in the on state (that is, the contactless status management switch mark bit is the contactless status 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 a substantially activated state.
[0080] 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 the 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 is not limited in the embodiment of the present application. Optionally, the preset setting time threshold may be set according to experience or according to actual needs, and this is not limited in the embodiment of the present application.
[0081] In the embodiment of the present application, when the card selection requirement is detected, the target card can be selected from M cards through the card management application, and a card cutting instruction can be 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. The target main application identifier can be determined by the security unit according to the card cutting instruction, and a logical mark is set for the target main application identifier in the application identifier set. The logical mark is used to indicate that the target card is in an activated state. Based on this, the target contactless protocol parameters of the target card can be sent 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 device. Further, the card management application can be used to detect whether the anti-collision interaction under the target contactless protocol parameters fails; if the anti-collision interaction failure is detected, the card to be verified is selected from the M cards, and the card to be verified is used to update the target card, thereby triggering the execution of sending the card cutting instruction to the security unit through the card management application; wherein, when the anti-collision interaction under the target contactless protocol parameters is successful, the card reader device supports sending the data acquisition instruction to be verified for data verification. It can be seen that the embodiments 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, in the process of intelligent card selection, there is no need to write to the flash each time the card is cut, thereby avoiding repeated write operations of the security unit, which can ensure the flash life of the security unit and extend the service life of the security unit.
[0082] Based on the description of the above-mentioned related embodiments of the smart card cutting method, the embodiment of the present application also proposes a smart card cutting device, which can be a computer program (including program code) running in an electronic device, the electronic device includes a card management application, a near field communication controller and a security unit, and M cards are installed in the security unit, where M is a positive integer; Figure 4 As shown, the smart card cutting device may include a sending unit 401 and a processing unit 402. The smart card cutting device may execute Figure 1 or Figure 2 The smart card cutting method shown, that is, the smart card cutting device can run the above-mentioned units:
[0083] The sending unit 401 is used 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, wherein the card switching instruction carries a target main application identifier of the target card, and one card corresponds to at least one application, and the at least one application corresponding to one card includes one main application;
[0084] The processing unit 402 is used to 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, wherein the logical mark is used to indicate that the target card is in an activated state;
[0085] 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.
[0086] In one embodiment, the card cutting instruction is a contactless parameter setting instruction, and the contactless parameter setting instruction 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:
[0087] 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.
[0088] In another embodiment, the card cutting instruction is a contactless parameter acquisition instruction, and the contactless parameter acquisition instruction 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:
[0089] 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;
[0090] The target contactless protocol parameters are sent to the near field communication controller via the card management application.
[0091] In another implementation, the processing unit 402 may also be used to:
[0092] detecting, by the card management application, whether the anti-collision interaction under the target contactless protocol parameters fails;
[0093] 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 a card cutting instruction to the security unit through the card management application;
[0094] 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.
[0095] In another embodiment, the instruction for obtaining the data to be verified includes a local application identifier to be matched, the instruction for obtaining the 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, a local application identifier corresponds to at least one application identifier, an application identifier corresponding to a local application identifier includes a 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 the 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 can also be used to:
[0096] After the security unit receives the instruction to obtain the data to be verified, the security unit determines, from the application identifier set, at least one matching application identifier that matches the local application identifier to be matched, wherein each matching application identifier in the at least one matching application identifier includes the local application identifier to be matched;
[0097] Determining an application identifier to be verified indicated by the logical tag from the at least one matching application identifier;
[0098] Determine the data to be verified of the application indicated by the application identifier to be verified;
[0099] The sending unit 401 may also be used for:
[0100] The data to be verified is sent to the card reading device for data verification.
[0101] In another implementation, the processing unit 402 may also be used to:
[0102] 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 mark;
[0103] The updating of the to-be-verified application identifier is adopted to update the to-be-verified application identifier, so as to trigger the execution of determining the to-be-verified data of the application indicated by the to-be-verified application identifier.
[0104] In another implementation, the processing unit 402 may also be used to:
[0105] The card management application detects a smart card selection activation operation, wherein the smart card selection activation operation supports setting the smart card selection function to an activated state; when the smart card selection function is in an activated state, the card management application supports detecting a card selection requirement;
[0106] When the smart card selection start operation is detected, the card management application is triggered to detect the card selection requirement.
[0107] In another implementation, the processing unit 402 may also be used to:
[0108] Determining a contactless state management state through the security unit, wherein the contactless state management state supports a contactless state management on state or a contactless state management off state;
[0109] If the contactless state management state is the contactless state management on 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.
[0110] In another implementation, the processing unit 402 may also be used to:
[0111] Determining whether the logic mark is invalid by the safety unit;
[0112] If it is determined that the logical mark is invalid, the logical mark is deleted.
[0113] According to one embodiment of the present application, Figure 1 or Figure 2 Each step involved in the method shown can be Figure 4 The smart card cutting device shown in the figure is executed by each unit. For example, Figure 1 The steps S101 and S103 shown in FIG. 1 can be both performed by Figure 4 The sending unit 401 shown in FIG. 1 is executed, and step S102 can be performed by Figure 4 The processing unit 402 shown in is executed. For example, Figure 2 The steps S201 and S203 shown in FIG. 1 can be performed by Figure 4 The sending unit 401 shown in FIG. 1 is executed, and steps S202, S204 and S205 can be performed by Figure 4 The processing unit 402 shown in executes, and so on.
[0114] According to another embodiment of the present application, Figure 4 Each unit in the shown intelligent card cutting device can be separately or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple functionally smaller units to form, 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 function 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.
[0115] According to another embodiment of the present application, the program can be executed by running on a general electronic device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 1 or Figure 2 A computer program (including program code) for each step involved in the corresponding method shown in Figure 4 The smart card cutting device shown in the embodiment of the present application is used to 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 electronic device through the computer storage medium and run therein.
[0116] In the embodiment of the present application, when the card selection requirement is detected, the target card can be 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. Based on this, the target main application identifier can be determined by the security unit according to the card cutting instruction, and a logical mark is set for the target main application identifier in the application identifier set, and the logical mark is used to indicate that the target card is in an activated state. Further, according to the card cutting 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. It can be seen that the embodiment of the present application does not need to implement the card cutting operation through deactivation and activation operations, so there is no need to perform conflict detection, parameter merging, and flash writing operations. That is to say, the embodiment of the present application can conveniently perform intelligent card cutting, thereby improving the efficiency of intelligent card cutting, and effectively improving the performance of card cutting; and accordingly, the embodiment of the present application does not need to write flash to a fixed position of the security unit, thereby effectively avoiding the impact on the life of the flash, so as to increase the life of the security unit.
[0117] Based on the description of the above method embodiment and device embodiment, the exemplary embodiment of the present application further provides an electronic device, including: one or more processors; and one or more memories connected to the one or more processors in communication. The one or more memories store a computer program that can be executed by the one or more processors, and the computer program is used to enable the electronic device to perform the method according to the embodiment of the present application when executed by the one or more processors.
[0118] The exemplary embodiment of the present application also provides a more specific electronic device, which can be seen in Figure 5 As shown, the electronic device may include an application processor 501 and a security unit processor 502;
[0119] The application processor 501 is used 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, wherein the card switching instruction carries a target main application identifier of the target card, and one card corresponds to at least one application, and the at least one application corresponding to one card includes one main application;
[0120] The security unit processor 502 is used to 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, wherein the logical mark is used to indicate that the target card is in an activated state;
[0121] The application processor 501 or the security unit processor 502 is also used 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 adopts the target contactless protocol parameters to perform anti-collision interaction with the card reader.
[0122] The 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.
[0123] The exemplary embodiments of the present application further provide 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 enable the computer to execute the method according to the embodiment of the present application.
[0124] refer 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 only examples, and are not intended to limit the implementation of the present application described and / or required herein.
[0125] like Figure 6 As shown, the 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 the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0126] A plurality of components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, an output unit 607, a storage unit 608, and a communication unit 609. The input unit 606 may be any type of device capable of inputting information to the electronic device 600, and the input unit 606 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 607 may 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. The storage unit 608 may include, but is not limited to, a disk, an optical disk. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network 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.
[0127] The computing unit 601 may be a variety of 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 running 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 may 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 may be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. In some embodiments, the computing unit 601 may be configured to perform the smart card cutting method in any other appropriate manner (e.g., by means of firmware).
[0128] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes 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 the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0129] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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.
[0130] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, 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.
[0131] 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).
[0132] The systems and techniques described herein may 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 with 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 may 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.
[0133] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0134] 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, the electronic device includes a card management application, a near field communication controller and a security unit, and the security unit has M cards installed therein, where M is a positive integer; the method includes: When a card selection requirement 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, wherein the card switching instruction carries a target main application identifier of the target card, and one card corresponds to at least one application, and the at least one application corresponding to one card includes one main application; Determine the target main application identifier according to the card cutting instruction through the security unit, and set a logic mark for the target main application identifier in the application identifier set, wherein the logic mark is used to indicate that the target card is in an activated state; 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 reading device.
2. The method according to claim 1, characterized in that The card cutting instruction is a contactless parameter setting instruction, and the contactless parameter setting instruction is used to instruct the security unit to send the target contactless protocol parameters to the near field communication controller; The step of sending the target contactless protocol parameters of the target card to the near field communication controller according to the card cutting instruction includes: 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.
3. The method according to claim 1, characterized in that The card cutting instruction is a contactless parameter acquisition instruction, and the contactless parameter acquisition instruction is used to instruct the security unit to return the target contactless protocol parameter to the card management application; The step of sending the target contactless protocol parameters of the target card to the near field communication controller according to the card cutting instruction includes: 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; The target contactless protocol parameters are sent to the near field communication controller via the card management application.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: detecting, by the card management application, whether the anti-collision interaction under the target contactless 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 a card cutting instruction to the security unit through the card management application; 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.
5. The method according to claim 4, characterized in that The instruction for obtaining data to be verified includes a local application identifier to be matched, and the instruction for obtaining data to be verified is used to request data to be verified of the application indicated by the local application identifier to be matched, and 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 supports indicating application identifiers of various applications corresponding to the target card; the method further includes: After the security unit receives the instruction to obtain the data to be verified, the security unit determines, from the application identifier set, at least one matching application identifier that matches the local application identifier to be matched, wherein each matching application identifier in the at least one matching application identifier includes the local application identifier to be matched; Determining an application identifier to be verified indicated by the logical tag from the at least one matching application identifier; Determine the data to be verified of the application indicated by the application identifier to be verified, and send the data to be verified to the card reading device for data verification.
6. The method according to claim 5, characterized in that The method further comprises: 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 mark; The updating of the to-be-verified application identifier is adopted to update the to-be-verified application identifier, so as to trigger the execution of determining the to-be-verified data of the application indicated by the to-be-verified application identifier.
7. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The card management application detects a smart card selection activation operation, wherein the smart card selection activation operation supports setting the smart card selection function to an activated state; when the smart card selection function is in an activated state, the card management application supports detecting a card selection requirement; When the smart card selection start operation is detected, the card management application is triggered to detect the card selection requirement.
8. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Determining a contactless state management state through the security unit, wherein the contactless state management state supports 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 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.
9. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Determining whether the logic mark is invalid by the safety unit; If it is determined that the logical mark is invalid, the logical mark 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, and M cards are installed in the security unit, where 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, wherein the card switching instruction carries a target main 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 one main application; a processing unit, configured to determine the target main application identifier according to the card cutting instruction through the security unit, and set a logic mark for the target main application identifier in the application identifier set, wherein the logic mark is used to indicate that the target card is in an activated state; The sending unit is further used 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 adopts the target contactless protocol parameters to perform anti-collision interaction with the card reader.
11. An electronic device, characterized in that: include: one or more processors; as well as one or more memories storing programs, The program includes instructions, which, when executed by the one or more processors, cause the one or more processors to perform the method according to any one of claims 1 to 9.
12. The electronic device according to claim 11, characterized in that: include: 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, wherein the card switching instruction carries a target main 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 one main application; A security unit processor, configured to determine the target main application identifier according to the card cutting instruction through the security unit, and set a logic mark for the target main application identifier in the application identifier set, wherein the logic mark is used to indicate that the target card is in an activated state; The application processor or the security unit processor is also used 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 adopts the target contactless protocol parameters to perform anti-collision interaction with the card reading device.
13. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-9.
