Intelligent card selection method and apparatus and electronic device
Through the intelligent card selection method of security components and near-field communication controllers, the problems of manual card selection and inefficiency of system-level chips are solved, efficient and sensitive card switching is achieved, user experience is improved, adapted to diverse scenarios and supported card cutting operations in shutdown state.
Patent Information
- Application Number
- PCT/CN2024/120090
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-09-20
- Publication Date
- 2025-07-03
AI Technical Summary
In the prior art, manual card selection method is cumbersome, system-level chip processing efficiency is low, resulting in poor user experience, and electronic equipment cannot be cut off when shutting down, affecting the convenience of use.
Through the coordinated work of the security element and the near-field communication controller, pre-select the card and write non-connection protocol parameters, receive card swipe requests and respond, realize intelligent card selection, and support anti-collision checks and verification processes of different types of cards to ensure that the card can be cut even in the shutdown state.
It improves the efficiency and response sensitivity of the card cutting, improves the convenience and experience of the card cutting of the user, adapts to diverse usage scenarios, and ensures that the card cutting can be cut normally even when shut down.
Smart Images

Figure CN2024120090_03072025_PF_FP_ABST
Abstract
Description
Intelligent card selection method, device 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 2023118628870 and application name “A smart card selection method, device and electronic device”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present disclosure relates to the field of near field communication technology, and in particular to a smart card selection method, device, and electronic device. Background Art
[0003] Near Field Communication (NFC) refers to the use of electromagnetic waves in nearby electromagnetic fields for short-distance communication. Common working modes include reader mode, point-to-point mode, and card mode. The reader mode is used to read the information in the tag by approaching the tag being read. The point-to-point mode is used for data exchange between different near-field communication devices. The card mode is used for the interaction between near-field communication devices and card readers to realize contactless business processing such as consumption and access control.
[0004] Taking the near-field communication device - the terminal as an example, the terminal includes a system-level chip, a card management application, a near-field communication controller and a security element. When processing contactless services, the user usually manually selects the target card from the card management application and notifies the near-field communication controller and the security element to switch; or the system-level chip uses geo-fencing technology to determine the target card and notify the near-field communication controller and the security element to switch.
[0005] However, with the diversification of usage scenarios, the manual card selection method requires frequent switching, which makes users too uncomfortable and cumbersome, reducing the user experience; system-level chip processing is limited by the usage scenario, and the timeliness of location information update is often not guaranteed, making the target card determination time-consuming and inefficient, and once the power is off or the device is shut down due to a fault, near-field communication cannot be used. The slow response and the inability to switch cards when shut down make the user experience poor, bringing many inconveniences to users.
[0006] Summary of the Invention
[0007] In view of this, the embodiments of the present disclosure provide an intelligent card selection method, device and electronic device, which can solve the problems that manual card selection is too uncomfortable and cumbersome, resulting in a poor user experience; the system-level chip processing response is slow and inefficient, and the slow response and inability to switch cards when shut down result in a poor user experience and bring many inconveniences to users.
[0008] To achieve the above objectives, according to one aspect of the present disclosure, a smart card selection method is provided. The method is applied to an electronic device, the electronic device including a security element and a near field communication controller. The smart card selection method includes:
[0009] The secure element inputs the card selection data set into the smart card selection model, selects a first target card from a first recommendation table output by the smart card selection model, reads a first contactless protocol parameter of the first target card, and writes the first contactless protocol parameter into the near field communication controller;
[0010] The near field communication controller receives a first card swiping request triggered by a card reading device;
[0011] The near field communication controller responds to the first card swiping request using the first contactless protocol parameter.
[0012] In some possible implementations, the near-field communication controller receives an anti-collision check result of the first contactless protocol parameter returned by the card reader device; the near-field communication controller determines whether the anti-collision check result is a successful check, and if the anti-collision check result is a successful check, determines whether the anti-collision check result includes a check instruction; if the anti-collision check result is a failed check, the near-field communication controller sends a smart card selection instruction to the security element.
[0013] In some possible implementations, determining whether the anti-collision check result includes a check instruction further includes:
[0014] If the anti-collision check result includes a check instruction, the near-field communication controller sends the check instruction to the security element; if the anti-collision check result does not include a check instruction, the near-field communication controller determines that the card swiping result of the first card swiping request is a successful card swiping.
[0015] In some possible implementations, the secure element receives the verification instruction and determines the type of the verification instruction; if the verification instruction is a business instruction, the secure element matches the target application identifier and reads the business parameters of the target application identifier to respond to the business instruction;
[0016] If the verification instruction is an authentication instruction, in response to the authentication instruction, the security element generates an element random number, and performs authentication verification by interacting with the card reader through the near field communication controller.
[0017] In some possible implementations, the secure element matches a target application identifier, reads a service parameter of the target application identifier to respond to the service instruction, and further includes:
[0018] The secure element receives the service instruction, determines whether the card selection data group has been updated, and if so, inputs the updated card selection data group into the smart card selection model to obtain a second recommendation table output by the smart card selection model, and searches the second recommendation table for a target application identifier;
[0019] In a case where there is no update to the card selection data group, the secure element searches the first recommendation table for the target application identifier;
[0020] The service parameters of the target application identifier are read and sent to the card reader through the near field communication controller to respond to the service instruction.
[0021] In some possible implementations, the near field communication controller receives a service verification result of the service parameter returned by the card reader, and determines the service verification result;
[0022] If the service verification result is a verification failure, the near field communication controller sends the service verification result to the secure element;
[0023] In response to the service verification result indicating a verification failure, the secure element triggers a false exit operation;
[0024] If the service verification result is successful, it is determined that the card swiping result of the first card swiping request is successful.
[0025] In some possible implementations, in response to the service verification result indicating a verification failure, the secure element triggers a false exit operation, further comprising:
[0026] The security element determines that the reason why the service verification result is a verification failure is irrelevant to the first contactless protocol parameter; the near-field communication controller receives a second card swiping request triggered by the card reader after the fake departure operation; the near-field communication controller responds to the second card swiping request using the first contactless protocol parameter.
[0027] In some possible implementations, in response to the business verification result of the verification failure, the security element triggers a fake departure operation, and also includes: the security element determines that the reason for the business verification result being a verification failure is related to the first contactless protocol parameter; the security element updates the first contactless protocol parameter and sends the updated first contactless protocol parameter to the near-field communication controller; the near-field communication controller receives a second card swiping request triggered by the card reader device after the fake departure operation; the near-field communication controller responds to the second card swiping request using the updated first contactless protocol parameter.
[0028] In some possible implementations, the security element searches for the target application identifier from the first recommendation table, and further includes: the security element determining whether the application identifier corresponding to each card includes a local application identifier; if the local application identifier is included, the security element searches for an application identifier that matches the local application identifier from the first recommendation table as the target application identifier; or, if the local application identifier is not included, the security element searches for a default application identifier from the first recommendation table as the target application identifier.
[0029] In some possible implementations, the security element searches for the target application identifier from the second recommendation table, and further includes: the security element determining whether the application identifier corresponding to each card includes a local application identifier; if the local application identifier is included, the security element searches for an application identifier that matches the local application identifier from the second recommendation table as the target application identifier; or, if the local application identifier is not included, the security element searches for a default application identifier from the second recommendation table as the target application identifier.
[0030] In some possible implementations, the security element generates an element random number, and performs authentication verification by interacting with the card reader device through the near-field communication controller, further comprising: the security element sending the element random number to the card reader device through the near-field communication controller; the near-field communication controller receives the encryption result returned by the card reader device, and sends the encryption result to the security element; the security element performs authentication verification on the encryption result to determine the card swiping result of the first card swiping request.
[0031] In some possible implementations, the authentication and verification of the encryption result to determine the card swiping result of the first card swiping request also includes: the security element uses the application identifier corresponding to the first contactless protocol parameter, the element random number, and the agreed element key to decrypt the encryption result to obtain an encrypted ciphertext and a decrypted random number; the security element performs data operation on the decrypted random number to obtain an operation result, and determines whether the operation result and the encrypted ciphertext are the same; if the operation result and the encrypted ciphertext are the same, the security element determines that the card swiping result of the first card swiping request is a successful card swiping; if the operation result and the encrypted ciphertext are different, the security element triggers a false exit operation.
[0032] In some possible implementations, the safety element triggering a fake exit operation further includes:
[0033] The secure element updates the first contactless protocol parameters and sends the updated first contactless protocol parameters to the near-field communication controller; the near-field communication controller receives a second card swiping request triggered by the card reader after the fake leave operation; and the near-field communication controller responds to the second card swiping request using the updated first contactless protocol parameters.
[0034] In some possible implementations, when the anti-collision check result is a check failure, the near-field communication controller sends a smart card selection instruction to the security element, which also includes: the security element searches for a second target card different from the first target card from the first recommendation table, reads the second contactless protocol parameters of the second target card, and uses the second contactless protocol parameters to overwrite the near-field communication controller to perform a smart card selection and swiping cycle.
[0035] In some possible implementations, when the anti-collision check result is a check failure, the near field communication controller sends a smart card selection instruction to the secure element, further comprising:
[0036] In response to the smart card selection instruction, the security element determines whether the card selection data group has been updated. If the card selection data group has been updated, the updated card selection data group is input into the smart card selection model to obtain a second recommendation table output by the smart card selection model; the security element searches for a second target card different from the first target card from the second recommendation table, reads the second contactless protocol parameters of the second target card, and uses the second contactless protocol parameters to overwrite the near-field communication controller to perform a smart card selection and swiping cycle.
[0037] In some possible implementations, the card selection data group includes signal frequency, signal envelope, signal phase, signal radio frequency power, geographic location, geomagnetism, acquisition time, and card pool.
[0038] In some possible implementations, determining the card pool includes:
[0039] The security element receives a card add instruction or a card delete instruction sent by a card management application; wherein, the card add instruction includes the card identifier of the virtual card to be added, and the card delete instruction includes the card identifier of the virtual card to be deleted; in response to the card add instruction or the card delete instruction, the security element adds the card identifier of the virtual card to be added to the card pool, or deletes the card identifier of the virtual card to be deleted from the card pool.
[0040] In some possible implementations, if the card swipe is successful, the following steps may also be included:
[0041] Generate a card swiping record, which includes the card swiping signal frequency, card swiping signal envelope, card swiping signal phase, card swiping signal radio frequency power, card swiping geographical location, card swiping geomagnetism, card swiping time and card swiping card identification.
[0042] In some possible implementations, the security element is provided with a first smart card selection switch flag, and the near field communication controller is provided with a second smart card selection switch flag; before the smart card selection, the method further includes:
[0043] The security element and the near-field communication controller receive an enable instruction; in response to the enable instruction, the security element sets the state value of the first smart card selection switch flag bit to be enabled, and the near-field communication controller sets the state value of the second smart card selection switch flag bit to be enabled.
[0044] In some possible implementations, the secure element and the near field communication controller receiving an opening instruction include:
[0045] The security element and the near-field communication controller receive the enable instruction issued by the card management application; or, the near-field communication controller receives the enable instruction issued by the card management application and sends the enable instruction to the security element; or, the security element receives the enable instruction issued by the card management application and sends the enable instruction to the near-field communication controller.
[0046] According to another aspect of the present disclosure, a smart card selection device is provided. The device is applied to an electronic device, wherein the electronic device includes a security element and a near field communication controller. The smart card cutting device includes:
[0047] The smart card selection module of the secure element is configured to input a card selection data set into a smart card selection model, select a first target card from a first recommendation table output by the smart card selection model, read first contactless protocol parameters of the first target card, and write the first contactless protocol parameters into the near field communication controller;
[0048] The receiving module of the near field communication controller is used to receive a first card swiping request triggered by a card reader;
[0049] The card cutting module of the near field communication controller is configured to respond to the first card swiping request using the first contactless protocol parameters.
[0050] According to another aspect of the present disclosure, an electronic device is provided, including a secure element and a near field communication controller, for executing the smart card selection method.
[0051] According to another aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the smart card selection method.
[0052] One or more technical solutions provided in the embodiments of the present application realize near-field communication card switching through a security element and a near-field communication controller, which can achieve high card cutting efficiency and sensitive response. It can still intelligently cut the card even when the device is turned off, thereby improving the user's card cutting convenience and card cutting experience, and has a wide range of application scenarios. Technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] 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:
[0054] FIG1 shows a flow chart of a smart card selection method according to an exemplary embodiment of the present disclosure;
[0055] FIG2 shows a schematic diagram of a smart card selection system according to an exemplary embodiment of the present disclosure;
[0056] FIG3 shows a flowchart of a card pool management method according to an exemplary embodiment of the present disclosure;
[0057] FIG4 shows a flow chart of a method for processing an anti-collision check result according to an exemplary embodiment of the present disclosure;
[0058] FIG5 shows a flowchart of a method for processing a check instruction according to an exemplary embodiment of the present disclosure;
[0059] FIG6 shows a flowchart of a method for processing a service instruction according to an exemplary embodiment of the present disclosure;
[0060] FIG7 shows a flowchart of a method for responding to a pseudo-departure operation of a service instruction according to an exemplary embodiment of the present disclosure;
[0061] FIG8 shows a flowchart of a method for processing an authentication instruction according to an exemplary embodiment of the present disclosure;
[0062] FIG9 shows a flow chart of a method for responding to a pseudo-leave operation of an authentication instruction according to an exemplary embodiment of the present disclosure;
[0063] FIG10 shows a flow chart of a method for processing a smart card selection instruction according to an exemplary embodiment of the present disclosure;
[0064] FIG11 shows a flow chart of a method for turning on a smart card selection switch according to an exemplary embodiment of the present disclosure;
[0065] FIG12 shows a schematic block diagram of a smart card selection device according to an exemplary embodiment of the present disclosure;
[0066] FIG13 shows a block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure. DETAILED DESCRIPTION
[0067] 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.
[0068] It should be understood that the various steps described in the method embodiments of the present disclosure may 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 disclosure is not limited in this respect.
[0069] 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 "at least partially based on". The term "in an embodiment of the present disclosure" means "at least one embodiment"; the term "another exemplary embodiment" means "at least one other embodiment". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure 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.
[0070] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0071] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0072] Near Field Communication: Near Field Communication, or NFC. "Near field" refers to electromagnetic waves in the vicinity of an electromagnetic field. The electric field and magnetic field in the near field are independent of each other. Using the magnetic field of electromagnetic waves in the vicinity of an electromagnetic field for short-distance communication is called near field communication.
[0073] Terminal: Device Host, also known as DH, including mobile phones, wristbands, etc.
[0074] Secure Element: SE is an encryption / decryption logic circuit developed to prevent external malicious parsing attacks on the terminal and protect data security.
[0075] SoC: System on Chip, also known as system-level chip, usually refers to the chip integration of the core of the terminal information system, integrating the microprocessor, analog IP (Intellectual Property) core, digital IP core and memory on a single chip. A single chip can complete the functions of an entire microelectronic system.
[0076] Near Field Communication Controller: Near Field Communication Controller, NFCC, also known as NFC Controller or NFC.
[0077] RF signal: Radio Frequency Signal, that is, radio frequency signal. The card reader device will transmit RF signal to the nearby terminal.
[0078] False exit operation: An operation triggered by a security element that causes the card reader to believe that the security element has left the card reader's signal field and then re-entered the card reader's signal field.
[0079] Under the existing card mode, the terminal will install multiple virtual cards. Frequent manual card switching operations are time-consuming and cumbersome, which will result in a poor user experience. When selecting cards using geo-fence technology, the terminal's system-on-chip (SOC) needs to interact with multiple parties, including security elements, card management applications, and near-field communication controllers. This consumes a lot of time and costs a lot, resulting in slow response and poor card switching performance. In addition, since the update timeliness of geographic information cannot be guaranteed or the positioning does not match the actual usage scenario (for example, if the user wants to use card B, but the user's location is within the fence of card A, it will be identified as card A), the SOC's accuracy in determining the associated card is low, and the reliability of card selection is low, which brings many inconveniences to users.
[0080] What's more, once the electronic device or smart terminal is shut down due to insufficient power or malfunction, manual card selection or geo-fence card selection becomes invalid, and the card switching operation cannot be performed.
[0081] Aspects of the present disclosure are described below with reference to the accompanying drawings.
[0082] FIG1 shows a flow chart of a smart card selection method according to an exemplary embodiment of the present disclosure. As shown in FIG1 , the smart card selection method of the present disclosure includes:
[0083] In an embodiment of the present disclosure, as shown in FIG2 , the smart card selection method of the present disclosure is executed by a smart card selection system including a security element and a near field communication controller, and the smart card selection system uses an electronic device as a carrier.
[0084] In step S101, the secure element inputs a card selection data set into a smart card selection model, selects a first target card from a first recommendation table output by the smart card selection model, reads first contactless protocol parameters of the first target card, and writes the first contactless protocol parameters into the near field communication controller.
[0085] In the disclosed embodiment, the secure element stores a card selection data set for storing various information related to the smart card selection model, including signal frequency, signal envelope, signal slope, signal phase, signal RF power, geographic location, geomagnetism, acquisition time, and card pool, among which:
[0086] The signal frequency, signal envelope, signal slope, signal phase, signal RF power, and corresponding acquisition time are obtained from the near-field communication controller. Each time the near-field communication controller approaches the card reader, it collects RF signal information from the RF signal field emitted by the card reader, including signal frequency, signal envelope, signal slope, signal phase, signal RF power, acquisition time, and other information, and synchronizes it to the security element.
[0087] The geographical location, geomagnetic field, and corresponding collection time are obtained from the terminal. The terminal's card management application will regularly or irregularly collect the geographical location, geomagnetic field, collection time, and other information of the location and synchronize it to the secure element.
[0088] The card pool is added and deleted by the user through the card management application of the terminal. The secure element manages the card pool according to the instructions of the card management application. As shown in Figure 3, the card pool management method includes the following steps:
[0089] In the embodiment of the present disclosure, the card pool management method is executed by a secure element.
[0090] Step S301, receiving a card adding instruction or a card deleting instruction; wherein, the card adding instruction includes the card identification of the virtual card to be added, and the card deleting instruction includes the card identification of the virtual card to be deleted.
[0091] In an embodiment of the present disclosure, the card management application displays an application interface through the front end of the electronic device. The application interface includes card identifiers, card names, card schematics, etc. of multiple virtual cards to be added or deleted. The user can select some or all virtual cards in the application interface to trigger a card add instruction or a card delete instruction. The card management application sends the card add instruction or the card delete instruction to the security element, and the security element receives the card add instruction or the card delete instruction.
[0092] Furthermore, the management of the card pool can adopt a reverse selection method. The user selects some virtual cards to be added in the application interface and does not add them to the card pool, or the user selects some virtual cards to be deleted and does not delete them from the card pool. The selection can be made according to the actual interface display.
[0093] Step S302, in response to the add card instruction or the delete card instruction, the card identifier and card information of the virtual card to be added are added to the card pool in the local cache, or the card identifier and card information of the virtual card to be deleted are deleted from the card pool in the local cache.
[0094] In the disclosed embodiment, in response to an add card instruction, the secure element adds the card identifiers and card information of some or all virtual cards selected by the user to be added to a locally cached card pool. In response to a delete card instruction, the secure element deletes the card identifiers and card information of some or all virtual cards selected by the user to be deleted from the locally cached card pool. Card information includes card type, card balance, and so on.
[0095] Furthermore, in the case of reverse selection, the security element adds the card identifiers and card information of the virtual cards to be added that are not selected by the user to the card pool in the local cache; or, the security element deletes the card identifiers and card information of the virtual cards to be deleted that are not selected by the user from the card pool in the local cache.
[0096] In the embodiment of the present disclosure, through the above-mentioned card pool management method, the security element can manage the locally cached card pool, add cards or delete cards, and then make card recommendations based on the pre-selected card pool, thereby achieving efficient card management and improving card selection efficiency.
[0097] Furthermore, the card pool can also be updated regularly or irregularly according to user needs; or, the card pool can also be updated according to the card swiping results of the card reading device. For example, if the swiping results of all the cards identified in the card recommendation table are all failed, the user may need to manually add a new card that matches the card reading device and trigger the add card instruction to adjust the card pool by the security element.
[0098] In the disclosed embodiment, the intelligent card selection model can be used to pre-select cards for users, automatically switch cards, reduce the time spent on card swiping, and thus improve the user's card swiping experience.
[0099] Furthermore, before the user uses the electronic device, the security element inputs the signal frequency, signal envelope, signal slope, signal phase, radio frequency power, geographic location, geomagnetism, acquisition time and card pool of the card selection data group into a pre-trained smart card selection model, selects the first card identifier as the first target card from the first recommendation table output by the smart card selection model, reads the first contactless protocol parameters of the first target card and writes them into the near field communication controller.
[0100] Furthermore, the algorithm of the smart card selection model can be a weighted calculation method such as weighted averaging, weighted voting, or weighted ranking. During the training process of the smart card selection model, the sample card selection data set is used as input, and the ranking labels of each virtual card are used as output. The smart card selection model is iteratively trained to obtain a pre-trained smart card selection model.
[0101] Step S102: The near field communication controller receives a first card swiping request triggered by a card reader.
[0102] In the embodiment of the present disclosure, after the security element pre-selects a card and writes the first contactless protocol parameters into the near-field communication controller, the user places the electronic device close to the card reader, the card reader triggers a first card swipe request and transmits an RF signal, and the near-field communication controller receives the first card swipe request triggered by the card reader, and at the same time collects signal information from the signal field of the RF signal and synchronizes it to the security element.
[0103] Step S103: The near field communication controller responds to the first card swiping request using the first contactless protocol parameters.
[0104] In the embodiment of the present disclosure, after receiving the first card swiping request, the near field communication controller responds to the first card swiping request using the first contactless protocol parameter, so that the card reader performs an anti-collision check on the first contactless protocol parameter and returns the anti-collision check result to the near field communication controller.
[0105] In the embodiment of the present disclosure, through the smart card selection method of the present disclosure, the security element pre-selects the card and provides the contactless protocol parameters for anti-collision verification for the near-field communication controller, which can avoid the tediousness of manual card selection, improve the user experience, and do not require system-level chip processing, thereby improving response sensitivity and card cutting efficiency; and, smart card selection can be achieved through the cooperation of the security element and the near-field communication controller. Since the near-field communication controller can power the security element, the smart card selection method of the present disclosure can be executed even in the off state, thereby improving the user experience and increasing the convenience of card cutting.
[0106] Furthermore, the card types of various cards in the card pool include three categories: type 1 card, type 2 card and type 3 card. Type 1 card can be a business card used for various business functions such as consumption, payment, and transfer, type 2 card can be an encrypted access card, and type 3 card can be an ordinary non-encrypted access card. The embodiment of the present application does not limit this. The card swiping process of type 1 card includes anti-collision verification and business verification, the card swiping process of type 2 card includes anti-collision verification and authentication verification, and the card swiping process of type 3 card only includes anti-collision verification. Therefore, the card swiping processes of different types of cards are different. Type 3 card only needs to perform anti-collision verification, and the anti-collision verification result is the card swiping result; type 1 card and type 2 card include two rounds of verification, anti-collision verification is the first round of verification, and the anti-collision verification result can only be used as a basis for judging whether to enter the second round of verification.
[0107] Furthermore, when the first contactless protocol parameter anti-collision check fails, it can be determined that the type 1 card and the type 2 card cannot enter the second round of verification, and the card swiping result of the type 3 card is a card swiping failure, so the near field communication controller re-issues the smart card selection instruction to perform smart card selection; when the first contactless protocol parameter anti-collision check succeeds, the type 1 card and the type 2 card can enter the second round of verification, and the card swiping result is subsequently determined based on the verification result of the second round of verification. For the type 3 card, the card swiping result can be directly determined as a card swiping success. That is, as shown in FIG4 , the method for processing the anti-collision check result disclosed in the present invention includes the following steps:
[0108] In an embodiment of the present disclosure, the method for processing the anti-collision check result of the present disclosure is executed by a near field communication controller.
[0109] Step S401: receiving the anti-collision check result returned by the card reader.
[0110] In the embodiment of the present disclosure, the near field communication controller receives an anti-collision check result returned by the card reader device, which is obtained by performing an anti-collision check on the first contactless protocol parameter.
[0111] Step S402, determine whether the anti-collision check result is successful. If yes, go to step S403; if not, go to step S406.
[0112] In the embodiment of the present disclosure, for Type 1 and Type 2 cards, the anti-collision verification result of a successful verification includes a verification instruction, which is used for the security element to perform a second round of verification; for Type 3 cards, the anti-collision verification result of a successful verification can directly determine that the card swiping result is successful.
[0113] Step S403, determine whether the anti-collision check result carries a check instruction, if yes, go to step S404; if not, go to step S405.
[0114] In the embodiment of the present disclosure, when the anti-collision check result is successful, the near field communication controller determines whether to enter the second round of verification based on whether the anti-collision check result carries a verification instruction.
[0115] Furthermore, when the anti-collision check result carries a check instruction, it indicates that the card type corresponding to the card reader is a Type 1 card or a Type 2 card, and the near field communication controller sends the check instruction to the secure element for processing.
[0116] Step S404: Send the verification instruction to the security element.
[0117] In the embodiment of the present disclosure, when the anti-collision check result carries a check instruction, the near field communication controller sends the check instruction to the secure element, and the secure element performs a second round of check.
[0118] Step S405: Determine that the card swiping result of the first card swiping request is successful.
[0119] In the embodiment of the present disclosure, when the anti-collision check result is successful and no verification instruction is carried, it means that the card type corresponding to the card reading device is a Type 3 card, and the near-field communication controller can directly determine that the card swiping result of the first card swiping request is successful.
[0120] Furthermore, after the three-type card is successfully swiped, it also includes:
[0121] Generate a card swiping record for the first card swiping request, the card swiping record including the card swiping signal frequency, the card swiping signal envelope, the card swiping signal phase, the card swiping signal radio frequency power, the card swiping geographic location, the card swiping geomagnetism, the card swiping time, and the card swiping card identifier.
[0122] Step S406: Send a smart card selection instruction to the secure element.
[0123] In the embodiment of the present disclosure, when the anti-collision check result is a check failure, the near field communication controller sends a smart card selection instruction to the secure element, so that the secure element reselects a card.
[0124] In the embodiment of the present disclosure, through the processing method of the anti-collision verification result of the present disclosure, different types of cards are responded to in different ways to adapt to diverse usage scenarios. The application scalability of the card selection method is strong, and the response sensitivity and efficiency of card cutting in different scenarios are enhanced, thereby improving the user experience and convenience of card cutting.
[0125] In an embodiment of the present disclosure, after receiving a verification instruction, the secure element processes the verification instruction using different verification methods depending on the type of verification instruction. The types of verification instructions include business instructions and authentication instructions. As shown in FIG5 , the processing method of the verification instruction of the present disclosure includes the following steps:
[0126] In an embodiment of the present disclosure, the method for processing the verification instruction of the present disclosure is executed by a secure element.
[0127] Step S501: receiving a verification instruction.
[0128] In the embodiment of the present disclosure, the secure element receives a verification instruction sent by the near field communication controller.
[0129] Step S502, determine whether the verification instruction is a business instruction, if yes, go to step S503; if not, go to step S504.
[0130] Step S503: matching the target application identifier, reading the service parameters of the target application identifier to respond to the service instruction.
[0131] In the embodiment of the present disclosure, the verification instruction is a business instruction, indicating that the card type corresponding to the card reader is a type 1 card - a business card. The secure element responds to the business instruction using the business parameters of the target application identifier. As shown in FIG6 , the method for processing the business instruction of the present disclosure includes the following steps:
[0132] Step S601: The secure element receives a service instruction.
[0133] In the embodiment of the present disclosure, when the verification instruction is a business instruction, it indicates that the card type corresponding to the card reading device is a type 1 card.
[0134] In step S602, the security element determines whether the card selection data set has been updated. If yes, the process goes to step S603; if not, the process goes to step S610.
[0135] In the embodiment of the present disclosure, as long as any one of the signal frequency, signal envelope, signal slope, signal phase, signal RF power, geographic location, geomagnetism, and card pool changes, the secure element can determine that the card selection data set has been updated.
[0136] In step S603 , the secure element inputs the updated card selection data set into the smart card selection model to obtain a second recommendation table output by the smart card selection model.
[0137] In the embodiment of the present disclosure, when the card selection data group is updated, the secure element inputs the updated card selection data group into the smart card selection model to obtain a second recommendation table.
[0138] Step S604: The secure element matches a target application identifier from the second recommendation table.
[0139] In the disclosed embodiments, a card may correspond to at least one application identifier. If a card corresponds to multiple application identifiers, the application parameters corresponding to the multiple application identifiers in the secure element are the same. The application parameters include contactless protocol parameters, service parameters, etc. Therefore, if a card corresponds to multiple application identifiers, one of the multiple application identifiers is typically selected as the application identifier corresponding to the card identifier.
[0140] Furthermore, based on whether the service instruction includes a local application identifier, the secure element determines whether to search the second recommendation table for a default application identifier as the target application identifier, or to search the second recommendation table for an application identifier that matches the local application identifier in the service instruction as the target application identifier. The default application identifier is pre-selected and can be selectively set based on the card's frequency of use, different usage scenarios, and the like.
[0141] Furthermore, when the business instruction does not include a local application identifier, when the security element searches for a default application identifier as the target application identifier from the second recommendation table, the default application identifier found one by one from the application identifier corresponding to the card identifier in the second recommendation table is used as the target application identifier.
[0142] Alternatively, when a service instruction includes a partial application identifier, when the secure element searches the second recommendation table for an application identifier that matches the partial application identifier of the service instruction as the target application identifier, it compares the partial application identifiers with the application identifiers corresponding to the card identifier in the second recommendation table one by one to determine whether the partial application identifier can partially match each application identifier corresponding to the second recommendation table. The secure element then uses the application identifier that can partially match, i.e., includes the partial application identifier, as the target application identifier. For example, if the application identifiers corresponding to the card identifier are 000***225637, 551***565637, or 452***458612, and the partial application identifier is 5637, then 000***225637 and 551***565637 are used as target application identifiers, and 452***458612 is not used as the target application identifier.
[0143] In an embodiment of the present disclosure, when it is determined that there is no default application identifier for the application identifier corresponding to each card identifier in the second recommendation table, or that it cannot be locally matched with the local application identifier, the security element directly determines that the swiping result of the first card swiping request is a card swiping failure.
[0144] Furthermore, a prompt of "default application identifier does not exist, card swiping failed" or "local application identifier matching failed, card swiping failed" is fed back to the front end of the electronic device, and the user is asked to reset the default application identifier or add a new card that matches the card reader to the card pool to facilitate smooth card cutting.
[0145] Step S605 : The secure element reads the service parameters of the target application identifier and sends the service parameters to the card reader through the near field communication controller.
[0146] In the embodiment of the present disclosure, the secure element sends the first service parameter to the near field communication controller, and the near field communication controller then sends the first service parameter to the card reader, so that the secure element transparently transmits the first service parameter to the card reader through the near field communication controller.
[0147] In step S606, the NFC controller receives the service verification result of the service parameter returned by the card reader and determines whether the service verification result is successful. If yes, the process goes to step S607; if not, the process goes to step S608.
[0148] Step S607: The near field communication controller determines that the card swiping result of the first card swiping request is successful.
[0149] In the embodiment of the present disclosure, when the service verification result is successful, it means that the card reader device is unblocked and the first type card is swiped successfully. Therefore, the near field communication controller can directly determine that the swiping result of the first card swiping request is successful.
[0150] Furthermore, after a type 1 card is successfully swiped, the following steps are also included:
[0151] Generate a card swiping record for the first card swiping request, the card swiping record including the card swiping signal frequency, the card swiping signal envelope, the card swiping signal phase, the card swiping signal radio frequency power, the card swiping geographic location, the card swiping geomagnetism, the card swiping time, and the card swiping card identifier.
[0152] Step S608: The near field communication controller sends the service verification result to the secure element.
[0153] In the embodiment of the present disclosure, when the first service verification result is verification failure, it is necessary to reselect the card, so the near field communication controller sends the first service verification result of verification failure to the secure element.
[0154] Step S609: the security element triggers a fake exit operation.
[0155] In the embodiment of the present disclosure, since the card reader device is unblocked and the card is swiped successfully, the near-field communication controller can directly determine the successful card swiping result without sending it to the security element. Therefore, the security element usually only receives the business verification result of the failed verification. In response to the business verification result of the failed verification, the security element triggers a false departure operation, causing the card reader device to think that the electronic device has left the signal field of the card reader device. Subsequently, another electronic device enters the signal field of the card reader device. At this time, the card reader device will re-initiate a second card swiping request to the electronic device after the false departure operation.
[0156] Furthermore, in the case where no service verification result is received, the secure element may directly determine that the card swiping result of the first card swiping request is a successful card swiping.
[0157] Step S610: The secure element matches the target application identifier from the first recommendation table, and then the process goes to step S605.
[0158] In the disclosed embodiment, if the card selection data set does not have an update, the secure element matches a default application identifier from the first recommendation table as the target application identifier. Alternatively, the secure element matches an application identifier from the first recommendation table that matches the local application identifier of the service instruction as the target application identifier. The method for matching the target application identifier in the first recommendation table is the same as the method for matching the target application identifier in the second recommendation table and will not be further described here.
[0159] In the embodiment of the present disclosure, through the business instruction processing method of the present disclosure, the security element decides to match the target application identifier in the recommendation table before or after the update based on whether the card selection data group is updated, and then reads the corresponding business parameters to respond to the business instruction. It decides whether to trigger a false departure operation based on the business verification result of the card reading device to re-accept the card swiping request of the card reading device, and re-performs the anti-collision check using the first contactless protocol parameter that has been successfully verified, and repeats this process until the final card swiping result of a type of card is determined, thereby realizing intelligent card cutting, which can improve card selection efficiency and enhance card cutting performance.
[0160] In an embodiment of the present disclosure, after the service verification result is a verification failure and the secure element triggers a false-leave operation, the secure element and the near-field communication controller trigger different response actions depending on whether the cause of the service verification failure is related to the first contactless protocol parameter. As shown in FIG7 , the response method for the false-leave operation of the service instruction of the present disclosure includes the following steps:
[0161] In step S701, the secure element determines whether the verification result of the service verification is a verification failure and whether the reason is related to the first contactless protocol parameter. If so, the process goes to step S702; if not, the process goes to step S705.
[0162] Step S702: The secure element updates the first contactless protocol parameters and sends the updated first contactless protocol parameters to the near field communication controller.
[0163] In an embodiment of the present disclosure, when the security element determines that the verification result of the service verification is that the verification failure is related to the first contactless protocol parameter, it is necessary to update the first contactless protocol parameter and send the updated first contactless protocol parameter to the near field communication controller to respond to the card reading device.
[0164] Furthermore, the secure element determines updated first contactless protocol parameters according to whether the card selection data group is updated, wherein:
[0165] If the card selection data set is updated, the secure element inputs the updated card selection data set into the smart card selection model, reselects a second target card different from the first target card from a second recommendation table output by the smart card selection model, and reads the contactless protocol parameters of the second target card as the updated first contactless protocol parameters;
[0166] Alternatively, when the card selection data group is not updated, a second target card different from the first target card is reselected from the first recommendation table, and the contactless protocol parameters of the second target card are read as the updated first contactless protocol parameters.
[0167] Step S703: The near field communication controller receives a second card swiping request triggered by the card reader after the fake leave operation.
[0168] Step S704: the near field communication controller responds to the second card swiping request using the updated first contactless protocol parameters.
[0169] Step S705: The near field communication controller receives a second card swiping request triggered by the card reader after the fake leave operation.
[0170] In the embodiment of the present disclosure, when the security element determines that the verification result of the service verification is that the reason for the verification failure is unrelated to the first contactless protocol parameter, there is no need to update the first contactless protocol parameter. The near-field communication controller still uses the first contactless protocol parameter that succeeded in the previous anti-collision verification to respond to the card reading device, avoiding the time, communication and other costs of requesting the contactless protocol parameter from the security element again, thereby improving the card cutting performance.
[0171] Step S706: The near field communication controller responds to the second card swiping request using the first contactless protocol parameters.
[0172] In the embodiment of the present disclosure, when the first contactless protocol parameter that succeeded in the previous anti-collision check is used to respond to the second card swiping request again, the anti-collision check result must be a successful check. Therefore, the near-field communication controller directly transmits the business instructions carried in the anti-collision check result to the security element again, and repeats the aforementioned business verification process until the card swiping is successful.
[0173] In the embodiment of the present disclosure, through the response method of the false leaving operation of the business instruction of the present disclosure, for the false leaving operation triggered by the security element, different operations such as updating the first contactless protocol parameters or using the old first contactless protocol parameters to respond to the card reading device are performed according to whether the reason for the false leaving is related to the first contactless protocol parameters, so as to ensure the success of the business verification, achieve rapid response of card cutting and card selection success rate, and improve card cutting performance.
[0174] Step S504: In response to the authentication instruction, the security element generates a random number and performs authentication verification by interacting with the card reader through the near field communication controller.
[0175] In the embodiment of the present disclosure, the verification instruction is an authentication instruction, indicating that the card type corresponding to the card reader is a Type II card - an encrypted access control card. In response to the authentication instruction, the secure element generates an element random number and interacts with the card reader through a near field communication controller to perform authentication verification. As shown in FIG8 , the authentication instruction processing method of the present disclosure includes the following steps:
[0176] Step S801: The secure element receives the authentication instruction.
[0177] In the disclosed embodiment, the encrypted access card requires authentication verification. Therefore, after the anti-collision verification is successful, the card reader sends an authentication instruction to the security element.
[0178] In step S802 , the security element generates a random element number, and sends the random element number to the card reader through the near field communication controller.
[0179] In the disclosed embodiment, in response to an authentication instruction, the secure element generates a random number and sends it to the card reader via the near-field communication controller. The random number is an integer ranging from -2147483648 to 2147483647 (i.e., -2³⁻¹ to 2³⁻¹-1), occupying 4 bytes (i.e., 32 bits).
[0180] Step S803: The near field communication controller receives the encryption result returned by the card reader and sends the encryption result to the secure element.
[0181] In the embodiment of the present disclosure, when the card reading device issues an authentication instruction, it will generate a card reading random number, perform data calculation on the card reading random number, and obtain an encrypted ciphertext.
[0182] Furthermore, data operation refers to performing a 64-bit successor function calculation on the card reading random number.
[0183] Furthermore, after receiving the component random number, the card reading device uses the card reading random number, the component random number, the card reading key, and the application identifier of the first contactless protocol parameter that has been successfully verified corresponding to the authentication instruction to encrypt the encrypted ciphertext and obtain an encryption result.
[0184] In step S804, the security element performs authentication verification on the encryption result.
[0185] In the disclosed embodiment, the essence of authentication verification is actually the inverse operation of the encryption operation of the card reader device.
[0186] Step S8041: Decrypt the encryption result using the application identifier corresponding to the first contactless protocol parameter, the component random number, and the agreed component key to obtain an encrypted ciphertext and a decrypted random number.
[0187] In the embodiment of the present disclosure, the application identifier to which the first contactless protocol parameter corresponding to the authentication instruction successfully passes the anti-collision check is known to both the security element and the card reader device. The security element knows the application identifier when writing to the near-field communication controller, and the card reader knows the application identifier when performing the anti-collision check. Therefore, the security element first uses the agreed element key, the application identifier corresponding to the first contactless protocol parameter, and the element random number to decrypt the encryption result to obtain the encrypted ciphertext and the decrypted random number.
[0188] Furthermore, the decryption algorithm of the security element is the same as the encryption algorithm of the card reader device. The card reader device and the security element pre-agreed on an encryption / decryption key, and the card reading key and element key are stored in the card reader device and the security element respectively.
[0189] Step S8042: performing data operation on the decrypted random number to obtain an operation result.
[0190] In the embodiment of the present disclosure, the security element performs a data operation on the decrypted random number obtained by decryption to obtain an operation result.
[0191] Step S8043, determine whether the operation result is the same as the encrypted ciphertext, if yes, go to step S8044; if not, go to step S8045.
[0192] Step S8044: Determine if the authentication verification result is successful. In the disclosed embodiment, if the calculation result is the same as the encrypted ciphertext, it means that the decrypted random number is the same as the card reading random number, and the security element authentication verification result is successful.
[0193] Step S8045: Determine that the verification result of the authentication verification is verification failure.
[0194] In the embodiment of the present disclosure, when the operation result is different from the encrypted ciphertext, it means that the decrypted random number is different from the card reading random number, and the security element determines that the verification result of the authentication verification is a verification failure.
[0195] Step S805, determine whether the verification result of the authentication verification is successful. If yes, go to step S806; if not, go to step S807.
[0196] Step S806: The secure element determines that the first card swiping result of the first card swiping request is a successful card swiping.
[0197] In the embodiment of the present disclosure, when the verification result of the authentication verification is verification success, the card swiping result of the first card swiping request is determined to be card swiping success.
[0198] Furthermore, since the authentication instruction corresponds to a Type II card, after the Type II card is successfully swiped, the following steps are also included:
[0199] Generate a card swiping record for the first card swiping request, the card swiping record including the card swiping signal frequency, the card swiping signal envelope, the card swiping signal phase, the card swiping signal radio frequency power, the card swiping geographic location, the card swiping geomagnetism, the card swiping time, and the card swiping card identifier.
[0200] Furthermore, the security element performs a 96-bit successor function calculation on the decrypted random number and sends the calculation result to the card reader through the near field communication controller. The card reader will perform a 96-bit successor function operation on the random number read by the card reader and compare the result with the calculation result to determine whether to release the card.
[0201] Step S807: the security element triggers a fake exit operation.
[0202] In an embodiment of the present disclosure, when the authentication verification result is a verification failure, the security element triggers a false exit operation, causing the card reader device to believe that the security element has left the signal field of the card reader device and then re-entered the signal field of the card reader device, and continues to re-trigger operations such as the second card swiping request.
[0203] In the embodiment of the present disclosure, through the authentication instruction processing method of the present disclosure, the security element processes the authentication instruction of the card reading device, and through decryption, data calculation, etc., the card swiping result of the first card swiping request can be determined, the authentication verification of the second type card can be realized, and the card selection efficiency and card cutting performance can be improved.
[0204] Furthermore, after the authentication verification result is a verification failure and the secure element triggers a false exit operation, as shown in FIG9 , the method for responding to the false exit operation of the authentication instruction disclosed herein includes the following steps:
[0205] Step S901: The secure element updates the first contactless protocol parameters and sends the updated first contactless protocol parameters to the near field communication controller.
[0206] Furthermore, the secure element updates the first contactless protocol parameter in the same manner as in step S702 , and will not be described again herein.
[0207] Step S902: The near field communication controller receives a second card swiping request triggered by the card reader after the fake leave operation.
[0208] Step S903: The near field communication controller responds to the second card swiping request using the updated first contactless protocol parameters.
[0209] In the embodiment of the present disclosure, through the response method of the false leaving operation of the authentication instruction of the present disclosure, for the false leaving operation triggered by the security element, different operations such as updating the first contactless protocol parameter to respond to the card reading device are performed to ensure the success of the authentication verification, achieve rapid response of card cutting and card selection success rate, and improve card cutting performance.
[0210] In an embodiment of the present disclosure, as shown in FIG10 , the method for processing the smart card selection instruction of the present disclosure includes the following steps:
[0211] Step S1001: The secure element receives the smart card selection instruction.
[0212] In step S1002 , the security element determines whether the card selection data set has been updated. If so, the process goes to step S1003 ; if not, the process goes to step S1008 .
[0213] In step S1003 , the secure element inputs the updated card selection data set into the smart card selection model to obtain a second recommendation table output by the smart card selection model.
[0214] Step S1004: the secure element searches the second recommendation table for a second target card that is different from the first target card.
[0215] In an embodiment of the present disclosure, when the anti-collision check result is a check failure and the card selection data group has been updated, the security element inputs the updated card selection data group into the smart card selection model to obtain a second recommendation table, searches for a second target card different from the first target card from the second recommendation table, and responds to the smart card selection instruction.
[0216] Step S1005 : The secure element reads the second contactless protocol parameters of the second target card, and overwrites the near field communication controller with the second contactless protocol parameters.
[0217] Step S1006: The near field communication controller receives a second card swiping request triggered by the card reader.
[0218] In the embodiment of the present disclosure, after the secure element overwrites the near field communication controller with the second contactless protocol parameter, the near field communication controller waits for a second card swiping request triggered by the card reader.
[0219] Step S1007: The near field communication controller responds to the second card swiping request using the second contactless protocol parameters.
[0220] Step S1008 : The secure element searches the first recommendation table for a second target card that is different from the first target card, and then goes to step S1005 .
[0221] In the embodiment of the present disclosure, when the anti-collision check result is a check failure and the card selection data group does not have an update, the secure element searches the first recommendation table for a second target card different from the first target card and responds to the smart card selection instruction.
[0222] In the embodiment of the present disclosure, through the processing method of the smart card selection instruction of the present disclosure, in the case where the anti-collision check of the initially selected contactless protocol parameters fails, the security element responds to the smart card selection instruction and re-selects a new target card according to the update of the card selection data group to respond to the card swiping request, thereby improving the card selection efficiency and card cutting performance, responding sensitively, and enhancing the user's card cutting experience.
[0223] In the embodiment of the present disclosure, the security element is provided with a first smart card selection switch mark position, and the near-field communication controller is provided with a second smart card selection switch mark position. When the first smart card selection switch mark position and the second smart card selection switch mark position are both turned on, the security element and the near-field communication controller can cooperate to implement the smart card selection method of the present disclosure. Therefore, smart card cutting can be implemented regardless of whether the electronic device is in the power-on state or the power-off state.
[0224] Furthermore, only when the electronic device is powered on can the secure element and the near-field communication controller change the state values of the first smart card selection switch flag and the second smart card selection switch flag, where the state values include on and off. Before the electronic device is powered off, if the first smart card selection switch flag and the second smart card selection switch flag of the secure element and the near-field communication controller are not enabled, the secure element and the near-field communication controller will not be able to implement smart card switching after the electronic device is powered off. The electronic device may be a terminal.
[0225] Furthermore, as shown in FIG11 , the method for turning on the smart card selection switch of the present disclosure includes the following steps:
[0226] In step S1101 , the secure element and the near field communication controller receive an opening instruction.
[0227] In the embodiment of the present disclosure, there are three ways to issue the start instruction:
[0228] Method 1: The secure element and near-field communication controller receive an activation command from the card management application.
[0229] In the embodiment of the present disclosure, the electronic device also includes a card management application, which sends an opening instruction to the security element through SPI or Apdu Gate, and the card management application sends an opening instruction to the near field communication controller through the near field communication controller interface (NFC Controller Interface, referred to as NCI).
[0230] Method 2: The NFC controller receives the activation command from the card management application and sends the activation command to the secure element.
[0231] In the embodiment of the present disclosure, the near field communication controller sends an opening instruction to the secure element through the SSPI.
[0232] Method 3: The secure element receives an activation command from the card management application and sends the activation command to the NFC controller. The activation command is triggered by the user through the card management application's application interface.
[0233] Step S1102: In response to the on instruction, the secure element sets the state value of the first smart card selection switch flag to on, and the near field communication controller sets the state value of the second smart card selection switch flag to on.
[0234] In the embodiment of the present disclosure, through the method of turning on the smart card selection switch disclosed in the present disclosure, the communication of turning on instructions under different interaction modes between the card management application, the security element, and the near-field communication controller can be realized, so that the smart card selection system can better adapt to the actual electronic device usage scenarios and improve the card cutting efficiency and user experience in different usage scenarios.
[0235] In the embodiment of the present disclosure, before the secure element inputs the card selection data group into the smart card selection model, the method further includes:
[0236] Determine whether the state values of the first smart card selection switch flag and the second smart card selection switch flag are on, and execute the smart card selection method if the state values of the first smart card selection switch flag and the second smart card selection switch flag are on.
[0237] In the embodiment of the present disclosure, whether to execute the smart card selection method of the present disclosure is determined by determining whether the smart card selection switch flag is on, thereby improving card switching accuracy and performance. When both the first smart card selection switch flag and the second smart card selection switch flag are on, the smart card selection method of the present disclosure is used to perform smart card switching.
[0238] FIG12 is a schematic diagram of the main modules of the smart card selection device according to an embodiment of the present disclosure. As shown in FIG12 , the smart card selection device 1200 of the present disclosure includes:
[0239] The smart card selection module 1201 of the security element is used to input the card selection data group into the smart card selection model, select a first target card from the first recommendation table output by the smart card selection model, read the first contactless protocol parameters of the first target card, and write the first contactless protocol parameters to the near-field communication controller.
[0240] The receiving module 1202 of the near field communication controller is configured to receive a first card swiping request triggered by a card reading device.
[0241] The card switching module 1203 of the near field communication controller is configured to respond to the first card swiping request using the first contactless protocol parameters.
[0242] The exemplary embodiments of the present disclosure further provide an electronic device, including a secure element and a near field communication controller, for executing the method according to the embodiments of the present disclosure.
[0243] Furthermore, the electronic device also includes a card management application.
[0244] Exemplary embodiments of the present disclosure further provide 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 disclosure.
[0245] Exemplary embodiments of the present disclosure 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 cause the computer to perform the method according to the embodiment of the present disclosure.
[0246] With reference to Figure 13, the block diagram of an electronic device 1300 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, 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 disclosure described and / or required herein.
[0247] As shown in FIG13 , electronic device 1300 includes a computing unit 1301 that can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1302 or a computer program loaded from a storage unit 1308 into a random access memory (RAM) 1303. Various programs and data required for the operation of device 1300 may also be stored in RAM 1303. Computing unit 1301, ROM 1302, and RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to bus 1304.
[0248] Multiple components within electronic device 1300 are connected to I / O interface 1305, including an input unit 1306, an output unit 1307, a storage unit 1308, and a communication unit 1309. Input unit 1306 can be any type of device capable of inputting information into electronic device 1300. Input unit 1306 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 1307 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 1304 may include, but is not limited to, a magnetic disk or an optical disk. Communication unit 1309 allows electronic device 1300 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 chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0249] The computing unit 1301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1301 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 1301 performs the various methods and processes described above. For example, in some embodiments, the methods of Figures 1 to 11 may be implemented as a computer software program that is tangibly included in a machine-readable medium, such as a storage unit 1308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1300 via ROM 1302 and / or communication unit 1309. In some embodiments, the computing unit 1301 may be configured to perform the methods of Figures 1 to 11 in any other appropriate manner (e.g., by means of firmware).
[0250] The program code for implementing the method of the present disclosure 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 when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram 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.
[0251] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction 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.
[0252] As used in this disclosure, 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 machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.
[0253] 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).
[0254] 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.
[0255] 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.
Claims
1. An intelligent card selection method, characterized in that, The method is applied to an electronic device, which includes a security element and a near field communication controller; the intelligent card selection method includes: The security element inputs a card selection data group into an intelligent card selection model, selects a first target card from a first recommendation list output by the intelligent card selection model, reads first contactless protocol parameters of the first target card, and writes the first contactless protocol parameters into the near field communication controller; The near field communication controller receives a first card swiping request triggered by a card reading device; The near field communication controller uses the first contactless protocol parameters to respond to the first card swiping request.
2. The intelligent card selection method according to claim 1, wherein It further includes: The near field communication controller receives an anti-collision verification result of performing anti-collision verification on the first contactless protocol parameters returned by the card reading device; The near field communication controller determines whether the anti-collision verification result is verification successful, and when the anti-collision verification result is verification successful, determines whether the anti-collision verification result includes a verification instruction; When the anti-collision verification result is verification failed, the near field communication controller sends an intelligent card selection instruction to the security element.
3. The intelligent card selection method according to claim 2, wherein The determination of whether the anti-collision verification result includes a verification instruction further includes: If the anti-collision verification result includes a verification instruction, the near field communication controller sends the verification instruction to the security element; If the anti-collision verification result does not include a verification instruction, the near field communication controller determines that the card swiping result of the first card swiping request is card swiping successful.
4. The intelligent card selection method according to claim 3, wherein It further includes: The security element receives the verification instruction and determines the type of the verification instruction; If the verification instruction is a service instruction, the security element matches a target application identifier, reads service parameters of the target application identifier to respond to the service instruction; If the verification instruction is an authentication instruction, in response to the authentication instruction, the security element generates an element random number, and interacts with the card reading device through the near field communication controller for authentication verification.
5. The intelligent card selection method according to claim 4, wherein The security element matches a target application identifier, reads service parameters of the target application identifier to respond to the service instruction, and further includes: The security element receives the service instruction, determines whether the card selection data group has an update. When the card selection data group has an update, the updated card selection data group is input into the intelligent card selection model to obtain a second recommendation list output by the intelligent card selection model, and the security element searches for the target application identifier from the second recommendation list; When the card selection data group has no update, the security element searches for the target application identifier from the first recommendation list; Reads service parameters of the target application identifier, and sends them to the card reading device through the near field communication controller to respond to the service instruction.
6. The intelligent card selection method according to claim 5, wherein It further includes: The near field communication controller receives a service verification result of performing service verification on the service parameters returned by the card reading device, and determines the service verification result; If the service verification result is verification failed, the near field communication controller sends the service verification result to the security element; In response to the service verification result of verification failed, the security element triggers a false departure operation; If the service verification result is successful verification, determine that the card swiping result of the first card swiping request is successful card swiping.
7. The intelligent card selection method according to claim 6, wherein, In response to the service verification result of verification failure, the security element triggering a fake departure operation further includes: The security element determines that the reason for the service verification result of verification failure has nothing to do with the first NFC protocol parameter; The near field communication controller receives a second card swiping request triggered by the card reading device after the fake departure operation; The near field communication controller responds to the second card swiping request using the first NFC protocol parameter.
8. The intelligent card selection method according to claim 6, wherein In response to the service verification result of verification failure, the security element triggering a fake departure operation further includes: The security element determines that the reason for the service verification result of verification failure is related to the first NFC protocol parameter; The security element updates the first NFC protocol parameter and sends the updated first NFC protocol parameter to the near field communication controller; The near field communication controller receives a second card swiping request triggered by the card reading device after the fake departure operation; The near field communication controller responds to the second card swiping request using the updated first NFC protocol parameter.
9. The intelligent card selection method according to claim 5, wherein, The security element searches for the target application identifier from the first recommendation list, and further includes: The security element determines whether the application identifiers corresponding to each card include a partial application identifier; If it includes a partial application identifier, the security element searches for an application identifier that matches the partial application identifier from the first recommendation list as the target application identifier; Or, If it does not include a partial application identifier, the security element searches for the default application identifier from the first recommendation list as the target application identifier.
10. The intelligent card selection method according to claim 5, wherein, The security element searches for the target application identifier from the second recommendation list, and further includes: The security element determines whether the application identifiers corresponding to each card include a partial application identifier; If it includes a partial application identifier, the security element searches for an application identifier that matches the partial application identifier from the second recommendation list as the target application identifier; Or, If it does not include a partial application identifier, the security element searches for the default application identifier from the second recommendation list as the target application identifier.
11. The intelligent card selection method according to claim 4, wherein The security element generates an element random number and performs authentication verification through interaction with the card reading device by the near field communication controller, and further includes: The security element sends the element random number to the card reading device through the near field communication controller; The near field communication controller receives the encryption result returned by the card reading device and sends the encryption result to the security element; The security element performs authentication verification on the encryption result to determine the card swiping result of the first card swiping request.
12. The intelligent card selection method according to claim 11, wherein Performing authentication verification on the encryption result to determine the card swiping result of the first card swiping request further includes: The security element decrypts the encryption result using the application identifier corresponding to the first NFC protocol parameter, the element random number, and the agreed element key to obtain the encrypted ciphertext and the decryption random number; The security element performs data operations on the decrypted random number to obtain an operation result, and determines whether the operation result is the same as the encrypted ciphertext; When the operation result is the same as the encrypted ciphertext, the security element determines that the card swiping result of the first card swiping request is successful card swiping; When the operation result is different from the encrypted ciphertext, the security element triggers a false departure operation.
13. The intelligent card selection method according to claim 12, wherein The security element triggering the false departure operation further includes: The security element updates the first NFC protocol parameter and sends the updated first NFC protocol parameter to the near field communication controller; The near field communication controller receives a second card swiping request triggered by the card reading device after the false departure operation; The near field communication controller responds to the second card swiping request by using the updated first NFC protocol parameter.
14. The intelligent card selection method according to claim 2, wherein When the anti-collision verification result is verification failure, the near field communication controller sending an intelligent card selection instruction to the security element further includes: The security element searches in the first recommendation list for a second target card different from the first target card, reads the second NFC protocol parameter of the second target card, and uses the second NFC protocol parameter to overwrite the near field communication controller to perform an intelligent card selection card swiping loop.
15. The intelligent card selection method according to claim 2, wherein When the anti-collision verification result is verification failure, the near field communication controller sending an intelligent card selection instruction to the security element further includes: In response to the intelligent card selection instruction, the security element determines whether the card selection data group has been updated. When the card selection data group has been updated, the updated card selection data group is input into the intelligent card selection model to obtain a second recommendation list output by the intelligent card selection model; The security element searches in the second recommendation list for a second target card different from the first target card, reads the second NFC protocol parameter of the second target card, and uses the second NFC protocol parameter to overwrite the near field communication controller to perform an intelligent card selection card swiping loop.
16. The intelligent card selection method according to any one of claims 1-15, characterized in that, The card selection data group includes signal frequency, signal envelope, signal phase, signal RF power, geographical location, geomagnetism, acquisition time, and card pool.
17. The intelligent card selection method according to claim 16, wherein The determination of the card pool includes: The security element receives an add card instruction or a delete card instruction sent by the card management application; wherein, the add card instruction includes the card identifier of the virtual card to be added, and the delete card instruction includes the card identifier of the virtual card to be deleted; In response to the add card instruction or the delete card instruction, the security element adds the card identifier of the virtual card to be added to the card pool, or deletes the card identifier of the virtual card to be deleted from the card pool.
18. The intelligent card selection method according to any one of claims 1-17, characterized in that, When the card swiping is successful, it further includes: Generating a card swiping record, where the card swiping record includes card swiping signal frequency, card swiping signal envelope, card swiping signal phase, card swiping signal RF power, card swiping geographical location, card swiping geomagnetism, card swiping time, and card swiping card identifier.
19. The intelligent card selection method according to claim 1, wherein, The security element is provided with a first intelligent card selection switch flag bit, and the near field communication controller is provided with a second intelligent card selection switch flag bit; Before intelligent card selection, it further includes: The security element and the near field communication controller receive an enabling instruction; In response to the enabling instruction, the security element sets the status value of the first intelligent card selection switch flag bit to enabled, and the near field communication controller sets the status value of the second intelligent card selection switch flag bit to enabled.
20. The intelligent card selection method according to claim 19, wherein The security element and the near field communication controller receiving the enabling instruction includes: The security element and the near field communication controller receive the enabling instruction sent by the card management application; Or, The near field communication controller receives the enabling instruction sent by the card management application and sends the enabling instruction to the security element; Or, The security element receives the enabling instruction sent by the card management application and sends the enabling instruction to the near field communication controller.
21. An intelligent card selection device, characterized in that, The apparatus is applied to an electronic device, the electronic device includes a security element and a near field communication controller; the intelligent card selection device includes: The intelligent card selection module of the security element is configured to input a card selection data group into an intelligent card selection model, select a first target card from a first recommendation list output by the intelligent card selection model, read first non-contact protocol parameters of the first target card, and write the first non-contact protocol parameters into the near field communication controller; The receiving module of the near field communication controller is configured to receive a first card swiping request triggered by a card reading device; The card switching module of the near field communication controller is configured to respond to The first card swiping request.
22. An electronic device, comprising a security element and a near field communication controller, configured to execute the intelligent card selection method according to any one of claims 1-20.
23. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the intelligent card selection method according to any one of claims 1-20.
Citation Information
Patent Citations
Near field communication card determination method and device, storage medium and electronic equipment
CN111464692A
Near field communication (NFC) method, device and electronic equipment
CN111581994A
Smart card application selection method and device, electronic equipment and storage medium
CN115604653A
Intelligent card selection method and device and electronic equipment
CN117997382A
Preprocessing method and device for configuring NFC smart card
US20210136562A1