+

WO2018161224A1 - Data processing method and related device - Google Patents

Data processing method and related device Download PDF

Info

Publication number
WO2018161224A1
WO2018161224A1 PCT/CN2017/075786 CN2017075786W WO2018161224A1 WO 2018161224 A1 WO2018161224 A1 WO 2018161224A1 CN 2017075786 W CN2017075786 W CN 2017075786W WO 2018161224 A1 WO2018161224 A1 WO 2018161224A1
Authority
WO
WIPO (PCT)
Prior art keywords
nfcc
application
message
user identity
identity verification
Prior art date
Application number
PCT/CN2017/075786
Other languages
French (fr)
Chinese (zh)
Inventor
赵晓娜
梅敬青
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2017/075786 priority Critical patent/WO2018161224A1/en
Priority to CN201780026377.6A priority patent/CN109076428B/en
Publication of WO2018161224A1 publication Critical patent/WO2018161224A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing

Definitions

  • the present application relates to the field of wireless communications, and in particular, to a data processing method and related apparatus.
  • NFC Near field communication
  • RFID radio frequency identification
  • the NFC device is mainly composed of three functional entities: a device host (DH), a near rield communication controller (NFCC), and a near field communication execution environment (NFCEE).
  • DH is responsible for the management of NFCC, such as initialization, configuration and power management;
  • NFCC is responsible for the physical transmission of data through the RF interface and antenna;
  • NFCEE can provide a safe execution environment for NFC applications.
  • the NFC controller interface (NCI) defines a logical interface for communication between DH and NFCC. The communication between DH and NFCC can be performed through the NCI protocol.
  • the host control interface can be used between NFCC and NFCEE.
  • the host controller interface (HCI) communication protocol communicates.
  • the NFC device includes at least one NFCEE, and at least one card application can be installed on each NFCEE.
  • multiple card applications on the same NFCEE, or multiple card applications on different NFCEEs can be activated simultaneously, and each The card application has a corresponding application identifier (AID); when the card application on the NFC device is activated, the card applies related radio frequency (RF) parameters (such as RF technical parameters, RF protocol parameters, etc.), Routing tables in listen mode (such as AID-based routing entries, protocol data unit pattern APDU Pattern routing entries, protocol-based routing entries, technology-based routing entries, etc.) are configured on the NFCC.
  • RF radio frequency
  • the peer NFC device (such as the point-of-sale terminal POS) discovers the RF protocol corresponding to the activated card application in the RF discovery process, so that the peer NFC device according to its own service requirements (such as banking, bus service, and access control service) Etc.) Select one of the card applications to communicate by applying a selection command (such as selectAID). Accordingly, the NFC device receives the application selected by the peer NFC device. Command matching routing entry based on the routing table to the application selection command, and subsequently received data frame is forwarded to the matching routing entry corresponding NFCEE processed.
  • a selection command such as selectAID
  • One of the existing standards can activate multiple card applications on one or more NFCEE at the same time, and does not fully consider that different types of card applications may have different requirements for security and convenience in implementation, such as bank cards.
  • the application requires more safety than the convenience requirement, and the bus card application requires higher convenience than the security requirement. Therefore, it is not conducive to actual product development, which has some impact on user experience or user capital security.
  • it is possible to design a scheme that activates only one card application at a time. When the bus card is activated, the bank POS machine reports an error, and when the bank card is activated, the bus POS machine requires the user.
  • Switching card application and other issues it is also possible to design a scheme to activate multiple card applications at a time, but limit the conditions used by the card application (such as which mobile phone energy state can be used by the routing item corresponding to the card application (such as AID-based routing items) ), wherein the mobile phone energy status is such as shutdown, unlock & bright screen, lock & bright screen, unlock & unlock screen, lock & unlock screen, etc., assuming that the AID-based routing item corresponding to the bank card application can only be unlocked & Under the bright screen, the user must first illuminate the screen and unlock the phone before swiping the bank card for payment.
  • the conditions used by the card application such as which mobile phone energy state can be used by the routing item corresponding to the card application (such as AID-based routing items)
  • the mobile phone energy status is such as shutdown, unlock & bright screen, lock & bright screen, unlock & unlock screen, lock & unlock screen, etc.
  • the user operation is cumbersome and the experience is not good; if the bank card application is based on the AID-based If the routing item can be used in the off-screen state, there is a risk of being stolen or mistakenly brushed for a passwordless credit card or some scenarios that support small-sized confidential business.
  • the embodiment of the present application provides a data processing method and related device, which are used to provide a unified solution for card applications with different security and convenience requirements.
  • the embodiment of the present application provides a data processing method, which is used by a host DH of a first terminal, where the first terminal further includes a near field communication controller NFCC and at least one near field communication execution environment NFCEE, Methods include:
  • the DH receives the first message sent by the NFCC, where the first message may be used to notify the DH that the second terminal is to select the first application on the first terminal, and/or to request the DH to perform the user identity verification operation.
  • the first application may be any type of card application activated on the first terminal, such as a bank card application and a bus card application, and the request for the DH to perform the user identity verification operation is required when using the first application.
  • Verifying the identity of the user, the user identity mentioned here is the identity of the current user of the first terminal, or, further, the first application on the first terminal or the electronic wallet where the first application is located (such as a mobile phone manufacturer such as huawei)
  • the wallet application such as pay, apple pay, and the controller of the wallet application such as ICBC mobile banking and google wallet launched by various banks or third parties (that is, knowing the password of the e-wallet or presetting the fingerprints related to the e-wallet)
  • the identity of the user, in addition, the second terminal is a terminal that performs NFC communication with the first terminal;
  • the DH determines that user authentication is required, the DH performs a user identity verification operation, wherein it can be understood that after the DH performs the user identity verification operation, the DH can learn according to the result of the user identity verification operation. Whether the user identity can use the first application.
  • the user authentication mentioned here is an operation that needs to be performed before using the first application, that is, determining whether the first application can be used by determining whether the user identity verification is passed, and only allowing the first application to be used after the user authentication is passed. Performing subsequent services with the second terminal.
  • the DH sends a second message to the NFCC, where the second message is a first command that allows the NFCC to perform data routing on the data frame, and the data frame is the second terminal. Sent to the NFCC and used to indicate that the first application is to be selected.
  • the embodiments of the present application have the following advantages:
  • the present application has a unified solution according to the different security and convenience requirements of different card applications, which can make the implementation simpler, the development cost is lower, the cycle is shorter, etc., and the user authentication is required.
  • the application of the card indicates that the security requirement is higher than the convenience requirement; for the card application that does not require the user identity verification, the convenience requirement is higher than the security requirement; therefore, the security requirements of the embodiment of the present application can be higher than
  • the card application for convenience requires user authentication, and the card application with higher convenience than the security requirement can realize the function of fast payment, and can also avoid the problems of affecting the user experience or complicating the user operation as described above.
  • the method before the DH receives the first message sent by the NFCC, the method further includes:
  • the DH sends and configures a first routing entry to the NFCC, where the first routing entry includes a user identity verification request identifier, where the user identity verification request identifier is used to indicate that the user needs to perform user identity verification when using the first application. Or no user authentication is required.
  • the DH may send the first user identifier verification request identifier to the NFCC after determining that the user identity verification request identifier corresponding to the first application indicates that the user needs to perform user identity verification when using the first application.
  • the routing item; or, whether the user authentication request identifier corresponding to the first application indicates whether the user needs or does not need to perform user authentication when using the first application the DH sends the first routing item including the user identity verification request identifier to the NFCC.
  • the user authentication request identifier is used to indicate that the user needs to perform user authentication when using the first application, or does not need to perform user authentication.
  • the DH configures the first routing item including the user identity verification requirement identifier to the NFCC, and the NFCC can conveniently learn, according to the user identity verification request identifier, whether the user identity is needed or not needed when using the first application. verification.
  • the DH determines that the user identity needs to be performed. Validation includes:
  • the DH When the DH receives the first message sent by the NFCC, and the function of the first message is used to notify the DH that the second terminal is to select the first application, in this scenario, the DH may be determined according to the user identity corresponding to the first application.
  • the identifier further determines whether user authentication is required or not, wherein the user authentication request identifier indicates that the user identity needs to be verified when the first application is used, and therefore, the DH determines that the user needs to perform the indication according to the user identity verification request identifier.
  • User authentication User authentication.
  • the DH since the first message does not indicate that the request DH performs the user identity verification operation, but notifies the DH second terminal that the first application is to be selected, the DH needs to determine the use of the first application by itself. Whether user authentication is required, it can be understood that the DH can obtain the user identity verification request identifier according to the registration information or the user indication information, or the user identity determined for each application according to the registration information or the user indication information. The user identification verification request identifier corresponding to the first application is obtained in the verification request identifier.
  • the method before the DH receives the first message that is sent by the NFCC, the method further includes:
  • the DH configures a second routing entry to the NFCC.
  • the user authentication request identifier corresponding to the first application indicates that the user identity needs to be verified when the first application is used, where the second routing entry includes the near field communication execution environment DH corresponding to the DH.
  • An identifier of the NFCEE which is used to indicate the near field communication execution environment DH-NFCEE corresponding to the DH.
  • the DH-NFCEE is not the NFCEE where the first application is located. It can be understood that the DH sends a second routing item to the NFCC.
  • the NFCC is configured with a route to DH-NFCEE.
  • the DH configures a route to the NFCC to point to the DH-NFCEE, so it is understandable that DH can simply point to DH-NFCEE according to the route corresponding to the first application to know that user identity verification is required when using the first application.
  • the DH receives the first message sent by the NFCC, and specifically includes:
  • the DH receives the first message sent by the NFCC, and the first message includes a data frame sent by the second terminal, where the data frame is used to notify the DH that the second terminal selects the first application;
  • the DH learns the first application according to the first message, and determines, according to the user identity verification request identifier corresponding to the first application, that the user identity verification is required when the first application is used, it may be understood that, at this time, the first Applying a corresponding user authentication request identifier indicates that user authentication is required when the first application is used;
  • the DH sends a second message to the NFCC, where the second message includes a third routing entry, where the third routing entry includes an identifier of the NFCEE where the first application is located. It can be understood that the identifier indicates the first application.
  • the NFCEE is located.
  • the data frame sent by the second terminal is directly forwarded as the first message, and the DH is notified.
  • This implementation manner is simpler and more convenient, and no need to configure the first message.
  • the method further includes:
  • the DH reconfigures the second routing entry to the NFCC, where the second routing entry includes an identifier of the near field communication execution environment DH-NFCEE corresponding to the DH, and is used to indicate the near field communication execution corresponding to the DH.
  • the DH may reconfigure the second routing entry to the NFCC when the DH does not receive the data frame sent by the second terminal for selecting the first application again within the preset time after the end of the communication. .
  • the DH reconfigures the second routing entry to the NFCC, so that after the first application is used, the user can automatically restore the route to wait for the next normal use of the first application.
  • the user identity verification request identifier may be determined by the DH according to the registration information of the first application and/or the user indication, where
  • the registration information of the first application includes an application type of the first application and/or a requirement parameter for indicating authentication.
  • the user identity verification request identifier is determined according to the registration information of the first application and/or the user indication, and the implementation manner is strong and easy to implement.
  • the DH performs a user identity verification operation, and specifically includes:
  • the DH determines that the user identity verification success flag corresponding to the first application exists, the DH determines, according to the user identity verification success flag, that the user identity verification operation passes;
  • the DH determines that there is no user identity verification success flag corresponding to the first application, the DH receives and determines the user identity information by using the identity verification module of the first terminal to determine whether the user identity verification operation passes.
  • this possible implementation method also considers the delay caused by the user to verify the fingerprint or other forms of identity information during the user authentication process or the user's usage habits, and may require the user to leave the NFC mobile phone and verify the NFC mobile phone. After the identity is successful, it is close to the POS machine, which improves the fault tolerance rate of the solution to some extent.
  • the user identity verification success flag is that the DH determines the user identity verification by using an identity verification module of the first terminal. The operation is saved after passing.
  • the method further includes:
  • the DH When the DH does not receive the first message sent by the NFCC again within the preset time period, the DH deletes the user identity verification success flag; or, after the DH determines that the user identity verification grass passes according to the user identity verification success flag, DH deletes the user authentication request token.
  • the user identity verification success flag is deleted in time after the user authentication success flag is used, which can effectively improve the security of the user identity verification.
  • the method further includes:
  • the DH When the DH determines that user authentication is not required, the DH sends a second message to the NFCC, wherein the second message is a second command that does not allow the NFCC to route the data frame.
  • the DH directly sends the first command to instruct the NFCC to route the data frame to the NFCEE where the first application is located, thereby effectively improving the use of the first application.
  • the processing speed increases the user experience.
  • the method further includes:
  • the DH may indicate the NFCC by sending a second message to the NFCC, where the second message is a second command that does not allow the NFCC to perform data routing on the data frame, to inform the NFCC not to perform data on the data frame. Routing processing; DH may not send any messages. It should be understood that when the NFCC does not receive any message within the preset time period, the NFCC does not route the data frame to the NFCEE where the first application is located.
  • the NFCC does not perform routing processing on the data frame, so that the security of using the first application can be effectively improved, and property loss may be prevented when the user is stolen.
  • the embodiment of the present application provides a data processing method, where the method is used for a near field communication controller NFCC of a first terminal, where the first terminal further includes a host DH and at least one near field communication execution environment NFCEE, where Methods include:
  • the NFCC receives the data frame sent by the second terminal, and finds a matching first routing item according to the data frame, where the data frame is used to indicate that the second terminal selects the first application on the first terminal,
  • the second terminal is a terminal that performs NFC communication with the first terminal;
  • the NFCC determines whether it needs to send the first message to the DH according to the preset condition, where the first message may be used to notify the DH that the second terminal is to select the first application on the first terminal. And/or, can be used to request DH to perform a user authentication operation;
  • the NFCC determines that the first message needs to be sent to the DH, then the NFCC sends the first message to the DH, it being understood that the first message can be used to perform any of the above steps or perform two functions simultaneously. ;
  • the NFCC when the NFCC receives the second message sent by the DH, the NFCC performs routing processing on the data frame according to the indication of the second message.
  • the embodiments of the present application have the following advantages:
  • the present application has a unified solution according to the different security and convenience requirements of different card applications, which can make the implementation simpler, the development cost is lower, the cycle is shorter, etc., and the user authentication is required.
  • the application of the card indicates that the security requirement is higher than the convenience requirement; for the card application that does not require the user identity verification, the convenience requirement is higher than the security requirement; therefore, the security requirements of the embodiment of the present application can be higher than
  • the card application for convenience requires user authentication, and the card application with higher convenience than the security requirement can realize the function of fast payment, and can also avoid the problems of affecting the user experience or complicating the user operation as described above.
  • the method further includes:
  • the NFCC determines that the first message does not need to be sent to the DH according to the preset condition, the NFCC routes the data frame, that is, the NFCC routes the data frame to the NFCEE where the first application is located.
  • the NFCC when the NFCC does not need to send the first message to the DH, the NFCC routes the data frame to the NFCEE where the first application is located, so that the routing and forwarding processing speed can be effectively improved.
  • the method before the NFCC finds the matched first routing item after receiving the data frame sent by the second terminal, the method further includes: :
  • the NFCC receives the first routing entry of the DH configuration, where the first routing entry includes the identifier of the first application and the first NFCEE identifier.
  • the first NFCEE identifier may be the identifier of the NFCEE where the first application is located, and The identification of the environment DH-NFCEE may be performed for the near field communication corresponding to the DH.
  • the NFCC before the NFCC finds the matched first routing item after receiving the data frame sent by the second terminal, the NFCC receives the first routing item including the first NFCEE identifier configured by the DH, so that the NFCC can be based in advance.
  • the first routing entry knows the NFCEE information, which NFCEE information should be routed to the data frame.
  • the first NFCEE identifier is an identifier of the NFCEE where the first application is located
  • the first routing entry is further The user authentication request identifier is included; the NFCC determines whether to send the first message to the DH according to the preset condition, including:
  • the NFCC determines, according to the user identity verification request identifier in the first routing item, whether to send the first message to the DH, and specifically, if the user identity verification request identifier indicates that the user identity needs to be verified when using the first application, The NFCC determines that the first message is to be sent to the DH; similarly, if the user identity verification request indicates that the user identity is not required to be used when the first application is used, the NFCC determines not to send the first message to the DH.
  • the NFCC judges according to the user identity verification request identifier in the first routing item, and can effectively determine that the first message needs to be sent to the DH or does not need to send the first message to the DH.
  • the NFCC determines, according to the preset condition, whether to send the first message to the DH, including:
  • the first message, the user authentication success flag is saved after the NFCC receives the message sent by the DH indicating that the user authentication operation passes.
  • the NFCC determines whether the current energy status or the identity verification success flag is The first message needs to be sent, so that the judgment can be accurately made and the timeliness and security of the NFC communication can be improved.
  • the NFCC determines, according to the current energy state of the first terminal, whether the first message needs to be sent to the DH, specifically including :
  • the NFCC determines that the first message needs to be sent to the DH, and it should be understood that the power of the first terminal can maintain the NFC communication. The NFCC determines that the first message needs to be sent to the DH. Secondly, when the current energy state of the first terminal is no power or power-off state, the NFCC determines that the first message does not need to be sent to the DH, it should be understood that when When the current energy state of a terminal is no power or power-off state, the DH of the first terminal cannot be used normally, and the message sent by the NFCC cannot be received, processed, or acknowledged. Therefore, the NFCC does not send the first message at this time. .
  • the first message is sent to the DH when the first terminal is not powered off or not, so that waste of resources on the NFCC can be effectively avoided.
  • the NFCC determines whether the presence or absence of the user identity verification success token corresponding to the first application needs to be sent to the DH.
  • the first message specifically includes:
  • the NFCC determines that the first message needs to be sent to the DH. It should be understood that when there is a user identity verification success flag, it indicates that there is a record of successful user identity verification, and no need to verify again; If there is a user authentication success token, then the NFCC determines that the first message does not need to be sent to the DH. It should be understood that when there is no user authentication success token, it indicates that there is no record of successful user authentication, and authentication is required; It should be noted that the user authentication success flag is marked as a token when the user authentication is passed.
  • the first message is sent or not by the user identity success flag, so that when there is a user identity verification success flag, the processing speed can be improved, and the first application can be solved.
  • the delay problem brought by the time increases the fault tolerance rate of the program.
  • the NFCC performs routing processing on the data frame according to the second message, specifically:
  • the NFCC routes the data frame sent by the second terminal to the NFCEE where the first application is located, where the first command is to allow the NFCC to perform data routing to the data frame to the first The NFCEE where the application is located, and the first command is sent when the DH performs the user authentication operation and the result is passed;
  • the NFCC does not route the data frame sent by the second terminal to the NFCEE where the first application is located, where the second command indicates that the NFCC is not allowed to perform data routing to the data frame.
  • the command of the NFCEE where the application is located and is sent by DH when the user authentication operation is performed to get a failed result.
  • the first command or the second command in the second message is used to determine whether the NFCC needs to or need to route the data frame sent by the second terminal to the NFCEE where the first application is located, so that The NFCC is effectively prevented from making an error in data routing processing of the above data frame according to the second message.
  • the NFCC when the first NFCEE identifier in the first routing item is the identifier of the DH-NFCEE, the NFCC sends the first to the DH.
  • a message including:
  • the NFCC sends a first message to the DH, where the first message includes a data frame that is sent by the second terminal and is used to select the first application in the first terminal.
  • the NFCC performs routing processing on the data frame according to the second message, and specifically includes:
  • the NFCC routes the data frame sent by the second terminal to the NFCEE where the first application is located, where the second message is The DH is sent after the user authentication operation is passed, or is sent after determining that the first application is used without verifying the identity of the user.
  • the NFCC performs routing processing on the data frame, specifically:
  • the NFCC directly forwards the data frame sent by the second terminal for selecting the first application of the first terminal to the NFCEE where the first application is located.
  • the NFCC directly routes the data frame to the NFCEE where the first application is located, so that the data frame can be correspondingly operated.
  • the method further includes:
  • the NFCC When the NFCC does not receive any message sent by the DH within a preset period of time, the NFCC terminates the communication.
  • the NFCC does not receive any message sent by the DH within a preset time period, and the NFCC may choose to terminate the communication, so that the first application may be prevented from being stolen to some extent.
  • the NFCC after receiving the data frame sent by the second terminal, finds the matching first routing item, and specifically includes:
  • the NFCC receives the data frame sent by the second terminal, and secondly, the NFCC finds a first routing item that matches the first application in the data frame according to the corresponding routing manner, where a possible routing manner may be It is based on the routing method of the application identification AID.
  • the current selection mode of the route may also be other types of routing methods, such as a routing mode based on the application protocol data unit mode APDU Pattern, a routing method based on the system number SC, a protocol-based routing method, or a technology-based routing method.
  • the identifier of the first application included in the data frame for selecting the first application is the APDU Pattern, SC, protocol or technology related to the first application.
  • the AID-based routing method can be used to find the first routing item that matches it more effectively, and the implementation is more general and applicable.
  • the embodiment of the present application provides a policy entity, where the policy entity has the function of implementing the first terminal in the first aspect of the foregoing method embodiment.
  • This function can be implemented in hardware or in hardware by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • an embodiment of the present application provides a policy entity, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer execution instruction, and the processor is connected to the memory through the bus, when the policy entity In operation, the processor executes the computer-executed instructions stored in the memory to enable the policy entity to execute as The data processing method of any of the above aspects.
  • the embodiment of the present application provides a computer readable storage medium, configured to store computer software instructions used by the policy entity, when executed on a computer, to enable the computer to perform any one of the foregoing first aspects. Data processing method.
  • an embodiment of the present application provides a computer program product comprising instructions, which when executed on a computer, cause the computer to perform the data processing method of any of the above first aspects.
  • the embodiment of the present application provides a policy entity, where the policy entity has the function of implementing the first terminal in the second aspect of the foregoing method embodiment.
  • This function can be implemented in hardware or in hardware by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • an embodiment of the present application provides a policy entity, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer execution instruction, and the processor is connected to the memory through the bus, when the policy entity In operation, the processor executes the computer-executed instructions stored in the memory to cause the policy entity to perform the data processing method of any of the second aspects above.
  • the embodiment of the present application provides a computer readable storage medium, configured to store computer software instructions used by the policy entity, when executed on a computer, to enable the computer to perform any one of the foregoing second aspects.
  • the data processing method of the item is not limited to:
  • the embodiment of the present application provides a computer program product comprising instructions, which when executed on a computer, enable the computer to perform the data processing method of any of the above second aspects.
  • FIG. 1 is a schematic diagram of a system for processing data in an embodiment of the present application
  • FIG. 2 is a schematic diagram of an embodiment of a data processing method in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an embodiment of a host DH according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another embodiment of a host DH according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an embodiment of a near field communication controller NFCC according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another embodiment of a near field communication controller NFCC according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of another embodiment of a host DH according to an embodiment of the present application.
  • the embodiment of the present application provides a data processing method and related device, which are used to provide a unified solution for card applications with different security and convenience requirements.
  • NFC technology is a short-range wireless connection technology based on RFID. It uses magnetic field induction to realize NFC equipment communication at close range. Users only need to touch or touch the equipment to exchange information and conduct transactions safely and quickly.
  • the NFC operates at a frequency of 13.56 MHz with an effective communication range of 0-20 cm and a typical value of 4 cm.
  • the working mode of the NFC device can be divided into three types: one, peer-to-peer mode (P2P), which is specifically applied to business card sharing, web page sharing, NFC pairing Bluetooth/WIFI, and the like; Card Emulation (CE), which is specifically used for mobile payment or authentication scenarios such as bank cards, transportation cards, membership cards, coupons, ID cards, etc. 3. Reader/Writer, R /W), this mode is specifically used for mobile payment or authentication scenarios such as bank card POS machines, bus card POS machines, and tag read/write scenarios.
  • P2P peer-to-peer mode
  • CE Card Emulation
  • Reader/Writer, R /W this mode is specifically used for mobile payment or authentication scenarios such as bank card POS machines, bus card POS machines, and tag read/write scenarios.
  • the first terminal and the second terminal are both NFC devices, where the first terminal and the second terminal are mutually peer devices.
  • the NFC device includes a host DH, a near field communication controller NFC, and at least one near field communication execution environment NFCEE, as follows:
  • the DH is responsible for the management of the first terminal, including the management of the NFCC, and may specifically be NFCC initialization, NFCC configuration, and the like.
  • DH is a term used in the NFC Forum Interface (NCI) specification developed by the NFC Forum to correspond to the Host Controller Interface (Host Controller) developed by the European Telecommunication Standards Institute (ETSI).
  • NCI NFC Forum Interface
  • Host Controller Host Controller Interface
  • ETSI European Telecommunication Standards Institute
  • the Terminal Host in the Interface (HCI) specification; in addition, the Management Entity (ME) in the specification developed by the Global Platform (GP) can also be implemented on the Terminal Host.
  • DH is called Management Host (MH).
  • the NFC device is an NFC-enabled device, which can be a smart phone, an NFC Bluetooth stereo, an NFC-enabled notebook, an NFC digital camera, and an NFC TV. If the NFC device is a smart phone, the DH can be a CPU in the smart phone, which can be understood.
  • the operating system of the smartphone described below (OS, Operating Stytem, such as Android OS, iOS, etc.).
  • the NFCC is responsible for physical transmission of data through the RF RF interface and the antenna to enable the first terminal to communicate with the second terminal.
  • NFCC is a term used in the NCI specification developed by the NFC Forum. It can correspond to the Contactless Front-end (CLF) in the HCI specification developed by ETSI. At this time, the Host Controller of HCI should be implemented. On the NFCC.
  • NFCEE is an entity that provides a secure execution environment for NFC applications on the first terminal, such as bank card, bus card and other card emulation applications.
  • NFCEE is a term used in the NCI specification developed by the NFC Forum. It can correspond to the Universal Integrated Circuit Card (UICC) embedded in the HCI specification developed by ETSI. Embedded Secure Element (eSE), Secure Digital Memory Card (SD card), etc.; can also correspond to the Secure Element (SE) in the specification of the GP, or the card simulation environment ( Card Emulation Environment, CEE).
  • UICC Universal Integrated Circuit Card
  • eSE Embedded Secure Element
  • SD card Secure Digital Memory Card
  • SE Secure Element
  • One of the special NFCEEs is DH-NFCEE, which is directly connected to DH or NFCEE in DH.
  • the physical carrier of the NFCEE or SE may be an eSE, a UICC, an SD card, or the like.
  • the NFC application on the first terminal may also be a peer-to-peer application such as a business card sharing, and a card reader application such as a bank POS or a bus POS, and the user may be on the first terminal in some manner (such as a mobile application market). Download and install these NFC applications.
  • these applications can also be preset to the eSE of the phone when the phone is shipped from the factory or preset to the UICC when the UICC card is shipped.
  • the above DH and NFCC can communicate through the interface defined by the NCI protocol; the NFCC and the NFCEE can communicate through the interface defined by the HCI protocol (the upper layer is the HCI protocol, and the bottom layer can be the single-line protocol SWP), of course, other interfaces can also be used. Communication (such as eSE and NFCC can communicate through NFC Wired Interface (NFC-WI)); DH and NFCEE can also communicate through the interface defined by HCI protocol.
  • NFC-WI NFC Wired Interface
  • the Radio Protocol is a protocol used when an NFC device's NFCC communicates with a peer NFC device.
  • RF Technology is a collection of transmission parameters used to transmit data between two NFC devices, such as RF carrier, communication mode, bit rate, modulation mode, bit coding, frame format, protocol, and command set. Wait.
  • the NFC standard mainly includes four RF technologies: NFC-A, NFC-B, NFC-F, and NFC-V, and each technology corresponds to a set of transmission parameters defined by a standard for completing communication.
  • the RF Discovery Porcess defined by the NCI protocol allows the NFCC to detect whether the NFC device exists at the peer end and respond to the device detection performed by the peer NFC device.
  • the defined RF Communication Configuration allows The DH configures some parameters required by the NFCC to perform the radio frequency discovery process to the NFCC, such as each RF technology, the poll mode parameter and the listen mode parameter corresponding to the RF protocol, the RF discovery frequency, the RF technology and mode,
  • the RF interface activates the required mapping table (such as the protocol-interface mapping table) and the routing table required for data routing (such as the listening mode routing table), and the forced NFCEE routing mechanism ForcedNFCEE routing.
  • the required mapping table such as the protocol-interface mapping table
  • the routing table required for data routing such as the listening mode routing table
  • the NFC device responds to the technical test or the device detection related command sent by the peer NFC device, and notifies the peer end of the RF protocol supported by the locally activated application, thereby making the opposite NFC device
  • the RF protocol is selected for the activation of the protocol according to the service requirements.
  • the NFC device sends a technical detection or device detection-related command to the peer NFC device, and selects the RF protocol to perform the protocol according to the service requirements after collecting the RF protocol supported by the peer NFC device. activation.
  • the two NFC devices are based on an application supporting the RF protocol (the application may be selected by a NFC device by selecting an application command such as SELECT AID or SELECT PPSE, or may be activated in the RF protocol).
  • the interactive service data is determined by the service data directly sent based on the RF protocol to complete the communication.
  • the first terminal is an NFC mobile phone with an NFC communication function
  • the second terminal is a POS device.
  • the NFC mobile phone includes a DH, an NFCC, and at least one NFCEE.
  • NFCEE is described as an example, specifically:
  • the DH determines the user identity verification requirement corresponding to each application by using a routing item (such as an AID-based routing entry defined by the NCI protocol) according to the requirement of the user authentication.
  • a routing item such as an AID-based routing entry defined by the NCI protocol
  • the NFCC receives the data frame sent by the peer NFC device (such as a POS machine) (such as the command SELECT AID or SELECT PPSE for selecting the application, or the service data sent based on the currently activated RF protocol)
  • the peer NFC device such as a POS machine
  • User authentication requirements in the routing entries corresponding to the application to be used ie, the application selected by the peer NFC device, or the application determined according to the activated RF protocol between the two NFC devices
  • the identifier determines whether user authentication is required, and if necessary, sends a message to DH to request DH to authenticate the user, otherwise it does not send.
  • the routing entry may also be other types of routing entries defined by the routing table defined by the NCI protocol, such as an APDU Pattern-based routing entry based on the application protocol data unit pattern (APDU Pattern-based routing entry), and a system-based routing entry. (System Code-based routing entry), protocol-based routing entry, technology-based routing entry, or NCI protocol definition configured by mandatory NFCEE routing mechanism. Routing item.
  • APDU Pattern-based routing entry based on the application protocol data unit pattern
  • System-based routing entry System Code-based routing entry
  • protocol-based routing entry protocol-based routing entry
  • technology-based routing entry or NCI protocol definition configured by mandatory NFCEE routing mechanism. Routing item.
  • an embodiment of a data processing method in an embodiment of the present application includes:
  • the DH records an identifier of each application (such as an application identifier AID) and a corresponding user identity verification request.
  • each application can be understood as a card application, such as a bank card issued by a bank, a bus card issued by a transportation company, a prepaid card issued by a merchant, a membership card, and the like.
  • card applications can be separate applications, that is, they are understood as card applications that users download separately from the application market, such as a Host-based Card Emulation (HCE) cloud card introduced by a bank; or they can exist in a wallet application.
  • HCE Host-based Card Emulation
  • the sub-applications managed by the wallet application such as a bank card, a bus card, etc. in a mobile wallet developed by a mobile phone manufacturer such as Huawei wallet huawei pay, apple wallet apple pay, and the like.
  • the NFC mobile phone may include at least one NFCEE, and at least one card application may be installed on each NFCEE. According to the current NCI standard, multiple card applications on the same NFCEE, or multiple card applications on different NFCEEs may be activated simultaneously.
  • the identifier of an application may be an application identifier defined by an application developer (AID, which may be registered with the system OS when each card application is downloaded to the mobile phone), or other identifiers.
  • Information about an application (such as an identification message associated with its AID set by the mobile phone after the card application is downloaded to the mobile phone), and the user authentication requirement of an application indicates whether the user identity is required to use the application. Verification, that is, whether the legality of the user's identity is required to be verified.
  • a smart electronic device such as a mobile phone, it is possible to verify whether the current user operating the mobile phone is a legitimate user of the mobile phone by entering a password or a biometric identification method such as fingerprint recognition.
  • the DH determines that the implementation of the user identity verification requirement corresponding to each application is multiple, and the specific implementation manner is as follows:
  • Possible implementation method 1 is based on the existing HCE implementation.
  • the OS can register its own policy type. For example, the category type of the bank card is registered as the payment payment class, and the category type of the bus card is registered as the other other. class. Therefore, the DH can determine the user authentication requirement corresponding to each card application according to the type of the policy registered by each card application, such as determining the user identity verification requirement corresponding to the card application of the policy type as the payment type. User authentication is performed to determine that the user authentication requirement corresponding to the card application of the other type is that no user authentication is required.
  • Possible implementation method 2 Extend the policy type in the existing HCE implementation, such as subdividing the current payment and other types into a secure payment class (corresponding to user identity authentication), an exempt payment class, and other classes;
  • the policy type of the bank card can be registered as a secure payment class
  • the policy type of the bus card is registered as an exempt payment or other class
  • the policy type of the coupon is registered as the other class, and the like. Therefore, the DH can determine the user authentication requirement corresponding to each card application according to the type of the policy registered by each card application. For example, the user authentication request corresponding to the card application of the security type is determined to require user identity verification. It is determined that the user authentication requirement corresponding to the card application of the confidential payment or other class is that no user authentication is required, and the like.
  • Possible implementation method 3 The card application developer sets a dedicated registration parameter UserValidationPara for each card application, which is used to indicate whether the user authentication operation needs to be performed, and further defines the type of user authentication mode, such as fingerprint verification and password. Verification of accessories such as verification and watches/wrists. Therefore, when downloading each card application, the DH can directly determine the user identity verification request corresponding to each card application according to the dedicated parameter UserValidationPara registered for each card application.
  • the possible implementation method 4 can also be determined according to user settings. For example, if a wallet application has multiple bank cards and multiple bus cards, the user needs to perform user identity verification when using the bank card, and is not required when using the bus card. Therefore, DH can determine the user authentication requirements corresponding to each card application according to the settings of the user for each card application.
  • Possible implementation method 5 When the card application is downloaded to the NFCEE, a dedicated parameter for indicating its user authentication requirement is simultaneously saved to the NFCEE, and subsequently, when the DH obtains all the card application related parameters from each NFCEE ( When it is mainly used for calculating RF parameters and completing the above-mentioned RF communication configuration, the dedicated parameters of each card application for indicating its user identity verification requirements may be acquired together, thereby determining each according to the dedicated parameters. Apply the corresponding user authentication requirements.
  • the wallet application can be installed in a secure environment such as a Trusted Execution Environment (TEE), and the application AID and its user authentication requirements can be stored in a secure environment such as TEE.
  • TEE Trusted Execution Environment
  • the “user identity” described in all embodiments of the present invention may be understood as the identity of the current user of the first terminal, or, further, the first application or the first application on the first terminal.
  • the e-wallet (such as the wallet application launched by mobile phone manufacturers such as huawei pay, apple pay, wallet applications such as ICBC mobile banking, google wallet, etc.) (that is, knowing the password or pre-email of the e-wallet)
  • the identity of the user who has set the biometrics such as fingerprints associated with the electronic wallet. Only after the user authentication is passed, the user is allowed to use the first application to perform subsequent services with the peer NFC device (such as the card card service of the bank card, the card card service of the bus card, the recharge service, etc.).
  • the verification of the identity of the user in the solution of the present invention is not equivalent to the verification of a card password such as a bank card as it is now, because the user identity in the solution of the present invention is locally verified by the terminal and is used to determine Whether to allow the current user to use the card application for subsequent transactions with the peer POS machine, where the card password is verified by the peer POS machine through the bank card server connected in the background (ie, the verification of the card password is one of the above-mentioned subsequent transactions) Card person verification link).
  • the DH configures, to the NFCC, a routing item that includes a user identity verification request identifier.
  • the DH configures a routing entry corresponding to the first application to the NFCC according to the user identity verification requirement corresponding to the first application, where the first application is any one of the foregoing applications, or is activated for each application. Any of at least one of the applications, wherein the meaning of "activated” applies to all embodiments of the inventive solution, and it can be understood that if a card application is activated, DH is in calculating the RF parameters.
  • the RF parameters related to the application of the card such as RF protocol related parameters, etc.
  • the NFCC can send the activated card application to the NFC device of the opposite end through the RF discovery process, so that the card application can be selected. For subsequent business (such as bank card credit card business, bus card card business or recharge business, etc.).
  • the manner in which the routing entry is configured by the DH may be any of the following:
  • a routing item including the user identity verification requirement identifier is configured for the first application.
  • the value of the user identity verification request identifier is determined by the user identity corresponding to the first application.
  • the verification request decision is used to indicate that user authentication is required or not required when using the first application, for example, setting a bit to indicate a user authentication request identifier, and when the bit is 1b, indicating that user authentication is required, When the bit is 0b, it means that user authentication is not required. or,
  • the routing item including the user identity verification request identifier is configured for the first application only when the user authentication request corresponding to the first application indicates that the user identity authentication is required. At this time, the user identity verification request identifier is used to indicate the usage. User authentication is required for an application. Otherwise, the configured authentication item does not include the user authentication request identifier.
  • the implementation of the present invention is not limited.
  • the user identity verification request identifier corresponding to the first application is determined by the user identity verification request corresponding to the first application, and is determined according to any possible implementation manner described in step 201, that is, according to the first application.
  • the registration information and/or the user indication are determined, wherein the registration information of the first application includes an application type of the first application and/or a requirement parameter for indicating identity verification (such as the dedicated parameter described above) ).
  • the routing entry can be configured through the listening mode routing table defined by the NCI protocol, or configured by the mandatory NFCEE routing mechanism. For details, see the corresponding content of the NCI protocol.
  • another possible implementation method is: using an AID-based routing item defined by the NCI standard as an example, corresponding to the AID-based routing item in the foregoing Table 1.
  • the Value field (which is described in detail in Table 4 below) is extended.
  • a parameter Identity Validation Flag is added to indicate the user authentication request identifier: if the value of the parameter is 1, it indicates the routing entry. After the application corresponding to the AID is selected, user authentication is required. Otherwise, it indicates that user authentication is not required.
  • the DH can also configure the parameter in the value field when the user identity verification requirement corresponding to the application corresponding to the AID in the routing item is that the user identity authentication is required. Otherwise, there is no such parameter.
  • the AID-based routing item (including the AID of the first application) defined by the NCI standard is taken as an example, and other types of routing items, such as an APDU pattern, are not excluded. Routing items (including first application related reference data and mask), SC based routing items (including the first application related system coding list SC list), protocol based routing items (including the first application related) The identifier of the RF protocol, the technology-based routing item (including the identifier of the RF technology related to the first application), and the like, and the information included in each routing item may be considered as the identifier of the first application.
  • the NFC mobile phone performs an RF discovery process with the peer POS machine to activate the RF protocol required for the POS machine to perform the service.
  • the NFC mobile phone may send a detection command to the outside, or the peer POS machine may send a detection command to detect whether the NFC device exists at the opposite end, and when the opposite end has an NFC device, the pair Which RF protocols are supported by the NFC devices on the side.
  • the foregoing detection command may be a command related to technical detection or device detection.
  • NFC-A there are mainly four kinds of RFs: NFC-A, NFC-B, NFC-F, and NFC-V.
  • Techniques each of which corresponds to a set of standard defined transmission parameters for completing communications, such as RF carrier, communication mode, bit rate, modulation scheme, bit coding, frame format, protocol, command set, and the like.
  • the above-mentioned technical detection command may be a detection command of any one of the above four RF technologies.
  • the NFC mobile phone simulates at least one card application as an example.
  • the peer POS machine should send a detection command to detect which RF protocols are supported by the NFC mobile phone side, and after the NFC mobile phone sends a detection response for the detection command, the POS machine It can be inferred which activated card applications are on the NFC mobile phone, so as to determine what data frame to send according to the business needs of the POS machine (such as banking, bus service, etc.) (for example, the command SELECT AID or SELECT PPSE for selecting the card application, or , is the business-related data).
  • the POS machine sends a data frame to the NFCC, where the data frame is an application selection command for selecting the first application.
  • the POS device sends an application selection command to the NFCC according to the service requirement, such as the Select command defined by the ISO/IEC 7816- protocol (ie, the SELECT Command, if it includes the AID of a card application, it can be regarded as a Select AID command, Or, if it includes the AID of the Proximity Payment Systems Environment (PPSE) application (such as "2PAY.SYS.DDF01"), it can be considered as a SELECT PPSE command) to inform the NFCC peer POS machine that it will choose
  • the first application in the NFC mobile phone such as the application identified by the AID
  • the first application may include an application requiring user authentication (such as a bank card application), and may also include an application that does not require user authentication (such as a bus card application) ).
  • the application selection command is a data frame sent by the POS machine to the NFCC
  • the service data sent by the POS machine to the NFCC in the subsequent data interaction phase ie, the data related to the executed service, Such as encrypted data in a card transaction, etc.
  • service data sent by the NFCC to the POS machine is also a type of data frame.
  • the application selection command may also be a command defined by another protocol for selecting an application on the NFC mobile phone, and there is no limitation here.
  • the NFCC finds a matching routing item for the received data frame.
  • the NFCC receives the selectAID command as an example, and the NFCC searches according to the routing table, and finds an AID-based routing item that matches the AID included in the command. Specifically, the NFCC will select the selectAID The AID in the command matches the AID contained in each AID-based routing entry in the routing table until an AID is found to match (if the two AIDs are identical, or the first X bits of the two AIDs are identical, X is the specified integer) based on the AID-based routing entry.
  • the manner in which the NFCC searches for a matching routing entry may be performed according to the listening mode routing table, that is, according to the AID-based routing item, the APDU Pattern-based routing item, the SC-based routing item, and the protocol-based routing.
  • the NFCC determines that the user identity verification requirement identifier in the matched routing item indicates that user identity verification is not required, the NFCC routes the data frame to the NFCEE where the first application is located.
  • the NFCC determines whether the user identity verification request identifier in the matched routing entry found in the foregoing step 205 indicates that the user identity verification is required, and if not, the first application corresponding to the AID in the routing entry is considered to be used. User authentication is not required. If the bit corresponding to the user authentication request identifier in the routing entry is 0b, it is considered that user identity verification is not required when the first application corresponding to the AID is used. At this time, the NFCC does not need to send any message to the DH, but directly routes the data frame (ie, the application selection command), that is, forwards the application selection command to the NFCEE where the first application is located, waiting for the NFCEE to select for the application. The command returns a response.
  • the data frame ie, the application selection command
  • all "routing" means forwarding or sending.
  • the NFCC routes the data frame to the NFCEE where the first application is located.
  • the NFCC forwards the data frame to the NFCEE where the first application is located, and then The NFCEE is forwarded to the first application for processing, so that the first application can return the message (such as the Select response) for answering the data frame to the NFCC, so that the NFCC is sent to the peer POS.
  • the NFCC determines that the user identity verification request identifier in the matched routing item indicates that user identity verification is required, the NFCC reports the first message to the DH.
  • the NFCC determines whether the user identity verification request identifier in the matched routing entry found in the foregoing step 205 indicates that the user identity verification is required, and if yes, the first application corresponding to the AID in the routing entry is considered to be used. User authentication is required. If the bit corresponding to the user authentication request identifier in the routing entry is 1b, it is considered that the user identity authentication is required when the first application corresponding to the AID is used. At this time, the NFCC reports the first message to the DH, where the first message is used to request the DH to perform a user identity verification operation.
  • the first message includes the foregoing data frame, or the route matching result in step 205 is used to notify the DH peer POS machine to select the first application in the NFC mobile phone, where the data frame includes the application of the first application.
  • the identifier such as the AID, needs to be described, the application identifier of the first application may also be other identification information other than the AID that uniquely identifies the first application.
  • the NFCC when the NFCC reports the first message to the DH, the NFCC can report the information through the RF NFCEE Action mechanism defined by the NCI protocol (that is, the notification is reported by the RF_NFCEE_ACTION_NTF).
  • a new notification of the DH may be added, such as a user authentication request notification USER_VALIDATION_REQUEST_NTF notification, for requesting DH to perform a user authentication operation, or a user identity. Verification decision notifies USER_VALIDATION_JUDGEMENT_NTF notification for request DH determines for itself whether user authentication is required, and there is no limit here.
  • the RF NFCEE Action notification may be extended, that is, (a) if the user identity needs to be verified, the NFCC sends an RF NFCEE Action notification to the DH, where the first indication information is included to indicate that the user identity verification is required; Alternatively, (b) if it is not necessary to verify the identity of the user, the NFCC sends an NFCEE Action notification to the DH, including second indication information indicating that no user authentication is required.
  • the first indication information and the second indication information may be respectively represented by two parameters in the notification, for example, the first parameter indicates that user identity verification is required, and the second parameter indicates that user identity verification is not required; or, the first The two indication information may also be represented by the same parameter when two values are respectively taken.
  • the value of the third parameter indicates that user identity authentication is required, and when it is 0, it indicates that it is not required.
  • the RF NFCEE Action notification may also include information related to the matching routing item, such as an AID, an NFCEE identifier, etc., for details, refer to the corresponding content of the NCI protocol.
  • the NFCC determines whether the first message needs to be sent to the DH according to the current energy state of the NFC mobile phone, where the NFCC determines that the NFC mobile phone does not need to send the first message to the DH when the current energy state of the NFC mobile phone is no power or shutdown state.
  • the current energy state may include an unpowered state, a power-off state, a bright screen and a locked state, a bright screen and an unlocked state, a screen-off state, a locked state, a screen-off state, and an unlocked state.
  • the routing items corresponding to the security-critical applications can be set to be unavailable in the no-power and/or shutdown state (for example, the corresponding energy state field)
  • the bit of no power and/or power-off state is set to 0b), so that if there is no power and/or power-off state, the NFCC cannot route the data frame to these cards even if it finds a matching routing item for the received data frame.
  • the NFCEE where the application is located is then forwarded to these card applications for processing, so as to avoid the consumption of these cards for consumption in the absence of power and/or shutdown. Therefore, in the no-power and/or power-off state, the NFCC no longer needs to send the first message to the DH to avoid waste of resources (because even if it is sent, the processing and response of the DH are not obtained).
  • the DH performs a user identity verification operation.
  • the DH can directly perform the user identity verification operation after receiving the first message.
  • the DH may further perform a user identity verification operation after determining that the user identity is required to use the first application according to the user identity verification requirement corresponding to the first application.
  • the DH performs the user identity verification operation, specifically, the DH invokes the user identity verification module to perform user identity verification, where the user identity verification module may be a fingerprint module, that is, the user identity is verified by verifying the user fingerprint, and of course, Other authentication methods, such as P1N authentication, iris, and other biometric verification, wearable device verification (ie, verifying the presence or absence of a particular wearable device connected to the terminal via a wireless technology (such as Bluetooth)) There are no restrictions here.
  • the DH indicates that the NFCC does not route the data frame to the NFCEE where the first application is located.
  • DH when DH performs user identity verification and fails verification, DH indicates that the NFCC does not route the data frame to the NFCEE where the first application is located.
  • the specific instructions are as follows:
  • the DH sends a second message to the NFCEE, the second message being NFCC not allowed. Routing the data frame to the second command of the NFCEE where the first application is located.
  • the DH when the DH performs user authentication and does not pass the verification, the DH does not send any message to the NFCC. It should be understood that the NFCC does not receive the preset time period after reporting the first message. When any indication message is received, then the NFCC can know that the DH indicates that it does not route the data frame to the NFCEE where the first application is located.
  • the NFCC does not route the data frame to the NFCEE where the first application is located, the NFCC cannot send a response message to the POS machine at the opposite end. Therefore, the POS machine terminates when it does not receive any response message within the preset time (that is, the response timeout condition). This communication.
  • the DH may also terminate the communication, such as sending an RF protocol deactivation command defined by the NCI protocol or other commands that may terminate the communication to the NFCC.
  • the user identity verification fails, which may be specifically: if the user identity verification fails within the preset identity verification time period or within the preset identity verification times, the DH determines the user identity verification. Failed (ie allows the user to perform multiple verifications within a preset time).
  • the DH sends a second message to the NFCC.
  • the DH when the result of the user identity verification operation is passed, the DH sends a second message to the NFCC, where the second message is a first command for allowing the NFCC to route the data frame to the NFCEE where the first application is located, the data.
  • the frame is sent by the POS to the NFCC to indicate that the message of the first application is to be selected (ie, the application selection command described above).
  • the content included in the first command may be information related to user identity verification (ie, the result of performing a user identity verification operation is passed), and/or information indicating that the NFCC is allowed to perform data routing.
  • the NFCC can only determine according to the content that the DH allows the NFCC to route the data frame to the NFCEE where the first application is located.
  • the NFCC routes the data frame to the NFCEE where the first application is located.
  • the NFCC when the NFCC receives the second message sent by the DH, the NFCC routes the data frame to the NFCEE where the first application is located.
  • a pair of command responses may be added in the NCI standard as the second message, which is used to instruct the NFCC to route the data frame to the NFCEE where the first application is located.
  • DH sends a command RF_ROUTE_PERMISSION_CMD to the NFCC, including the route permission identifier RoutingFlag parameter.
  • RoutingFlag the route permission identifier RoutingFlag parameter.
  • the parameter value is 1, it indicates that the NFCC is allowed to perform data routing, and when it is other values, it may indicate that it is not allowed.
  • the NFCC may respond to the DH response RF_ROUTE_PERMISSION_RSP and start forwarding the previously received data frame (such as the above application selection command) to the NFCEE where the first application is located (of course, the subsequently received service data is also directly forwarded. To the NFCEE where the first application is located).
  • the routing entry including the user identity verification request identifier is configured to the NFCC by using the DH for the first application, so that the NFCC can directly according to the route after receiving the data frame sent by the peer NFC device for selecting the first application.
  • the user authentication requirement in the item determines whether the user authentication is required when using the first application, and only requests the DH to perform user authentication when the user authentication is required, and then routes the data frame after determining that the verification has passed. To the NFCEE where the first application is located, and directly route the data frame to the NFCEE where the first application is located when user authentication is not required.
  • the most suitable first application processing method is adopted, and a unified solution is developed, which can realize simpler implementation and lower development cost.
  • the cycle is shorter, etc., wherein for the card application that needs to perform user identity verification, the security requirement is higher than the convenience requirement, and for the card application that does not need the user identity verification, the convenience requirement is higher than the security requirement;
  • the user identity verification can be performed on the card application with the security requirement higher than the convenience requirement, and the card application with the convenience requirement higher than the security requirement can realize the function of fast payment, and the frontage can be avoided.
  • the implementation method of using the first application to complete the payment is implemented.
  • Embodiment 2 referring to FIG. 3, another embodiment of the data processing method in the embodiment of the present application includes:
  • DH records the AID of each application and its corresponding user authentication requirements.
  • the DH configures, to the NFCC, a routing item that includes a user identity verification request identifier.
  • the NFC mobile phone and the peer POS perform an RF discovery process to activate the RF protocol required by the POS to perform the service.
  • the POS machine sends a data frame to the NFCC, where the data frame is an application selection command for selecting the first application.
  • the NFCC finds a matching routing item for the received data frame.
  • the NFCC determines that the user authentication request identifier in the matched routing item indicates that user authentication is not required, the NFCC routes the data frame to the NFCEE where the first application is located.
  • the NFCC determines that the user identity verification request identifier in the matched routing entry indicates that user identity authentication is required, the NFCC reports the first message to the DH.
  • the steps 301 to 307 are similar to the steps 201 to 207 in the first embodiment, and details are not described herein again.
  • the DH performs a user identity verification operation.
  • the DH may directly verify the identity of the user after receiving the first message, or may determine that the user needs to be used when using the first application according to the user identity verification requirement corresponding to the first application. Authenticate the user after authentication. Then, the DH specifically determines the identity of the user, and may determine whether the user identity verification success token corresponding to the first application is saved locally. If not, the DH does not perform the user identity verification operation for the first application before, or The user authentication operation performed before the DH for the first application is not successful, that is, at this time, the DH needs to perform the user authentication identity operation.
  • the user identity verification is required, and the first message is reported to the DH to indicate that the DH is required to perform the user identity verification operation, and if the DH determines that the user identity corresponding to the first application does not exist,
  • DH performs a user authentication operation.
  • the DH performs the user identity verification operation, and specifically may call the fingerprint module for the DH, that is, verify the user identity by verifying the user fingerprint, and in addition to the fingerprint verification, for other authentication methods that may generate delay (such as P1N verification, iris verification, etc.)
  • P1N verification verifying the user fingerprint
  • iris verification iris verification
  • the DH indicates that the NFCC does not route the data frame to the NFCEE where the first application is located, and the specific implementation manner is similar to the step 209 in the foregoing Embodiment 1. Narration.
  • the DH sends a second message to the NFCC, to allow the NFCC to route the data frame to the NFCEE where the first application is located, and the specific implementation is the same as step 210 in the first embodiment. Similar, this will not be repeated here.
  • the corresponding user identity verification success flag may be set and saved for the first application, so that when the NFC mobile phone approaches the POS device again, the DH receives the NFCC transmission again.
  • the user authentication success token can be directly used for judgment, as in step 309 below. Because this is because the user may need to leave the POS and then re-close when verifying the fingerprint, or the time required for user authentication may be greater than the maximum delay handled by the POS, etc., it is designed for the completion of this transaction for two credit cards. Implementation plan.
  • the user identity verification success flag in this step is deleted after being used once, that is, when it is determined in the following step 309 that the user identity verification success flag exists, it is determined that the user identity verification is successful, and then the user identity is deleted. Verify the success flag to prevent the risk of property damage from being stolen when the NFC phone is stolen without being deleted.
  • the DH sends a second message to the NFCC.
  • the DH may directly verify the identity of the user after receiving the first message, or may determine that the user needs to be used when using the first application according to the user identity verification requirement corresponding to the first application. Authenticate the user after authentication. Then, the DH specifically determines the identity of the user, and may determine whether the user identity verification success token corresponding to the first application is saved locally. If yes, it is considered that the user authentication operation is performed for the first application before the DH, and the verification succeeds, that is, That is to say, at this time, DH no longer needs to perform user authentication identity operation, and can directly send a second message to the NFCC. It should be noted that the user identity verification success flag may be set and saved after the user authentication operation succeeds after the DH receives the first message sent by the NFCC when the DH is last close to the POS machine.
  • the NFCC determines to use the first application
  • the user identity verification is required
  • the first message is reported to the DH to indicate that the DH is required to perform the user identity verification operation
  • the DH determines that the user identity corresponding to the first application exists
  • the DH determines that the user authentication operation passes, sending a second message to the NFCC, the second message being the first command to allow the NFCC to route the data frame to the NFCEE where the first application is located.
  • the user identity verification success flag may be deleted after the user identity verification success flag is used to determine that the user identity verification operation does not need to be performed again (ie, after the user identity verification success flag is used once).
  • the DCH is directly used by the DH to judge the success of the verification (ie, it is not required to verify the identity of the current user (ie, the pirate) because the NFC mobile phone is stolen when the NFC mobile phone is stolen. Risk of property damage such as stolen brush.
  • the DH may also receive the NFCC transmission according to the preset time (which may be set by the user or the system).
  • the first message essentially, the NFCC receives the data frame sent by the POS machine) to determine whether to delete the success flag, and if the first message is not received within the preset time, the success flag is deleted, otherwise continue save.
  • the NFCC routes the data frame to the NFCEE where the first application is located according to the second message.
  • the step is similar to the step 211 in the first embodiment, and details are not described herein again.
  • the delay problem caused by the user to verify the fingerprint or other forms of identity information during the user identity verification process or the user usage habit is considered, and the user may need to leave the POS machine and verify the identity is successful.
  • the POS machine has improved the fault tolerance of the solution to some extent.
  • the DH receives the first message sent by the NFCC and executes the first message.
  • User authentication operation and when the user authentication operation is passed, the user authentication success token set for the first application is sent to the NFCC, so that the NFCC saves the user authentication success token; in the second credit card (ie, the NFC mobile phone)
  • the NFCC receives the POS machine (that is, the POS machine that is close to the first time when the card is swiped.
  • the POS machine that is close to the first card when judging the second card swipe.
  • the POS machine that is close to the time is judged by the same NFC device, for example, it can be judged by the terminal identification information of the NFC device, etc., and is not limited herein.
  • the user who sends the data selects the data frame of the first application, it can directly determine whether the local area is The user authentication success flag corresponding to the first application is saved, and if yes, the first message is not sent to the DH, but the routing of the data frame can be directly performed; otherwise, the first message is sent to the DH.At this time, the manner of saving or deleting the user identity verification success flag corresponding to the first application on the NFCC side is similar to the manner of saving or deleting the user identity verification success flag on the DH side, and details are not described herein again.
  • the embodiment of the present application is described in terms of determining whether the user authentication is required by the NFCC.
  • the following is a description of whether the DH needs to perform user identity verification.
  • FIG. 4 another embodiment of the data processing method in the embodiment of the present application includes:
  • DH records the AID of each application and its corresponding user authentication requirements.
  • step is similar to step 201 in the first embodiment, and details are not described herein again.
  • the DH sets a corresponding user identity verification request identifier for each application according to the user identity verification requirement corresponding to each application, and saves, for example, the association between the application AID and its corresponding user identity verification request identifier.
  • the relationship table is saved.
  • the DH configures a routing entry to the NFCC.
  • the DH configures a routing entry for the first application to the NFCC.
  • the first application may be any one of the applications installed on the DH, or Any one of the at least one application that has been activated in the application; the routing item may be an AID-based routing item, or may be other types of routing items, and details are not described herein again.
  • the DH can configure a routing entry to the NFCC through the listening mode routing table.
  • the routing table includes an AID-based routing entry corresponding to the first application. It should be noted that, the routing item corresponding to the first application does not include information indicating whether user identity verification is required when the first application is used, such as the user identity verification request identifier in the first embodiment.
  • the NFC mobile phone and the peer POS perform an RF discovery process to activate the RF protocol required by the POS to perform the service.
  • the POS machine sends a data frame to the NFCC, where the data frame is an application selection command for selecting the first application.
  • the NFCC finds a matching routing item for the received data frame.
  • the steps 403 to 405 are similar to the steps 203 to 205 in the foregoing embodiment, and details are not described herein again.
  • the NFCC sends a first message to the DH.
  • the NFCC sends a first message to the DH, where the first message is used to notify the DH peer POS machine to select the first application in the NFC mobile phone.
  • the NFCC passes the RF NFCEE.
  • the action mechanism reports the route to the DH, including the AID, the NFCEE identifier, and the like, and the NFCEE identifier is a unique identifier indicating the NFCEE where the first application is located.
  • the NFCC sends a first message including the foregoing data frame to the DH, where the data frame is used to notify the DH peer POS machine to select the first application in the NFC mobile phone, and the first message is used in addition to the foregoing data.
  • the DH peer POS machine can be directly notified to select the first application in the NFC mobile phone, which is not limited herein.
  • the NFCC when the NFCC reports the first message to the DH, the NFCC can report the information through the RFNFCEEAction mechanism.
  • a new notification of the DH may be added, such as the user identity verification notification USER_VALIDATION_JUDGEMENT_NTF, for requesting the DH to determine whether the user authentication is required.
  • the RF NFCEE Action mechanism reports the RF_NFCEE_ACTION_NTF notification.
  • the NFCC determines whether the first message needs to be sent to the DH according to the current energy state of the NFC mobile phone, where the NFCC determines that the NFC mobile phone does not need to send the first message to the DH when the current energy state of the NFC mobile phone is no power or shutdown state.
  • the current energy state may include an unpowered state, a power-off state, a bright screen and a locked state, a bright screen and an unlocked state, a screen-off state, a locked state, a screen-off state, and an unlocked state.
  • the routing items corresponding to the security-critical applications can be set to be unavailable in the no-power and/or shutdown state (for example, the corresponding energy state field)
  • the no-power and/off-off status bits are set to 0b), so that in the absence of power and/or shutdown, the NFCC cannot route the data frame to these card applications even if it finds a matching routing item for the received data frame.
  • the NFCEE is then forwarded to these card applications for processing, which avoids the consumption of these cards for consumption in the event of no power and/or shutdown. Therefore, in the no-power and/or power-off state, the NFCC no longer needs to send the first message to the DH to avoid waste of resources (because even if it is sent, the processing and response of the DH are not obtained).
  • the DH determines that the user identity verification request identifier corresponding to the first application indicates that user identity verification is not required, the DH instructs the NFCC to route the data frame to the NFCEE where the first application is located.
  • the DH may determine the user identity verification request identifier corresponding to the first application by using the identifier of the first application (such as the AID) included in the first message, where specifically, The DH searches for the user identity verification request identifier corresponding to the AID from the association table of the AID saved in step 401 and its corresponding user identity verification request identifier according to the AID. Then, DH determines the user authentication request corresponding to the first application. Whether the identifier indicates that the user authentication is required when using the first application, and if not, it is considered that the user authentication is not required when the first application is used. For example, if the user authentication request identifier corresponding to the bit is 0b, the indication is used. The first application corresponding to the AID does not require user authentication.
  • the DH indicates that the NFCC routes the data frame to the NFCEE where the first application is located, where a possible indication manner is that the DH sends a second message to the NFCC, where the second message is to allow the NFCC to perform data routing on the data frame.
  • a possible indication manner is that the DH sends a second message to the NFCC, where the second message is to allow the NFCC to perform data routing on the data frame.
  • the content included in the first command may be information related to user identity verification (ie, no user identity verification is required), and/or information indicating that the NFCC is allowed to perform data routing.
  • the NFCC can only determine according to the content that the DH allows the NFCC to route the data frame to the NFCEE where the first application is located.
  • the DH determines that the user identity verification request identifier corresponding to the first application indicates that user identity verification is required when using the first application, the DH performs a user identity verification operation.
  • the DH may determine the user identity verification request identifier corresponding to the first application by using the identifier of the first application (such as the AID) included in the first message, where specifically, The DH searches for the user identity verification request identifier corresponding to the AID from the association table of the AID saved in step 401 and its corresponding user identity verification request identifier according to the AID. Then, the DH determines whether the user identity verification request identifier corresponding to the first application indicates that the user identity verification is required when using the first application, and if yes, it is determined that the user identity verification is required when using the first application, that is, DH Perform user authentication operations.
  • the DH may determine the user identity verification request identifier corresponding to the first application by using the identifier of the first application (such as the AID) included in the first message, where specifically, The DH searches for the user identity verification request identifier corresponding to the AID from the association table of the AID saved in step 401 and its corresponding user identity verification request identifier according to
  • the DH performs the user identity verification operation, and the implementation manner is similar to the implementation manner described in the step 208 in the first embodiment, and details are not described herein again.
  • the DH sends a second message to the NFCC.
  • the DH when the user identity verification operation is passed, the DH sends a second message to the NFCC, where the second message is a first command that allows the NFCC to perform data routing processing on the data frame, where the NFCC is allowed to perform data routing on the data frame.
  • the process is to allow the NFCC to route the data frame to the NFCEE where the first application is located.
  • the content included in the first command may be information related to user identity verification (ie, the result of performing a user identity verification operation is passed), and/or information indicating that the NFCC is allowed to perform data routing.
  • the NFCC can only determine according to the content that the DH allows the NFCC to route the data frame to the NFCEE where the first application is located.
  • the NFCC performs routing processing on the data frame according to the second message.
  • the NFCC receives the second message, and performs routing processing on the data frame according to the second message.
  • the specific implementation manner is as follows:
  • the second message is a first command that allows the NFCC to perform data routing processing on the data frame.
  • the NFCC routes the data frame to the NFCEE where the first application is located.
  • Step 211 is similar, and will not be described here.
  • the NFCC may also receive the second message, but only the second message is a second command that does not allow the NFCC to perform data routing processing on the data frame. Then, the NFCC does not route the data frame to the first application. NFCEE, that is, NFCC cannot send a response message to the peer POS, so the POS machine is at the preset time. This communication is terminated when no response message is received (ie, the response timeout condition).
  • the DH indicates that the NFCC does not route the data frame to the NFCEE corresponding to the first application.
  • DH when DH performs user identity verification and fails verification, DH indicates that the NFCC does not route the data frame to the NFCEE where the first application is located.
  • the specific indication manner is similar to the step 209 in the first embodiment, and details are not described herein again.
  • the DH determines whether the user identity verification is required when the first application is used, and implements the application according to different cards.
  • Different security and convenience requirements adopt the most suitable first-application processing method, and a unified solution can be made, which makes the implementation simpler, lower development cost, shorter cycle, etc., where user authentication is required.
  • the application of the card indicates that the security requirement is higher than the convenience requirement.
  • the convenience requirement is higher than the security requirement; therefore, the security requirements of the embodiment of the present application are higher than the convenience.
  • the card application for sexual requirements performs user authentication, and the card application with higher convenience than the security requirement can realize the function of fast payment, and can also avoid the problems of affecting the user experience or complicating the user operation as described above.
  • the DH itself determines whether the user authentication is required.
  • the following describes an embodiment corresponding to the two card swipe scenarios of the solution similar to the second embodiment.
  • Embodiment 4 referring to FIG. 5, another embodiment of the data processing method in the embodiment of the present application includes:
  • DH records the AID of each application and its corresponding user authentication requirements.
  • the DH configures a routing entry to the NFCC.
  • the NFC mobile phone and the peer POS perform an RF discovery process to activate the RF protocol required by the POS to perform the service.
  • the POS machine sends a data frame to the NFCC, where the data frame is an application selection command for selecting the first application.
  • the NFCC finds a matching routing item for the received data frame.
  • the NFCC sends a first message to the DH.
  • DH determines that user authentication is not required when using the first application, DH instructs the NFCC to route the data frame to the NFCEE where the first application is located.
  • the steps 501 to 507 are similar to the steps 401 to 407 in the third embodiment, and details are not described herein again.
  • the DH determines that the user authentication is required when the first application is used, and the user identity verification success flag corresponding to the first application exists, the DH indicates that the NFCC routes the data frame to the NFCEE where the first application is located.
  • the DH determines whether the user identity verification success flag corresponding to the first application exists or not, and if the DH determines that the user identity corresponding to the first application exists. To verify the success flag, DH instructs the NFCC to route the data frame to the NFCEE where the first application is located.
  • the DH determines that the first application is required to perform user identity verification. Specifically, after receiving the first message sent by the NFCC, the DH may pass the identifier of the first application (such as an AID) included in the first message. Determining a user identity verification request identifier corresponding to the first application, for example, the DH searches for the user identity verification request identifier corresponding to the AID from the association relationship between the AID saved in step 401 and the corresponding user identity verification request identifier according to the AID, The DH determines whether the user identity verification request identifier corresponding to the first application indicates that the user identity verification is required when the first application is used, and if yes, it is determined that the user identity verification is required when the first application is used.
  • the identifier of the first application such as an AID
  • the DH indicates that the NFCC routes the data frame to the NFCEE where the first application is located, where a possible indication manner is that the DH sends a second message to the NFCC, where the second message is to allow the NFCC to perform data routing on the data frame.
  • the content included in the foregoing first command may be information related to user identity verification (that is, the result of performing the user identity verification operation is passed, or information indicating that the user identity verification success flag exists), and/or , indicating the information that allows the NFCC to perform data routing.
  • the NFCC can only determine according to the content that the DH allows the NFCC to route the data frame to the NFCEE where the first application is located.
  • the DH determines that the user authentication is required when the first application is used, and the user identity verification success flag corresponding to the first application does not exist, the DH performs a user identity verification operation.
  • the DH determines whether the user identity verification success flag corresponding to the first application exists or not, and if the DH determines that the user corresponding to the first application does not exist. If the authentication is successfully marked, the DH performs the user authentication operation.
  • the specific implementation mode is that the DH invokes the fingerprint module, that is, the user identity is verified by verifying the user fingerprint, and in addition to the fingerprint verification, other authentication methods that may generate delays (such as The P1N verification, the iris verification, and the like are also applicable to the embodiment, which is not limited herein.
  • the DH sends a second message to the NFCC.
  • the corresponding user identity verification success flag may be set and saved for the first application, so that the NFC mobile phone is close to the POS machine again.
  • the DH receives the first message sent by the NFCC again, the DH can directly use the user identity verification success flag to perform the determination, as in step 508 or 509 above. Because this is because the user may need to leave the POS and then re-close when verifying the fingerprint, or the time required for user authentication may be greater than the maximum delay handled by the POS, etc., it is designed for the completion of this transaction for two credit cards. Implementation plan.
  • the user identity verification success flag in this step is deleted after being used once, that is, when it is determined in the above step 508 that the user identity verification success flag is present, it is determined that the user identity verification is successful, and then the user identity is deleted. Verify the success flag to prevent the risk of property damage from being stolen when the NFC phone is stolen without being deleted.
  • the NFCC routes the data frame to the NFCEE where the first application is located according to the second message.
  • the NFCC is instructed not to route the data frame to the NFCEE corresponding to the first application.
  • step 510 to step 512 are performed under the condition that the DH determines that there is no user identity verification success flag corresponding to the first application, which is different from step 409 to step 411 in the third embodiment.
  • the usage habits of the user in performing identity verification are also considered (such as directly checking the fingerprint in the process of attaching the POS machine, or picking up the fingerprint after attaching the POS machine) or a possible delay, therefore, To some extent, the fault tolerance rate of the program has been improved.
  • the routing entry corresponding to the first application when the routing entry corresponding to the first application is configured by the DH to the NFCC, the routing entry needs to be set to point to the NFCEE where the first application is located (that is, the Route in the routing item defined in the NCI protocol).
  • the parameter is set to the NFCEE identifier of the first application), whether it is NFCC or DH, the first choice for the opposite POS machine.
  • the corresponding user authentication request identifier is used for judging, and the NFCC is allowed to perform routing processing on the data frame sent by the POS machine only if the user authentication is not required or the user authentication is required and the verification is passed.
  • the frame is routed to the NFCEE where the first application is located.
  • the DH When the DH configures the routing entry corresponding to the first application to the NFCC, the DH only sets the routing entry corresponding to the application that does not require user authentication to the NFCEE where the application is located. And the routing item corresponding to the first application that requires the user authentication is set to point to the DH, then the NFCC can route the data frame to the DH after receiving the data frame of the first application, and then the DH pair The user identity verification request identifier corresponding to the first application is determined, and the routing entry corresponding to the first application is reconfigured to the NFCC to change the routing entry to the NFCC only if the user authentication is required and the verification is passed. Points to the NFCEE where the first application is located.
  • Embodiment 5 Referring to FIG. 6, another embodiment of the data processing method in the embodiment of the present application includes:
  • the DH records the identifier of each application (such as the application identifier AID) and its corresponding user identity verification requirement.
  • the step is similar to the step 401 in the foregoing embodiment 3.
  • the DH sets a corresponding user identity verification request identifier for each application according to the user identity verification requirement corresponding to each application, and saves the identifier, for example, by applying the AID.
  • the association table corresponding to the user authentication request identifier is saved. Others will not go into details.
  • the DH configures a second routing entry to the NFCC.
  • step 602 is different from step 402 in the third embodiment.
  • each routing item configured by the DH to the NFCC is directed to the NFCEE where each application (such as the application corresponding to the AID in the routing entry) is located. .
  • the DH selects a specific AID, and configures a second routing entry for the first application corresponding to the specific AID, where the second routing entry is a near field communication execution environment DH-NFCEE corresponding to the DH.
  • the DH selects a specific AID according to the user identity verification request identifier corresponding to each AID in step 601. For example, the DH marks the AID corresponding to the user identity verification request identifier that needs to perform user identity verification, thereby selecting a specific AID. And configuring a second routing item for the first application corresponding to the specific AID.
  • the second routing item may include an identifier of the DH-NFCEE, where the identifier is used to uniquely identify the DH-NFCEE corresponding to the DH corresponding near field communication execution environment.
  • the DH is When setting a routing item, you can set the NFCEE ID in the second routing entry set for bank card 1 to the ID of DH-NFCEE (for example, 0x00), and the routing items set for bank card 2 and bus card respectively point to the card.
  • DH-NFCEE for example, 0x00
  • the NFC mobile phone and the peer POS perform an RF discovery process to activate the RF protocol required by the POS to perform the service.
  • the POS machine sends a data frame to the NFCC, where the data frame is an application selection command for selecting the first application.
  • the NFCC finds a matching second routing item for the received data frame.
  • the steps 603 to 605 are similar to the steps 203 to 205 in the foregoing embodiment, and details are not described herein again.
  • the NFCC sends a first message to the DH according to the second routing item, where the first message is the data frame.
  • the NFCC after the NFCC receives the data frame sent by the POS machine, the NFCC selects a command according to an application in the data frame (such as a SelectAID command), and finds a matching second routing item (such as the AID in the command and the Second After the AIDs in the routing entries match, the NFCC routes the above data frame to the routing destination DH pointed to by the second routing entry.
  • a command such as a SelectAID command
  • a matching second routing item such as the AID in the command and the Second
  • the RF communication is terminated. If the command to configure the third routing entry sent by the DH is received within the set time, the data frame is rerouted according to the newly configured third routing entry.
  • the DH determines that the user identity verification request identifier corresponding to the first application indicates that user identity verification is required when using the first application, perform a user identity verification operation.
  • the DH determines that the user identity verification request identifier corresponding to the first application indicates that the user identity needs to be performed when the first application is used, and the AID corresponding to the first application selected by the DH to determine the data frame is marked as Specific AID.
  • the DH performs the user identity verification operation, specifically, the DH invokes the user identity verification module to perform user identity verification, where the user identity verification module may be a fingerprint module, that is, the user identity is verified by verifying the user fingerprint, and of course, Other authentication methods, such as PIN verification, iris, and other biometric verification, wearable device verification (ie, verifying the presence of a particular wearable device connected to the terminal via a wireless technology (such as Bluetooth)) There are no restrictions here.
  • the user identity verification module may be a fingerprint module, that is, the user identity is verified by verifying the user fingerprint, and of course, Other authentication methods, such as PIN verification, iris, and other biometric verification, wearable device verification (ie, verifying the presence of a particular wearable device connected to the terminal via a wireless technology (such as Bluetooth)
  • the DH determines that the user authentication request identifier corresponding to the first application indicates that the user authentication is not required when using the first application, it indicates that the NFCEE where the first application is located is originally DH-NFCEE, thus, DH The message that the user answers the data frame (such as the Select response) can be directly sent to the NFCC, so that the NFCC can reply it to the peer POS machine. Therefore, the solution of the fifth embodiment design is for those card applications that are not operating in DH (ie, DH-NFCEE).
  • the DH indicates that the NFC does not route the data frame to the NFCEE where the first application is located.
  • the DH indicates that the NFC does not route the data frame to the NFCEE where the first application is located.
  • the specific instructions are as follows:
  • the DH terminates the communication. Specifically, the DH sends an RF protocol deactivation command defined by the NCI protocol or other command that can terminate the communication to the NFCC. Alternatively, the DH does not send any information to the NFCC. The message is acknowledged, so that the NFCC cannot answer the POS machine of the opposite end. Once the response times out, the POS machine terminates the current communication with the NFC mobile phone (ie, disconnects the NFC connection between the two).
  • the DH sends a second message to the NFCEE, the second message is a command that does not allow the NFCC to route the data frame to the NFCEE where the first application is located, or does not allow the NFCC to the opposite POS.
  • the command to answer the machine.
  • the user identity verification fails, which may be specifically: if the user identity verification fails within the preset identity verification time period or within the preset identity verification times, the DH determines the user identity verification. Failed (ie allows the user to perform multiple verifications within a preset time).
  • the DH sends a second message to the NFCC, where the second message is used for configuration.
  • the third routing item If the user authentication operation passes, the DH sends a second message to the NFCC, where the second message is used for configuration.
  • the DH configures a third routing entry to the NFCC, where the third routing entry is set to point to the NFCEE where the first application is located, and the NFCEE where the first application is located is not DH.
  • the corresponding near field communication execution environment DH-NFCEE is not DH.
  • the third routing item configured by the DH to the NFCC includes an identifier of the first application (such as an AID of the first application), a unique identifier indicating the NFCEE where the first application is located, and the like.
  • the NFCEE routes the data frame to the NFCEE where the first application is located.
  • the NFCC after the NFCC receives the second message (that is, the second command for configuring the third routing entry), the NFCC routes the data frame to the NFCEE where the first application pointed to by the third routing entry is located.
  • the DH reconfigures the second routing entry to the NFCC.
  • the DH when the radio frequency RF communication ends, the DH reconfigures the second routing item to the NFCC, where the second routing item includes a near field communication execution environment DH-NFCEE corresponding to the DH.
  • the radio frequency RF communication described herein ends, specifically, the DH is determined after receiving the notification that the NFCC reports that the opposite radio frequency RF field disappears (ie, by the RF_FIELD_INFO_NTF notification), or DH Determined when no message of NFCC is received within the specified time, or DH deactivates the RF interface RF interface between DH and NFCC for any reason (such as transmission error in data interaction, protocol error, timeout, etc.)
  • the method defined by the other NCI protocol to determine the end of the RF communication is not limited herein.
  • the method of swiping the card may be used once in the first embodiment or the third embodiment, or the method of swiping the card twice in the second embodiment or the fourth embodiment.
  • the routing item can only be configured when the RF communication state machine is in the IDLE state (ie, RFST_IDLE)
  • the following manner can be implemented. Re-configuration of the routing entry (that is, updating the second routing entry corresponding to the first application to the third routing entry).
  • the DH sends a corresponding command (such as RF_DEACTIVE_CMD (Idle mode)) to the NFCC to enable the state machine to perform the data interaction phase.
  • the corresponding ACTIVE state (ie, RFST_LISTEN_ACTIVE) becomes the IDLE state, and then the routing table is updated (ie, reconfigured); again, the DH is allowed to reconfigure the routing table directly in the ACTIVE state.
  • the time limit may be increased in the first embodiment or the third embodiment. For example, after the NFCC forwards the received data frame to the DH through the first message, if the DH is received within the preset time, the third routing entry is configured.
  • the second command (ie, the second message) re-routes the data frame according to the newly configured routing item (that is, routes the data frame to the NFCEE where the first application is located according to the third routing item); otherwise, the NFCC considers this
  • the secondary RF communication ends.
  • the NFC mobile phone and the POS machine perform two RF communications in succession, as long as the NFC mobile phone is in the IDLE state after leaving the POS.
  • DH can reconfigure routing entries for NFCC. At this time, similar to the second or fourth embodiment, the time limit is increased.
  • the DH configures the third routing item by using the second message
  • the next RF communication is not performed with the peer POS machine within a preset time (more specifically, If the DH does not receive the data frame for the first application to be forwarded by the NFCC within the preset time after the reconfiguration of the routing entry, the DH needs to configure the routing entry again to restore the original routing table (that is, the first application corresponds to the first application).
  • the third routing entry is updated again to the second routing entry, that is, the routing entry of the application represented by the specific AID is also Is pointing to DH).
  • DH saves the user identity success token after verifying the user identity after the first card swiping, and then directly uses the card when the second card is swiped.
  • the success flag is determined whether the user identity verification is passed by determining whether the success flag exists, and details are not described herein again.
  • the DH does not modify the current NCI standard, so that the DH sets a routing entry that points to the DH by using the first application that needs to perform user authentication, and receives the data for selecting the first application that is forwarded by the NFCC.
  • User authentication is performed after the frame, and the routing entry pointing to the NFCEE where the first application is located is reconfigured to the NFCC only when it is determined that the verification has passed, so that the NFCC can route the data frame to the NFCEE where the first application is located.
  • the user identity verification can be performed on the card application with the security requirement higher than the convenience requirement, and the card application with the convenience requirement higher than the security requirement can realize the function of fast payment, and can also avoid the foregoing.
  • the impact of the user experience or the complexity of the user's operation, in addition, the above two brushing schemes can still be to some extent High fault tolerance of the program.
  • the actions of the policy entity in the first embodiment to the fifth embodiment may also be performed by the processor in the first terminal 8 as shown in FIG. 8 by calling the application code stored in the memory 803. There are no restrictions on the case.
  • the DH records the application identifier as an example of the AID of the application, and the DH configures the routing entry as an example.
  • the routing item may also be other types of routing items, such as an APDU pattern-based routing item defined by the NCI, an SC-based routing item, a protocol-based routing item, a technology-based routing item, and a mandatory NFCEE routing mechanism, etc.
  • the identifier of the application may also be other information that can represent the application, such as application-related APDU pattern information (such as reference data and mask), application-related SC information (such as SC list), and application-related RF protocol information (such as ISO).
  • NFCEE in which it is located, etc., is not limited by the present invention.
  • the data processing method in the embodiment of the present application has been described above.
  • the host DH in the embodiment of the present application is described below.
  • an embodiment of the host DH in the embodiment of the present application includes:
  • the first receiving unit 701 is configured to receive a first message sent by the NFCC, where the first message is used to notify the DH that the second terminal is to select the first application on the first terminal, and/or to request the DH to be executed.
  • User authentication operation
  • the verification unit 702 is configured to perform a user identity verification operation if the DH determines that user identity verification is required;
  • the first sending unit 703 is configured to: when the result of the user identity verification operation is passed, send a second message to the NFCC, where the second message is a first command that allows the NFCC to perform data routing on the data frame, where the data frame
  • the message sent by the second terminal to the NFCC indicates that the first application is to be selected.
  • the host DH formulates a unified solution according to different security and convenience requirements of different card applications, and indicates that the security requirement is higher than the convenience requirement for the card application that needs to perform user identity verification; For card applications that do not require user authentication, the convenience requirements are higher than the security requirements.
  • other possible embodiments of the host DH in the embodiment of the present application may further include:
  • the first receiving unit 801 may specifically include a first receiving module 8011.
  • the first receiving module 8011 is specifically configured to:
  • the verification unit 802 may specifically include: one or more modules of the first determining module 8021, the second determining module 8022, the third determining module 8023, or the fourth determining module 8024.
  • the functions of each module are as follows:
  • the first determining module 8021 is configured to determine, according to the user identity verification request identifier corresponding to the first application, that the user identity verification is required; wherein the user identity verification request identifier is used to indicate that the user identity needs to be verified when the first application is used;
  • the second determining module 8022 is configured to determine, according to the user identity verification request identifier corresponding to the first application, that user identity verification is required when the first application is used;
  • the third determining module 8023 is configured to: if the DH determines that the user identity verification success flag corresponding to the first application exists, determine, according to the user identity verification success flag, that the user identity verification operation passes; or
  • the fourth determining module 8024 is configured to: if the DH determines that the user identity verification success flag corresponding to the first application does not exist, receive, by the identity verification module of the first terminal, the user identity information to determine the user identity verification operation. Whether it passed.
  • the first sending unit 803 includes a first sending module 8031, where the first sending module 8031 is configured to send, to the NFCC, a second message including a third routing item, where The third routing entry includes an identifier of the NFCEE where the first application is located.
  • the host DH further includes: a second sending unit 804, a third sending unit 805, a fourth sending unit 806, a fifth sending unit 807, a deleting unit 808, or a configuration unit 809.
  • a second sending unit 804 a third sending unit 805, a fourth sending unit 806, a fifth sending unit 807, a deleting unit 808, or a configuration unit 809.
  • a third sending unit 805 a fourth sending unit 806, a fifth sending unit 807, a deleting unit 808, or a configuration unit 809.
  • a second sending unit 804 configured to send, to the NFCC, a first routing item that includes a user identity verification request identifier, where the user identity verification request identifier is used to indicate that the user identity is required or not required to use the first application;
  • the third sending unit 805 is configured to: if the user identity verification request identifier corresponding to the first application indicates that the user identity needs to be verified when the first application is used, send a second routing item to the NFCC, where the second routing item includes the DH Corresponding near field communication execution environment DH-NFCEE identifier, the DH-NFCEE is not the NFCEE where the first application is located;
  • the fourth sending unit 806 is configured to: if the DH determines that user identity verification is not required, send the second message to the NFCC, where the second message is the first command that allows the NFCC to perform data processing on the data frame;
  • the fifth sending unit 807 is configured to send a second message to the NFCC or not send any message when the user identity verification operation fails, the second message is a second that does not allow the NFCC to perform data routing on the data frame. command;
  • the deleting unit 808 is configured to: when the DH does not receive the first message sent by the NFCC again within a preset time period, or after the DH determines, according to the user identity verification success flag, that the user identity verification operation is passed, Delete the user authentication success token;
  • the configuration unit 809 is configured to: when the communication ends, or when the DH does not receive the data frame sent by the second terminal for selecting the first application again within a preset time after the end of the communication Reconfigure to the NFCC The second routing entry.
  • the user identity verification request identifier is determined by the DH according to the registration information and/or the user indication of the first application, where the registration information of the first application includes the first The application type of an application and/or the required parameters for representing authentication.
  • the user identity verification success flag is that the DH is saved after the identity verification module of the first terminal determines that the user identity verification operation is passed.
  • the sixth embodiment is described in detail in the main sentence DH in the embodiment of the present application.
  • the near field communication controller NFCC in the embodiment of the present application is described below.
  • an embodiment of the near field communication controller NFCC in the embodiment of the present application includes:
  • the first receiving unit 901 is configured to: after receiving the data frame sent by the second terminal, find a matching first routing item, where the data frame is used to indicate that the first application on the first terminal is to be selected;
  • the first determining unit 902 is configured to determine, according to the preset condition, whether to send the first message to the DH, where the first message is used to notify the DH that the second terminal is to select the first application on the first terminal, And/or for requesting the DH to perform a user authentication operation;
  • the first sending unit 903 is configured to: if yes, send the first message to the DH;
  • the first routing unit 904 is configured to: if the NFCC receives the second message sent by the DH, perform routing processing on the data frame according to the second message.
  • the near field communication controller NFCC formulates a unified solution according to different security and convenience requirements of different card applications.
  • the security requirement is higher than the convenience.
  • the method may further include:
  • the first receiving unit 1001 may include a first query module 10011, where the first query module 10011 is configured to: after the NFCC receives the data frame sent by the second terminal, And determining, by the routing manner, the first routing item that matches the first application, where the routing manner includes a routing manner based on the application identifier AID.
  • the first determining unit 1002 may include: a first determining module 10021, a first determining module 10022, a second determining module 10023, a second determining module 10024, or a third determining module 10025.
  • a first determining module 10021 a first determining module 10021, a first determining module 10022, a second determining module 10023, a second determining module 10024, or a third determining module 10025.
  • One or more modules in the module; wherein the functions of each module are as follows:
  • the first determining module 10021 is configured to determine, according to the user identity verification request identifier in the first routing item, whether to send the first message to the DH.
  • the first determining module 10022 is configured to: if the user identity verification request identifier indicates that the user identity needs to be verified when using the first application, determine that the first message is to be sent to the DH;
  • the second determining module 10023 is configured to: if the user identity verification request identifier indicates that the user identity is not required to be used when the first application is used, determine that the first message is not sent to the DH;
  • the second determining module 10024 is configured to determine, according to the current energy state of the first terminal, whether the first message needs to be sent to the DH; or
  • the third determining module 10025 is configured to determine, according to the presence or absence of the user identity verification success flag corresponding to the first application, whether the first message needs to be sent to the DH, where the user identity verification success flag is that the NFCC is receiving, the DH The message sent after the message indicating the user authentication operation is saved.
  • the second determining module 10024 can include a first determining submodule 100241 and a second determining submodule 100242, where
  • the first determining sub-module 100241 is configured to determine that the first message needs to be sent to the DH if the current energy state of the first terminal is not the power-off state and the power-off state;
  • the second determining sub-module 100242 is configured to determine that the first message does not need to be sent to the DH if the current energy state of the first terminal is an unpowered or powered-off state.
  • the third determining module 10025 may include a third determining submodule 100251 and a fourth determining submodule 100252.
  • a third determining sub-module 100251 configured to: if the user identity verification success flag exists, determine that the first message needs to be sent to the DH;
  • the fourth determining submodule 100252 is configured to determine that the first message does not need to be sent to the DH if the user identity verification success flag does not exist.
  • the first sending unit 1003 may include a first sending module 10031, where the first sending module 10031 is configured to send a first message including the data frame to the DH.
  • the first routing unit 1005 may include: one or more modules in the first routing module 10051, the second routing module 10052, or the third routing module 10053, and functions of each module. details as follows:
  • the first routing module 10051 is configured to: when the second message is sent by the DH after the user identity verification operation is passed, indicating that the NFCC is allowed to perform the first command of data routing, routing the data frame to the first application NFCEE; or,
  • the second routing module 10052 is configured to: when the second message is sent by the DH after the user identity verification operation fails, indicating that the NFCC is not allowed to perform the second command of data routing, the data frame is not routed to the first NFCEE where the application is located, or terminate this communication;
  • the third routing module 10053 is configured to: when the second message is a routing configuration command including the second routing item, routing the data frame to the NFCEE where the first application is located, where the second message is the user authentication of the DH After the operation is passed or after determining that the first application is used, it is not required to verify the identity of the user.
  • the second routing item includes the identifier of the first application and the identifier of the NFCEE where the first application is located.
  • the near field communication controller NFCC further includes one or two units of the second routing unit 1006 and the terminating unit 1007.
  • the specific functions of the two units are as follows:
  • a second routing unit 1006, configured to perform routing processing on the data frame if not;
  • the terminating unit 1007 is configured to terminate the current communication if the NFCC does not receive any message sent by the DH within a preset time period.
  • the second routing unit 1006 can include a fourth routing module 10061, where the fourth routing module 10061 is configured to route the data frame to the NFCEE where the first application is located.
  • the near field communication controller NFCC further includes a second receiving unit 1004,
  • the second receiving unit 1004 is configured to receive the first routing entry of the DH configuration, where the first routing entry includes an identifier of the first application and the first NFCEE identifier, where the first NFCEE identifier is the first The identifier of the NFCEE where the application is located or the identifier of the near field communication execution environment DH-NFCEE corresponding to the DH.
  • the above embodiments respectively describe the functional entities of the host DH and the near field communication controller NFCC in the embodiments of the present application. It should be noted that the near field communication controller NFCC and the host DH are similar in hardware implementation, and the near field communication control is performed.
  • the NFCC can refer to the description of the hardware aspect of the host DH. For details, the host DH in the embodiment of the present application is described below.
  • the processor in the host DH11 as shown in FIG. 11 can perform the actions of the policy entity in the foregoing Embodiments 1 to 5 by calling the application code stored in the memory 1103. Do not make any restrictions.
  • a hardware structure diagram of a host DH11 includes at least one processor 1101, a communication bus 1102, a memory 1103, and at least one communication unit 1104.
  • the processor 1101 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more programs for controlling the execution of the program of the present application. integrated circuit.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the processor 1101 may configure a listening mode routing table to the NFCC by using an NCI based routing configuration command/response (RF_SET_LISTEN_MODE_ROUTING_CMD/RSP) in an initialization phase of the NFC device, which may include The routing entry of the AID (including the application identifier AID and the NFCEE ID of the NFCEE where the application is located), etc., so that the NFCC can find the matching route target NFCEE according to the AID-based routing item after receiving the selectAID command.
  • an NCI based routing configuration command/response RF_SET_LISTEN_MODE_ROUTING_CMD/RSP
  • the processor 1101 can also correspond to the NFCEE of the NFC device, and the NFCEE can communicate with the NFCC through a protocol (such as HCI/SWP), so that the NFCEE can receive and process the peer NFC device forwarded by the NFCC (ie, the second terminal).
  • a protocol such as HCI/SWP
  • Communication bus 1102 can include a path for communicating information between the components described above.
  • the communication unit 1104 uses a device such as any transceiver for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc. .
  • a device such as any transceiver for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc. .
  • RAN Radio Access Network
  • WLAN Wireless Local Area Networks
  • the communication unit 1104 may further include a module for communicating with the NFCC, such as an interface between the DH and the NFCC, the interface may support the NCI protocol at the upper layer, and may be used at the bottom layer.
  • Universal Asynchronous Receiver/Transmitter (UART), 12C bus (Inter-Integrated Circuit) or half-duplex Serial Peripheral Interface (SPI) to transmit data.
  • the DH can configure the RF parameters, the routing table, and the like to the NFCC through the communication unit 1104, so that the NFCC can communicate with the NFC device of the opposite end in the RF discovery process, and receive the first message sent by the NFCC to perform corresponding according to the first message.
  • the memory 1103 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • EEPROM Electrically erasable programmable read only memory
  • CD-ROM Compact Disc Read-Only Memory
  • CD-ROM Compact Disc Read-Only Memory
  • optical disc storage including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.
  • the memory 1103 is configured to store application code for executing the solution of the present application, and is controlled by the processor 1101 to execute.
  • the processor 1101 is configured to execute the application code stored in the memory 1103, thereby implementing the AR projection method in the above embodiment.
  • the storage unit may store an NFC application installed in the DH-NFCEE or NFCEE(s), and a routing program and a routing table in the NFCC.
  • the processor 1101 may include one or more CPUs, such as CPU0 and CPU1 in FIG.
  • the host DH11 may include multiple processors, such as the processor 1101 and the processor 1108 in FIG. Each of these processors can be a single-CPU processor or a multi-core processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data, such as computer program instructions.
  • the host DH11 may further include an output device 1105 and an input device 1106.
  • the output device 1105 is in communication with the processor 1101 and can display information in a variety of ways.
  • the output device 1105 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. Wait.
  • Input device 1106 is in communication with processor 1101 and can accept user input in a variety of ways.
  • input device 1106 can be a mouse, keyboard, touch screen device, or sensing device, and the like.
  • the host DH11 described above may be a general terminal or a dedicated terminal.
  • the host DH11 may be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet, a wireless terminal device, an embedded device, or a device having a similar structure as in FIG. .
  • PDA personal digital assistant
  • the embodiment of the present application does not limit the type of the host DH11.
  • the communication unit 1104 may further include a module for communicating with the DH, such as an interface between the DH and the NFCC, and the interface may be in the upper layer.
  • Support NCI protocol at the bottom layer can use Universal Asynchronous Receiver/Transmitter (UART), 12C bus (Inter-Integrated Circuit) or half-duplex Serial Peripheral Interface (SPI) to transmit data
  • UART Universal Asynchronous Receiver/Transmitter
  • 12C bus Inter-Integrated Circuit
  • SPI Serial Peripheral Interface
  • the NFCC can receive the RF parameters, the routing table, and the like of the DH configuration through the communication unit 1104, so as to be able to communicate with the NFC device of the opposite end in the RF discovery process, and send the first message to the DH, so that the DH performs the first message according to the first message.
  • SPI Serial Peripheral Interface
  • Corresponding user authentication processing, and receiving a second message sent by the DH to perform corresponding data routing processing according to the second message, and the like may further include performing, for performing, with the NFC device (ie, the second terminal) of the peer end a module for communication (ie, transmitting data to and receiving data from a second terminal), such as a transceiver circuit in the NFCC, and the NFC in the transceiver circuit Line operating frequency may be 13.56MHz, NFCC may transmit data to the second terminal through the NFC antenna may also receive data from the second terminal.
  • a module for communication ie, transmitting data to and receiving data from a second terminal
  • the NFC in the transceiver circuit Line operating frequency may be 13.56MHz
  • NFCC may transmit data to the second terminal through the NFC antenna may also receive data from the second terminal.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Embodiments of the present application provide a data processing method and a related device to provide a unified solution for card applications having different security and convenience requirements. The method in the embodiments of the application comprises: a DH receiving a first message sent by an NFCC, the first message being used to notify the DH that a second terminal is to select a first application on a first terminal, and/or being used to request the DH to perform a user identity authentication operation; the DH performing the user identity authentication operation if the DH determines that user identity authentication is required; the DH sending a second message to the NFCC if the user identity authentication operation is successful, the second message being a first command that allows the NFCC to perform data routing on a data frame, and the data frame being a message that is sent by the second terminal to the NFCC and indicating that the second terminal is to select the first application.

Description

一种数据处理方法及相关装置Data processing method and related device 技术领域Technical field
本申请涉及无线通信领域,尤其涉及一种数据处理方法及相关装置。The present application relates to the field of wireless communications, and in particular, to a data processing method and related apparatus.
背景技术Background technique
近场通信(near field communication,NFC)是一种基于射频识别(radio frequency identification,RFID)的一种短距离无线通信技术。NFC设备主要由以下三个功能实体组成:主机(device host,DH),近场通信控制器(near rield communication controller,NFCC)和近场通信执行环境(near field communication Execution Environment,NFCEE)。其中DH负责NFCC的管理,如初始化,配置和电源管理等;NFCC负责通过射频接口和天线进行数据的物理传输;NFCEE可以为NFC应用程序提供一个安全的执行环境。NFC控制接口(NFC controller interface,NCI)定义了一个用于DH和NFCC之间通信的逻辑接口,DH和NFCC之间可以通过NCI协议进行通信;另外,NFCC和NFCEE之间可以通过主机控制接口(host controller interface,HCI)通信协议进行通信。Near field communication (NFC) is a short-range wireless communication technology based on radio frequency identification (RFID). The NFC device is mainly composed of three functional entities: a device host (DH), a near rield communication controller (NFCC), and a near field communication execution environment (NFCEE). DH is responsible for the management of NFCC, such as initialization, configuration and power management; NFCC is responsible for the physical transmission of data through the RF interface and antenna; NFCEE can provide a safe execution environment for NFC applications. The NFC controller interface (NCI) defines a logical interface for communication between DH and NFCC. The communication between DH and NFCC can be performed through the NCI protocol. In addition, the host control interface can be used between NFCC and NFCEE. The host controller interface (HCI) communication protocol communicates.
NFC设备中包含至少一个NFCEE,每个NFCEE上可以安装至少一个卡应用,根据目前NCI标准,同一NFCEE上的多个卡应用,或者不同NFCEE上的多个卡应用可以同时激活,另外,每个卡应用都有对应的应用标识(Application Identifier,AID);NFC设备上的卡应用被激活时,这些卡应用相关的射频(radio frequency,RF)参数(如RF技术参数、RF协议参数等)、侦听模式(listen mode)下的路由表(如基于AID的路由项、基于协议数据单元模式APDU Pattern的路由项、基于协议的路由项、基于技术的路由项等)等会被配置到NFCC上,从而使对端NFC设备(如销售点终端POS)在RF发现过程中发现这些已激活卡应用对应的RF协议,进而使对端NFC设备根据自身业务需求(如银行业务、公交业务、门禁业务等)通过应用选择命令(如selectAID)选择其中一个卡应用进行通信,相应的,NFC设备在收到对端NFC设备发送的应用选择命令后根据上述路由表进行路由项的匹配以将该应用选择命令以及后续收到的数据帧转发给匹配的路由项对应的NFCEE进行处理。The NFC device includes at least one NFCEE, and at least one card application can be installed on each NFCEE. According to the current NCI standard, multiple card applications on the same NFCEE, or multiple card applications on different NFCEEs can be activated simultaneously, and each The card application has a corresponding application identifier (AID); when the card application on the NFC device is activated, the card applies related radio frequency (RF) parameters (such as RF technical parameters, RF protocol parameters, etc.), Routing tables in listen mode (such as AID-based routing entries, protocol data unit pattern APDU Pattern routing entries, protocol-based routing entries, technology-based routing entries, etc.) are configured on the NFCC. Therefore, the peer NFC device (such as the point-of-sale terminal POS) discovers the RF protocol corresponding to the activated card application in the RF discovery process, so that the peer NFC device according to its own service requirements (such as banking, bus service, and access control service) Etc.) Select one of the card applications to communicate by applying a selection command (such as selectAID). Accordingly, the NFC device receives the application selected by the peer NFC device. Command matching routing entry based on the routing table to the application selection command, and subsequently received data frame is forwarded to the matching routing entry corresponding NFCEE processed.
现有标准中定义的一次可以同时激活一个或多个NFCEE上的多个卡应用,并没有充分考虑不同类型的卡应用在实现中对安全性和便捷性可能会有不同的要求,如银行卡应用对安全性要求高于便捷性要求,公交卡应用对于便捷性要求高于安全性要求。因此,不利于实际产品开发,从而对用户体验或用户资金安全带来一些影响。例如,为了兼顾银行卡的安全要求与公交卡的便捷要求,可能设计一次只激活一个卡应用的方案,在激活公交卡时刷银行POS机则报错,激活银行卡时刷公交POS机则要求用户切换卡应用等问题;也可能设计一次激活多个卡应用的方案,但通过卡应用对应的路由项(如基于AID的路由项)限制卡应用使用的条件(如能在哪些手机能量状态下使用),其中,手机能量状态如关机、解锁&亮屏、上锁&亮屏、解锁&熄屏、上锁&熄屏等状态,假设限制银行卡应用对应的基于AID的路由项只能在解锁&亮屏下使用,则用户必须先主动点亮屏幕并解锁手机后才能刷银行卡进行支付,显然用户操作繁琐,体验不佳;若设置银行卡应用对应的基于AID的 路由项能在熄屏状态下使用,则对于无密码信用卡或某些支持小额免密业务的场景,存在被盗刷或误刷的风险等。One of the existing standards can activate multiple card applications on one or more NFCEE at the same time, and does not fully consider that different types of card applications may have different requirements for security and convenience in implementation, such as bank cards. The application requires more safety than the convenience requirement, and the bus card application requires higher convenience than the security requirement. Therefore, it is not conducive to actual product development, which has some impact on user experience or user capital security. For example, in order to balance the security requirements of the bank card with the convenience requirements of the bus card, it is possible to design a scheme that activates only one card application at a time. When the bus card is activated, the bank POS machine reports an error, and when the bank card is activated, the bus POS machine requires the user. Switching card application and other issues; it is also possible to design a scheme to activate multiple card applications at a time, but limit the conditions used by the card application (such as which mobile phone energy state can be used by the routing item corresponding to the card application (such as AID-based routing items) ), wherein the mobile phone energy status is such as shutdown, unlock & bright screen, lock & bright screen, unlock & unlock screen, lock & unlock screen, etc., assuming that the AID-based routing item corresponding to the bank card application can only be unlocked & Under the bright screen, the user must first illuminate the screen and unlock the phone before swiping the bank card for payment. Obviously, the user operation is cumbersome and the experience is not good; if the bank card application is based on the AID-based If the routing item can be used in the off-screen state, there is a risk of being stolen or mistakenly brushed for a passwordless credit card or some scenarios that support small-sized confidential business.
发明内容Summary of the invention
本申请实施例提供了一种数据处理方法及相关装置,用于对安全性和便捷性要求不同的卡应用提供一种统一的解决方案。The embodiment of the present application provides a data processing method and related device, which are used to provide a unified solution for card applications with different security and convenience requirements.
第一方面,本申请实施例提供了一种数据处理方法,该方法用于第一终端的主机DH,该第一终端还包括近场通信控制器NFCC和至少一个近场通信执行环境NFCEE,该方法包括:In a first aspect, the embodiment of the present application provides a data processing method, which is used by a host DH of a first terminal, where the first terminal further includes a near field communication controller NFCC and at least one near field communication execution environment NFCEE, Methods include:
首先,DH接收NFCC发送的第一消息,其中,该第一消息可以用于通知DH第二终端要选择该第一终端上的第一应用,和/或,用于请求DH执行用户身份验证操作,应理解,该第一应用可以是第一终端上已激活的任意类型的卡应用,如银行卡应用和公交卡应用等,请求DH执行用户身份验证操作的目的在于在使用第一应用时要求验证用户身份,这里所说的用户身份为第一终端的当前用户的身份,或者,更进一步的,为第一终端上第一应用或第一应用所在的电子钱包(如手机厂商推出的如huawei pay、apple pay等钱包应用、各银行或第三方机构推出的如工行手机银行、google wallet等钱包应用)的控制者(即知道电子钱包的密码或预置了与电子钱包相关的指纹等生物特征的用户)的身份,此外,第二终端为与第一终端进行NFC通信的终端;First, the DH receives the first message sent by the NFCC, where the first message may be used to notify the DH that the second terminal is to select the first application on the first terminal, and/or to request the DH to perform the user identity verification operation. It should be understood that the first application may be any type of card application activated on the first terminal, such as a bank card application and a bus card application, and the request for the DH to perform the user identity verification operation is required when using the first application. Verifying the identity of the user, the user identity mentioned here is the identity of the current user of the first terminal, or, further, the first application on the first terminal or the electronic wallet where the first application is located (such as a mobile phone manufacturer such as huawei) The wallet application such as pay, apple pay, and the controller of the wallet application such as ICBC mobile banking and google wallet launched by various banks or third parties (that is, knowing the password of the e-wallet or presetting the fingerprints related to the e-wallet) The identity of the user, in addition, the second terminal is a terminal that performs NFC communication with the first terminal;
其次,如果该DH确定需要进行用户身份验证,则DH便执行用户身份验证操作,其中,可以理解的是,在DH执行用户身份验证操作完成之后,根据用户身份验证操作的结果,DH便可以获知用户身份是否能使用第一应用。这里所说的用户身份验证是在使用第一应用之前需要做的操作,即通过判断用户身份验证是否通过来决定是否可以使用第一应用,只有用户身份验证通过后,才允许使用该第一应用与第二终端执行后续的业务。Secondly, if the DH determines that user authentication is required, the DH performs a user identity verification operation, wherein it can be understood that after the DH performs the user identity verification operation, the DH can learn according to the result of the user identity verification operation. Whether the user identity can use the first application. The user authentication mentioned here is an operation that needs to be performed before using the first application, that is, determining whether the first application can be used by determining whether the user identity verification is passed, and only allowing the first application to be used after the user authentication is passed. Performing subsequent services with the second terminal.
最后,当DH执行的用户身份验证操作的结果为通过时,DH便向NFCC发送第二消息,其中,第二消息为允许NFCC对数据帧进行数据路由的第一命令,数据帧是第二终端发送至NFCC,并用于表示要选择第一应用的消息。Finally, when the result of the user authentication operation performed by the DH is a pass, the DH sends a second message to the NFCC, where the second message is a first command that allows the NFCC to perform data routing on the data frame, and the data frame is the second terminal. Sent to the NFCC and used to indicate that the first application is to be selected.
从以上技术方案可以看出,本申请实施例具有以下优点:As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:
可以理解的是,本申请根据不同卡应用对安全性和便捷性要求的不同,制定了统一的解决方案,可使实现更简单,开发成本更低、周期更短等,对于需要进行用户身份验证的卡应用,说明对安全性要求高于便捷性要求;对于不需要进行用户身份验证的卡应用,说明便捷性要求高于安全性要求;因此,本申请实施例既可以对安全性要求高于便捷性要求的卡应用进行用户身份验证,又可以使得便捷性要求高于安全性要求的卡应用实现快捷支付的功能,同时还可以避免前面所述的影响用户体验或使用户操作复杂的问题。It can be understood that the present application has a unified solution according to the different security and convenience requirements of different card applications, which can make the implementation simpler, the development cost is lower, the cycle is shorter, etc., and the user authentication is required. The application of the card indicates that the security requirement is higher than the convenience requirement; for the card application that does not require the user identity verification, the convenience requirement is higher than the security requirement; therefore, the security requirements of the embodiment of the present application can be higher than The card application for convenience requires user authentication, and the card application with higher convenience than the security requirement can realize the function of fast payment, and can also avoid the problems of affecting the user experience or complicating the user operation as described above.
在一种可能的设计中,在本申请实施例第一方面的第一种可能的实现方式中,在DH接收NFCC发送的第一消息之前,还包括:In a possible design, in a first possible implementation manner of the first aspect of the embodiment of the present application, before the DH receives the first message sent by the NFCC, the method further includes:
该DH向NFCC发送并配置第一路由项,其中,该第一路由项中包括用户身份验证要求标识,该用户身份验证要求标识用于指示用户在使用第一应用时需要进行用户身份验证, 或者不需要进行用户身份验证。The DH sends and configures a first routing entry to the NFCC, where the first routing entry includes a user identity verification request identifier, where the user identity verification request identifier is used to indicate that the user needs to perform user identity verification when using the first application. Or no user authentication is required.
该种可能的实现方式中,DH可以在确定地第一应用对应的用户身份验证要求标识指示用户在使用第一应用时需要进行用户身份验证之后,向NFCC发送包含用户身份验证要求标识的第一路由项;或者,不论第一应用对应的用户身份验证要求标识指示用户在使用第一应用时是需要还是不需要进行用户身份验证,DH都向NFCC发送包含用户身份验证要求标识的第一路由项,该用户身份验证要求标识用于指示用户在使用第一应用时需要进行用户身份验证,或者不需要进行用户身份验证。In this possible implementation manner, the DH may send the first user identifier verification request identifier to the NFCC after determining that the user identity verification request identifier corresponding to the first application indicates that the user needs to perform user identity verification when using the first application. The routing item; or, whether the user authentication request identifier corresponding to the first application indicates whether the user needs or does not need to perform user authentication when using the first application, the DH sends the first routing item including the user identity verification request identifier to the NFCC. The user authentication request identifier is used to indicate that the user needs to perform user authentication when using the first application, or does not need to perform user authentication.
该种可能的实现方式中,DH向NFCC配置包括用户身份验证要求标识的第一路由项,NFCC便可以根据该用户身份验证要求标识方便的获知在使用第一应用时需要或不需要进行用户身份验证。In this possible implementation manner, the DH configures the first routing item including the user identity verification requirement identifier to the NFCC, and the NFCC can conveniently learn, according to the user identity verification request identifier, whether the user identity is needed or not needed when using the first application. verification.
在一种可能的设计中,在本申请实施例第一方面的第二种可能的实现方式中,当第一消息用于通知DH第二终端要选择第一应用时,DH确定需要进行用户身份验证包括:In a possible design, in a second possible implementation manner of the first aspect of the embodiment of the present application, when the first message is used to notify the DH that the second terminal is to select the first application, the DH determines that the user identity needs to be performed. Validation includes:
当DH接收到NFCC发送的第一消息时,并且该第一消息的作用是用于通知DH第二终端要选择第一应用,此种场景中,DH可以根据第一应用对应的用户身份验证要求标识,进一步确定需要或不需要进行用户身份验证,其中,该用户身份验证要求标识指示使用所述第一应用时需要验证用户身份,因此,DH根据该用户身份验证要求标识的指示,确定需要进行用户身份验证。When the DH receives the first message sent by the NFCC, and the function of the first message is used to notify the DH that the second terminal is to select the first application, in this scenario, the DH may be determined according to the user identity corresponding to the first application. The identifier further determines whether user authentication is required or not, wherein the user authentication request identifier indicates that the user identity needs to be verified when the first application is used, and therefore, the DH determines that the user needs to perform the indication according to the user identity verification request identifier. User authentication.
在该种可能的实现方式中,由于第一消息中并未指示请求DH执行用户身份验证操作,而是通知了DH第二终端要选择第一应用,因此,DH需要自身去判断使用第一应用是是否需要进行用户身份验证,可以理解的是,DH可以根据注册信息或用户指示信息去获取上述用户身份验证要求标识,或者,从之前根据注册信息或用户指示信息为每个应用确定的用户身份验证要求标识中获取第一应用对应的用户身份验证要求标识。In this possible implementation manner, since the first message does not indicate that the request DH performs the user identity verification operation, but notifies the DH second terminal that the first application is to be selected, the DH needs to determine the use of the first application by itself. Whether user authentication is required, it can be understood that the DH can obtain the user identity verification request identifier according to the registration information or the user indication information, or the user identity determined for each application according to the registration information or the user indication information. The user identification verification request identifier corresponding to the first application is obtained in the verification request identifier.
在一种可能的设计中,在本申请实施例第一方面的第三种可能的实现方式中,在DH接收述NFCC发送的第一消息之前,该方法还包括:In a possible design, in a third possible implementation manner of the first aspect of the embodiments of the present application, before the DH receives the first message that is sent by the NFCC, the method further includes:
DH向NFCC配置第二路由项,此时,第一应用对应的用户身份验证要求标识指示使用第一应用时需要验证用户身份,其中,第二路由项中包括DH对应的近场通信执行环境DH-NFCEE的标识,该标识用于指示DH对应的近场通信执行环境DH-NFCEE,但是,DH-NFCEE不是第一应用所在的NFCEE,可以理解的是,DH向通过向NFCC发送第二路由项,实质上是为NFCC配置了一个指向DH-NFCEE的路由。The DH configures a second routing entry to the NFCC. In this case, the user authentication request identifier corresponding to the first application indicates that the user identity needs to be verified when the first application is used, where the second routing entry includes the near field communication execution environment DH corresponding to the DH. An identifier of the NFCEE, which is used to indicate the near field communication execution environment DH-NFCEE corresponding to the DH. However, the DH-NFCEE is not the NFCEE where the first application is located. It can be understood that the DH sends a second routing item to the NFCC. In essence, the NFCC is configured with a route to DH-NFCEE.
该种可能的实现方式中,当使用第一应用时需要用户身份验证,并且第一应用对应的NFCEE不是DH-NFCEE时,DH向NFCC配置一个指向DH-NFCEE的路由,因此,可以理解的是,DH可以根据第一应用对应的路由指向了DH-NFCEE来简单的获知在使用第一应用时需要进行用户身份验证。In this possible implementation, when user authentication is required when the first application is used, and the NFCEE corresponding to the first application is not DH-NFCEE, the DH configures a route to the NFCC to point to the DH-NFCEE, so it is understandable that DH can simply point to DH-NFCEE according to the route corresponding to the first application to know that user identity verification is required when using the first application.
在一种可能的设计中,在本申请实施例第一方面的第四种可能的实现方式中,DH接收NFCC发送的第一消息,具体可以包括:In a possible design, in a fourth possible implementation manner of the first aspect of the embodiment, the DH receives the first message sent by the NFCC, and specifically includes:
首先,DH接收NFCC发送的第一消息,并且该第一消息中包括第二终端发送的数据帧,该数据帧用于通知DH第二终端要选择第一应用; First, the DH receives the first message sent by the NFCC, and the first message includes a data frame sent by the second terminal, where the data frame is used to notify the DH that the second terminal selects the first application;
其次,DH根据第一消息获知第一应用之后,并根据该第一应用对应的用户身份验证要求标识确定使用该第一应用时需要进行用户身份验证,可以理解的是,此时,该第一应用对应的用户身份验证要求标识指示使用该第一应用时需要进行用户身份验证;Secondly, after the DH learns the first application according to the first message, and determines, according to the user identity verification request identifier corresponding to the first application, that the user identity verification is required when the first application is used, it may be understood that, at this time, the first Applying a corresponding user authentication request identifier indicates that user authentication is required when the first application is used;
最后,DH向NFCC发送第二消息,其中该第二消息中包括第三路由项,该第三路由项中包括第一应用所在的NFCEE的标识,可以理解的是,该标识指示了第一应用所在的NFCEE。Finally, the DH sends a second message to the NFCC, where the second message includes a third routing entry, where the third routing entry includes an identifier of the NFCEE where the first application is located. It can be understood that the identifier indicates the first application. The NFCEE is located.
该种可能的实现方式中,将第二终端发送的数据帧直接作为第一消息进行转发,通知DH,这种实现方式,更加简单,便捷,无需再另从配置第一消息。In this possible implementation, the data frame sent by the second terminal is directly forwarded as the first message, and the DH is notified. This implementation manner is simpler and more convenient, and no need to configure the first message.
在一种可能的设计中,在本申请实施例第一方面的第五种可能的实现方式中,该方法还包括:In a possible design, in a fifth possible implementation manner of the first aspect of the embodiments, the method further includes:
当本次通信结束时,DH向NFCC重新配置第二路由项,其中,该第二路由项中包括DH对应的近场通信执行环境DH-NFCEE的标识,用于指示DH对应的近场通信执行环境DH-NFCEE;When the communication ends, the DH reconfigures the second routing entry to the NFCC, where the second routing entry includes an identifier of the near field communication execution environment DH-NFCEE corresponding to the DH, and is used to indicate the near field communication execution corresponding to the DH. Environment DH-NFCEE;
或者,也可以在DH在本次通信结束后的预设时间内没有再次收到第二终端发送的用于选择所述第一应用的数据帧时,该DH再向NFCC重新配置第二路由项。Alternatively, the DH may reconfigure the second routing entry to the NFCC when the DH does not receive the data frame sent by the second terminal for selecting the first application again within the preset time after the end of the communication. .
该种可能的实现方式中,DH向NFCC重新配置第二路由项,这样使得用户在使用第一应用完毕后,可以将路由自动恢复,以待下一次正常使用该第一应用。In this possible implementation, the DH reconfigures the second routing entry to the NFCC, so that after the first application is used, the user can automatically restore the route to wait for the next normal use of the first application.
在一种可能的设计中,在本申请实施例第一方面的第六种可能的实现方式中,用户身份验证要求标识可以是DH根据第一应用的注册信息和/或用户指示确定的,其中,第一应用的注册信息包括第一应用的应用类型和/或用于表示对身份验证的要求参数。In a possible design, in a sixth possible implementation manner of the first aspect of the embodiment, the user identity verification request identifier may be determined by the DH according to the registration information of the first application and/or the user indication, where The registration information of the first application includes an application type of the first application and/or a requirement parameter for indicating authentication.
该种可能的实现方式中,根据第一应用的注册信息和/或用户指示确定用户身份验证要求标识,该种实现方式,可行性较强,容易实现。In this possible implementation manner, the user identity verification request identifier is determined according to the registration information of the first application and/or the user indication, and the implementation manner is strong and easy to implement.
在一种可能的设计中,在本申请实施例第一方面的第七种可能的实现方式中,DH执行用户身份验证操作,具体包括:In a possible design, in a seventh possible implementation manner of the first aspect of the embodiment, the DH performs a user identity verification operation, and specifically includes:
若该DH确定存在该第一应用对应的用户身份验证成功标记,则该DH根据该用户身份验证成功标记确定该用户身份验证操作通过;或者,If the DH determines that the user identity verification success flag corresponding to the first application exists, the DH determines, according to the user identity verification success flag, that the user identity verification operation passes; or
若该DH确定不存在该第一应用对应的用户身份验证成功标记,则该DH通过该第一终端的身份验证模块接收并判断用户身份信息,以确定该用户身份验证操作是否通过。If the DH determines that there is no user identity verification success flag corresponding to the first application, the DH receives and determines the user identity information by using the identity verification module of the first terminal to determine whether the user identity verification operation passes.
该种可能的实现方式中,对DH执行用户身份验证操作进一步细化,使得该操作变得更加清楚,具体。同时,该种可能的实现方式也是考虑了在用户身份验证过程中由用户验证指纹或其他形式的身份信息带来的时延问题或者用户使用习惯问题,可能需要用户将NFC手机离开POS机并验证身份成功后再次靠近POS机,一定程度上提高了该方案的容错率。In this possible implementation, the user authentication operation performed on the DH is further refined, so that the operation becomes clearer and specific. At the same time, this possible implementation method also considers the delay caused by the user to verify the fingerprint or other forms of identity information during the user authentication process or the user's usage habits, and may require the user to leave the NFC mobile phone and verify the NFC mobile phone. After the identity is successful, it is close to the POS machine, which improves the fault tolerance rate of the solution to some extent.
在一种可能的设计中,在本申请实施例第一方面的第八种可能的实现方式中,该用户身份验证成功标记是该DH在通过该第一终端的身份验证模块确定该用户身份验证操作通过之后保存的。In a possible design, in an eighth possible implementation manner of the first aspect of the embodiments, the user identity verification success flag is that the DH determines the user identity verification by using an identity verification module of the first terminal. The operation is saved after passing.
该种可能的实现方式中,对该用户身份验证成功标记的产生提出来一种可能的实现方 式,增加了该方案的可实现性。In this possible implementation, a possible implementation is proposed for the generation of the user identity verification success flag. This increases the achievability of the scheme.
在一种可能的设计中,在本申请实施例第一方面的第九种可能的实现方式中,该方法还包括:In a possible design, in a ninth possible implementation manner of the first aspect of the embodiments, the method further includes:
当DH在预设时间段内没有再次接收到NFCC发送的第一消息时,DH便将该用户身份验证成功标记删除;或者,当DH根据该用户身份验证成功标记确定用户身份验证草通过之后,DH便将该用户身份验证要求标记删除。When the DH does not receive the first message sent by the NFCC again within the preset time period, the DH deletes the user identity verification success flag; or, after the DH determines that the user identity verification grass passes according to the user identity verification success flag, DH deletes the user authentication request token.
该种可能的实现方式中,在使用完用户身份验证成功标记之后及时的将该户身份验证成功标记删除,可以有效地提高用户身份验证的安全性。In this possible implementation manner, the user identity verification success flag is deleted in time after the user authentication success flag is used, which can effectively improve the security of the user identity verification.
在一种可能的设计中,在本申请实施例第一方面的第十种可能的实现方式中,该方法还包括:In a possible design, in a tenth possible implementation manner of the first aspect of the embodiments, the method further includes:
当DH确定不需要进行用户身份验证时,DH向NFCC发送第二消息,其中,该第二消息为不允许NFCC对数据帧进行路由的第二命令。When the DH determines that user authentication is not required, the DH sends a second message to the NFCC, wherein the second message is a second command that does not allow the NFCC to route the data frame.
在该种可能的实现方式中,当不需要进行用户身份验证时,DH直接发送第一命令指示NFCC对数据帧进行路由至第一应用所在的NFCEE,因此,有效地提高了使用第一应用时的处理速度,提高了用户体验。In this possible implementation, when the user authentication is not required, the DH directly sends the first command to instruct the NFCC to route the data frame to the NFCEE where the first application is located, thereby effectively improving the use of the first application. The processing speed increases the user experience.
在一种可能的设计中,在本申请实施例第一方面的第十一种可能的实现方式中,该方法还包括:In a possible design, in an eleventh possible implementation manner of the first aspect of the embodiments, the method further includes:
当用户身验证操作未通过时,DH可以通过向NFCC发送第二消息指示NFCC,其中,第二消息为不允许NFCC对数据帧进行数据路由的第二命令,以告知NFCC不对该数据帧进行数据路由处理;DH还可以不发送任何消息,应理解,当NFCC在预设时间段内没有接收到任何消息,则NFCC便不将数据帧路由至第一应用所在的NFCEE。When the user verification operation fails, the DH may indicate the NFCC by sending a second message to the NFCC, where the second message is a second command that does not allow the NFCC to perform data routing on the data frame, to inform the NFCC not to perform data on the data frame. Routing processing; DH may not send any messages. It should be understood that when the NFCC does not receive any message within the preset time period, the NFCC does not route the data frame to the NFCEE where the first application is located.
该种可能的实现方式中,当用户身份验证未通过时,NFCC不对数据帧进行路由处理,这样,可以有效地提高使用第一应用的安全性,防止被盗用时可能造成的财产损失。In this possible implementation manner, when the user identity verification fails, the NFCC does not perform routing processing on the data frame, so that the security of using the first application can be effectively improved, and property loss may be prevented when the user is stolen.
第二方面,本申请实施例提供了一种数据处理方法,该方法用于第一终端的近场通信控制器NFCC,该第一终端还包括主机DH和至少一个近场通信执行环境NFCEE,该方法包括:In a second aspect, the embodiment of the present application provides a data processing method, where the method is used for a near field communication controller NFCC of a first terminal, where the first terminal further includes a host DH and at least one near field communication execution environment NFCEE, where Methods include:
首先,NFCC接收第二终端发送的数据帧,并根据该数据帧查找到与之匹配的第一路由项,其中,该数据帧用于表示第二终端要选择第一终端上的第一应用,此外,第二终端为与第一终端进行NFC通信的终端;First, the NFCC receives the data frame sent by the second terminal, and finds a matching first routing item according to the data frame, where the data frame is used to indicate that the second terminal selects the first application on the first terminal, In addition, the second terminal is a terminal that performs NFC communication with the first terminal;
其次,在NFCC查找到第一路由项后,NFCC根据预设条件判断是否需要向DH发送第一消息,其中,第一消息可以用于通知DH第二终端将要选择第一终端上的第一应用,和/或,可以用于请求DH执行用户身份验证操作;Then, after the NFCC finds the first routing item, the NFCC determines whether it needs to send the first message to the DH according to the preset condition, where the first message may be used to notify the DH that the second terminal is to select the first application on the first terminal. And/or, can be used to request DH to perform a user authentication operation;
再次,如果NFCC确定需要向DH发送第一消息,那么,NFCC便将第一消息发送至DH,应理解,该第一消息可以用于执行上述步骤中的单独任意一个功能或同时执行两个功能;Again, if the NFCC determines that the first message needs to be sent to the DH, then the NFCC sends the first message to the DH, it being understood that the first message can be used to perform any of the above steps or perform two functions simultaneously. ;
最后,当NFCC接收到DH发送的第二消息时,NFCC根据该第二消息的指示,对上述数据帧进行路由处理。 Finally, when the NFCC receives the second message sent by the DH, the NFCC performs routing processing on the data frame according to the indication of the second message.
从以上技术方案可以看出,本申请实施例具有以下优点:As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:
可以理解的是,本申请根据不同卡应用对安全性和便捷性要求的不同,制定了统一的解决方案,可使实现更简单,开发成本更低、周期更短等,对于需要进行用户身份验证的卡应用,说明对安全性要求高于便捷性要求;对于不需要进行用户身份验证的卡应用,说明便捷性要求高于安全性要求;因此,本申请实施例既可以对安全性要求高于便捷性要求的卡应用进行用户身份验证,又可以使得便捷性要求高于安全性要求的卡应用实现快捷支付的功能,同时还可以避免前面所述的影响用户体验或使用户操作复杂的问题。It can be understood that the present application has a unified solution according to the different security and convenience requirements of different card applications, which can make the implementation simpler, the development cost is lower, the cycle is shorter, etc., and the user authentication is required. The application of the card indicates that the security requirement is higher than the convenience requirement; for the card application that does not require the user identity verification, the convenience requirement is higher than the security requirement; therefore, the security requirements of the embodiment of the present application can be higher than The card application for convenience requires user authentication, and the card application with higher convenience than the security requirement can realize the function of fast payment, and can also avoid the problems of affecting the user experience or complicating the user operation as described above.
在一种可能的设计中,在本申请实施例第二方面的第一种可能的实现方式中,该方法还包括:In a possible design, in a first possible implementation manner of the second aspect of the embodiment of the present application, the method further includes:
如果NFCC根据预设条件判断不需要向DH发送第一消息,那么,NFCC对数据帧进行路由处理,即NFCC将数据帧路由至第一应用所在的NFCEE。If the NFCC determines that the first message does not need to be sent to the DH according to the preset condition, the NFCC routes the data frame, that is, the NFCC routes the data frame to the NFCEE where the first application is located.
该种可能的实现方式中,当NFCC不需要向DH发送第一消息时,NFCC便将数据帧路由至第一应用所在的NFCEE,这样,可以有效地提高路由转发处理速度。In this possible implementation manner, when the NFCC does not need to send the first message to the DH, the NFCC routes the data frame to the NFCEE where the first application is located, so that the routing and forwarding processing speed can be effectively improved.
在一种可能的设计中,在本申请实施例第二方面的第二种可能的实现方式中,在NFCC接收第二终端发送的数据帧后找到匹配的第一路由项之前,该方法还包括:In a possible design, in a second possible implementation manner of the second aspect of the embodiment of the present application, before the NFCC finds the matched first routing item after receiving the data frame sent by the second terminal, the method further includes: :
NFCC接收DH配置的第一路由项,其中,该第一路由项包括第一应用的标识和第一NFCEE标识,需要说明的是,第一NFCEE标识可以为第一应用所在的NFCEE的标识,也可以为DH对应的近场通信执行环境DH-NFCEE的标识。The NFCC receives the first routing entry of the DH configuration, where the first routing entry includes the identifier of the first application and the first NFCEE identifier. It should be noted that the first NFCEE identifier may be the identifier of the NFCEE where the first application is located, and The identification of the environment DH-NFCEE may be performed for the near field communication corresponding to the DH.
该种可能的实现方式中,在NFCC接收第二终端发送的数据帧后找到匹配的第一路由项之前,NFCC接收DH配置的包括第一NFCEE标识的第一路由项,这样NFCC便可以提前根据第一路由项获知NFCEE的信息,即应该把数据帧路由到哪个NFCEE的信息。In a possible implementation manner, before the NFCC finds the matched first routing item after receiving the data frame sent by the second terminal, the NFCC receives the first routing item including the first NFCEE identifier configured by the DH, so that the NFCC can be based in advance. The first routing entry knows the NFCEE information, which NFCEE information should be routed to the data frame.
在一种可能的设计中,在本申请实施例第二方面的第三种可能的实现方式中,若第一NFCEE标识为该第一应用所在的NFCEE的标识,则所述第一路由项还包括所述用户身份验证要求标识;NFCC根据预设条件判断是否要向DH发送第一消息,包括:In a possible design, in a third possible implementation manner of the second aspect of the embodiment of the present application, if the first NFCEE identifier is an identifier of the NFCEE where the first application is located, the first routing entry is further The user authentication request identifier is included; the NFCC determines whether to send the first message to the DH according to the preset condition, including:
NFCC根据该第一路由项中的用户身份验证要求标识判断是否要向该DH发送该第一消息,具体可以为,若该用户身份验证要求标识指示使用第一应用时需要验证用户身份,则该NFCC确定要向该DH发送该第一消息;同理,若该用户身份验证要求标识指示使用第一应用时不需要验证用户身份,则该NFCC确定不向该DH发送该第一消息。The NFCC determines, according to the user identity verification request identifier in the first routing item, whether to send the first message to the DH, and specifically, if the user identity verification request identifier indicates that the user identity needs to be verified when using the first application, The NFCC determines that the first message is to be sent to the DH; similarly, if the user identity verification request indicates that the user identity is not required to be used when the first application is used, the NFCC determines not to send the first message to the DH.
在该种可能的实现方式中,NFCC根据第一路由项中的用户身份验证要求标识进行判断,能有效地判断出需要向DH发送第一消息或不需要向DH发送第一消息。In this possible implementation manner, the NFCC judges according to the user identity verification request identifier in the first routing item, and can effectively determine that the first message needs to be sent to the DH or does not need to send the first message to the DH.
在一种可能的设计中,在本申请实施例第二方面的第四种可能的实现方式中,该NFCC根据预设条件判断是否要向该DH发送第一消息,包括:In a possible design, in a fourth possible implementation manner of the second aspect of the embodiment, the NFCC determines, according to the preset condition, whether to send the first message to the DH, including:
该NFCC根据该第一终端的当前能量状态判断是否需要向该DH发送该第一消息;或者,该NFCC根据该第一应用对应的用户身份验证成功标记存在与否判断是否需要向该DH发送该第一消息,该用户身份验证成功标记是该NFCC在接收到,该DH发送的表示用户身份验证操作通过的消息后保存的。Determining, by the NFCC, whether the first message needs to be sent to the DH according to the current energy status of the first terminal; or determining, by the NFCC, whether the user identity verification success token corresponding to the first application needs to be sent to the DH. The first message, the user authentication success flag is saved after the NFCC receives the message sent by the DH indicating that the user authentication operation passes.
在该种可能的实现方式中,NFCC根据当前能量状态或身份验证成功标记来确定是否 需要发送第一消息,这样,可以精准地做出判断,提高NFC通信的时效性、安全性。In this possible implementation, the NFCC determines whether the current energy status or the identity verification success flag is The first message needs to be sent, so that the judgment can be accurately made and the timeliness and security of the NFC communication can be improved.
在一种可能的设计中,在本申请实施例第二方面的第五种可能的实现方式中,该NFCC根据第一终端的当前能量状态判断是否需要向该DH发送该第一消息,具体包括:In a possible design, in a fifth possible implementation manner of the second aspect of the embodiment, the NFCC determines, according to the current energy state of the first terminal, whether the first message needs to be sent to the DH, specifically including :
首先,当第一终端的当前能量状态既不是无电状态,也不是关机状态时,该NFCC确定需要向该DH发送第一消息,应理解,第一终端的电量能维续NFC通信的情况下,该NFCC才确定需要向该DH发送第一消息;其次,当第一终端的当前能量状态是无电或关机状态时,该NFCC确定不需要向该DH发送第一消息,应理解,当第一终端的当前能量状态是无电或关机状态时,该第一终端的DH便无法正常使用,也就不能接收、处理或应答NFCC发送的消息,因此,此时该NFCC不发送该第一消息。First, when the current energy state of the first terminal is neither the powerless state nor the power-off state, the NFCC determines that the first message needs to be sent to the DH, and it should be understood that the power of the first terminal can maintain the NFC communication. The NFCC determines that the first message needs to be sent to the DH. Secondly, when the current energy state of the first terminal is no power or power-off state, the NFCC determines that the first message does not need to be sent to the DH, it should be understood that when When the current energy state of a terminal is no power or power-off state, the DH of the first terminal cannot be used normally, and the message sent by the NFCC cannot be received, processed, or acknowledged. Therefore, the NFCC does not send the first message at this time. .
在该种可能的实现方式中,在第一终端处于非关机或非无电的情况下才向DH发送第一消息,这样,可以有效地避免NFCC上资源的浪费。In this possible implementation, the first message is sent to the DH when the first terminal is not powered off or not, so that waste of resources on the NFCC can be effectively avoided.
在一种可能的设计中,在本申请实施例第二方面的第六种可能的实现方式中,该NFCC根据该第一应用对应的用户身份验证成功标记存在与否判断是否需要向该DH发送该第一消息,具体包括:In a possible design, in a sixth possible implementation manner of the second aspect of the embodiment, the NFCC determines whether the presence or absence of the user identity verification success token corresponding to the first application needs to be sent to the DH. The first message specifically includes:
首先,如果存在用户身份验证成功标记,那么,NFCC确定需要向该DH发送第一消息,应理解,当存在用户身份验证成功标记时,说明存在用户身份验证成功的记录,无需再次验证;如果不存在用户身份验证成功标记,那么,NFCC确定不需要向该DH发送第一消息,应理解,当不存在用户身份验证成功标记时,说明不存在用户身份验证成功的记录,便需要进行身份验证;需要说明的是,用户身份验证成功标记是表征用户身份验证通过时标记留下的。First, if there is a user authentication success flag, the NFCC determines that the first message needs to be sent to the DH. It should be understood that when there is a user identity verification success flag, it indicates that there is a record of successful user identity verification, and no need to verify again; If there is a user authentication success token, then the NFCC determines that the first message does not need to be sent to the DH. It should be understood that when there is no user authentication success token, it indicates that there is no record of successful user authentication, and authentication is required; It should be noted that the user authentication success flag is marked as a token when the user authentication is passed.
在该种可能的实现方式中,通过用户身份验证成功标记来确定发送第一消息与否,这样,当存在用户身份验证成功标记的情况下,可以提高处理速度,并且可以解决在使用第一应用时带来的时延问题,提高该方案的容错率。In this possible implementation, the first message is sent or not by the user identity success flag, so that when there is a user identity verification success flag, the processing speed can be improved, and the first application can be solved. The delay problem brought by the time increases the fault tolerance rate of the program.
在一种可能的设计中,在本申请实施例第二方面的第七种可能的实现方式中,该NFCC根据该第二消息对所述数据帧进行路由处理,具体包括:In a possible design, in a seventh possible implementation manner of the second aspect of the embodiment, the NFCC performs routing processing on the data frame according to the second message, specifically:
首先,当第二消息为第一命令时,NFCC将第二终端发送的数据帧路由至该第一应用所在的NFCEE,其中,第一命令是表示允许NFCC对上述数据帧进行数据路由至第一应用所在的NFCEE,并且第一命令是DH在执行用户身份验证操作得到结果为通过时发送的;First, when the second message is the first command, the NFCC routes the data frame sent by the second terminal to the NFCEE where the first application is located, where the first command is to allow the NFCC to perform data routing to the data frame to the first The NFCEE where the application is located, and the first command is sent when the DH performs the user authentication operation and the result is passed;
其次,当第二消息为第二命令时,NFCC便不路由第二终端发送的数据帧至第一应用所在的NFCEE,其中,第二命令是表示不允许NFCC对上述数据帧进行数据路由至第一应用所在的NFCEE的命令,并且是DH在执行用户身份验证操作得到未通过的结果时发送的。Secondly, when the second message is the second command, the NFCC does not route the data frame sent by the second terminal to the NFCEE where the first application is located, where the second command indicates that the NFCC is not allowed to perform data routing to the data frame. The command of the NFCEE where the application is located, and is sent by DH when the user authentication operation is performed to get a failed result.
在该种可能的实现方式中,根据第二消息中的第一命令或第二命令去分别判断NFCC是需要或不需要将第二终端发送的数据帧路由至第一应用所在的NFCEE,这样可以有效地避免NFCC在根据第二消息对上述数据帧进行数据路由处理出错。In this possible implementation, the first command or the second command in the second message is used to determine whether the NFCC needs to or need to route the data frame sent by the second terminal to the NFCEE where the first application is located, so that The NFCC is effectively prevented from making an error in data routing processing of the above data frame according to the second message.
在一种可能的设计中,在本申请实施例第二方面的第八种可能的实现方式中,当第一路由项中的第一NFCEE标识为DH-NFCEE的标识时,NFCC向DH发送第一消息,具体包括: In a possible design, in an eighth possible implementation manner of the second aspect of the embodiment of the present application, when the first NFCEE identifier in the first routing item is the identifier of the DH-NFCEE, the NFCC sends the first to the DH. A message, including:
该NFCC向该DH发送第一消息,其中,该第一消息中包括第二终端发送的,用于选择第一终端中第一应用的数据帧;The NFCC sends a first message to the DH, where the first message includes a data frame that is sent by the second terminal and is used to select the first application in the first terminal.
此时,该NFCC根据第二消息对上述数据帧进行路由处理,具体包括:At this time, the NFCC performs routing processing on the data frame according to the second message, and specifically includes:
如果第二消息为路由配置命令,并且该路由配置命令中包括上述第二路由项,那么,NFCC将第二终端发送的数据帧路由至该第一应用所在的NFCEE,其中,该第二消息为DH在用户身份验证操作通过之后发送的,或者为确定使用第一应用时不需要验证用户身份之后发送的。If the second message is a route configuration command, and the route configuration command includes the foregoing second routing item, the NFCC routes the data frame sent by the second terminal to the NFCEE where the first application is located, where the second message is The DH is sent after the user authentication operation is passed, or is sent after determining that the first application is used without verifying the identity of the user.
在该种可能的实现方式中,在NFCC实现对数据帧的路由上只需要发送相应的路由配置命令即可,在实现上较为简单,方便,可实现性较强。In this possible implementation manner, only the corresponding routing configuration command needs to be sent on the routing of the data frame by the NFCC, which is simple, convenient, and implementable.
在一种可能的设计中,在本申请实施例第二方面的第九种可能的实现方式中,NFCC对数据帧进行路由处理,具体包括:In a possible design, in a ninth possible implementation manner of the second aspect of the embodiment of the present application, the NFCC performs routing processing on the data frame, specifically:
NFCC直接将第二终端发送的,用于选择第一终端的第一应用的数据帧转发至该第一应用所在的NFCEE。The NFCC directly forwards the data frame sent by the second terminal for selecting the first application of the first terminal to the NFCEE where the first application is located.
在该种可能的实现方式中,NFCC将上述数据帧直接路由至第一应用所在的NFCEE,可以使得对上述数据帧进行相应的操作。In this possible implementation, the NFCC directly routes the data frame to the NFCEE where the first application is located, so that the data frame can be correspondingly operated.
在一种可能的设计中,在本申请实施例第二方面的第十种可能的实现方式中,该方法还包括:In a possible design, in a tenth possible implementation manner of the second aspect of the embodiments, the method further includes:
当NFCC在预设的时间段内没有接收到DH发送的任何消息,则NFCC终止本次通信。When the NFCC does not receive any message sent by the DH within a preset period of time, the NFCC terminates the communication.
在该种可能的实现方式中,NFCC在预设的时间段内没有接收到DH发送的任何消息,NFCC可以选择终止本次通信,这样,在一定程度上可以避免该第一应用被盗用。In this possible implementation manner, the NFCC does not receive any message sent by the DH within a preset time period, and the NFCC may choose to terminate the communication, so that the first application may be prevented from being stolen to some extent.
在一种可能的设计中,在本申请实施例第二方面的第十一种可能的实现方式中,NFCC接收第二终端发送的数据帧后找到匹配的第一路由项,具体包括:In a possible design, in an eleventh possible implementation manner of the second aspect of the embodiment of the present application, the NFCC, after receiving the data frame sent by the second terminal, finds the matching first routing item, and specifically includes:
首先,该NFCC接收第二终端发送的数据帧,其次,该NFCC根据相应的路由选择方式找到与上述数据帧中第一应用相匹配的第一路由项,其中,一种可能的路由选择方式可以是基于应用标识AID的路由选择方式。当然,该路由现选择方式还可以是其他种类的路由选择方式,如基于应用协议数据单元模式APDU Pattern的路由选择方式、基于系统编号SC的路由选择方式、基于协议的路由选择方式或基于技术的路由选择方式等,相应地,用于选择第一应用的数据帧中包括的第一应用的标识就是与第一应用相关的APDU Pattern、SC、协议或技术等。First, the NFCC receives the data frame sent by the second terminal, and secondly, the NFCC finds a first routing item that matches the first application in the data frame according to the corresponding routing manner, where a possible routing manner may be It is based on the routing method of the application identification AID. Of course, the current selection mode of the route may also be other types of routing methods, such as a routing mode based on the application protocol data unit mode APDU Pattern, a routing method based on the system number SC, a protocol-based routing method, or a technology-based routing method. Correspondingly, the identifier of the first application included in the data frame for selecting the first application is the APDU Pattern, SC, protocol or technology related to the first application.
在该种可能的实现方式中,使用基于AID的路由选择方式可以更加有效地找到与之匹配的第一路由项,在实现上具体普遍性,适用范围更大。In this possible implementation manner, the AID-based routing method can be used to find the first routing item that matches it more effectively, and the implementation is more general and applicable.
第三方面,本申请实施例提供一种策略实体,该策略实体具有实现上述方法实施例的第一方面中第一终端的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In a third aspect, the embodiment of the present application provides a policy entity, where the policy entity has the function of implementing the first terminal in the first aspect of the foregoing method embodiment. This function can be implemented in hardware or in hardware by executing the corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
第四方面,本申请实施例提供一种策略实体,包括:处理器、存储器、总线和通信接口;该存储器用于存储计算机执行指令,该处理器与该存储器通过该总线连接,当该策略实体运行时,该处理器执行该存储器存储的该计算机执行指令,以使该策略实体备执行如 上述第一方面任意一项的数据处理方法。In a fourth aspect, an embodiment of the present application provides a policy entity, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer execution instruction, and the processor is connected to the memory through the bus, when the policy entity In operation, the processor executes the computer-executed instructions stored in the memory to enable the policy entity to execute as The data processing method of any of the above aspects.
五方面,本申请实施例提供了一种计算机可读存储介质,用于储存为上述策略实体所用的计算机软件指令,当其在计算机上运行时,使得计算机可以执行上述第一方面中任意一项的数据处理方法。In a fifth aspect, the embodiment of the present application provides a computer readable storage medium, configured to store computer software instructions used by the policy entity, when executed on a computer, to enable the computer to perform any one of the foregoing first aspects. Data processing method.
第六方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第一方面中任意一项的数据处理方法。In a sixth aspect, an embodiment of the present application provides a computer program product comprising instructions, which when executed on a computer, cause the computer to perform the data processing method of any of the above first aspects.
另外,第三方面至第六方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。In addition, the technical effects brought by any one of the third aspect to the sixth aspect can be referred to the technical effects brought by different design modes in the first aspect, and details are not described herein again.
第七方面,本申请实施例提供一种策略实体,该策略实体具有实现上述方法实施例的第二方面中第一终端的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In a seventh aspect, the embodiment of the present application provides a policy entity, where the policy entity has the function of implementing the first terminal in the second aspect of the foregoing method embodiment. This function can be implemented in hardware or in hardware by executing the corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
第八方面,本申请实施例提供一种策略实体,包括:处理器、存储器、总线和通信接口;该存储器用于存储计算机执行指令,该处理器与该存储器通过该总线连接,当该策略实体运行时,该处理器执行该存储器存储的该计算机执行指令,以使该策略实体备执行如上述第二方面任意一项的数据处理方法。In an eighth aspect, an embodiment of the present application provides a policy entity, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer execution instruction, and the processor is connected to the memory through the bus, when the policy entity In operation, the processor executes the computer-executed instructions stored in the memory to cause the policy entity to perform the data processing method of any of the second aspects above.
第九方面,本申请实施例提供了一种计算机可读存储介质,用于储存为上述策略实体所用的计算机软件指令,当其在计算机上运行时,使得计算机可以执行上述第二方面中任意一项的数据处理方法。In a ninth aspect, the embodiment of the present application provides a computer readable storage medium, configured to store computer software instructions used by the policy entity, when executed on a computer, to enable the computer to perform any one of the foregoing second aspects. The data processing method of the item.
第十方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第二方面中任意一项的数据处理方法。In a tenth aspect, the embodiment of the present application provides a computer program product comprising instructions, which when executed on a computer, enable the computer to perform the data processing method of any of the above second aspects.
另外,第七方面至第十方面中任一种设计方式所带来的技术效果可参见第二方面中不同设计方式所带来的技术效果,此处不再赘述。In addition, the technical effects brought by the design mode of any one of the seventh aspect to the tenth aspect can be referred to the technical effects brought by different design modes in the second aspect, and details are not described herein again.
附图说明DRAWINGS
图1为本申请实施例中数据处理方法的一个系统示意图;1 is a schematic diagram of a system for processing data in an embodiment of the present application;
图2为本申请实施例中数据处理方法的一个实施例示意图;2 is a schematic diagram of an embodiment of a data processing method in an embodiment of the present application;
图3为本申请实施例中数据处理方法的另一个实施例示意图;3 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application;
图4为本申请实施例中数据处理方法的另一个实施例示意图;4 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application;
图5为本申请实施例中数据处理方法的另一个实施例示意图;FIG. 5 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application; FIG.
图6为本申请实施例中数据处理方法的另一个实施例示意图;FIG. 6 is a schematic diagram of another embodiment of a data processing method according to an embodiment of the present application; FIG.
图7为本申请实施例中主机DH的一个实施例示意图;FIG. 7 is a schematic diagram of an embodiment of a host DH according to an embodiment of the present application;
图8为本申请实施例中主机DH的另一个实施例示意图;FIG. 8 is a schematic diagram of another embodiment of a host DH according to an embodiment of the present application;
图9为本申请实施例中近场通信控制器NFCC的一个实施例示意图;FIG. 9 is a schematic diagram of an embodiment of a near field communication controller NFCC according to an embodiment of the present application; FIG.
图10为本申请实施例中近场通信控制器NFCC的另一个实施例示意图;FIG. 10 is a schematic diagram of another embodiment of a near field communication controller NFCC according to an embodiment of the present application; FIG.
图11为本申请实施例中主机DH的另一个实施例示意图。FIG. 11 is a schematic diagram of another embodiment of a host DH according to an embodiment of the present application.
具体实施方式 detailed description
本申请实施例提供了一种数据处理方法及相关装置,用于对安全性和便捷性要求不同的卡应用提供一种统一的解决方案。The embodiment of the present application provides a data processing method and related device, which are used to provide a unified solution for card applications with different security and convenience requirements.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if present) in the specification and claims of the present application and the above figures are used to distinguish similar objects without having to use To describe a specific order or order. It is to be understood that the data so used may be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than what is illustrated or described herein. In addition, the terms "comprises" and "comprises" and "the" and "the" are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to Those steps or units may include other steps or units not explicitly listed or inherent to such processes, methods, products or devices.
NFC技术是一种基于RFID的短距离无线连接技术,利用磁场感应实现NFC设备在近距离间的通信,用户只需要通过触碰或者设备靠近,就可以安全快速地交换信息、进行交易等。NFC工作在13.56MHz的频率上,有效通信范围为0-20cm,典型值为4cm。NFC technology is a short-range wireless connection technology based on RFID. It uses magnetic field induction to realize NFC equipment communication at close range. Users only need to touch or touch the equipment to exchange information and conduct transactions safely and quickly. The NFC operates at a frequency of 13.56 MHz with an effective communication range of 0-20 cm and a typical value of 4 cm.
具体来说,NFC设备的工作模式可分为三种:一、点对点模式(Peer-to-Peer,P2P),该模式具体应用于名片分享、网页分享、NFC配对蓝牙/WIFI等场景;二、卡模拟模式(Card Emulation,CE),该模式具体用于如银行卡、交通卡、会员卡、优惠券、身份证等移动支付或身份验证场景;三、读写器模式(Reader/Writer,R/W),该模式具体用于银行卡POS机、公交卡POS机等移动支付或身份验证场景,以及标签读/写场景。Specifically, the working mode of the NFC device can be divided into three types: one, peer-to-peer mode (P2P), which is specifically applied to business card sharing, web page sharing, NFC pairing Bluetooth/WIFI, and the like; Card Emulation (CE), which is specifically used for mobile payment or authentication scenarios such as bank cards, transportation cards, membership cards, coupons, ID cards, etc. 3. Reader/Writer, R /W), this mode is specifically used for mobile payment or authentication scenarios such as bank card POS machines, bus card POS machines, and tag read/write scenarios.
如图1所示,第一终端和第二终端均为NFC设备,其中第一终端和第二终端互为对端设备。NFC设备包括主机DH、近场通信控制器NFC和至少一个近场通信执行环境NFCEE,具体如下:As shown in FIG. 1 , the first terminal and the second terminal are both NFC devices, where the first terminal and the second terminal are mutually peer devices. The NFC device includes a host DH, a near field communication controller NFC, and at least one near field communication execution environment NFCEE, as follows:
DH用于负责第一终端的管理,其中包括NFCC的管理,具体可以是NFCC初始化,NFCC配置等。DH是NFC论坛(NFC Forum)制定的NFC控制器接口(NFC Controller Interface,NCI)规范中使用的术语,可以对应欧洲电信标准协会(European Telecommunication Standards Institute,ETSI)制定的主机控制器接口(Host Controller Interface,HCI)规范中的终端主机(Terminal Host);此外,全球平台国际标准组织(Global Platform,GP)制定的规范中的管理实体(Managing Entity,ME)若实现在Terminal Host上,则也可以将DH称为管理主机(Managing Host,MH)。NFC设备为具有NFC功能的设备,可以是智能手机、NFC蓝牙音响、支持NFC的笔记本、NFC数码相机和NFC电视等,若NFC设备是智能手机,则DH可以是智能手机中的CPU,可以理解下面所述的智能手机的操作系统(OS,Operating Stytem,如安卓OS、iOS等)。The DH is responsible for the management of the first terminal, including the management of the NFCC, and may specifically be NFCC initialization, NFCC configuration, and the like. DH is a term used in the NFC Forum Interface (NCI) specification developed by the NFC Forum to correspond to the Host Controller Interface (Host Controller) developed by the European Telecommunication Standards Institute (ETSI). The Terminal Host in the Interface (HCI) specification; in addition, the Management Entity (ME) in the specification developed by the Global Platform (GP) can also be implemented on the Terminal Host. DH is called Management Host (MH). The NFC device is an NFC-enabled device, which can be a smart phone, an NFC Bluetooth stereo, an NFC-enabled notebook, an NFC digital camera, and an NFC TV. If the NFC device is a smart phone, the DH can be a CPU in the smart phone, which can be understood. The operating system of the smartphone described below (OS, Operating Stytem, such as Android OS, iOS, etc.).
NFCC负责通过射频RF接口和天线进行数据的物理传输,以使得第一终端实现与第二终端的通信。NFCC是在NFC Forum制定的NCI规范中使用的术语,它可以对应ETSI制定的HCI规范中的非接触前端(Contactless Front-end,CLF),此时,HCI中主机控制器(Host Controller)要实现在NFCC上。The NFCC is responsible for physical transmission of data through the RF RF interface and the antenna to enable the first terminal to communicate with the second terminal. NFCC is a term used in the NCI specification developed by the NFC Forum. It can correspond to the Contactless Front-end (CLF) in the HCI specification developed by ETSI. At this time, the Host Controller of HCI should be implemented. On the NFCC.
NFCEE是为第一终端上的NFC应用(如银行卡、公交卡等各种卡模拟应用)提供安全的执行环境的实体。NFCEE是NFC Forum制定的NCI规范中使用的术语,它可以对应ETSI制定的HCI规范中的通用集成电路卡(Universal Integrated Circuit Card,UICC)、嵌 入式安全单元(Embedded Secure Element,eSE)、安全数码内存卡(Secure Digital Memory Card,SD卡)等;还可以对应GP制定的规范中的安全单元(Secure Element,SE),或者卡模拟环境(Card Emulation Environment,CEE)。其中一种特别的NFCEE为DH-NFCEE,是与DH直接相连或者在DH内的NFCEE。也就是说,NFCEE或SE的物理载体可以是eSE、UICC、SD卡等。此外,上述第一终端上的NFC应用还可以是如名片分享等点对点应用以及如银行POS、公交POS等读卡器应用,用户可通过某种方式(如手机应用市场等)在第一终端上下载与安装这些NFC应用,当然,这些应用也可以在手机出厂时预置到手机的eSE中或者在UICC卡出厂时预置到UICC中等等。NFCEE is an entity that provides a secure execution environment for NFC applications on the first terminal, such as bank card, bus card and other card emulation applications. NFCEE is a term used in the NCI specification developed by the NFC Forum. It can correspond to the Universal Integrated Circuit Card (UICC) embedded in the HCI specification developed by ETSI. Embedded Secure Element (eSE), Secure Digital Memory Card (SD card), etc.; can also correspond to the Secure Element (SE) in the specification of the GP, or the card simulation environment ( Card Emulation Environment, CEE). One of the special NFCEEs is DH-NFCEE, which is directly connected to DH or NFCEE in DH. That is, the physical carrier of the NFCEE or SE may be an eSE, a UICC, an SD card, or the like. In addition, the NFC application on the first terminal may also be a peer-to-peer application such as a business card sharing, and a card reader application such as a bank POS or a bus POS, and the user may be on the first terminal in some manner (such as a mobile application market). Download and install these NFC applications. Of course, these applications can also be preset to the eSE of the phone when the phone is shipped from the factory or preset to the UICC when the UICC card is shipped.
上述DH与NFCC之间可以通过NCI协议定义的接口进行通信;NFCC和NFCEE之间可以通过HCI协议定义的接口进行通信(上层是HCI协议,底层可以是单线协议SWP),当然也可以使用其他接口进行通信(如eSE与NFCC之间可通过NFC有线接口(NFC Wired Interface,NFC-WI)进行通信);DH与NFCEE之间也可以通过HCI协议定义的接口进行通信。The above DH and NFCC can communicate through the interface defined by the NCI protocol; the NFCC and the NFCEE can communicate through the interface defined by the HCI protocol (the upper layer is the HCI protocol, and the bottom layer can be the single-line protocol SWP), of course, other interfaces can also be used. Communication (such as eSE and NFCC can communicate through NFC Wired Interface (NFC-WI)); DH and NFCEE can also communicate through the interface defined by HCI protocol.
射频协议(RF Protocol)是一个NFC设备的NFCC与对端NFC设备之间进行通信时所用的协议。射频技术(RF Technology)是两个NFC设备之间通信时在底层传输数据所使用的传输参数的集合,如RF载波、通信模式、比特率、调制方式、比特编码、帧格式、协议、命令集等。目前NFC标准主要有NFC-A、NFC-B、NFC-F、NFC-V四种RF技术,每种技术对应一组标准定义的用于完成通信的传输参数。The Radio Protocol (RF Protocol) is a protocol used when an NFC device's NFCC communicates with a peer NFC device. RF Technology is a collection of transmission parameters used to transmit data between two NFC devices, such as RF carrier, communication mode, bit rate, modulation mode, bit coding, frame format, protocol, and command set. Wait. At present, the NFC standard mainly includes four RF technologies: NFC-A, NFC-B, NFC-F, and NFC-V, and each technology corresponds to a set of transmission parameters defined by a standard for completing communication.
NCI协议定义的射频发现过程(RF Discovery Porcess)允许NFCC检测对端是否存在NFC设备,以及在对端NFC设备执行的设备检测中进行应答;同时,定义的射频通信配置(RF Communication Configuration),允许DH向NFCC配置一些NFCC执行射频发现过程所需的相关参数,如每种RF技术、RF协议所对应的poll模式参数和listen模式参数,RF发现频率,RF技术与模式(RF Technology and Mode)、RF接口激活所需的映射表(如protocol-interface映射表)以及数据路由所需的路由表(如侦听模式路由表listen mode routing table)、强制NFCEE路由机制ForcedNFCEE routing等,详见NCI协议的相应内容。The RF Discovery Porcess defined by the NCI protocol allows the NFCC to detect whether the NFC device exists at the peer end and respond to the device detection performed by the peer NFC device. At the same time, the defined RF Communication Configuration allows The DH configures some parameters required by the NFCC to perform the radio frequency discovery process to the NFCC, such as each RF technology, the poll mode parameter and the listen mode parameter corresponding to the RF protocol, the RF discovery frequency, the RF technology and mode, The RF interface activates the required mapping table (such as the protocol-interface mapping table) and the routing table required for data routing (such as the listening mode routing table), and the forced NFCEE routing mechanism ForcedNFCEE routing. For details, see the NCI protocol. Corresponding content.
具体地,在RF发现过程中,NFC设备通过对对端NFC设备发送的技术检测或设备检测相关的命令进行应答,将本地已激活应用所支持的RF协议告知对端,从而使对端NFC设备后续根据业务需要选择RF协议进行协议激活;或者,NFC设备向对端NFC设备发送技术检测或设备检测相关的命令,并在收集对端NFC设备支持的RF协议之后根据业务需要选择RF协议进行协议激活。通常,在RF协议激活后双方NFC设备会基于一个支持该RF协议的应用(该应用可以是一方NFC设备通过选择应用的命令如SELECT AID或SELECT PPSE等选择的,或者,可以是在RF协议激活后通过直接基于RF协议发送的业务数据所确定的)交互业务数据,以完成本次通信。Specifically, in the RF discovery process, the NFC device responds to the technical test or the device detection related command sent by the peer NFC device, and notifies the peer end of the RF protocol supported by the locally activated application, thereby making the opposite NFC device The RF protocol is selected for the activation of the protocol according to the service requirements. Alternatively, the NFC device sends a technical detection or device detection-related command to the peer NFC device, and selects the RF protocol to perform the protocol according to the service requirements after collecting the RF protocol supported by the peer NFC device. activation. Generally, after the RF protocol is activated, the two NFC devices are based on an application supporting the RF protocol (the application may be selected by a NFC device by selecting an application command such as SELECT AID or SELECT PPSE, or may be activated in the RF protocol). The interactive service data is determined by the service data directly sent based on the RF protocol to complete the communication.
为了便于理解本申请实施例中的数据处理方法,将结合以下实施例进行详细说明。需要说明的是,第一终端以具有NFC通信功能的NFC手机为例,第二终端以POS机为例进行说明,其中,NFC手机包括DH、NFCC和至少一个NFCEE,以下实施例中均以一个NFCEE为例进行说明,,具体为: In order to facilitate the understanding of the data processing method in the embodiments of the present application, the following embodiments will be described in detail. It should be noted that the first terminal is an NFC mobile phone with an NFC communication function, and the second terminal is a POS device. The NFC mobile phone includes a DH, an NFCC, and at least one NFCEE. NFCEE is described as an example, specifically:
实施例一,DH根据每个应用对用户身份验证的要求情况,通过路由项(如NCI协议定义的基于应用标识AID的路由项AID-based routing entry)将每个应用对应的用户身份验证要求标识配置给NFCC,从而使NFCC接收到对端NFC设备(如POS机)发送的数据帧(如用于选择应用的命令SELECT AID或SELECT PPSE,或者,基于当前已激活的RF协议发送的业务数据)后,能根据要使用的应用(即对端NFC设备所选择的应用,或者也可以是根据两个NFC设备之间已激活的RF协议确定的应用)所对应的路由项中的用户身份验证要求标识判断是否需要进行用户身份验证,如果需要,则向DH发送消息,以请求DH验证用户身份,否则不发送。In the first embodiment, the DH determines the user identity verification requirement corresponding to each application by using a routing item (such as an AID-based routing entry defined by the NCI protocol) according to the requirement of the user authentication. Configured to the NFCC, so that the NFCC receives the data frame sent by the peer NFC device (such as a POS machine) (such as the command SELECT AID or SELECT PPSE for selecting the application, or the service data sent based on the currently activated RF protocol) User authentication requirements in the routing entries corresponding to the application to be used (ie, the application selected by the peer NFC device, or the application determined according to the activated RF protocol between the two NFC devices) The identifier determines whether user authentication is required, and if necessary, sends a message to DH to request DH to authenticate the user, otherwise it does not send.
其中,上述路由项还可以是NCI协议定义的通过路由表配置的其他类型的路由项,如基于应用协议数据单元模式APDU Pattern的路由项(APDU Pattern-based routing entry)、基于系统编码的路由项(System Code-based routing entry)、基于协议的路由项(Protocol-based routing entry)、基于技术的路由项(Technology-based routing entry),或者,也可以是NCI协议定义通过强制NFCEE路由机制配置的路由项。The routing entry may also be other types of routing entries defined by the routing table defined by the NCI protocol, such as an APDU Pattern-based routing entry based on the application protocol data unit pattern (APDU Pattern-based routing entry), and a system-based routing entry. (System Code-based routing entry), protocol-based routing entry, technology-based routing entry, or NCI protocol definition configured by mandatory NFCEE routing mechanism. Routing item.
请参阅图2,本申请实施例中数据处理方法的一个实施例,包括:Referring to FIG. 2, an embodiment of a data processing method in an embodiment of the present application includes:
201、DH记录每个应用的标识(如应用标识AID)及其对应的用户身份验证要求。201. The DH records an identifier of each application (such as an application identifier AID) and a corresponding user identity verification request.
本实施例中,每个应用可以理解为卡应用,如银行发行的银行卡、交通公司发行的公交卡、商户发行的预付卡、会员卡等等。这些卡应用可以是单独的应用,即理解为用户从应用市场单独下载的卡应用,如某银行推出的主机卡仿真(Host-based Card Emulation,HCE)云卡;也可以是存在于某钱包应用中,由该钱包应用管理的子应用,如华为钱包huawei pay、苹果钱包apple pay等手机厂商开发的手机钱包中的银行卡、公交卡等。还需要说明的是,这些卡应用可以下载到以eSE、UICC等物理载体的NFCEE中,当然也不排除DH-NFCEE中。NFC手机中可以包括至少一个NFCEE,每个NFCEE上可以安装至少一个卡应用,根据目前NCI标准,同一NFCEE上的多个卡应用,或者不同NFCEE上的多个卡应用可以同时激活。In this embodiment, each application can be understood as a card application, such as a bank card issued by a bank, a bus card issued by a transportation company, a prepaid card issued by a merchant, a membership card, and the like. These card applications can be separate applications, that is, they are understood as card applications that users download separately from the application market, such as a Host-based Card Emulation (HCE) cloud card introduced by a bank; or they can exist in a wallet application. Among the sub-applications managed by the wallet application, such as a bank card, a bus card, etc. in a mobile wallet developed by a mobile phone manufacturer such as Huawei wallet huawei pay, apple wallet apple pay, and the like. It should also be noted that these card applications can be downloaded to NFCEE with physical carriers such as eSE and UICC, and of course DH-NFCEE is not excluded. The NFC mobile phone may include at least one NFCEE, and at least one card application may be installed on each NFCEE. According to the current NCI standard, multiple card applications on the same NFCEE, or multiple card applications on different NFCEEs may be activated simultaneously.
本实施例中,某个应用的标识可以是应用开发者定义的应用标识(Application Identifier,AID,该AID可以是在每个卡应用下载到手机上时向系统OS注册的),或者其他能标识一个应用的信息(如一个卡应用下载到手机后,手机给该卡应用设置的与其AID相关联的一个标识信息),而某个应用的用户身份验证要求表示使用该应用时是否需要进行用户身份验证,即是否要求对用户身份的合法性进行验证。通常,在手机等智能电子设备上可通过输入密码或诸如指纹识别之类的生物特征识别方式来验证操作该手机的当前用户是否为该手机的合法用户。In this embodiment, the identifier of an application may be an application identifier defined by an application developer (AID, which may be registered with the system OS when each card application is downloaded to the mobile phone), or other identifiers. Information about an application (such as an identification message associated with its AID set by the mobile phone after the card application is downloaded to the mobile phone), and the user authentication requirement of an application indicates whether the user identity is required to use the application. Verification, that is, whether the legality of the user's identity is required to be verified. Generally, on a smart electronic device such as a mobile phone, it is possible to verify whether the current user operating the mobile phone is a legitimate user of the mobile phone by entering a password or a biometric identification method such as fingerprint recognition.
本实施例中,DH确定每个应用对应的用户身份验证要求的实现方式有多种,具体实现方式如下:In this embodiment, the DH determines that the implementation of the user identity verification requirement corresponding to each application is multiple, and the specific implementation manner is as follows:
可能的实现方式一,基于现有的HCE实现,每个卡应用下载时,可向OS注册自己的策略类型,如银行卡的category类型注册为支付payment类,公交卡的category类型注册为其他other类。因此,DH可根据每个卡应用注册的策略类型来确定每个卡应用对应的用户身份验证要求,如确定策略类型为payment类的卡应用对应的用户身份验证要求为需要 进行用户身份验证,确定策略类型为other类的卡应用对应的用户身份验证要求为无需进行用户身份验证。Possible implementation method 1 is based on the existing HCE implementation. When each card application is downloaded, the OS can register its own policy type. For example, the category type of the bank card is registered as the payment payment class, and the category type of the bus card is registered as the other other. class. Therefore, the DH can determine the user authentication requirement corresponding to each card application according to the type of the policy registered by each card application, such as determining the user identity verification requirement corresponding to the card application of the policy type as the payment type. User authentication is performed to determine that the user authentication requirement corresponding to the card application of the other type is that no user authentication is required.
可能的实现方式二,将现有HCE实现中的策略类型进行扩展,如将目前的payment和other两类细分为安全payment类(对应需要用户身份验证)、免密payment类、other类等;相应的,可将银行卡的策略类型注册为安全payment类,将公交卡的策略类型注册为免密payment类或other类,将优惠券的策略类型注册为other类,等等。因此,DH可根据每个卡应用注册的策略类型来确定每个卡应用对应的用户身份验证要求,如确定策略类型为安全payment类的卡应用对应的用户身份验证要求为需要进行用户身份验证,确定策略类型为免密payment或other类的卡应用对应的用户身份验证要求为无需进行用户身份验证,等等。Possible implementation method 2: Extend the policy type in the existing HCE implementation, such as subdividing the current payment and other types into a secure payment class (corresponding to user identity authentication), an exempt payment class, and other classes; Correspondingly, the policy type of the bank card can be registered as a secure payment class, the policy type of the bus card is registered as an exempt payment or other class, the policy type of the coupon is registered as the other class, and the like. Therefore, the DH can determine the user authentication requirement corresponding to each card application according to the type of the policy registered by each card application. For example, the user authentication request corresponding to the card application of the security type is determined to require user identity verification. It is determined that the user authentication requirement corresponding to the card application of the confidential payment or other class is that no user authentication is required, and the like.
可能的实现方式三,卡应用开发者为每个卡应用设置一个专用注册参数UserValidationPara,用于表示是否需要执行用户身份验证操作,另外,还可进一步限定用户身份验证方式类型,如指纹验证、密码验证、手表/手环等配件的验证。因此,在下载每个卡应用时,DH可直接根据每个卡应用注册的专用参数UserValidationPara确定每个卡应用对应的用户身份验证要求。Possible implementation method 3: The card application developer sets a dedicated registration parameter UserValidationPara for each card application, which is used to indicate whether the user authentication operation needs to be performed, and further defines the type of user authentication mode, such as fingerprint verification and password. Verification of accessories such as verification and watches/wrists. Therefore, when downloading each card application, the DH can directly determine the user identity verification request corresponding to each card application according to the dedicated parameter UserValidationPara registered for each card application.
以上可能的实现方式一至三,是每个卡应用下载到NFCEE中时,向手机系统注册自己的应用标识AID的同时也注册其他可用于确定其用户身份验证要求的信息,从而使DH能根据这些信息确定每个卡应用对应的用户身份验证要求。当然,还有其他实现方式,具体如下:The above possible implementations one to three, when each card application is downloaded into NFCEE, register its own application identification AID with the mobile phone system, and also register other information that can be used to determine its user authentication requirements, so that DH can The information determines the user authentication requirements corresponding to each card application. Of course, there are other implementations, as follows:
可能的实现方式四,也可以根据用户设置确定,例如,假设某钱包应用中有多个银行卡和多个公交卡,用户设置使用银行卡时需要进行用户身份验证,使用公交卡时不需要。因此,DH可根据用户对每个卡应用的设置确定每个卡应用对应的用户身份验证要求。The possible implementation method 4 can also be determined according to user settings. For example, if a wallet application has multiple bank cards and multiple bus cards, the user needs to perform user identity verification when using the bank card, and is not required when using the bus card. Therefore, DH can determine the user authentication requirements corresponding to each card application according to the settings of the user for each card application.
可能的实现方式五,卡应用下载到NFCEE时,将用于表示其用户身份验证要求的一个专用参数同时保存到NFCEE中,后续,当DH从每个NFCEE中获取其中所有卡应用相关的参数(主要用于进行RF参数的计算以及完成上述的射频通信配置)时,可将每个卡应用的用于表示其用户身份验证要求的专用参数一并获取出来,从而根据该专用参数确定每个应用对应的用户身份验证要求。Possible implementation method 5: When the card application is downloaded to the NFCEE, a dedicated parameter for indicating its user authentication requirement is simultaneously saved to the NFCEE, and subsequently, when the DH obtains all the card application related parameters from each NFCEE ( When it is mainly used for calculating RF parameters and completing the above-mentioned RF communication configuration, the dedicated parameters of each card application for indicating its user identity verification requirements may be acquired together, thereby determining each according to the dedicated parameters. Apply the corresponding user authentication requirements.
可选的,可将钱包应用安装在可信运行环境(Trusted Execution Environment,TEE)等安全环境下,应用的AID及其用户身份验证要求可存储在TEE等安全环境中保存下来。Optionally, the wallet application can be installed in a secure environment such as a Trusted Execution Environment (TEE), and the application AID and its user authentication requirements can be stored in a secure environment such as TEE.
需要说明的是,本发明所有实施例中所述的“用户身份”,可以理解为第一终端的当前用户的身份,或者,更进一步的,为第一终端上第一应用或第一应用所在的电子钱包(如手机厂商推出的如huawei pay、apple pay等钱包应用、各银行或第三方机构推出的如工行手机银行、google wallet等钱包应用)的控制者(即知道电子钱包的密码或预置了与电子钱包相关的指纹等生物特征的用户)的身份。只有当用户身份验证通过后,才允许用户使用该第一应用完成与对端NFC设备之间执行后续的业务(如银行卡的刷卡业务、公交卡的刷卡业务、充值业务等等)。本发明方案中所说的验证用户身份,并不等价于现在通常所说的验证如银行卡的卡密码,因为,本发明方案中的用户身份则是终端本地验证的,用来决定 是否允许当前用户使用卡应用与对端POS机进行后续交易的,这里的卡密码是由对端POS机通过后台连接的银行卡服务器验证的(即卡密码的验证是上述后续交易中的一个持卡人验证环节)。It should be noted that the “user identity” described in all embodiments of the present invention may be understood as the identity of the current user of the first terminal, or, further, the first application or the first application on the first terminal. The e-wallet (such as the wallet application launched by mobile phone manufacturers such as huawei pay, apple pay, wallet applications such as ICBC mobile banking, google wallet, etc.) (that is, knowing the password or pre-email of the e-wallet) The identity of the user who has set the biometrics such as fingerprints associated with the electronic wallet. Only after the user authentication is passed, the user is allowed to use the first application to perform subsequent services with the peer NFC device (such as the card card service of the bank card, the card card service of the bus card, the recharge service, etc.). The verification of the identity of the user in the solution of the present invention is not equivalent to the verification of a card password such as a bank card as it is now, because the user identity in the solution of the present invention is locally verified by the terminal and is used to determine Whether to allow the current user to use the card application for subsequent transactions with the peer POS machine, where the card password is verified by the peer POS machine through the bank card server connected in the background (ie, the verification of the card password is one of the above-mentioned subsequent transactions) Card person verification link).
202、DH向NFCC配置包含用户身份验证要求标识的路由项。202. The DH configures, to the NFCC, a routing item that includes a user identity verification request identifier.
本实施中,DH根据第一应用对应的用户身份验证要求向NFCC配置第一应用对应的路由项,该第一应用为上述每个应用中的任一个,或者,为上述每个应用中已激活的至少一个应用中的任一个,其中,这里“已激活”的意思适用于本发明方案的所有实施例,可以理解为,如果某个卡应用是已激活的,则DH在计算RF参数时都要考虑该卡应用相关的RF参数(如RF协议相关的参数等),也就是说NFCC可以通过RF发现过程让对端的NFC设备发送该已激活的卡应用,从而使该卡应用能够被选中,以用于后续的业务(如银行卡刷卡业务、公交卡刷卡业务或充值业务等等)。In this implementation, the DH configures a routing entry corresponding to the first application to the NFCC according to the user identity verification requirement corresponding to the first application, where the first application is any one of the foregoing applications, or is activated for each application. Any of at least one of the applications, wherein the meaning of "activated" applies to all embodiments of the inventive solution, and it can be understood that if a card application is activated, DH is in calculating the RF parameters. Consider the RF parameters related to the application of the card (such as RF protocol related parameters, etc.), that is, the NFCC can send the activated card application to the NFC device of the opposite end through the RF discovery process, so that the card application can be selected. For subsequent business (such as bank card credit card business, bus card card business or recharge business, etc.).
其中,DH配置路由项的方式可以是如下任一种:The manner in which the routing entry is configured by the DH may be any of the following:
1、不论第一应用对应的用户身份验证要求表示什么,都为第一应用配置一个包含用户身份验证要求标识的路由项,此时,用户身份验证要求标识的值由第一应用对应的用户身份验证要求决定,用于表示使用第一应用时需要或者不需要进行用户身份验证,例如,设置一个比特位来表示用户身份验证要求标识,当该比特位为1b时,表示需要进行用户身份验证,当该比特位为0b时,表示不需要进行用户身份验证。或者,1. Regardless of the user authentication request corresponding to the first application, a routing item including the user identity verification requirement identifier is configured for the first application. At this time, the value of the user identity verification request identifier is determined by the user identity corresponding to the first application. The verification request decision is used to indicate that user authentication is required or not required when using the first application, for example, setting a bit to indicate a user authentication request identifier, and when the bit is 1b, indicating that user authentication is required, When the bit is 0b, it means that user authentication is not required. or,
2、只有当第一应用对应的用户身份验证要求表示需要进行用户身份验证时,才为第一应用配置包含用户身份验证要求标识的路由项,此时,用户身份验证要求标识用于表示使用第一应用时需要进行用户身份验证,否则,配置的路由项中不包含该用户身份验证要求标识。本发明对该实现方式并不进行限定。2. The routing item including the user identity verification request identifier is configured for the first application only when the user authentication request corresponding to the first application indicates that the user identity authentication is required. At this time, the user identity verification request identifier is used to indicate the usage. User authentication is required for an application. Otherwise, the configured authentication item does not include the user authentication request identifier. The implementation of the present invention is not limited.
上述第一应用对应的用户身份验证要求标识是由第一应用对应的用户身份验证要求确定的,本质上是按照步骤201中描述的任一种可能的实现方式确定的,即可以根据第一应用的注册信息和/或用户指示(即上述用户设置)确定的,其中,第一应用的注册信息包括第一应用的应用类型和/或用于表示对身份验证的要求参数(如上述的专用参数)。The user identity verification request identifier corresponding to the first application is determined by the user identity verification request corresponding to the first application, and is determined according to any possible implementation manner described in step 201, that is, according to the first application. The registration information and/or the user indication (ie, the user settings described above) are determined, wherein the registration information of the first application includes an application type of the first application and/or a requirement parameter for indicating identity verification (such as the dedicated parameter described above) ).
上述路由项可以是通过NCI协议定义的侦听模式路由表配置的,或者是通过强制NFCEE路由机制配置的,具体配置方式请详见NCI协议的相应内容。The routing entry can be configured through the listening mode routing table defined by the NCI protocol, or configured by the mandatory NFCEE routing mechanism. For details, see the corresponding content of the NCI protocol.
可选的,通过路由项配置用户身份验证要求标识的方法中,一种可能的实现方法为:对NCI标准中定义的路由项中的类型与限定Qualifier-Type字段(如下表1所示)进行扩展,例如,对其中的b7比特位进行扩展,如果b7=1,则表示使用该路由项对应的应用时(即该应用被选择后)需要进行用户身份验证,否则,表示不需要进行用户身份验证。 Optionally, in the method for configuring the user authentication request identifier by using the routing item, a possible implementation method is: performing the type and the qualified Qualifier-Type field in the routing item defined in the NCI standard (as shown in Table 1 below). Extending, for example, the b7 bit in the extension, if b7=1, it means that when the application corresponding to the routing item is used (that is, the application is selected), user authentication is required, otherwise, the user identity is not required. verification.
表1Table 1
Figure PCTCN2017075786-appb-000001
Figure PCTCN2017075786-appb-000001
表2Table 2
Figure PCTCN2017075786-appb-000002
Figure PCTCN2017075786-appb-000002
表3table 3
可选的,通过路由项配置用户身份验证要求标识的方法中,另一种可能的实现方法为:以NCI标准定义的基于AID的路由项为例,对上述表格1中基于AID的路由项对应的值Value字段(其承载的信息详见如下表4)进行扩展,例如,新增一个参数Identity Validation Flag,用于表示用户身份验证要求标识:如果该参数的值为1,则表示该路由项中的AID对应的应用被选择后需要进行用户身份验证,否则,表示不需要进行用户身份验证。当然,也可以在该路由项中的AID对应的应用所对应的用户身份验证要求为需要进行用户身份验证时,DH才在该值字段中配置该参数,否则,无该参数。Optionally, in the method for configuring the user authentication request identifier by using the routing item, another possible implementation method is: using an AID-based routing item defined by the NCI standard as an example, corresponding to the AID-based routing item in the foregoing Table 1. The Value field (which is described in detail in Table 4 below) is extended. For example, a parameter Identity Validation Flag is added to indicate the user authentication request identifier: if the value of the parameter is 1, it indicates the routing entry. After the application corresponding to the AID is selected, user authentication is required. Otherwise, it indicates that user authentication is not required. Of course, the DH can also configure the parameter in the value field when the user identity verification requirement corresponding to the application corresponding to the AID in the routing item is that the user identity authentication is required. Otherwise, there is no such parameter.
表4Table 4
Figure PCTCN2017075786-appb-000004
Figure PCTCN2017075786-appb-000004
本实施例中,需要说明的是,本步骤是以NCI标准定义的基于AID的路由项(其中包括第一应用的AID)为例说明的,当然不排除其他类型的路由项,如基于APDU pattern的路由项(其中包括第一应用相关的reference data与mask)、基于SC的路由项(其中包括第一应用相关的系统编码列表SC list)、基于协议的路由项(其中包括第一应用相关的RF协议的标识)、基于技术的路由项(其中包括第一应用相关的RF技术的标识)等,上述每种路由项中包括的这些信息都可以认为是第一应用的标识。In this embodiment, it should be noted that the AID-based routing item (including the AID of the first application) defined by the NCI standard is taken as an example, and other types of routing items, such as an APDU pattern, are not excluded. Routing items (including first application related reference data and mask), SC based routing items (including the first application related system coding list SC list), protocol based routing items (including the first application related) The identifier of the RF protocol, the technology-based routing item (including the identifier of the RF technology related to the first application), and the like, and the information included in each routing item may be considered as the identifier of the first application.
203、NFC手机与对端的POS机执行RF发现过程,以激活POS机执行业务所需的RF协议。203. The NFC mobile phone performs an RF discovery process with the peer POS machine to activate the RF protocol required for the POS machine to perform the service.
本实施例中,在RF发现过程中,可以是NFC手机向外发送检测命令,或者,对端POS机发送检测命令,以检测对端是否存在NFC设备,以及当对端存在NFC设备时该对端的NFC设备都支持哪些RF协议。In this embodiment, in the RF discovery process, the NFC mobile phone may send a detection command to the outside, or the peer POS machine may send a detection command to detect whether the NFC device exists at the opposite end, and when the opposite end has an NFC device, the pair Which RF protocols are supported by the NFC devices on the side.
应理解,上述检测命令可以是与技术检测或设备检测相关的命令,其中需要说明的是,在NFC标准中,目前主要有NFC-A、NFC-B、NFC-F、NFC-V四种RF技术,每种技术对应一组标准定义的用于完成通信的传输参数,例如,RF载波、通信模式、比特率、调制方式、比特编码、帧格式、协议、命令集等。上述技术检测命令可以是上述四种RF技术中任一种技术的检测命令。It should be understood that the foregoing detection command may be a command related to technical detection or device detection. It should be noted that, in the NFC standard, there are mainly four kinds of RFs: NFC-A, NFC-B, NFC-F, and NFC-V. Techniques, each of which corresponds to a set of standard defined transmission parameters for completing communications, such as RF carrier, communication mode, bit rate, modulation scheme, bit coding, frame format, protocol, command set, and the like. The above-mentioned technical detection command may be a detection command of any one of the above four RF technologies.
本实施例中,以NFC手机模拟至少一个卡应用为例,那么,对端的POS机应该发送检测命令来检测NFC手机侧都支持哪些RF协议,在NFC手机针对检测命令发送检测应答后,POS机可推断NFC手机上有哪些已激活的卡应用,从而根据POS机的业务需要(如银行业务、公交业务等)确定发送什么数据帧(如,是选择卡应用的命令SELECT AID或SELECT PPSE,或者,是与业务相关的数据)。In this embodiment, the NFC mobile phone simulates at least one card application as an example. Then, the peer POS machine should send a detection command to detect which RF protocols are supported by the NFC mobile phone side, and after the NFC mobile phone sends a detection response for the detection command, the POS machine It can be inferred which activated card applications are on the NFC mobile phone, so as to determine what data frame to send according to the business needs of the POS machine (such as banking, bus service, etc.) (for example, the command SELECT AID or SELECT PPSE for selecting the card application, or , is the business-related data).
204、POS机向NFCC发送数据帧,该数据帧为用于选择第一应用的应用选择命令。204. The POS machine sends a data frame to the NFCC, where the data frame is an application selection command for selecting the first application.
本实施例中,POS机根据业务需要向NFCC发送应用选择命令,如ISO/IEC 7816-协议定义的Select命令(即SELECT Command,若其中包括一个卡应用的AID,则可认为是Select AID命令,或,若其中包括近距离支付系统环境(Proximity Payment Systems Environment,PPSE)应用的AID(如”2PAY.SYS.DDF01”),则可认为是SELECT PPSE命令),以告知NFCC对端POS机将要选择NFC手机中的第一应用(如AID所标识的应用),该第一应用可以包括需要用户身份验证的应用(如银行卡应用),还可以包括不需要用户身份验证的应用(如公交卡应用)。In this embodiment, the POS device sends an application selection command to the NFCC according to the service requirement, such as the Select command defined by the ISO/IEC 7816- protocol (ie, the SELECT Command, if it includes the AID of a card application, it can be regarded as a Select AID command, Or, if it includes the AID of the Proximity Payment Systems Environment (PPSE) application (such as "2PAY.SYS.DDF01"), it can be considered as a SELECT PPSE command) to inform the NFCC peer POS machine that it will choose The first application in the NFC mobile phone (such as the application identified by the AID), the first application may include an application requiring user authentication (such as a bank card application), and may also include an application that does not require user authentication (such as a bus card application) ).
本实施例中,需要说明的是,该应用选择命令是POS机发送给NFCC的一种数据帧,在后续数据交互阶段,POS机发送给NFCC的业务数据(即跟执行的业务相关的数据,如刷卡交易中的加密数据等)或NFCC发送给POS机的业务数据也是一种数据帧。另外,该应用选择命令还可以是其他协议定义的用于选择NFC手机上的某个应用的命令对此此处不作任何限制。In this embodiment, it is to be noted that the application selection command is a data frame sent by the POS machine to the NFCC, and the service data sent by the POS machine to the NFCC in the subsequent data interaction phase (ie, the data related to the executed service, Such as encrypted data in a card transaction, etc.) or service data sent by the NFCC to the POS machine is also a type of data frame. In addition, the application selection command may also be a command defined by another protocol for selecting an application on the NFC mobile phone, and there is no limitation here.
205、NFCC为上述所接收的数据帧查找到匹配的路由项。205. The NFCC finds a matching routing item for the received data frame.
本实施例中,以NFCC接收到selectAID命令为例,则NFCC按照路由表进行查找,并找到与该命令中包含的AID相匹配的基于AID的路由项。具体地,NFCC将该selectAID 命令中的AID与该路由表中每个基于AID的路由项包含的AID进行匹配,直到找到一个AID相匹配(如这两个AID完全相同,或者,这两个AID的前X位完全相同,X为指定的整数)的基于AID的路由项为止。In this embodiment, the NFCC receives the selectAID command as an example, and the NFCC searches according to the routing table, and finds an AID-based routing item that matches the AID included in the command. Specifically, the NFCC will select the selectAID The AID in the command matches the AID contained in each AID-based routing entry in the routing table until an AID is found to match (if the two AIDs are identical, or the first X bits of the two AIDs are identical, X is the specified integer) based on the AID-based routing entry.
需要说明的是,NFCC查找匹配的路由项的方式,可以是根据侦听模式路由表进行查找,即按照基于AID的路由项、基于APDU Pattern的路由项、基于SC的路由项、基于协议的路由项和基于技术的路由项中的一种或多种路由项,并以一定的顺序进行匹配,直到找到相匹配的路由项为止;当然也可以是根据强制NFCEE路由机制进行查找,详见NCI协议的相应内容。It should be noted that the manner in which the NFCC searches for a matching routing entry may be performed according to the listening mode routing table, that is, according to the AID-based routing item, the APDU Pattern-based routing item, the SC-based routing item, and the protocol-based routing. One or more routing entries in the item and the technology-based routing entry, and match in a certain order until a matching routing entry is found; of course, it can also be searched according to the mandatory NFCEE routing mechanism, as described in the NCI protocol. The corresponding content.
206、若NFCC确定上述匹配的路由项中的用户身份验证要求标识表示不需要进行用户身份验证,则NFCC将数据帧路由至第一应用所在的NFCEE。206. If the NFCC determines that the user identity verification requirement identifier in the matched routing item indicates that user identity verification is not required, the NFCC routes the data frame to the NFCEE where the first application is located.
本实施例中,NFCC判断上述步骤205中找到的匹配的路由项中的用户身份验证要求标识是否表示需要进行用户身份验证,如果否,则认为使用该路由项中的AID对应的第一应用时不需要进行用户身份验证,如该路由项中的用户身份验证要求标识对应的比特位为0b,则认为指示使用该AID对应的第一应用时不需要用户身份验证。此时,NFCC不需要向DH发送任何消息,而是直接对上述数据帧(即应用选择命令)进行路由处理,即将应用选择命令转发至第一应用所在的NFCEE,以等待该NFCEE针对该应用选择命令返回响应。In this embodiment, the NFCC determines whether the user identity verification request identifier in the matched routing entry found in the foregoing step 205 indicates that the user identity verification is required, and if not, the first application corresponding to the AID in the routing entry is considered to be used. User authentication is not required. If the bit corresponding to the user authentication request identifier in the routing entry is 0b, it is considered that user identity verification is not required when the first application corresponding to the AID is used. At this time, the NFCC does not need to send any message to the DH, but directly routes the data frame (ie, the application selection command), that is, forwards the application selection command to the NFCEE where the first application is located, waiting for the NFCEE to select for the application. The command returns a response.
本实施例中,所有“路由”是转发或发送的意思,如NFCC将数据帧路由至第一应用所在的NFCEE,实现中即为,NFCC将数据帧转发给第一应用所在的NFCEE,然后由该NFCEE转给第一应用进行处理,这样的话,第一应用可以将用于应答该数据帧的消息(如Select响应)原路返回给NFCC,以使NFCC发送给对端POS机。In this embodiment, all "routing" means forwarding or sending. For example, the NFCC routes the data frame to the NFCEE where the first application is located. In the implementation, the NFCC forwards the data frame to the NFCEE where the first application is located, and then The NFCEE is forwarded to the first application for processing, so that the first application can return the message (such as the Select response) for answering the data frame to the NFCC, so that the NFCC is sent to the peer POS.
207、若NFCC确定上述匹配的路由项中的用户身份验证要求标识表示需要进行用户身份验证,则NFCC向DH上报第一消息。207. If the NFCC determines that the user identity verification request identifier in the matched routing item indicates that user identity verification is required, the NFCC reports the first message to the DH.
本实施例中,NFCC判断上述步骤205中找到的匹配的路由项中的用户身份验证要求标识是否表示需要进行用户身份验证,如果是,则认为使用该路由项中的AID对应的第一应用时需要进行用户身份验证,如该路由项中的用户身份验证要求标识对应的比特位为1b,则认为指示使用该AID对应的第一应用时需要进行用户身份验证。此时,NFCC向DH上报第一消息,其中,第一消息用于请求DH执行用户身份验证操作。In this embodiment, the NFCC determines whether the user identity verification request identifier in the matched routing entry found in the foregoing step 205 indicates that the user identity verification is required, and if yes, the first application corresponding to the AID in the routing entry is considered to be used. User authentication is required. If the bit corresponding to the user authentication request identifier in the routing entry is 1b, it is considered that the user identity authentication is required when the first application corresponding to the AID is used. At this time, the NFCC reports the first message to the DH, where the first message is used to request the DH to perform a user identity verification operation.
可选的,第一消息中包括上述数据帧,或者步骤205中的路由匹配结果,用于通知DH对端POS机要选择NFC手机中的第一应用,上述数据帧中包括第一应用的应用标识,如AID,需要说明的是,第一应用的应用标识还可以是除AID之外的其他唯一识别第一应用的标识信息。Optionally, the first message includes the foregoing data frame, or the route matching result in step 205 is used to notify the DH peer POS machine to select the first application in the NFC mobile phone, where the data frame includes the application of the first application. The identifier, such as the AID, needs to be described, the application identifier of the first application may also be other identification information other than the AID that uniquely identifies the first application.
可选的,NFCC向DH上报第一消息时,可以通过NCI协议定义的RF NFCEE Action机制上报(即通过RF_NFCEE_ACTION_NTF通知上报)。其中,需要说明的是,除通过RF NFCEE Action机制上报之外,还可以新增一个上报DH的通知,如用户身份验证请求通知USER_VALIDATION_REQUEST_NTF通知,用于请求DH执行用户身份验证操作,或者,用户身份验证判断通知USER_VALIDATION_JUDGEMENT_NTF通知,用于请求 DH自行判断是否需要进行用户身份验证,对此此处也不作任何限定。Optionally, when the NFCC reports the first message to the DH, the NFCC can report the information through the RF NFCEE Action mechanism defined by the NCI protocol (that is, the notification is reported by the RF_NFCEE_ACTION_NTF). It should be noted that, in addition to reporting through the RF NFCEE Action mechanism, a new notification of the DH may be added, such as a user authentication request notification USER_VALIDATION_REQUEST_NTF notification, for requesting DH to perform a user authentication operation, or a user identity. Verification decision notifies USER_VALIDATION_JUDGEMENT_NTF notification for request DH determines for itself whether user authentication is required, and there is no limit here.
可选的,可对RF NFCEE Action通知进行扩展,即,(a)如果需要验证用户身份,则NFCC向DH发送RF NFCEE Action通知,其中包括第一指示信息,用于表示需要进行用户身份验证;或者,(b)如果不需要验证用户身份,则NFCC向DH发送NFCEE Action通知,其中包括第二指示信息,用于表示不需要进行用户身份验证。其中,第一指示信息、第二指示信息可以在该通知中分别由两个参数表示,例如,第一参数表示需要进行用户身份验证,第二参数表示不需要进行用户身份验证;或者,第一、二指示信息也可以由同一参数在分别取两个值时表示,例如,第三参数的值为1时表示需要进行用户身份验证,为0时表示不需要。当然,除了第一参数和第二参数、或者第三参数,该RF NFCEE Action通知也可以包括该匹配路由项相关的信息,如AID、NFCEE标识等,具体请参考NCI协议的相应内容。Optionally, the RF NFCEE Action notification may be extended, that is, (a) if the user identity needs to be verified, the NFCC sends an RF NFCEE Action notification to the DH, where the first indication information is included to indicate that the user identity verification is required; Alternatively, (b) if it is not necessary to verify the identity of the user, the NFCC sends an NFCEE Action notification to the DH, including second indication information indicating that no user authentication is required. The first indication information and the second indication information may be respectively represented by two parameters in the notification, for example, the first parameter indicates that user identity verification is required, and the second parameter indicates that user identity verification is not required; or, the first The two indication information may also be represented by the same parameter when two values are respectively taken. For example, the value of the third parameter indicates that user identity authentication is required, and when it is 0, it indicates that it is not required. Of course, in addition to the first parameter and the second parameter, or the third parameter, the RF NFCEE Action notification may also include information related to the matching routing item, such as an AID, an NFCEE identifier, etc., for details, refer to the corresponding content of the NCI protocol.
可选的,NFCC根据NFC手机的当前能量状态判断是否需要向DH发送第一消息,具体可以为:当NFC手机的当前能量状态时为无电或关机状态时,NFCC确定不需要向DH发送第一消息;当NFC手机的当前能量状态时既不是无电,又不是关机时,NFCC确定需要向DH发送第一消息。其中,当前能量状态可以包括无电状态、关机状态、亮屏且上锁状态、亮屏且解锁状态、灭屏且上锁状态、灭屏且解锁状态等,详见NCI协议的相应内容。这样设计是考虑到,实现中可以将那些对安全性要求较高的应用(如银行卡)对应的路由项设置为在无电和/或关机状态下不可用(如将其中能量状态字段中对应无电和/或关机状态的比特位设为0b),从而保证无电和/或关机状态下,NFCC即使为接收到的数据帧找到匹配的路由项,也不能将该数据帧路由到这些卡应用所在的NFCEE,再转发给这些卡应用进行处理,这样既可避免发生无电和/或关机状态下刷这些卡进行消费的情况。因此,在无电和/或关机状态下,NFCC不再需要向DH发送第一消息,以避免资源浪费(因为即使发送,也得不到DH的处理与应答)。Optionally, the NFCC determines whether the first message needs to be sent to the DH according to the current energy state of the NFC mobile phone, where the NFCC determines that the NFC mobile phone does not need to send the first message to the DH when the current energy state of the NFC mobile phone is no power or shutdown state. A message; when the current energy state of the NFC handset is neither power nor shutdown, the NFCC determines that the first message needs to be sent to the DH. The current energy state may include an unpowered state, a power-off state, a bright screen and a locked state, a bright screen and an unlocked state, a screen-off state, a locked state, a screen-off state, and an unlocked state. For details, refer to the corresponding content of the NCI protocol. This design is considered, in the implementation, the routing items corresponding to the security-critical applications (such as bank cards) can be set to be unavailable in the no-power and/or shutdown state (for example, the corresponding energy state field) The bit of no power and/or power-off state is set to 0b), so that if there is no power and/or power-off state, the NFCC cannot route the data frame to these cards even if it finds a matching routing item for the received data frame. The NFCEE where the application is located is then forwarded to these card applications for processing, so as to avoid the consumption of these cards for consumption in the absence of power and/or shutdown. Therefore, in the no-power and/or power-off state, the NFCC no longer needs to send the first message to the DH to avoid waste of resources (because even if it is sent, the processing and response of the DH are not obtained).
208、DH执行用户身份验证操作。208. The DH performs a user identity verification operation.
本实施例中,DH在收到第一消息后可直接执行用户身份验证操作。In this embodiment, the DH can directly perform the user identity verification operation after receiving the first message.
可选的,DH还可以在根据第一应用对应的用户身份验证要求确定使用第一应用时需要进行用户身份验证后,执行用户身份验证操作。Optionally, the DH may further perform a user identity verification operation after determining that the user identity is required to use the first application according to the user identity verification requirement corresponding to the first application.
可选的,DH执行用户身份验证操作可具体为,DH调用用户身份验证模块进行用户身份验证,其中,用户身份验证模块可以是指纹模块,即通过验证用户指纹来验证用户身份,当然,还可以是其他验证方式,例如,P1N验证、虹膜等其他生物特征验证、可穿戴设备验证(即验证是否存在与该终端通过某无线技术(如蓝牙)连接着的某特定可穿戴设备)等,对此此处不作任何限定。Optionally, the DH performs the user identity verification operation, specifically, the DH invokes the user identity verification module to perform user identity verification, where the user identity verification module may be a fingerprint module, that is, the user identity is verified by verifying the user fingerprint, and of course, Other authentication methods, such as P1N authentication, iris, and other biometric verification, wearable device verification (ie, verifying the presence or absence of a particular wearable device connected to the terminal via a wireless technology (such as Bluetooth)) There are no restrictions here.
209、若用户身份验证操作未通过,则DH指示NFCC不路由数据帧至第一应用所在的NFCEE。209. If the user identity verification operation fails, the DH indicates that the NFCC does not route the data frame to the NFCEE where the first application is located.
本实施例中,当DH执行用户身份验证并未通过验证时,DH指示NFCC不路由数据帧至第一应用所在的NFCEE。其中,具体的指示方式如下:In this embodiment, when DH performs user identity verification and fails verification, DH indicates that the NFCC does not route the data frame to the NFCEE where the first application is located. Among them, the specific instructions are as follows:
在一种可能的指示方式中,DH向NFCEE发送第二消息,该第二消息为不允许NFCC 将数据帧路由至第一应用所在的NFCEE的第二命令。In one possible indication, the DH sends a second message to the NFCEE, the second message being NFCC not allowed. Routing the data frame to the second command of the NFCEE where the first application is located.
在另一种可能的指示方式中,当DH执行用户身份验证并未通过验证时,DH不向NFCC发送任何消息,应理解,当NFCC在上报第一消息之后的预设时间段内没有收到任何指示消息时,那么,NFCC便可获知DH指示其不路由数据帧至第一应用所在的NFCEE。In another possible indication manner, when the DH performs user authentication and does not pass the verification, the DH does not send any message to the NFCC. It should be understood that the NFCC does not receive the preset time period after reporting the first message. When any indication message is received, then the NFCC can know that the DH indicates that it does not route the data frame to the NFCEE where the first application is located.
NFCC不路由该数据帧到第一应用所在的NFCEE,则NFCC无法向对端的POS机发送应答消息,因此,POS机在预设时间内未收到任何应答消息(即应答超时情况)时会终止本次通信。If the NFCC does not route the data frame to the NFCEE where the first application is located, the NFCC cannot send a response message to the POS machine at the opposite end. Therefore, the POS machine terminates when it does not receive any response message within the preset time (that is, the response timeout condition). This communication.
可选的,当DH执行用户身份验证并未通过验证时,DH还可以终止本次通信,如向NFCC发送NCI协议定义的RF协议去激活命令或其他可终止本次通信的命令等。Optionally, when the DH performs user identity verification and fails to pass the verification, the DH may also terminate the communication, such as sending an RF protocol deactivation command defined by the NCI protocol or other commands that may terminate the communication to the NFCC.
本实施例中,需要说明的是,用户身份验证未通过,可具体为:在预设的身份验证时间段内或在预设的身份验证次数内用户身份验证未通过,则DH确定用户身份验证未通过(即允许用户在预设时间内进行多次验证)。In this embodiment, it is required that the user identity verification fails, which may be specifically: if the user identity verification fails within the preset identity verification time period or within the preset identity verification times, the DH determines the user identity verification. Failed (ie allows the user to perform multiple verifications within a preset time).
210、若用户身份验证操作通过,则DH向NFCC发送第二消息。210. If the user authentication operation passes, the DH sends a second message to the NFCC.
本实施例中,当用户身份验证操作的结果为通过时,则DH向NFCC发送第二消息,该第二消息为允许NFCC将数据帧路由至第一应用所在的NFCEE的第一命令,该数据帧为由POS机发送至NFCC的,用于表示要选择第一应用的消息(即上述的应用选择命令)。In this embodiment, when the result of the user identity verification operation is passed, the DH sends a second message to the NFCC, where the second message is a first command for allowing the NFCC to route the data frame to the NFCEE where the first application is located, the data. The frame is sent by the POS to the NFCC to indicate that the message of the first application is to be selected (ie, the application selection command described above).
需要说明的是,上述第一命令中包含的内容,可以是用户身份验证相关的信息(即执行用户身份验证操作的结果为通过),和/或,表示允许NFCC进行数据路由的信息。总之,NFCC在收到该第一命令后,只有能根据其中的内容确定DH允许NFCC将数据帧路由到第一应用所在的NFCEE即可。It should be noted that the content included in the first command may be information related to user identity verification (ie, the result of performing a user identity verification operation is passed), and/or information indicating that the NFCC is allowed to perform data routing. In summary, after receiving the first command, the NFCC can only determine according to the content that the DH allows the NFCC to route the data frame to the NFCEE where the first application is located.
211、NFCC将数据帧路由至第一应用所在的NFCEE。211. The NFCC routes the data frame to the NFCEE where the first application is located.
本实施例中,当NFCC接收到DH发送的第二消息时,NFCC将数据帧路由至第一应用所在的NFCEE。In this embodiment, when the NFCC receives the second message sent by the DH, the NFCC routes the data frame to the NFCEE where the first application is located.
可选的,可在NCI标准中新增一对命令响应作为第二消息,用于指示NFCC将数据帧路由至第一应用所在的NFCEE。如,DH向NFCC发送命令RF_ROUTE_PERMISSION_CMD,其中包括路由允许标识RoutingFlag参数,该参数值为1时表示允许NFCC进行数据路由,为其他值时可表示不允许。NFCC收到该CMD后,可以向DH应答响应RF_ROUTE_PERMISSION_RSP,并开始把之前接收到的数据帧(如上述应用选择命令)转发到第一应用所在的NFCEE(当然,后续接收到的业务数据也直接转发到该第一应用所在的NFCEE)。Optionally, a pair of command responses may be added in the NCI standard as the second message, which is used to instruct the NFCC to route the data frame to the NFCEE where the first application is located. For example, DH sends a command RF_ROUTE_PERMISSION_CMD to the NFCC, including the route permission identifier RoutingFlag parameter. When the parameter value is 1, it indicates that the NFCC is allowed to perform data routing, and when it is other values, it may indicate that it is not allowed. After receiving the CMD, the NFCC may respond to the DH response RF_ROUTE_PERMISSION_RSP and start forwarding the previously received data frame (such as the above application selection command) to the NFCEE where the first application is located (of course, the subsequently received service data is also directly forwarded. To the NFCEE where the first application is located).
本实施例中,通过DH为第一应用向NFCC配置包括用户身份验证要求标识的路由项,使得NFCC在收到对端NFC设备发送的用于选择第一应用的数据帧后可以直接根据路路由项中的用户身份验证要求标识判断使用第一应用时是否需要进行用户身份验证,只有在需要进行用户身份验证时才请求DH执行用户身份验证,然后在确定验证已通过后再将该数据帧路由至第一应用所在的NFCEE,而在不需要进行用户身份验证时直接将该数据帧路由至第一应用所在的NFCEE。如此,实现了根据不同卡应用对安全性和便捷性要求的不同采用最合适第一应用的处理方式,制定了统一的解决方案,可使实现更简单,开发成本更低、 周期更短等,其中,对于需要进行用户身份验证的卡应用,说明对安全性要求高于便捷性要求,对于不需要进行用户身份验证的卡应用,说明便捷性要求高于安全性要求;因此,本申请实施例既可以对安全性要求高于便捷性要求的卡应用进行用户身份验证,又可以使得便捷性要求高于安全性要求的卡应用实现快捷支付的功能,同时还可以避免前面所述的影响用户体验或使用户操作复杂的问题。In this embodiment, the routing entry including the user identity verification request identifier is configured to the NFCC by using the DH for the first application, so that the NFCC can directly according to the route after receiving the data frame sent by the peer NFC device for selecting the first application. The user authentication requirement in the item determines whether the user authentication is required when using the first application, and only requests the DH to perform user authentication when the user authentication is required, and then routes the data frame after determining that the verification has passed. To the NFCEE where the first application is located, and directly route the data frame to the NFCEE where the first application is located when user authentication is not required. In this way, according to the different security and convenience requirements of different card applications, the most suitable first application processing method is adopted, and a unified solution is developed, which can realize simpler implementation and lower development cost. The cycle is shorter, etc., wherein for the card application that needs to perform user identity verification, the security requirement is higher than the convenience requirement, and for the card application that does not need the user identity verification, the convenience requirement is higher than the security requirement; In the embodiment of the present application, the user identity verification can be performed on the card application with the security requirement higher than the convenience requirement, and the card application with the convenience requirement higher than the security requirement can realize the function of fast payment, and the frontage can be avoided. The problem that affects the user experience or complicates user operations.
上述实施例一对一次刷卡的场景下(即NFC手机贴近POS机一次,若需要验证用户身份,则在本次贴近中完成如指纹识别等用户身份验证操作)使用第一应用完成支付的实施方式进行了详细说明,应理解,考虑到一次刷卡之后可能存在不能刷卡成功的情况,或者,实现中用户进行身份验证时的使用习惯(如贴近POS机过程中直接验指纹,或,需要暂时离开POS机后拿起手机再验指纹,等等),或者,一次刷卡中进行用户身份验证可能产生的时延,可能还需要再次靠近POS机进行刷卡,因此,下面将从两次刷卡的场景对本申请实施例进行详细说明。In the above embodiment, in the scenario of one-time card swiping (that is, the NFC mobile phone is close to the POS machine once, if the user identity needs to be verified, the user identity verification operation such as fingerprint identification is completed in the closeness), the implementation method of using the first application to complete the payment is implemented. After detailed description, it should be understood that it may be considered that after a card is swiped, there may be a situation in which the card cannot be successfully swiped, or the usage habit of the user in the implementation of the authentication (such as direct fingerprinting in the process of being close to the POS machine, or temporarily leaving the POS) After the machine picks up the phone and then checks the fingerprint, etc.), or the delay that may occur in the user authentication in one swipe, it may need to be swiped again near the POS machine. Therefore, the following will be applied from the scene of the two swipes. The embodiment is described in detail.
实施例二,请参阅图3对本申请实施例中数据处理方法的另一个实施例,包括:Embodiment 2, referring to FIG. 3, another embodiment of the data processing method in the embodiment of the present application includes:
301、DH记录每个应用的AID及其对应的用户身份验证要求。301, DH records the AID of each application and its corresponding user authentication requirements.
302、DH向NFCC配置包含用户身份验证要求标识的路由项。302. The DH configures, to the NFCC, a routing item that includes a user identity verification request identifier.
303、NFC手机与对端的POS机执行RF发现过程,以激活POS机执行业务所需的RF协议。303. The NFC mobile phone and the peer POS perform an RF discovery process to activate the RF protocol required by the POS to perform the service.
304、POS机向NFCC发送数据帧,该数据帧为用于选择第一应用的应用选择命令。304. The POS machine sends a data frame to the NFCC, where the data frame is an application selection command for selecting the first application.
305、NFCC为上述所接收的数据帧查找到匹配的路由项。305. The NFCC finds a matching routing item for the received data frame.
306、若NFCC确定上述匹配的路由项中的用户身份验证要求标识表示不需要用户身份验证,则NFCC将数据帧路由至第一应用所在的NFCEE。306. If the NFCC determines that the user authentication request identifier in the matched routing item indicates that user authentication is not required, the NFCC routes the data frame to the NFCEE where the first application is located.
307、若NFCC确定上述匹配的路由项中的用户身份验证要求标识表示需要用户身份验证,则NFCC向DH上报第一消息。307. If the NFCC determines that the user identity verification request identifier in the matched routing entry indicates that user identity authentication is required, the NFCC reports the first message to the DH.
本实施例中,步骤301至步骤307与实施例一中的步骤201至步骤207类似,对此此处不再赘述。In this embodiment, the steps 301 to 307 are similar to the steps 201 to 207 in the first embodiment, and details are not described herein again.
308、若不存在第一应用对应的用户身份验证成功标记,则DH执行用户身份验证操作。308. If the user identity verification success token corresponding to the first application does not exist, the DH performs a user identity verification operation.
本实施例中,类似实施例一种的步骤208,DH在收到第一消息后可直接验证用户身份,也可以在根据第一应用对应的用户身份验证要求确定使用第一应用时需要进行用户身份验证后再验证用户身份。那么,DH具体如何验证用户身份,可以是判断本地是否保存有第一应用对应的用户身份验证成功标记,如果不存在,则认为DH之前并未曾针对第一应用执行用户身份验证操作,或者,认为DH之前针对第一应用执行的用户身份验证操作并未成功,也就说,此时,DH需要执行用户验证身份操作。In this embodiment, in step 208 of the embodiment, the DH may directly verify the identity of the user after receiving the first message, or may determine that the user needs to be used when using the first application according to the user identity verification requirement corresponding to the first application. Authenticate the user after authentication. Then, the DH specifically determines the identity of the user, and may determine whether the user identity verification success token corresponding to the first application is saved locally. If not, the DH does not perform the user identity verification operation for the first application before, or The user authentication operation performed before the DH for the first application is not successful, that is, at this time, the DH needs to perform the user authentication identity operation.
本实施例中,在NFCC确定使用第一应用时需要进行用户身份验证,并向DH上报第一消息用于指示请求DH执行用户身份验证操作之后,若DH确定不存在第一应用对应的用户身份验证成功标记,则DH执行用户身份验证操作。其中,DH执行用户身份验证操作具体可为DH调用指纹模块,即通过验证用户指纹来验证用户身份,除指纹验证之外,对于其他可能产生时延的身份验证方式(如P1N验证、虹膜验证等)同样适用于本实施例, 对此此处不作限定。In this embodiment, when the NFCC determines to use the first application, the user identity verification is required, and the first message is reported to the DH to indicate that the DH is required to perform the user identity verification operation, and if the DH determines that the user identity corresponding to the first application does not exist, To verify the success token, DH performs a user authentication operation. The DH performs the user identity verification operation, and specifically may call the fingerprint module for the DH, that is, verify the user identity by verifying the user fingerprint, and in addition to the fingerprint verification, for other authentication methods that may generate delay (such as P1N verification, iris verification, etc.) The same applies to this embodiment, This is not limited here.
可选的,若用户身份验证操作未通过时,则DH指示NFCC不路由数据帧至第一应用所在的NFCEE,对于具体的实现方式与上述实施例一中步骤209类似,对此此处不再赘述。Optionally, if the user authentication operation fails, the DH indicates that the NFCC does not route the data frame to the NFCEE where the first application is located, and the specific implementation manner is similar to the step 209 in the foregoing Embodiment 1. Narration.
可选的,当用户身份验证操作通过时,DH向NFCC发送第二消息,以允许NFCC将数据帧路由至所述第一应用所在的NFCEE,对于具体的实现方式与上述实施例一中步骤210类似,对此此处不再赘述。Optionally, when the user authentication operation is passed, the DH sends a second message to the NFCC, to allow the NFCC to route the data frame to the NFCEE where the first application is located, and the specific implementation is the same as step 210 in the first embodiment. Similar, this will not be repeated here.
本实施例中,当用户身份验证操作通过时,可以针对第一应用设置其对应的用户身份验证成功标记并保存起来,以方便该NFC手机再次靠近POS机时DH在再次收到NFCC发送的第一消息后可以直接使用该用户身份验证成功标记进行判断,如下面步骤309。因为这是考虑到用户验证指纹时可能需要离开POS机然后重新靠近,或者,用户验证需要的时间可能大于POS机处理的最大时延等情况,所以才针对两次刷卡完成本次交易而设计的实现方案。此外,本步骤中的用户身份验证成功标记,在使用一次之后即删除,即在下面步骤309中判断出存在该用户身份验证成功标记时确定用户身份验证已成功,之后即可将删除该用户身份验证成功标记,以防止不删除时该NFC手机被盗刷等可能带来的财产损失风险。In this embodiment, when the user identity verification operation is passed, the corresponding user identity verification success flag may be set and saved for the first application, so that when the NFC mobile phone approaches the POS device again, the DH receives the NFCC transmission again. After the message, the user authentication success token can be directly used for judgment, as in step 309 below. Because this is because the user may need to leave the POS and then re-close when verifying the fingerprint, or the time required for user authentication may be greater than the maximum delay handled by the POS, etc., it is designed for the completion of this transaction for two credit cards. Implementation plan. In addition, the user identity verification success flag in this step is deleted after being used once, that is, when it is determined in the following step 309 that the user identity verification success flag exists, it is determined that the user identity verification is successful, and then the user identity is deleted. Verify the success flag to prevent the risk of property damage from being stolen when the NFC phone is stolen without being deleted.
309、若存在第一应用对应的用户身份验证成功标记,则DH向NFCC发送第二消息。309. If there is a user identity verification success flag corresponding to the first application, the DH sends a second message to the NFCC.
本实施例中,类似实施例一种的步骤208,DH在收到第一消息后可直接验证用户身份,也可以在根据第一应用对应的用户身份验证要求确定使用第一应用时需要进行用户身份验证后再验证用户身份。那么,DH具体如何验证用户身份,可以是判断本地是否保存有第一应用对应的用户身份验证成功标记,如果存在,则认为DH之前曾针对第一应用执行用户身份验证操作并且验证成功,也就是说,此时,DH不再需要执行用户验证身份操作,可直接向NFCC发送第二消息。需要说明的是,该用户身份验证成功标记可以是NFC手机在上次靠近POS机时DH接收到NFCC发送的第一消息后执行用户身份验证操作成功后设置与保存的。In this embodiment, in step 208 of the embodiment, the DH may directly verify the identity of the user after receiving the first message, or may determine that the user needs to be used when using the first application according to the user identity verification requirement corresponding to the first application. Authenticate the user after authentication. Then, the DH specifically determines the identity of the user, and may determine whether the user identity verification success token corresponding to the first application is saved locally. If yes, it is considered that the user authentication operation is performed for the first application before the DH, and the verification succeeds, that is, That is to say, at this time, DH no longer needs to perform user authentication identity operation, and can directly send a second message to the NFCC. It should be noted that the user identity verification success flag may be set and saved after the user authentication operation succeeds after the DH receives the first message sent by the NFCC when the DH is last close to the POS machine.
本实施例中,在NFCC确定使用第一应用时需要进行用户身份验证,并向DH上报第一消息用于指示请求DH执行用户身份验证操作之后,若DH确定存在第一应用对应的用户身份验证成功标记,则DH确定用户身份验证操作通过,向NFCC发送第二消息,该第二消息为允许NFCC将数据帧路由至第一应用所在的NFCEE的第一命令。In this embodiment, when the NFCC determines to use the first application, the user identity verification is required, and the first message is reported to the DH to indicate that the DH is required to perform the user identity verification operation, and if the DH determines that the user identity corresponding to the first application exists, Upon successful marking, the DH determines that the user authentication operation passes, sending a second message to the NFCC, the second message being the first command to allow the NFCC to route the data frame to the NFCEE where the first application is located.
当然,在本实施例中,可以在使用该用户身份验证成功标记确定不需要再执行用户身份验证操作之后(即该用户身份验证成功标记被使用一次之后),将该用户身份验证成功标记删除。这样做可以避免不删除该成功标记的情况下,由于该NFC手机被盗刷时DH直接使用该标记判断验证成功(即,不是要求验证当前用户(即盗刷者)的身份)而造成的资金被盗刷等财产损失风险。Of course, in this embodiment, the user identity verification success flag may be deleted after the user identity verification success flag is used to determine that the user identity verification operation does not need to be performed again (ie, after the user identity verification success flag is used once). This can avoid the case that the DCH is directly used by the DH to judge the success of the verification (ie, it is not required to verify the identity of the current user (ie, the pirate) because the NFC mobile phone is stolen when the NFC mobile phone is stolen. Risk of property damage such as stolen brush.
需要说明的是,本实施例中,DH在保存第一应用对应的用户身份验证成功标记后,也可以根据预设时间(该时间值可以由用户或系统等设置)内是否再次接收NFCC发送的第一消息(本质上是,由NFCC接收到该POS机发送的数据帧决定)来判断是否删除该成功标记,如果预设时间内没有收到该第一消息,则删除该成功标记,否则继续保存。 It should be noted that, in this embodiment, after saving the user identity verification success flag corresponding to the first application, the DH may also receive the NFCC transmission according to the preset time (which may be set by the user or the system). The first message (essentially, the NFCC receives the data frame sent by the POS machine) to determine whether to delete the success flag, and if the first message is not received within the preset time, the success flag is deleted, otherwise continue save.
310、NFCC根据第二消息将数据帧路由至第一应用所在的NFCEE。310. The NFCC routes the data frame to the NFCEE where the first application is located according to the second message.
本实施例中,该步骤与上述实施例一中步骤211类似,对此此处不再赘述。In this embodiment, the step is similar to the step 211 in the first embodiment, and details are not described herein again.
本实施例是考虑了在用户身份验证过程中由用户验证指纹或其他形式的身份信息带来的时延问题或者用户使用习惯问题,可能需要用户将NFC手机离开POS机并验证身份成功后再次靠近POS机,一定程度上提高了该方案的容错率。In this embodiment, the delay problem caused by the user to verify the fingerprint or other forms of identity information during the user identity verification process or the user usage habit is considered, and the user may need to leave the POS machine and verify the identity is successful. The POS machine has improved the fault tolerance of the solution to some extent.
此外,针对实施例二的两次刷卡场景,还有另外一种可实现的方式,即:在第一刷卡(即NFC手机靠近POS机)时,DH接收到NFCC发送的该第一消息后执行用户身份验证操作,并在用户身份验证操作通过时,将针对第一应用设置的用户身份验证成功标记发送给NFCC,从而是NFCC保存该用户身份验证成功标记;在第二次刷卡(即NFC手机(在预设时间内)再次靠近POS机)时,NFCC收到该POS机(即第一次刷卡时靠近的POS机,此时可能存在判断第二刷卡时靠近的POS机与第一次刷卡时靠近的POS机是否为同一个NFC设备的判断,如可通过NFC设备的终端标识信息等判断,此处不进行限定)发送的用户选择第一应用的该数据帧后,可直接判断本地是否保存有第一应用对应的用户身份验证成功标记,如果有,则不向DH发送第一消息,而是可直接进行数据帧的路由处理,否则,向DH发送第一消息。此时,NFCC侧对第一应用对应的用户身份验证成功标记的保存或删除的处理方式,类似上述DH侧对该用户身份验证成功标记的保存或删除方式,这里不再赘述。In addition, for the two card swipe scenarios of the second embodiment, there is another achievable manner, that is, when the first swipe card (ie, the NFC mobile phone is close to the POS machine), the DH receives the first message sent by the NFCC and executes the first message. User authentication operation, and when the user authentication operation is passed, the user authentication success token set for the first application is sent to the NFCC, so that the NFCC saves the user authentication success token; in the second credit card (ie, the NFC mobile phone) When (close to the POS machine) (the preset time), the NFCC receives the POS machine (that is, the POS machine that is close to the first time when the card is swiped. At this time, there may be a POS machine that is close to the first card when judging the second card swipe. Whether the POS machine that is close to the time is judged by the same NFC device, for example, it can be judged by the terminal identification information of the NFC device, etc., and is not limited herein. After the user who sends the data selects the data frame of the first application, it can directly determine whether the local area is The user authentication success flag corresponding to the first application is saved, and if yes, the first message is not sent to the DH, but the routing of the data frame can be directly performed; otherwise, the first message is sent to the DH.At this time, the manner of saving or deleting the user identity verification success flag corresponding to the first application on the NFCC side is similar to the manner of saving or deleting the user identity verification success flag on the DH side, and details are not described herein again.
上述实施例一和实施例二,从NFCC判断是否需要进行用户身份验证的角度来对本申请实施例进行了说明,下面将从DH判断是否需要进行用户身份验证的角度来进行说明。In the first embodiment and the second embodiment, the embodiment of the present application is described in terms of determining whether the user authentication is required by the NFCC. The following is a description of whether the DH needs to perform user identity verification.
实施例三,从DH判断是否需要进行用户身份验证的角度进行描述,请参阅图4,本申请实施例中数据处理方法的另一个实施例,包括:For a third embodiment, a description is made from the perspective of the DH to determine whether the user authentication is required. Referring to FIG. 4, another embodiment of the data processing method in the embodiment of the present application includes:
401、DH记录每个应用的AID及其对应的用户身份验证要求。401. DH records the AID of each application and its corresponding user authentication requirements.
本实施例中,该步骤与上述实施例一中步骤201类似,对此此处不再赘述。In this embodiment, the step is similar to step 201 in the first embodiment, and details are not described herein again.
与实施例一不同的是,DH根据每个应用对应的用户身份验证要求为每个应用设置对应的用户身份验证要求标识并保存起来,例如,通过应用AID与其对应的用户身份验证要求标识的关联关系表保存。Different from the first embodiment, the DH sets a corresponding user identity verification request identifier for each application according to the user identity verification requirement corresponding to each application, and saves, for example, the association between the application AID and its corresponding user identity verification request identifier. The relationship table is saved.
402、DH向NFCC配置路由项。402. The DH configures a routing entry to the NFCC.
本实施例中,DH针对第一应用向NFCC配置路由项,与上述实施例一中的步骤202类似,该第一应用可以是DH上安装的每个应用中的任一个,或者,是上述每个应用中已激活的至少一个应用中的任一个;该路由项可以是基于AID的路由项,也可以是其他类型的路由项,这里不再赘述。同样的,DH可通过侦听模式路由表向NFCC配置路由项,如,该路由表中包括第一应用对应的基于AID的路由项等。其中,需要说明的是,第一应用对应的路由项中不包括用于表示在使用第一应用时是否需要进行用户身份验证的信息,如上述实施例一中的用户身份验证要求标识。In this embodiment, the DH configures a routing entry for the first application to the NFCC. Similar to step 202 in the first embodiment, the first application may be any one of the applications installed on the DH, or Any one of the at least one application that has been activated in the application; the routing item may be an AID-based routing item, or may be other types of routing items, and details are not described herein again. Similarly, the DH can configure a routing entry to the NFCC through the listening mode routing table. For example, the routing table includes an AID-based routing entry corresponding to the first application. It should be noted that, the routing item corresponding to the first application does not include information indicating whether user identity verification is required when the first application is used, such as the user identity verification request identifier in the first embodiment.
403、NFC手机与对端的POS机执行RF发现过程,以激活POS机执行业务所需的RF协议。403. The NFC mobile phone and the peer POS perform an RF discovery process to activate the RF protocol required by the POS to perform the service.
404、POS机向NFCC发送数据帧,该数据帧为用于选择第一应用的应用选择命令。 404. The POS machine sends a data frame to the NFCC, where the data frame is an application selection command for selecting the first application.
405、NFCC为上述所接收到的数据帧查找到匹配的路由项。405. The NFCC finds a matching routing item for the received data frame.
本实施例中,步骤403至步骤405与上述实施例中步骤203至步骤205类似,对此此处不再赘述。In this embodiment, the steps 403 to 405 are similar to the steps 203 to 205 in the foregoing embodiment, and details are not described herein again.
406、NFCC向DH发送第一消息。406. The NFCC sends a first message to the DH.
本实施例中,NFCC向DH发送第一消息,该第一消息用于通知DH对端POS机要选择NFC手机中的第一应用。In this embodiment, the NFCC sends a first message to the DH, where the first message is used to notify the DH peer POS machine to select the first application in the NFC mobile phone.
可选的,NFCC在接收到POS机发送的应用选择命令(如SelectAID命令),并查找到匹配的路由项(如与该命令中的AID相匹配的基于AID的路由项)之后,通过RF NFCEE Action机制向DH上报该路由情况,其中包括AID、NFCEE标识等,该NFCEE标识为指示第一应用所在的NFCEE的唯一标识。Optionally, after receiving the application selection command (such as the SelectAID command) sent by the POS machine, and finding the matching routing item (such as the AID-based routing item matching the AID in the command), the NFCC passes the RF NFCEE. The action mechanism reports the route to the DH, including the AID, the NFCEE identifier, and the like, and the NFCEE identifier is a unique identifier indicating the NFCEE where the first application is located.
可选的,NFCC向DH发送包括上述数据帧的第一消息,数据帧用于通知DH对端POS机要选择NFC手机中的第一应用,需要说明的是,第一消息中除用上述数据帧进行通知之外,还可以直接通知DH对端POS机要选择NFC手机中的第一应用,对此此处不作任何限定。Optionally, the NFCC sends a first message including the foregoing data frame to the DH, where the data frame is used to notify the DH peer POS machine to select the first application in the NFC mobile phone, and the first message is used in addition to the foregoing data. In addition to the notification of the frame, the DH peer POS machine can be directly notified to select the first application in the NFC mobile phone, which is not limited herein.
可选的,NFCC向DH上报第一消息时,可以通过RFNFCEEAction机制上报。其中,需要说明的是,除通过RF NFCEE Action机制上报之外,还可以新增一个上报DH的通知,如用户身份验证判断通知USER_VALIDATION_JUDGEMENT_NTF,用于请求DH自行判断是否需要进行用户身份验证,对此此处也不作任何限定,其中,RF NFCEE Action机制上报时使用的是RF_NFCEE_ACTION_NTF通知。Optionally, when the NFCC reports the first message to the DH, the NFCC can report the information through the RFNFCEEAction mechanism. It should be noted that, in addition to reporting through the RF NFCEE Action mechanism, a new notification of the DH may be added, such as the user identity verification notification USER_VALIDATION_JUDGEMENT_NTF, for requesting the DH to determine whether the user authentication is required. There is no limitation here, in which the RF NFCEE Action mechanism reports the RF_NFCEE_ACTION_NTF notification.
可选的,NFCC根据NFC手机的当前能量状态判断是否需要向DH发送第一消息,具体可以为:当NFC手机的当前能量状态时为无电或关机状态时,NFCC确定不需要向DH发送第一消息;当NFC手机的当前能量状态时既不是无电,又不是关机时,NFCC确定需要向DH发送第一消息。其中,当前能量状态可以包括无电状态、关机状态、亮屏且上锁状态、亮屏且解锁状态、灭屏且上锁状态、灭屏且解锁状态等,详见NCI协议的相应内容。这样设计是考虑到,实现中可以将那些对安全性要求较高的应用(如银行卡)对应的路由项设置为在无电和/或关机状态下不可用(如将其中能量状态字段中对应无电和/关机状态的比特位设为0b),从而保证无电和/或关机状态下,NFCC即使为接收到的数据帧找到匹配的路由项,也不能将该数据帧路由到这些卡应用所在的NFCEE,再转发给这些卡应用进行处理,这样既可避免发生无电和/或关机状态下刷这些卡进行消费的情况。因此,在无电和/或关机状态下,NFCC不再需要向DH发送第一消息,以避免资源浪费(因为即使发送,也得不到DH的处理与应答)。Optionally, the NFCC determines whether the first message needs to be sent to the DH according to the current energy state of the NFC mobile phone, where the NFCC determines that the NFC mobile phone does not need to send the first message to the DH when the current energy state of the NFC mobile phone is no power or shutdown state. A message; when the current energy state of the NFC handset is neither power nor shutdown, the NFCC determines that the first message needs to be sent to the DH. The current energy state may include an unpowered state, a power-off state, a bright screen and a locked state, a bright screen and an unlocked state, a screen-off state, a locked state, a screen-off state, and an unlocked state. For details, refer to the corresponding content of the NCI protocol. This design is considered, in the implementation, the routing items corresponding to the security-critical applications (such as bank cards) can be set to be unavailable in the no-power and/or shutdown state (for example, the corresponding energy state field) The no-power and/off-off status bits are set to 0b), so that in the absence of power and/or shutdown, the NFCC cannot route the data frame to these card applications even if it finds a matching routing item for the received data frame. The NFCEE is then forwarded to these card applications for processing, which avoids the consumption of these cards for consumption in the event of no power and/or shutdown. Therefore, in the no-power and/or power-off state, the NFCC no longer needs to send the first message to the DH to avoid waste of resources (because even if it is sent, the processing and response of the DH are not obtained).
407、若DH确定第一应用对应的用户身份验证要求标识表示不需要进行用户身份验证,则DH指示NFCC路由数据帧至第一应用所在的NFCEE。407. If the DH determines that the user identity verification request identifier corresponding to the first application indicates that user identity verification is not required, the DH instructs the NFCC to route the data frame to the NFCEE where the first application is located.
本实施例中,DH在收到NFCC发送的第一消息后,可通过第一消息中包含的第一应用的标识(如AID)确定第一应用对应的用户身份验证要求标识,具体可以是,DH根据AID从步骤401中保存的AID与其对应的用户身份验证要求标识的关联关系表中查找该AID对应的用户身份验证要求标识。然后,DH判断该第一应用对应的用户身份验证要求 标识是否表示使用第一应用时需要进行用户身份验证,如果否,则认为使用第一应用时不需要进行用户身份验证,例如,该用户身份验证要求标识对应的比特位为0b,则认为指示使用该AID对应的第一应用时不需要用户身份验证。In this embodiment, after receiving the first message sent by the NFCC, the DH may determine the user identity verification request identifier corresponding to the first application by using the identifier of the first application (such as the AID) included in the first message, where specifically, The DH searches for the user identity verification request identifier corresponding to the AID from the association table of the AID saved in step 401 and its corresponding user identity verification request identifier according to the AID. Then, DH determines the user authentication request corresponding to the first application. Whether the identifier indicates that the user authentication is required when using the first application, and if not, it is considered that the user authentication is not required when the first application is used. For example, if the user authentication request identifier corresponding to the bit is 0b, the indication is used. The first application corresponding to the AID does not require user authentication.
可选的,DH指示NFCC路由数据帧至第一应用所在的NFCEE,其中,一种可能的指示方式为,DH向NFCC发送第二消息,该第二消息为允许NFCC对数据帧进行数据路由的第一命令。Optionally, the DH indicates that the NFCC routes the data frame to the NFCEE where the first application is located, where a possible indication manner is that the DH sends a second message to the NFCC, where the second message is to allow the NFCC to perform data routing on the data frame. First order.
需要说明的是,上述第一命令中包含的内容,可以是用户身份验证相关的信息(即不需要进行用户身份验证),和/或,表示允许NFCC进行数据路由的信息。总之,NFCC在收到该第一命令后,只有能根据其中的内容确定DH允许NFCC将数据帧路由到第一应用所在的NFCEE即可。It should be noted that the content included in the first command may be information related to user identity verification (ie, no user identity verification is required), and/or information indicating that the NFCC is allowed to perform data routing. In summary, after receiving the first command, the NFCC can only determine according to the content that the DH allows the NFCC to route the data frame to the NFCEE where the first application is located.
408、若DH确定第一应用对应的用户身份验证要求标识表示使用第一应用时需要进行用户身份验证,则DH执行用户身份验证操作。408. If the DH determines that the user identity verification request identifier corresponding to the first application indicates that user identity verification is required when using the first application, the DH performs a user identity verification operation.
本实施例中,DH在收到NFCC发送的第一消息后,可通过第一消息中包含的第一应用的标识(如AID)确定第一应用对应的用户身份验证要求标识,具体可以是,DH根据AID从步骤401中保存的AID与其对应的用户身份验证要求标识的关联关系表中查找该AID对应的用户身份验证要求标识。然后,DH判断该第一应用对应的用户身份验证要求标识是否表示使用第一应用时需要进行用户身份验证,如果是,则认为确定使用第一应用时需要进行用户身份验证,也就是说,DH执行用户身份验证操作。In this embodiment, after receiving the first message sent by the NFCC, the DH may determine the user identity verification request identifier corresponding to the first application by using the identifier of the first application (such as the AID) included in the first message, where specifically, The DH searches for the user identity verification request identifier corresponding to the AID from the association table of the AID saved in step 401 and its corresponding user identity verification request identifier according to the AID. Then, the DH determines whether the user identity verification request identifier corresponding to the first application indicates that the user identity verification is required when using the first application, and if yes, it is determined that the user identity verification is required when using the first application, that is, DH Perform user authentication operations.
可选的,DH执行用户身份验证操作,具体实现方式与实施例一中步骤208中描述的实现方式类似,对此此处不再赘述。Optionally, the DH performs the user identity verification operation, and the implementation manner is similar to the implementation manner described in the step 208 in the first embodiment, and details are not described herein again.
409、若用户身份验证操作通过,则DH向NFCC发送第二消息。409. If the user authentication operation passes, the DH sends a second message to the NFCC.
本实施例中,当用户身份验证操作通过时,DH向NFCC发送第二消息,该第二消息为允许NFCC对数据帧进行数据路由处理的第一命令,其中,允许NFCC对数据帧进行数据路由处理为允许NFCC将数据帧路由至第一应用所在的NFCEE。In this embodiment, when the user identity verification operation is passed, the DH sends a second message to the NFCC, where the second message is a first command that allows the NFCC to perform data routing processing on the data frame, where the NFCC is allowed to perform data routing on the data frame. The process is to allow the NFCC to route the data frame to the NFCEE where the first application is located.
需要说明的是,上述第一命令中包含的内容,可以是用户身份验证相关的信息(即执行用户身份验证操作的结果为通过),和/或,表示允许NFCC进行数据路由的信息。总之,NFCC在收到该第一命令后,只有能根据其中的内容确定DH允许NFCC将数据帧路由到第一应用所在的NFCEE即可。It should be noted that the content included in the first command may be information related to user identity verification (ie, the result of performing a user identity verification operation is passed), and/or information indicating that the NFCC is allowed to perform data routing. In summary, after receiving the first command, the NFCC can only determine according to the content that the DH allows the NFCC to route the data frame to the NFCEE where the first application is located.
410、NFCC根据第二消息对数据帧进行路由处理。410. The NFCC performs routing processing on the data frame according to the second message.
本实施例中,NFCC接收第二消息,并根据第二消息对数据帧进行路由处理,具体实现方式如下:In this embodiment, the NFCC receives the second message, and performs routing processing on the data frame according to the second message. The specific implementation manner is as follows:
对于步骤409,第二消息为允许NFCC对数据帧进行数据路由处理的第一命令,此时,NFCC将数据帧路由至第一应用所在的NFCEE,此外,该种实现方式中与上述实施例一中步骤211类似,对此此处不再赘述。For the step 409, the second message is a first command that allows the NFCC to perform data routing processing on the data frame. In this case, the NFCC routes the data frame to the NFCEE where the first application is located. Step 211 is similar, and will not be described here.
当然,对于步骤413,NFCC还可能接受到第二消息,只是此时第二消息为不允许NFCC对数据帧进行数据路由处理的第二命令,那么,NFCC不路由数据帧至第一应用所在的NFCEE,也就是说,NFCC无法向对端的POS机发送应答消息,因此,POS机在预设时间 内未收到任何应答消息(即应答超时情况)时会终止本次通信。Certainly, for step 413, the NFCC may also receive the second message, but only the second message is a second command that does not allow the NFCC to perform data routing processing on the data frame. Then, the NFCC does not route the data frame to the first application. NFCEE, that is, NFCC cannot send a response message to the peer POS, so the POS machine is at the preset time. This communication is terminated when no response message is received (ie, the response timeout condition).
411、若用户身份验证操作未通过时,则DH指示NFCC不路由数据帧至第一应用对应的NFCEE。411. If the user identity verification operation fails, the DH indicates that the NFCC does not route the data frame to the NFCEE corresponding to the first application.
本实施例中,当DH执行用户身份验证并未通过验证时,DH指示NFCC不路由数据帧至第一应用所在的NFCEE。其中,具体的指示方式与上述实施例一中步骤209类似,对此此处不再赘述。In this embodiment, when DH performs user identity verification and fails verification, DH indicates that the NFCC does not route the data frame to the NFCEE where the first application is located. The specific indication manner is similar to the step 209 in the first embodiment, and details are not described herein again.
本实施例中,通过DH在收到NFCC发送的用于表示对端POS机要选择第一应用的通知消息后,判断使用第一应用时是否需要进行用户身份验证,实现了根据不同卡应用对安全性和便捷性要求的不同采用最合适第一应用的处理方式,制定了统一的解决方案,可使实现更简单,开发成本更低、周期更短等,其中,对于需要进行用户身份验证的卡应用,说明对安全性要求高于便捷性要求,对于不需要进行用户身份验证的卡应用,说明便捷性要求高于安全性要求;因此,本申请实施例既可以对安全性要求高于便捷性要求的卡应用进行用户身份验证,又可以使得便捷性要求高于安全性要求的卡应用实现快捷支付的功能,同时还可以避免前面所述的影响用户体验或使用户操作复杂的问题。In this embodiment, after receiving the notification message sent by the NFCC to indicate that the peer POS machine selects the first application, the DH determines whether the user identity verification is required when the first application is used, and implements the application according to different cards. Different security and convenience requirements adopt the most suitable first-application processing method, and a unified solution can be made, which makes the implementation simpler, lower development cost, shorter cycle, etc., where user authentication is required. The application of the card indicates that the security requirement is higher than the convenience requirement. For the card application that does not require the user identity verification, the convenience requirement is higher than the security requirement; therefore, the security requirements of the embodiment of the present application are higher than the convenience. The card application for sexual requirements performs user authentication, and the card application with higher convenience than the security requirement can realize the function of fast payment, and can also avoid the problems of affecting the user experience or complicating the user operation as described above.
实施例三中对DH自己判断是否需要进行用户身份验证的实施例进行了说明,下面与实施例二类似对该种方案的两次刷卡场景对应的实施例进行说明。In the third embodiment, an embodiment in which the DH itself determines whether the user authentication is required is described. The following describes an embodiment corresponding to the two card swipe scenarios of the solution similar to the second embodiment.
实施例四,请参阅图5对本申请实施例中数据处理方法的另一个实施例,包括:Embodiment 4, referring to FIG. 5, another embodiment of the data processing method in the embodiment of the present application includes:
501、DH记录每个应用的AID及其对应的用户身份验证要求。501, DH records the AID of each application and its corresponding user authentication requirements.
502、DH向NFCC配置路由项。502. The DH configures a routing entry to the NFCC.
503、NFC手机与对端的POS机执行RF发现过程,以激活POS机执行业务所需的RF协议。503. The NFC mobile phone and the peer POS perform an RF discovery process to activate the RF protocol required by the POS to perform the service.
504、POS机向NFCC发送数据帧,该数据帧为用于选择第一应用的应用选择命令。504. The POS machine sends a data frame to the NFCC, where the data frame is an application selection command for selecting the first application.
505、NFCC为上述所接收到的数据帧查找到匹配的路由项。505. The NFCC finds a matching routing item for the received data frame.
506、NFCC向DH发送第一消息。506. The NFCC sends a first message to the DH.
507、若DH确定使用第一应用时不需要进行用户身份验证,则DH指示NFCC路由数据帧至第一应用所在的NFCEE。507. If DH determines that user authentication is not required when using the first application, DH instructs the NFCC to route the data frame to the NFCEE where the first application is located.
本实施例中,步骤501至步骤507与上述实施例三中步骤401至步骤407类似,对此此处不再赘述。In this embodiment, the steps 501 to 507 are similar to the steps 401 to 407 in the third embodiment, and details are not described herein again.
508、若DH确定使用第一应用时需要进行用户身份验证,且存在第一应用对应的用户身份验证成功标记,则DH指示NFCC路由数据帧至第一应用所在的NFCEE。508. If the DH determines that the user authentication is required when the first application is used, and the user identity verification success flag corresponding to the first application exists, the DH indicates that the NFCC routes the data frame to the NFCEE where the first application is located.
本实施例中,在DH确定使用第一应用时需要进行用户身份验证时,DH再对第一应用对应的用户身份验证成功标记存在与否进行判断,如果DH确定存在第一应用对应的用户身份验证成功标记,则DH指示NFCC路由数据帧至第一应用所在的NFCEE。In this embodiment, when the DH determines that the user identity verification is required when the first application is used, the DH determines whether the user identity verification success flag corresponding to the first application exists or not, and if the DH determines that the user identity corresponding to the first application exists. To verify the success flag, DH instructs the NFCC to route the data frame to the NFCEE where the first application is located.
可选的,DH确定使用第一应用时需要进行用户身份验证,具体可以为,DH在收到NFCC发送的第一消息后,可通过第一消息中包含的第一应用的标识(如AID)确定第一应用对应的用户身份验证要求标识,例如,DH根据AID从步骤401中保存的AID与其对应的用户身份验证要求标识的关联关系表中查找该AID对应的用户身份验证要求标识,然 后DH判断该第一应用对应的用户身份验证要求标识是否表示使用第一应用时需要进行用户身份验证,如果是,则认为确定使用第一应用时需要进行用户身份验证。Optionally, the DH determines that the first application is required to perform user identity verification. Specifically, after receiving the first message sent by the NFCC, the DH may pass the identifier of the first application (such as an AID) included in the first message. Determining a user identity verification request identifier corresponding to the first application, for example, the DH searches for the user identity verification request identifier corresponding to the AID from the association relationship between the AID saved in step 401 and the corresponding user identity verification request identifier according to the AID, The DH determines whether the user identity verification request identifier corresponding to the first application indicates that the user identity verification is required when the first application is used, and if yes, it is determined that the user identity verification is required when the first application is used.
可选的,DH指示NFCC路由数据帧至第一应用所在的NFCEE,其中,一种可能的指示方式为,DH向NFCC发送第二消息,该第二消息为允许NFCC对数据帧进行数据路由的第一命令。需要说明的是,上述第一命令中包含的内容,可以是用户身份验证相关的信息(即执行用户身份验证操作的结果为通过,或者,表示存在用户身份验证成功标记的信息),和/或,表示允许NFCC进行数据路由的信息。总之,NFCC在收到该第一命令后,只有能根据其中的内容确定DH允许NFCC将数据帧路由到第一应用所在的NFCEE即可。Optionally, the DH indicates that the NFCC routes the data frame to the NFCEE where the first application is located, where a possible indication manner is that the DH sends a second message to the NFCC, where the second message is to allow the NFCC to perform data routing on the data frame. First order. It should be noted that the content included in the foregoing first command may be information related to user identity verification (that is, the result of performing the user identity verification operation is passed, or information indicating that the user identity verification success flag exists), and/or , indicating the information that allows the NFCC to perform data routing. In summary, after receiving the first command, the NFCC can only determine according to the content that the DH allows the NFCC to route the data frame to the NFCEE where the first application is located.
509、若DH确定使用第一应用时需要进行用户身份验证,且不存在第一应用对应的用户身份验证成功标记,则DH执行用户身份验证操作。509. If the DH determines that the user authentication is required when the first application is used, and the user identity verification success flag corresponding to the first application does not exist, the DH performs a user identity verification operation.
本实施例中,在DH确定使用第一应用时需要进行用户身份验证时,DH再对第一应用对应的用户身份验证成功标记存在与否进行判断,如果DH确定不存在第一应用对应的用户身份验证成功标记,则DH执行用户身份验证操作,具体实现方式为DH调用指纹模块,即通过验证用户指纹来验证用户身份,除指纹验证之外,对于其他可能产生时延的身份验证方式(如P1N验证、虹膜验证等)同样适用于本实施例,对此此处不作限定。In this embodiment, when the DH determines that the user authentication is required when the first application is used, the DH determines whether the user identity verification success flag corresponding to the first application exists or not, and if the DH determines that the user corresponding to the first application does not exist. If the authentication is successfully marked, the DH performs the user authentication operation. The specific implementation mode is that the DH invokes the fingerprint module, that is, the user identity is verified by verifying the user fingerprint, and in addition to the fingerprint verification, other authentication methods that may generate delays (such as The P1N verification, the iris verification, and the like are also applicable to the embodiment, which is not limited herein.
510、若身份验证成功操作通过时,则DH向NFCC发送第二消息。510. If the identity verification successful operation passes, the DH sends a second message to the NFCC.
本实施例中,类似上述实施例二中的步骤308,当用户身份验证操作通过时,可以针对第一应用设置其对应的用户身份验证成功标记并保存起来,以方便该NFC手机再次靠近POS机时DH在再次收到NFCC发送的第一消息后可以直接使用该用户身份验证成功标记进行判断,如上面步骤508或509。因为这是考虑到用户验证指纹时可能需要离开POS机然后重新靠近,或者,用户验证需要的时间可能大于POS机处理的最大时延等情况,所以才针对两次刷卡完成本次交易而设计的实现方案。此外,本步骤中的用户身份验证成功标记,在使用一次之后即删除,即在上面步骤508中判断出存在该用户身份验证成功标记时确定用户身份验证已成功,之后即可将删除该用户身份验证成功标记,以防止不删除时该NFC手机被盗刷等可能带来的财产损失风险。In this embodiment, similar to step 308 in the foregoing embodiment 2, when the user identity verification operation is passed, the corresponding user identity verification success flag may be set and saved for the first application, so that the NFC mobile phone is close to the POS machine again. When the DH receives the first message sent by the NFCC again, the DH can directly use the user identity verification success flag to perform the determination, as in step 508 or 509 above. Because this is because the user may need to leave the POS and then re-close when verifying the fingerprint, or the time required for user authentication may be greater than the maximum delay handled by the POS, etc., it is designed for the completion of this transaction for two credit cards. Implementation plan. In addition, the user identity verification success flag in this step is deleted after being used once, that is, when it is determined in the above step 508 that the user identity verification success flag is present, it is determined that the user identity verification is successful, and then the user identity is deleted. Verify the success flag to prevent the risk of property damage from being stolen when the NFC phone is stolen without being deleted.
511、NFCC根据第二消息将数据帧路由至第一应用所在的NFCEE。511. The NFCC routes the data frame to the NFCEE where the first application is located according to the second message.
512、若用户身份验证操作未通过时,则指示NFCC不路由数据帧至第一应用对应的NFCEE。512. If the user identity verification operation fails, the NFCC is instructed not to route the data frame to the NFCEE corresponding to the first application.
本实施例中,步骤511至步骤512与上述实施例三中步骤410至步骤411类似,对此此处不再赘述。此外,需要说明的是,步骤510至步骤512是在DH确定不存在第一应用对应的用户身份验证成功标记的条件下执行的,这里与实施例三中骤409至步骤411不同。In this embodiment, the steps 511 to 512 are similar to the steps 410 to 411 in the foregoing third embodiment, and details are not described herein again. In addition, it should be noted that step 510 to step 512 are performed under the condition that the DH determines that there is no user identity verification success flag corresponding to the first application, which is different from step 409 to step 411 in the third embodiment.
本实施例,同样考虑了实现中用户进行身份验证时的使用习惯(如贴POS机过程中直接验指纹,或,贴POS机后拿起再验指纹)或可能产生的时延,因此,也一定程度上提高了该方案的容错率。In this embodiment, the usage habits of the user in performing identity verification are also considered (such as directly checking the fingerprint in the process of attaching the POS machine, or picking up the fingerprint after attaching the POS machine) or a possible delay, therefore, To some extent, the fault tolerance rate of the program has been improved.
上述四个实施例中,在DH向NFCC配置第一应用对应的路由项时,都是需要将该路由项设置为指向该第一应用所在的NFCEE(即NCI协议中定义的路由项中的Route参数设为第一应用所在的NFCEE的标识),不论是NFCC还是DH对对端的POS机要选择的第一 应用对应的用户身份验证要求标识进行判断,只有在不需要进行用户身份验证或者需要进行用户身份验证且确定验证已通过的条件下,才允许NFCC对POS机发送的数据帧进行路由处理,即将数据帧路由至第一应用所在的NFCEE。下面的实施例则提供了另外一种解决思路,即DH在向NFCC配置第一应用对应的路由项时,只将不要求进行用户身份验证的应用对应的路由项设置为指向这些应用所在的NFCEE,而将要求进行用户身份验证的第一应用对应的路由项设置为指向DH,那么,NFCC在收到POS机选择第一应用的数据帧后能将该数据帧路由至DH,然后由DH对该第一应用对应的用户身份验证要求标识进行判断,只有在需要进行用户身份验证且确定验证已通过的条件下,才向NFCC重新配置第一应用对应的路由项,以将其路由项更改为指向第一应用所在的NFCEE。In the foregoing four embodiments, when the routing entry corresponding to the first application is configured by the DH to the NFCC, the routing entry needs to be set to point to the NFCEE where the first application is located (that is, the Route in the routing item defined in the NCI protocol). The parameter is set to the NFCEE identifier of the first application), whether it is NFCC or DH, the first choice for the opposite POS machine The corresponding user authentication request identifier is used for judging, and the NFCC is allowed to perform routing processing on the data frame sent by the POS machine only if the user authentication is not required or the user authentication is required and the verification is passed. The frame is routed to the NFCEE where the first application is located. The following embodiments provide another solution. When the DH configures the routing entry corresponding to the first application to the NFCC, the DH only sets the routing entry corresponding to the application that does not require user authentication to the NFCEE where the application is located. And the routing item corresponding to the first application that requires the user authentication is set to point to the DH, then the NFCC can route the data frame to the DH after receiving the data frame of the first application, and then the DH pair The user identity verification request identifier corresponding to the first application is determined, and the routing entry corresponding to the first application is reconfigured to the NFCC to change the routing entry to the NFCC only if the user authentication is required and the verification is passed. Points to the NFCEE where the first application is located.
实施例五,请参阅图6,本申请实施例中数据处理方法的另一个实施例,包括:Embodiment 5 Referring to FIG. 6, another embodiment of the data processing method in the embodiment of the present application includes:
601、DH记录每个应用的标识(如应用标识AID)及其对应的用户身份验证要求。601. The DH records the identifier of each application (such as the application identifier AID) and its corresponding user identity verification requirement.
本实施例中,该步骤与上述实施例三中的步骤401类似,DH根据每个应用对应的用户身份验证要求为每个应用设置对应的用户身份验证要求标识并保存起来,例如,通过应用AID与其对应的用户身份验证要求标识的关联关系表保存。其他不再赘述。In this embodiment, the step is similar to the step 401 in the foregoing embodiment 3. The DH sets a corresponding user identity verification request identifier for each application according to the user identity verification requirement corresponding to each application, and saves the identifier, for example, by applying the AID. The association table corresponding to the user authentication request identifier is saved. Others will not go into details.
602、DH向NFCC配置第二路由项。602. The DH configures a second routing entry to the NFCC.
本实施例中,步骤602与上述实施例三的步骤402不同,步骤402中DH配置给NFCC的每个路由项都是指向每个应用(如该路由项中AID所对应的应用)所在的NFCEE。In this embodiment, step 602 is different from step 402 in the third embodiment. In step 402, each routing item configured by the DH to the NFCC is directed to the NFCEE where each application (such as the application corresponding to the AID in the routing entry) is located. .
本实施例中,DH选择特定AID,并对该特定AID对应的第一应用配置第二路由项,该第二路由项为指向DH对应的近场通信执行环境DH-NFCEE。具体地,DH根据步骤601中每个AID对应的用户身份验证要求标识选择特定AID,例如,DH将表示需要进行用户身份验证的用户身份验证要求标识所对应的AID标记出来,从而选择特定AID,以及针对该特定AID对应的第一应用配置第二路由项。In this embodiment, the DH selects a specific AID, and configures a second routing entry for the first application corresponding to the specific AID, where the second routing entry is a near field communication execution environment DH-NFCEE corresponding to the DH. Specifically, the DH selects a specific AID according to the user identity verification request identifier corresponding to each AID in step 601. For example, the DH marks the AID corresponding to the user identity verification request identifier that needs to perform user identity verification, thereby selecting a specific AID. And configuring a second routing item for the first application corresponding to the specific AID.
可选的,第二路由项中可以包括DH-NFCEE的标识,该标识用于唯一识别DH对应的近场通信执行环境即DH-NFCEE。Optionally, the second routing item may include an identifier of the DH-NFCEE, where the identifier is used to uniquely identify the DH-NFCEE corresponding to the DH corresponding near field communication execution environment.
示例地,假设手机上某钱包中有银行卡1、银行卡2和公交卡,用户设置使用银行卡1时需要进行用户身份验证,使用银行卡2和公交卡时则不需要,那么,DH在设置路由项时,可以将为银行卡1设置的第二路由项中的NFCEE ID设为DH-NFCEE的标识(如0x00),而将为银行卡2和公交卡分别设置的路由项都指向卡应用所在的NFCEE。For example, suppose that there is a bank card 1, a bank card 2 and a bus card in a wallet on the mobile phone, the user needs to perform user identity verification when using the bank card 1, and the bank card 2 and the bus card are not required, then the DH is When setting a routing item, you can set the NFCEE ID in the second routing entry set for bank card 1 to the ID of DH-NFCEE (for example, 0x00), and the routing items set for bank card 2 and bus card respectively point to the card. The NFCEE where the application is located.
603、NFC手机与对端的POS机执行RF发现过程,以激活POS机执行业务所需的RF协议。603. The NFC mobile phone and the peer POS perform an RF discovery process to activate the RF protocol required by the POS to perform the service.
604、POS机向NFCC发送数据帧,该数据帧为用于选择第一应用的应用选择命令。604. The POS machine sends a data frame to the NFCC, where the data frame is an application selection command for selecting the first application.
605、NFCC为上述所接收到的数据帧查找到匹配的第二路由项。605. The NFCC finds a matching second routing item for the received data frame.
本实施例中,步骤603至步骤605与上述实施例中步骤203至步骤205类似,对此此处不再赘述。In this embodiment, the steps 603 to 605 are similar to the steps 203 to 205 in the foregoing embodiment, and details are not described herein again.
606、NFCC根据该第二路由项向DH发送第一消息,该第一消息为该数据帧。606. The NFCC sends a first message to the DH according to the second routing item, where the first message is the data frame.
本实施例中,在NFCC接收到POS机发送的数据帧之后,NFCC根据数据帧中的应用选择命令(如SelectAID命令),并查找到匹配的第二路由项(如该命令中的AID与该第二 路由项中的AID相匹配)之后,NFCC将上述数据帧路由至该第二路由项指向的路由目的地DH。In this embodiment, after the NFCC receives the data frame sent by the POS machine, the NFCC selects a command according to an application in the data frame (such as a SelectAID command), and finds a matching second routing item (such as the AID in the command and the Second After the AIDs in the routing entries match, the NFCC routes the above data frame to the routing destination DH pointed to by the second routing entry.
本实施例中,还需要说明的是,NFCC向DH转发收到的数据帧后,若预设时间内未收到DH发送的配置第三路由项的命令,则本次RF通信终止,若预设时间内收到DH发送的配置第三路由项的命令,则按照最新配置的第三路由项重新进行数据帧的路由。应理解,该种可能的实现方式,可适用于采用验证用户指纹的方式进行用户身份验证,并且验证指纹时手机保持贴近POS的应用场景即一次刷卡场景。In this embodiment, it is also required that after the NFCC forwards the received data frame to the DH, if the command for configuring the third routing item sent by the DH is not received within the preset time, the RF communication is terminated. If the command to configure the third routing entry sent by the DH is received within the set time, the data frame is rerouted according to the newly configured third routing entry. It should be understood that the possible implementation manner is applicable to the user authentication by using the method of verifying the user's fingerprint, and the application scenario that the mobile phone keeps close to the POS when verifying the fingerprint is a swipe scene.
607、如果DH确定第一应用对应的用户身份验证要求标识表示使用第一应用时需要进行用户身份验证,则执行用户身份验证操作。607. If the DH determines that the user identity verification request identifier corresponding to the first application indicates that user identity verification is required when using the first application, perform a user identity verification operation.
本实施例中,DH确定第一应用对应的用户身份验证要求标识表示使用第一应用时需要进行用户身份验,等价于DH确定该数据帧所选择的第一应用对应的AID已被标记为特定AID。In this embodiment, the DH determines that the user identity verification request identifier corresponding to the first application indicates that the user identity needs to be performed when the first application is used, and the AID corresponding to the first application selected by the DH to determine the data frame is marked as Specific AID.
可选的,DH执行用户身份验证操作可具体为,DH调用用户身份验证模块进行用户身份验证,其中,用户身份验证模块可以是指纹模块,即通过验证用户指纹来验证用户身份,当然,还可以是其他验证方式,例如,PIN验证、虹膜等其他生物特征验证、可穿戴设备验证(即验证是否存在与该终端通过某无线技术(如蓝牙)连接着的某特定可穿戴设备)等,对此此处不作任何限定。Optionally, the DH performs the user identity verification operation, specifically, the DH invokes the user identity verification module to perform user identity verification, where the user identity verification module may be a fingerprint module, that is, the user identity is verified by verifying the user fingerprint, and of course, Other authentication methods, such as PIN verification, iris, and other biometric verification, wearable device verification (ie, verifying the presence of a particular wearable device connected to the terminal via a wireless technology (such as Bluetooth)) There are no restrictions here.
此外,需要说明的是,如果DH确定第一应用对应的用户身份验证要求标识表示使用第一应用时不需要进行用户身份验证,则表示第一应用所在的NFCEE本来就是DH-NFCEE,这样,DH可直接将用户应答该数据帧的消息(如Select响应)发送给NFCC,以使NFCC将其应答给对端POS机。因此,本实施例五设计的方案是针对那些不在DH(即DH-NFCEE)中运行的卡应用。In addition, it should be noted that if the DH determines that the user authentication request identifier corresponding to the first application indicates that the user authentication is not required when using the first application, it indicates that the NFCEE where the first application is located is originally DH-NFCEE, thus, DH The message that the user answers the data frame (such as the Select response) can be directly sent to the NFCC, so that the NFCC can reply it to the peer POS machine. Therefore, the solution of the fifth embodiment design is for those card applications that are not operating in DH (ie, DH-NFCEE).
608、若用户身份验证操作未通过,则DH指示NFC不路由数据帧至第一应用所在的NFCEE。608. If the user authentication operation fails, the DH indicates that the NFC does not route the data frame to the NFCEE where the first application is located.
本实施例中,当用户身份验证操作的结果为未通过时,DH指示NFC不路由数据帧至第一应用所在的NFCEE。其中,具体的指示方式如下:In this embodiment, when the result of the user identity verification operation is not passed, the DH indicates that the NFC does not route the data frame to the NFCEE where the first application is located. Among them, the specific instructions are as follows:
在一种可能的指示方式中,DH终止本次通信,具体可以是,DH向NFCC发送NCI协议定义的RF协议去激活命令或其他可终止本次通信的命令;或者,DH不向NFCC发送任何应答消息,从而使NFCC无法应答对端的POS机,一旦应答超时,POS机就会终止与NFC手机的本次通信(即断开两者之间的NFC连接)。In a possible indication manner, the DH terminates the communication. Specifically, the DH sends an RF protocol deactivation command defined by the NCI protocol or other command that can terminate the communication to the NFCC. Alternatively, the DH does not send any information to the NFCC. The message is acknowledged, so that the NFCC cannot answer the POS machine of the opposite end. Once the response times out, the POS machine terminates the current communication with the NFC mobile phone (ie, disconnects the NFC connection between the two).
在另一种可能的指示方式中,DH向NFCEE发送一个第二消息,该第二消息为不允许NFCC将数据帧路由至第一应用所在的NFCEE的命令,或者,不允许NFCC向对端POS机进行应答的命令。In another possible indication manner, the DH sends a second message to the NFCEE, the second message is a command that does not allow the NFCC to route the data frame to the NFCEE where the first application is located, or does not allow the NFCC to the opposite POS. The command to answer the machine.
本实施例中,需要说明的是,用户身份验证未通过,可具体为:在预设的身份验证时间段内或在预设的身份验证次数内用户身份验证未通过,则DH确定用户身份验证未通过(即允许用户在预设时间内进行多次验证)。In this embodiment, it is required that the user identity verification fails, which may be specifically: if the user identity verification fails within the preset identity verification time period or within the preset identity verification times, the DH determines the user identity verification. Failed (ie allows the user to perform multiple verifications within a preset time).
609、若用户身份验证操作通过,则DH向NFCC发送第二消息,该第二消息用于配置 第三路由项。609. If the user authentication operation passes, the DH sends a second message to the NFCC, where the second message is used for configuration. The third routing item.
本实施例中,当用户身份验证操作的结果为通过时,DH向NFCC配置第三路由项,该第三路由项被设置为指向第一应用所在的NFCEE,该第一应用所在的NFCEE不是DH对应的近场通信执行环境DH-NFCEE。In this embodiment, when the result of the user identity verification operation is passed, the DH configures a third routing entry to the NFCC, where the third routing entry is set to point to the NFCEE where the first application is located, and the NFCEE where the first application is located is not DH. The corresponding near field communication execution environment DH-NFCEE.
可选的,DH向NFCC配置的第三路由项中包括第一应用的标识(如第一应用的AID)、指示第一应用所在NFCEE的唯一标识等。Optionally, the third routing item configured by the DH to the NFCC includes an identifier of the first application (such as an AID of the first application), a unique identifier indicating the NFCEE where the first application is located, and the like.
610、NFCEE将数据帧路由至第一应用所在的NFCEE。610. The NFCEE routes the data frame to the NFCEE where the first application is located.
本实施例中,NFCC接收到第二消息(即配置第三路由项的第二命令)后,NFCC将数据帧路由至第三路由项所指向的第一应用所在的NFCEE。In this embodiment, after the NFCC receives the second message (that is, the second command for configuring the third routing entry), the NFCC routes the data frame to the NFCEE where the first application pointed to by the third routing entry is located.
611、当本次通信结束时,DH向NFCC重新配置第二路由项。611. When the communication ends, the DH reconfigures the second routing entry to the NFCC.
本实施例中,当本次射频RF通信结束时,DH向NFCC重新配置第二路由项,该第二路由项中包括为指向DH对应的近场通信执行环境DH-NFCEE。In this embodiment, when the radio frequency RF communication ends, the DH reconfigures the second routing item to the NFCC, where the second routing item includes a near field communication execution environment DH-NFCEE corresponding to the DH.
需要说明的是,这里所述的本次射频RF通信结束,具体可以是,DH在收到NFCC上报的表示对端射频RF场消失的通知(即通过RF_FIELD_INFO_NTF通知)之后确定的,或者是,DH在规定时间内未收到NFCC的任何消息时确定的,或者是,DH基于任何原因(如数据交互中的传输错误、协议错误、超时等)去激活DH与NFCC之间的射频接口RF Interface之后确定的,或者其他NCI协议定义的确定本次RF通信结束的方式,这里不进行限定。It should be noted that, the radio frequency RF communication described herein ends, specifically, the DH is determined after receiving the notification that the NFCC reports that the opposite radio frequency RF field disappears (ie, by the RF_FIELD_INFO_NTF notification), or DH Determined when no message of NFCC is received within the specified time, or DH deactivates the RF interface RF interface between DH and NFCC for any reason (such as transmission error in data interaction, protocol error, timeout, etc.) The method defined by the other NCI protocol to determine the end of the RF communication is not limited herein.
本实施例的步骤607中,DH执行用户身份验证操作时,可以如前面的实施例一或三采用一次刷卡的方式,或者,如前面实施例二或四采用两次刷卡的方式。In the step 607 of the embodiment, when the DH performs the user identity verification operation, the method of swiping the card may be used once in the first embodiment or the third embodiment, or the method of swiping the card twice in the second embodiment or the fourth embodiment.
如果是一次刷卡的方式(如验证用户身份时NFC手机保持贴近POS),由于目前NCI协议规定只能在RF通信状态机处于IDLE状态(即RFST_IDLE)时配置路由项,因此,可采用如下方式实现路由项的重新配置(即将上述第一应用对应的第二路由项更新为第三路由项),示例地,DH向NFCC发送相应的命令(如RF_DEACTIVE_CMD(Idle mode))使状态机从数据交互阶段对应的ACTIVE状态(即RFST_LISTEN_ACTIVE)变为IDLE状态,然后再进行路由表的更新(即重新配置);再示例地,允许DH直接在ACTIVE状态下重新配置路由表。此时,可类似上述实施例一或三,增加时间限制,如,NFCC通过第一消息向DH转发收到的数据帧后,若预设时间内收到DH发送的用于配置第三路由项的第二命令(即第二消息),则按照最新配置的路由项重新进行数据帧的路由(即根据第三路由项将该数据帧路由至第一应用所在的NFCEE),否则,NFCC认为本次RF通信结束。If it is a way of swiping the card (such as the NFC mobile phone stays close to the POS when verifying the user's identity), since the current NCI protocol stipulates that the routing item can only be configured when the RF communication state machine is in the IDLE state (ie, RFST_IDLE), the following manner can be implemented. Re-configuration of the routing entry (that is, updating the second routing entry corresponding to the first application to the third routing entry). For example, the DH sends a corresponding command (such as RF_DEACTIVE_CMD (Idle mode)) to the NFCC to enable the state machine to perform the data interaction phase. The corresponding ACTIVE state (ie, RFST_LISTEN_ACTIVE) becomes the IDLE state, and then the routing table is updated (ie, reconfigured); again, the DH is allowed to reconfigure the routing table directly in the ACTIVE state. In this case, the time limit may be increased in the first embodiment or the third embodiment. For example, after the NFCC forwards the received data frame to the DH through the first message, if the DH is received within the preset time, the third routing entry is configured. The second command (ie, the second message) re-routes the data frame according to the newly configured routing item (that is, routes the data frame to the NFCEE where the first application is located according to the third routing item); otherwise, the NFCC considers this The secondary RF communication ends.
如果是两次刷卡的方式(即验证用户身份时NFC手机离开POS机),则相当于NFC手机与POS机先后进行两次RF通信,只要NFC手机在离开POS后的RF通信状态机处于IDLE状态,DH就可以给NFCC重新配置路由项。此时,可类似实施例二或四,增加时间限制,如,若DH通过第二消息配置第三路由项后没有在预设时间内与对端POS机进行下一次RF通信(更具体地是,DH在重新配置路由项后的预设时间内没有收到NFCC转发的用于选择第一应用的数据帧),则DH要再次配置路由项以恢复为原来的路由表(即将第一应用对应的第三路由项再次更新为第二路由项,也就是说特定AID表示的应用的路由项还 是指向DH)。当然,两次刷卡的方式中,也可以如前面的实施例二或四,DH在第一次刷卡后验证用户身份通过后将用户身份验证成功标记保存下来,然后在第二次刷卡时直接使用该成功标记,即通过判断是否存在该成功标记来确定用户身份验证是否通过,具体这里不再赘述。If the card is swiped twice (that is, the NFC mobile phone leaves the POS when the user identity is verified), the NFC mobile phone and the POS machine perform two RF communications in succession, as long as the NFC mobile phone is in the IDLE state after leaving the POS. DH can reconfigure routing entries for NFCC. At this time, similar to the second or fourth embodiment, the time limit is increased. For example, if the DH configures the third routing item by using the second message, the next RF communication is not performed with the peer POS machine within a preset time (more specifically, If the DH does not receive the data frame for the first application to be forwarded by the NFCC within the preset time after the reconfiguration of the routing entry, the DH needs to configure the routing entry again to restore the original routing table (that is, the first application corresponds to the first application). The third routing entry is updated again to the second routing entry, that is, the routing entry of the application represented by the specific AID is also Is pointing to DH). Of course, in the manner of two card swipes, as in the previous embodiment two or four, DH saves the user identity success token after verifying the user identity after the first card swiping, and then directly uses the card when the second card is swiped. The success flag is determined whether the user identity verification is passed by determining whether the success flag exists, and details are not described herein again.
本实施例在尽量不修改当前NCI标准的前提下,使得DH通过对需要进行用户身份验证的第一应用设置指向DH的路由项,并在收到NFCC转发的用于选择该第一应用的数据帧后进行用户身份验证,只有在确定验证已通过时才向NFCC重新配置指向第一应用所在的NFCEE的路由项,以使NFCC能将该数据帧路由至该第一应用所在的NFCEE,如此,实现了根据不同卡应用对安全性和便捷性要求的不同采用最合适第一应用的处理方式,制定了统一的解决方案,可使实现更简单,开发成本更低、周期更短等;因此,本申请实施例既可以对安全性要求高于便捷性要求的卡应用进行用户身份验证,又可以使得便捷性要求高于安全性要求的卡应用实现快捷支付的功能,同时还可以避免前面所述的影响用户体验或使用户操作复杂的问题,此外,上述考虑的两次刷机方案还能在一定程度上提高了该方案的容错率。In this embodiment, the DH does not modify the current NCI standard, so that the DH sets a routing entry that points to the DH by using the first application that needs to perform user authentication, and receives the data for selecting the first application that is forwarded by the NFCC. User authentication is performed after the frame, and the routing entry pointing to the NFCEE where the first application is located is reconfigured to the NFCC only when it is determined that the verification has passed, so that the NFCC can route the data frame to the NFCEE where the first application is located. The implementation of the most appropriate first application processing method according to the different security and convenience requirements of different card applications, and the development of a unified solution, which can make the implementation simpler, lower development cost, shorter cycle, etc.; In the embodiment of the present application, the user identity verification can be performed on the card application with the security requirement higher than the convenience requirement, and the card application with the convenience requirement higher than the security requirement can realize the function of fast payment, and can also avoid the foregoing. The impact of the user experience or the complexity of the user's operation, in addition, the above two brushing schemes can still be to some extent High fault tolerance of the program.
上述实施例一至实施例五中策略实体的动作还可以由如图8中所示的第一终端8中的处理器可以通过调用存储器803中存储的应用程序代码来执行,对此本申请实施例例不做任何限制。The actions of the policy entity in the first embodiment to the fifth embodiment may also be performed by the processor in the first terminal 8 as shown in FIG. 8 by calling the application code stored in the memory 803. There are no restrictions on the case.
需要说明的是,上述实施例一至五中,DH在记录应用的标识时都是以记录应用的AID为例,DH在配置路由项时都是以配置基于AID的路由项为例。当然,路由项还可以是其他类型的路由项,如NCI定义的基于APDU pattern的路由项、基于SC的路由项、基于协议的路由项、基于技术的路由项以及强制NFCEE路由机制等,相应的,应用的标识还可以是其他能够表示应用的信息,如应用相关的APDU pattern信息(如reference data和mask等)、应用相关的SC信息(如SC列表)、应用相关的RF协议信息(如ISO-DEP协议、T1T/T2T/T3T/T5T协议等)、应用相关的RF技术信息(如NFC-A、NFC-B、NFC-F、NFC-V技术等)以及应用相关的NFCEE信息(如应用所在的NFCEE)等等,本发明对此并不进行限定。It should be noted that, in the above-mentioned first to fifth embodiments, the DH records the application identifier as an example of the AID of the application, and the DH configures the routing entry as an example. Certainly, the routing item may also be other types of routing items, such as an APDU pattern-based routing item defined by the NCI, an SC-based routing item, a protocol-based routing item, a technology-based routing item, and a mandatory NFCEE routing mechanism, etc. The identifier of the application may also be other information that can represent the application, such as application-related APDU pattern information (such as reference data and mask), application-related SC information (such as SC list), and application-related RF protocol information (such as ISO). -DEP protocol, T1T/T2T/T3T/T5T protocol, etc.), application-related RF technical information (such as NFC-A, NFC-B, NFC-F, NFC-V technology, etc.) and application-related NFCEE information (such as applications) The NFCEE in which it is located, etc., is not limited by the present invention.
上面对本申请实施例中数据处理方法进行了说明,下面对本申请实施例中的主机DH进行说明。The data processing method in the embodiment of the present application has been described above. The host DH in the embodiment of the present application is described below.
实施例六,请参阅图7,本申请实施例中主机DH的一个实施例包括:Embodiment 6 Referring to FIG. 7, an embodiment of the host DH in the embodiment of the present application includes:
第一接收单元701,用于接收该NFCC发送的第一消息,该第一消息用于通知该DH第二终端要选择该第一终端上的第一应用,和/或用于请求该DH执行用户身份验证操作;The first receiving unit 701 is configured to receive a first message sent by the NFCC, where the first message is used to notify the DH that the second terminal is to select the first application on the first terminal, and/or to request the DH to be executed. User authentication operation;
验证单元702,用于如果该DH确定需要进行用户身份验证,则执行用户身份验证操作;The verification unit 702 is configured to perform a user identity verification operation if the DH determines that user identity verification is required;
第一发送单元703,用于当该用户身份验证操作的结果为通过时,向该NFCC发送第二消息,该第二消息为允许该NFCC对数据帧进行数据路由的第一命令,该数据帧为由该第二终端发送至该NFCC的,表示要选择该第一应用的消息。The first sending unit 703 is configured to: when the result of the user identity verification operation is passed, send a second message to the NFCC, where the second message is a first command that allows the NFCC to perform data routing on the data frame, where the data frame The message sent by the second terminal to the NFCC indicates that the first application is to be selected.
本实施例中,主机DH根据不同卡应用对安全性和便捷性要求的不同,制定了统一的解决方案,对于需要进行用户身份验证的卡应用,说明对安全性要求高于便捷性要求;对 与不需要进行用户身份验证的卡应用,说明便捷性要求高于安全性要求。In this embodiment, the host DH formulates a unified solution according to different security and convenience requirements of different card applications, and indicates that the security requirement is higher than the convenience requirement for the card application that needs to perform user identity verification; For card applications that do not require user authentication, the convenience requirements are higher than the security requirements.
请参阅图8,本申请实施例中主机DH的其他可能的实施例中还可以包括:Referring to FIG. 8, other possible embodiments of the host DH in the embodiment of the present application may further include:
可选的,在一种可能的实施方式中,第一接收单元801具体可以包括第一接收模块8011;其中,第一接收模块8011具体用于,Optionally, in a possible implementation, the first receiving unit 801 may specifically include a first receiving module 8011. The first receiving module 8011 is specifically configured to:
可选的,在一种可能的实施方式中,验证单元802具体可以包括:第一确定模块8021、第二确定模块8022、第三确定模块8023或第四确定模块8024中的一个或多个模块;其各模块的功能具体如下:Optionally, in a possible implementation, the verification unit 802 may specifically include: one or more modules of the first determining module 8021, the second determining module 8022, the third determining module 8023, or the fourth determining module 8024. The functions of each module are as follows:
第一确定模块8021,用于根据该第一应用对应的用户身份验证要求标识确定需要进行用户身份验证;其中,该用户身份验证要求标识用于指示使用该第一应用时需要验证用户身份;The first determining module 8021 is configured to determine, according to the user identity verification request identifier corresponding to the first application, that the user identity verification is required; wherein the user identity verification request identifier is used to indicate that the user identity needs to be verified when the first application is used;
第二确定模块8022,用于根据该第一应用对应的用户身份验证要求标识确定使用该第一应用时需要进行用户身份验证;The second determining module 8022 is configured to determine, according to the user identity verification request identifier corresponding to the first application, that user identity verification is required when the first application is used;
第三确定模块8023,用于若该DH确定存在该第一应用对应的用户身份验证成功标记,则根据该用户身份验证成功标记确定该用户身份验证操作通过;或者,The third determining module 8023 is configured to: if the DH determines that the user identity verification success flag corresponding to the first application exists, determine, according to the user identity verification success flag, that the user identity verification operation passes; or
第四确定模块8024,用于若该DH确定不存在该第一应用对应的用户身份验证成功标记,则通过该第一终端的身份验证模块接收并判断用户身份信息,以确定该用户身份验证操作是否通过。The fourth determining module 8024 is configured to: if the DH determines that the user identity verification success flag corresponding to the first application does not exist, receive, by the identity verification module of the first terminal, the user identity information to determine the user identity verification operation. Whether it passed.
可选的,在一种可能的实施方式中,第一发送单元803包括第一发送模块8031;其中,第一发送模块8031,用于向该NFCC发送包括第三路由项的第二消息,该第三路由项中包括该第一应用所在的NFCEE的标识。Optionally, in a possible implementation manner, the first sending unit 803 includes a first sending module 8031, where the first sending module 8031 is configured to send, to the NFCC, a second message including a third routing item, where The third routing entry includes an identifier of the NFCEE where the first application is located.
可选的,在一种可能的实施方式中,主机DH还包括:第二发送单元804、第三发送单元805、第四发送单元806、第五发送单元807、删除单元808或配置单元809中的一个或多个单元,其各单元的功能具体如下:Optionally, in a possible implementation manner, the host DH further includes: a second sending unit 804, a third sending unit 805, a fourth sending unit 806, a fifth sending unit 807, a deleting unit 808, or a configuration unit 809. One or more units, the functions of each unit are as follows:
第二发送单元804,用于向该NFCC发送包括用户身份验证要求标识的第一路由项;其中,该用户身份验证要求标识用于指示使用该第一应用时需要或不需要验证用户身份;a second sending unit 804, configured to send, to the NFCC, a first routing item that includes a user identity verification request identifier, where the user identity verification request identifier is used to indicate that the user identity is required or not required to use the first application;
第三发送单元805,用于如果该第一应用对应的用户身份验证要求标识指示使用该第一应用时需要验证用户身份,则向该NFCC发送第二路由项,该第二路由项包括该DH对应的近场通信执行环境DH-NFCEE的标识,该DH-NFCEE不是该第一应用所在的NFCEE;The third sending unit 805 is configured to: if the user identity verification request identifier corresponding to the first application indicates that the user identity needs to be verified when the first application is used, send a second routing item to the NFCC, where the second routing item includes the DH Corresponding near field communication execution environment DH-NFCEE identifier, the DH-NFCEE is not the NFCEE where the first application is located;
第四发送单元806,用于如果该DH确定不需要进行用户身份验证,则向该NFCC发送该第二消息,该第二消息为允许该NFCC对该数据帧进行数据处理的该第一命令;The fourth sending unit 806 is configured to: if the DH determines that user identity verification is not required, send the second message to the NFCC, where the second message is the first command that allows the NFCC to perform data processing on the data frame;
第五发送单元807,用于当该用户身份验证操作未通过时,向该NFCC发送第二消息或不发送任何消息,该第二消息为不允许该NFCC对该数据帧进行数据路由的第二命令;The fifth sending unit 807 is configured to send a second message to the NFCC or not send any message when the user identity verification operation fails, the second message is a second that does not allow the NFCC to perform data routing on the data frame. command;
删除单元808,用于在该DH在预设时间段内没有再次接收到该NFCC发送的该第一消息时,或者,在该DH根据该用户身份验证成功标记确定该用户身份验证操作通过之后,将该用户身份验证成功标记删除;The deleting unit 808 is configured to: when the DH does not receive the first message sent by the NFCC again within a preset time period, or after the DH determines, according to the user identity verification success flag, that the user identity verification operation is passed, Delete the user authentication success token;
配置单元809,用于当本次通信结束时,或者,当该DH在本次通信结束后的预设时间内没有再次收到该第二终端发送的用于选择该第一应用的数据帧时,向该NFCC重新配置 该第二路由项。The configuration unit 809 is configured to: when the communication ends, or when the DH does not receive the data frame sent by the second terminal for selecting the first application again within a preset time after the end of the communication Reconfigure to the NFCC The second routing entry.
可选的,在一种可能的实施方式中,该用户身份验证要求标识是该DH根据该第一应用的注册信息和/或用户指示确定的,其中,该第一应用的注册信息包括该第一应用的应用类型和/或用于表示对身份验证的要求参数。Optionally, in a possible implementation, the user identity verification request identifier is determined by the DH according to the registration information and/or the user indication of the first application, where the registration information of the first application includes the first The application type of an application and/or the required parameters for representing authentication.
可选的,在一种可能的实施方式中,该用户身份验证成功标记是该DH在通过该第一终端的身份验证模块确定该用户身份验证操作通过之后保存的。Optionally, in a possible implementation manner, the user identity verification success flag is that the DH is saved after the identity verification module of the first terminal determines that the user identity verification operation is passed.
上述实施例六对本申请实施例中的主句DH进行了详细说明,下面对本申请实施例中近场通信控制器NFCC进行说明。The sixth embodiment is described in detail in the main sentence DH in the embodiment of the present application. The near field communication controller NFCC in the embodiment of the present application is described below.
实施例七,请参阅图9,本申请实施例中近场通信控制器NFCC的一个实施例包括:Embodiment 7, with reference to FIG. 9, an embodiment of the near field communication controller NFCC in the embodiment of the present application includes:
第一接收单元901,用于接收第二终端发送的数据帧后找到匹配的第一路由项,其中该数据帧用于表示要选择该第一终端上的第一应用;The first receiving unit 901 is configured to: after receiving the data frame sent by the second terminal, find a matching first routing item, where the data frame is used to indicate that the first application on the first terminal is to be selected;
第一判断单元902,用于根据预设条件判断是否要向该DH发送第一消息,其中,该第一消息用于通知该DH该第二终端要选择该第一终端上的第一应用,和/或用于请求该DH执行用户身份验证操作;The first determining unit 902 is configured to determine, according to the preset condition, whether to send the first message to the DH, where the first message is used to notify the DH that the second terminal is to select the first application on the first terminal, And/or for requesting the DH to perform a user authentication operation;
第一发送单元903,用于如果是,则向该DH发送该第一消息;The first sending unit 903 is configured to: if yes, send the first message to the DH;
第一路由单元904,用于如果该NFCC接收到该DH发送的第二消息,则根据该第二消息对该数据帧进行路由处理。The first routing unit 904 is configured to: if the NFCC receives the second message sent by the DH, perform routing processing on the data frame according to the second message.
本实施例中,近场通信控制器NFCC根据不同卡应用对安全性和便捷性要求的不同,制定了统一的解决方案,对于需要进行用户身份验证的卡应用,说明对安全性要求高于便捷性要求;对与不需要进行用户身份验证的卡应用,说明便捷性要求高于安全性要求。In this embodiment, the near field communication controller NFCC formulates a unified solution according to different security and convenience requirements of different card applications. For the card application requiring user identity verification, the security requirement is higher than the convenience. Sexual requirements; for card applications that do not require user authentication, the convenience requirements are higher than the security requirements.
请参阅图10,本申请实施例中近场通信控制器NFCC的其他可能的实施例中还可以包括:Referring to FIG. 10, in other possible embodiments of the near field communication controller NFCC in the embodiment of the present application, the method may further include:
可选的,在一种可能的实施方式中,第一接收单元1001可以包括第一查询模块10011;其中,第一查询模块10011,用于在该NFCC接收该第二终端发送的该数据帧之后,根据路由选择方式找到与该第一应用相匹配的该第一路由项,其中,该路由选择方式包括基于应用标识AID的路由选择方式。Optionally, in a possible implementation, the first receiving unit 1001 may include a first query module 10011, where the first query module 10011 is configured to: after the NFCC receives the data frame sent by the second terminal, And determining, by the routing manner, the first routing item that matches the first application, where the routing manner includes a routing manner based on the application identifier AID.
可选的,在一种可能的实施方式中,第一判断单元1002可以包括:第一判断模块10021、第一确定模块10022、第二确定模块10023、第二判断模块10024或第三判断模块10025中的一个或多个模块;其中,各模块的功能具体如下:Optionally, in a possible implementation manner, the first determining unit 1002 may include: a first determining module 10021, a first determining module 10022, a second determining module 10023, a second determining module 10024, or a third determining module 10025. One or more modules in the module; wherein the functions of each module are as follows:
第一判断模块10021,用于根据该第一路由项中的该用户身份验证要求标识判断是否要向该DH发送该第一消息;The first determining module 10021 is configured to determine, according to the user identity verification request identifier in the first routing item, whether to send the first message to the DH.
第一确定模块10022,用于若该用户身份验证要求标识指示使用第一应用时需要验证用户身份,则确定要向该DH发送该第一消息;The first determining module 10022 is configured to: if the user identity verification request identifier indicates that the user identity needs to be verified when using the first application, determine that the first message is to be sent to the DH;
第二确定模块10023,用于若该用户身份验证要求标识指示使用第一应用时不需要验证用户身份,则确定不向该DH发送该第一消息;The second determining module 10023 is configured to: if the user identity verification request identifier indicates that the user identity is not required to be used when the first application is used, determine that the first message is not sent to the DH;
第二判断模块10024,用于根据该第一终端的当前能量状态判断是否需要向该DH发送该第一消息;或者, The second determining module 10024 is configured to determine, according to the current energy state of the first terminal, whether the first message needs to be sent to the DH; or
第三判断模块10025,用于根据该第一应用对应的用户身份验证成功标记存在与否判断是否需要向该DH发送该第一消息,该用户身份验证成功标记是该NFCC在接收到,该DH发送的表示用户身份验证操作通过的消息后保存的。The third determining module 10025 is configured to determine, according to the presence or absence of the user identity verification success flag corresponding to the first application, whether the first message needs to be sent to the DH, where the user identity verification success flag is that the NFCC is receiving, the DH The message sent after the message indicating the user authentication operation is saved.
可选的,在一种可能的实施方式中,第二判断模块10024可以包括第一确定子模块100241和第二确定子模块100242,其中,具体用于:Optionally, in a possible implementation manner, the second determining module 10024 can include a first determining submodule 100241 and a second determining submodule 100242, where
第一确定子模块100241,用于若该第一终端的当前能量状态不是无电和关机状态时,则确定需要向该DH发送该第一消息;The first determining sub-module 100241 is configured to determine that the first message needs to be sent to the DH if the current energy state of the first terminal is not the power-off state and the power-off state;
第二确定子模块100242,用于若该第一终端的当前能量状态是无电或关机状态时,则确定不需要向该DH发送该第一消息。The second determining sub-module 100242 is configured to determine that the first message does not need to be sent to the DH if the current energy state of the first terminal is an unpowered or powered-off state.
可选的,在一种可能的实施方式中,第三判断模块10025可以包括第三确定子模块100251和第四确定子模块100252;其中,具体用于:Optionally, in a possible implementation manner, the third determining module 10025 may include a third determining submodule 100251 and a fourth determining submodule 100252.
第三确定子模块100251,用于若存在该用户身份验证成功标记,则确定需要向该DH发送该第一消息;a third determining sub-module 100251, configured to: if the user identity verification success flag exists, determine that the first message needs to be sent to the DH;
第四确定子模块100252,用于若不存在该用户身份验证成功标记,则确定不需要向该DH发送该第一消息。The fourth determining submodule 100252 is configured to determine that the first message does not need to be sent to the DH if the user identity verification success flag does not exist.
可选的,在一种可能的实施方式中,第一发送单元1003可以包括第一发送模块10031,其中,第一发送模块10031,用于向该DH发送包括该数据帧的第一消息;Optionally, in a possible implementation, the first sending unit 1003 may include a first sending module 10031, where the first sending module 10031 is configured to send a first message including the data frame to the DH.
可选的,在一种可能的实施方式中,第一路由单元1005可以包括:第一路由模块10051、第二路由模块10052或第三路由模块10053中的一个或多个模块,各模块的功能具体如下:Optionally, in a possible implementation manner, the first routing unit 1005 may include: one or more modules in the first routing module 10051, the second routing module 10052, or the third routing module 10053, and functions of each module. details as follows:
第一路由模块10051,用于当该第二消息为该DH在用户身份验证操作通过后发送的,表示允许该NFCC进行数据路由的第一命令时,将该数据帧路由至该第一应用所在的NFCEE;或者,The first routing module 10051 is configured to: when the second message is sent by the DH after the user identity verification operation is passed, indicating that the NFCC is allowed to perform the first command of data routing, routing the data frame to the first application NFCEE; or,
第二路由模块10052,用于当该第二消息为该DH在用户身份验证操作未通过后发送的,表示不允许该NFCC进行数据路由的第二命令时,不路由该数据帧至该第一应用所在的NFCEE,或终止本次通信;The second routing module 10052 is configured to: when the second message is sent by the DH after the user identity verification operation fails, indicating that the NFCC is not allowed to perform the second command of data routing, the data frame is not routed to the first NFCEE where the application is located, or terminate this communication;
第三路由模块10053,用于当该第二消息为包括第二路由项的路由配置命令时,将该数据帧路由至该第一应用所在的NFCEE,该第二消息为该DH在用户身份验证操作通过之后或确定使用该第一应用时不需要验证用户身份之后发送的,该第二路由项包括该第一应用的标识和该第一应用所在的NFCEE的标识。The third routing module 10053 is configured to: when the second message is a routing configuration command including the second routing item, routing the data frame to the NFCEE where the first application is located, where the second message is the user authentication of the DH After the operation is passed or after determining that the first application is used, it is not required to verify the identity of the user. The second routing item includes the identifier of the first application and the identifier of the NFCEE where the first application is located.
可选的,在一种可能的实施方式中,近场通信控制器NFCC还包括第二路由单元1006和终止单元1007中一个或两个单元,两单元具体功能如下:Optionally, in a possible implementation manner, the near field communication controller NFCC further includes one or two units of the second routing unit 1006 and the terminating unit 1007. The specific functions of the two units are as follows:
第二路由单元1006,用于如果否,则对该数据帧进行路由处理;a second routing unit 1006, configured to perform routing processing on the data frame if not;
终止单元1007,用于如果该NFCC在预设时间段内未接收到该DH发送的任何消息,则终止本次通信。The terminating unit 1007 is configured to terminate the current communication if the NFCC does not receive any message sent by the DH within a preset time period.
可选的,在一种可能的实施方式中,第二路由单元1006可以包括第四路由模块10061,其中,第四路由模块10061,用于将该数据帧路由至该第一应用所在的NFCEE。Optionally, in a possible implementation manner, the second routing unit 1006 can include a fourth routing module 10061, where the fourth routing module 10061 is configured to route the data frame to the NFCEE where the first application is located.
可选的,在一种可能的实施方式中,近场通信控制器NFCC还包括第二接收单元1004, 其中,第二接收单元1004,用于接收该DH配置的该第一路由项,该第一路由项包括该第一应用的标识与该第一NFCEE标识,其中,该第一NFCEE标识为该第一应用所在的NFCEE的标识或该DH对应的近场通信执行环境DH-NFCEE的标识。Optionally, in a possible implementation manner, the near field communication controller NFCC further includes a second receiving unit 1004, The second receiving unit 1004 is configured to receive the first routing entry of the DH configuration, where the first routing entry includes an identifier of the first application and the first NFCEE identifier, where the first NFCEE identifier is the first The identifier of the NFCEE where the application is located or the identifier of the near field communication execution environment DH-NFCEE corresponding to the DH.
上述实施例分别对本申请实施例中主机DH和近场通信控制器NFCC的功能实体进行了详细说明,需要说明的是近场通信控制器NFCC和主机DH在硬件实现上类似,对于近场通信控制器NFCC可参照对主机DH的硬件方面的描述,对此此处不再赘述,下面从主机DH的硬件方面对本申请实施例中主机DH进行说明,具体如下:The above embodiments respectively describe the functional entities of the host DH and the near field communication controller NFCC in the embodiments of the present application. It should be noted that the near field communication controller NFCC and the host DH are similar in hardware implementation, and the near field communication control is performed. The NFCC can refer to the description of the hardware aspect of the host DH. For details, the host DH in the embodiment of the present application is described below.
实施例八,如图11中所示的主机DH11中的处理器可以通过调用存储器1103中存储的应用程序代码来执行上述实施例一至实施例五中策略实体的动作,对此本申请实施例例不做任何限制。In the eighth embodiment, the processor in the host DH11 as shown in FIG. 11 can perform the actions of the policy entity in the foregoing Embodiments 1 to 5 by calling the application code stored in the memory 1103. Do not make any restrictions.
如图11所示,为本申请实施例提供的一种主机DH11的硬件结构示意图,该包括至少一个处理器1101,通信总线1102,存储器1103以及至少一个通信单元1104。As shown in FIG. 11, a hardware structure diagram of a host DH11 according to an embodiment of the present application includes at least one processor 1101, a communication bus 1102, a memory 1103, and at least one communication unit 1104.
处理器1101可以是一个通用中央处理器(Central Processing Unit,CPU),微处理器,特定应用集成电路(Application-Specific Integrated Circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。The processor 1101 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more programs for controlling the execution of the program of the present application. integrated circuit.
需要说明的是,本发明具体实施方式中,处理器1101,在NFC设备的初始化阶段,可以通过NCI基于路由配置命令/响应(RF_SET_LISTEN_MODE_ROUTING_CMD/RSP)向NFCC配置侦听模式路由表,其中可包括基于AID的路由项(其中包括应用标识AID以及应用所在的NFCEE的标识NFCEE ID等)等,以使NFCC在接收到selectAID命令后能根据基于AID的路由项查找到匹配的路由目标NFCEE。此外,处理器1101还可以对应NFC设备的NFCEE,NFCEE可以通过某种协议(如HCI/SWP)与NFCC进行通信,以使NFCEE可以接收与处理NFCC转发的对端NFC设备(即第二终端)发送的数据帧。It should be noted that, in the specific implementation manner of the present invention, the processor 1101 may configure a listening mode routing table to the NFCC by using an NCI based routing configuration command/response (RF_SET_LISTEN_MODE_ROUTING_CMD/RSP) in an initialization phase of the NFC device, which may include The routing entry of the AID (including the application identifier AID and the NFCEE ID of the NFCEE where the application is located), etc., so that the NFCC can find the matching route target NFCEE according to the AID-based routing item after receiving the selectAID command. In addition, the processor 1101 can also correspond to the NFCEE of the NFC device, and the NFCEE can communicate with the NFCC through a protocol (such as HCI/SWP), so that the NFCEE can receive and process the peer NFC device forwarded by the NFCC (ie, the second terminal). The data frame sent.
通信总线1102可包括一通路,在上述组件之间传送信息。 Communication bus 1102 can include a path for communicating information between the components described above.
通信单元1104,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线接入网(Radio Access Network,RAN),无线局域网(Wireless Local Area Networks,WLAN)等。The communication unit 1104 uses a device such as any transceiver for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc. .
对于主机DH而言,本发明具体实施例中,通信单元1104还可以包括用于与NFCC进行通信的模块,如DH与NFCC之间的接口,该接口在上层可以支持NCI协议,在底层可以使用通用异步收发传输器(Universal Asynchronous Receiver/Transmitter,UART)、12C总线(Inter-Integrated Circuit)或半双工串行外设接口(Serial Peripheral Interface,SPI)等传输数据。DH可以通过通信单元1104向NFCC配置RF参数、路由表等,以使NFCC在RF发现过程中能与对端的NFC设备进行通信,接收NFCC发送的第一消息,以根据所述第一消息进行相应的用户身份验证处理,以及向NFCC发送第二消息以使NFCC根据所述第二消息进行相应的数据路由处理等。For the host DH, in the specific embodiment of the present invention, the communication unit 1104 may further include a module for communicating with the NFCC, such as an interface between the DH and the NFCC, the interface may support the NCI protocol at the upper layer, and may be used at the bottom layer. Universal Asynchronous Receiver/Transmitter (UART), 12C bus (Inter-Integrated Circuit) or half-duplex Serial Peripheral Interface (SPI) to transmit data. The DH can configure the RF parameters, the routing table, and the like to the NFCC through the communication unit 1104, so that the NFCC can communicate with the NFC device of the opposite end in the RF discovery process, and receive the first message sent by the NFCC to perform corresponding according to the first message. User authentication processing, and sending a second message to the NFCC for the NFCC to perform corresponding data routing processing or the like according to the second message.
存储器1103可以是只读存储器(Read-Only Memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(Random Access Memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically  Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The memory 1103 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions. Dynamic storage device, or electrically erasable programmable read only memory (Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.) A disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of an instruction or data structure and that can be accessed by a computer, but is not limited thereto. The memory can exist independently and be connected to the processor via a bus. The memory can also be integrated with the processor.
其中,存储器1103用于存储执行本申请方案的应用程序代码,并由处理器1101来控制执行。处理器1101用于执行存储器1103中存储的应用程序代码,从而实现上述实施例中的AR投影方法。The memory 1103 is configured to store application code for executing the solution of the present application, and is controlled by the processor 1101 to execute. The processor 1101 is configured to execute the application code stored in the memory 1103, thereby implementing the AR projection method in the above embodiment.
需要说明的是,本发明具体实施例中,存储单元可以存储DH-NFCEE或NFCEE(s)内安装的NFC应用程序、以及NFCC内的路由程序与路由表。It should be noted that, in a specific embodiment of the present invention, the storage unit may store an NFC application installed in the DH-NFCEE or NFCEE(s), and a routing program and a routing table in the NFCC.
在具体实现中,作为一种实施例,处理器1101可以包括一个或多个CPU,例如图11中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 1101 may include one or more CPUs, such as CPU0 and CPU1 in FIG.
在具体实现中,作为一种实施例,主机DH11可以包括多个处理器,例如图11中的处理器1101和处理器1108。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the host DH11 may include multiple processors, such as the processor 1101 and the processor 1108 in FIG. Each of these processors can be a single-CPU processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data, such as computer program instructions.
在具体实现中,作为一种实施例,主机DH11还可以包括输出设备1105和输入设备1106。输出设备1105和处理器1101通信,可以以多种方式来显示信息。例如,输出设备1105可以是液晶显示器(Liquid Crystal Display,LCD),发光二级管(Light Emitting Diode,LED)显示设备,阴极射线管(Cathode Ray Tube,CRT)显示设备,或投影仪(projector)等。输入设备1106和处理器1101通信,可以以多种方式接受用户的输入。例如,输入设备1106可以是鼠标、键盘、触摸屏设备或传感设备等。In a specific implementation, as an embodiment, the host DH11 may further include an output device 1105 and an input device 1106. The output device 1105 is in communication with the processor 1101 and can display information in a variety of ways. For example, the output device 1105 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. Wait. Input device 1106 is in communication with processor 1101 and can accept user input in a variety of ways. For example, input device 1106 can be a mouse, keyboard, touch screen device, or sensing device, and the like.
上述的主机DH11可以是一个通用终端或者是一个专用终端。在具体实现中,主机DH11可以是台式机、便携式电脑、网络服务器、掌上电脑(Personal Digital Assistant,PDA)、移动手机、平板电脑、无线终端设备、嵌入式设备或有图11中类似结构的设备。本申请实施例不限定主机DH11的类型。The host DH11 described above may be a general terminal or a dedicated terminal. In a specific implementation, the host DH11 may be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet, a wireless terminal device, an embedded device, or a device having a similar structure as in FIG. . The embodiment of the present application does not limit the type of the host DH11.
还需要说明的是,对于NFC控制器NFCC而言,本发明具体实施例中,通信单元1104还可以包括用于与DH进行通信的模块,如DH与NFCC之间的接口,该接口在上层可以支持NCI协议,在底层可以使用通用异步收发传输器(Universal Asynchronous Receiver/Transmitter,UART)、12C总线(Inter-Integrated Circuit)或半双工串行外设接口(Serial Peripheral Interface,SPI)等传输数据,NFCC可以通过通信单元1104接收DH配置的RF参数、路由表等,以在RF发现过程中能与对端的NFC设备进行通信,向DH发送第一消息,以使DH根据所述第一消息进行相应的用户身份验证处理,以及接收DH发送的第二消息以根据所述第二消息进行相应的数据路由处理的等;此外,还可以包括用于与对端的NFC设备(即第二终端)进行通信(即向第二终端发送数据以及从第二终端接收数据)的模块,如NFCC中的收发电路等,该收发电路中NFC天线的工作频率可以是13.56MHz,NFCC通过该NFC天线可以向第二终端发送数据,也可以从第二终端接收数据。 It should be noted that, for the NFC controller NFCC, in the specific embodiment of the present invention, the communication unit 1104 may further include a module for communicating with the DH, such as an interface between the DH and the NFCC, and the interface may be in the upper layer. Support NCI protocol, at the bottom layer can use Universal Asynchronous Receiver/Transmitter (UART), 12C bus (Inter-Integrated Circuit) or half-duplex Serial Peripheral Interface (SPI) to transmit data The NFCC can receive the RF parameters, the routing table, and the like of the DH configuration through the communication unit 1104, so as to be able to communicate with the NFC device of the opposite end in the RF discovery process, and send the first message to the DH, so that the DH performs the first message according to the first message. Corresponding user authentication processing, and receiving a second message sent by the DH to perform corresponding data routing processing according to the second message, and the like, and may further include performing, for performing, with the NFC device (ie, the second terminal) of the peer end a module for communication (ie, transmitting data to and receiving data from a second terminal), such as a transceiver circuit in the NFCC, and the NFC in the transceiver circuit Line operating frequency may be 13.56MHz, NFCC may transmit data to the second terminal through the NFC antenna may also receive data from the second terminal.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。 The above embodiments are only used to explain the technical solutions of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still The technical solutions described in the embodiments are modified, or the equivalents of the technical features are replaced by the equivalents. The modifications and substitutions of the embodiments do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (50)

  1. 一种数据处理方法,其特征在于,所述方法用于第一终端的主机DH,所述第一终端还包括近场通信控制器NFCC和至少一个近场通信执行环境NFCEE,所述方法包括:A data processing method, characterized in that the method is used for a host DH of a first terminal, the first terminal further comprising a near field communication controller NFCC and at least one near field communication execution environment NFCEE, the method comprising:
    所述DH接收所述NFCC发送的第一消息,所述第一消息用于通知所述DH第二终端要选择所述第一终端上的第一应用,和/或用于请求所述DH执行用户身份验证操作;Receiving, by the DH, a first message sent by the NFCC, where the first message is used to notify the DH that the second terminal is to select the first application on the first terminal, and/or to request the DH to be executed. User authentication operation;
    如果所述DH确定需要进行用户身份验证,则所述DH执行用户身份验证操作;If the DH determines that user authentication is required, the DH performs a user identity verification operation;
    当所述用户身份验证操作的结果为通过时,所述DH向所述NFCC发送第二消息,所述第二消息为允许所述NFCC对数据帧进行数据路由的第一命令,所述数据帧为由所述第二终端发送至所述NFCC的,表示要选择所述第一应用的消息。When the result of the user identity verification operation is a pass, the DH sends a second message to the NFCC, where the second message is a first command that allows the NFCC to perform data routing on a data frame, the data frame For the second terminal to send to the NFCC, indicating that the message of the first application is to be selected.
  2. 根据权利要求1所述的数据处理方法,其特征在于,在所述DH接收所述NFCC发送的第一消息之前,还包括:The data processing method according to claim 1, wherein before the DH receives the first message sent by the NFCC, the method further includes:
    所述DH向所述NFCC发送包括用户身份验证要求标识的第一路由项;其中,所述用户身份验证要求标识用于指示使用所述第一应用时需要或不需要验证用户身份。The DH sends a first routing entry including a user identity verification request identifier to the NFCC; wherein the user identity verification request identifier is used to indicate that the user identity is required or not required to be used when the first application is used.
  3. 据权利要求1所述的数据处理方法,其特征在于,当所述第一消息用于通知所述DH所述第二终端要选择所述第一应用时,所述DH确定需要进行用户身份验证包括:The data processing method according to claim 1, wherein when the first message is used to notify the DH that the second terminal is to select the first application, the DH determines that user identity verification is required. include:
    所述DH根据所述第一应用对应的用户身份验证要求标识确定需要进行用户身份验证;其中,所述用户身份验证要求标识用于指示使用所述第一应用时需要验证用户身份。And determining, by the DH, that the user identity verification is required according to the user identity verification request identifier corresponding to the first application, where the user identity verification request identifier is used to indicate that the user identity needs to be verified when the first application is used.
  4. 根据权利要求1所述的数据处理方法,其特征在于,在所述DH接收所述NFCC发送的第一消息之前,还包括:The data processing method according to claim 1, wherein before the DH receives the first message sent by the NFCC, the method further includes:
    如果所述第一应用对应的用户身份验证要求标识指示使用所述第一应用时需要验证用户身份,则所述DH向所述NFCC发送第二路由项,所述第二路由项包括所述DH对应的近场通信执行环境DH-NFCEE的标识,所述DH-NFCEE不是所述第一应用所在的NFCEE。And if the user identity verification request identifier corresponding to the first application indicates that the user identity needs to be verified when the first application is used, the DH sends a second routing item to the NFCC, where the second routing item includes the DH Corresponding near field communication execution environment DH-NFCEE, the DH-NFCEE is not the NFCEE where the first application is located.
  5. 根据权利要求4所述的数据处理方法,其特征在于,所述DH接收所述NFCC发送的第一消息,包括:The data processing method according to claim 4, wherein the receiving, by the DH, the first message sent by the NFCC comprises:
    所述DH接收所述NFCC发送的包含所述数据帧的第一消息,所述数据帧用于通知所述DH所述第二终端要选择所述第一应用;The DH receives a first message that is sent by the NFCC and includes the data frame, where the data frame is used to notify the DH that the second terminal is to select the first application;
    所述DH确定需要进行用户身份验证,包括:The DH determines that user authentication is required, including:
    所述DH根据所述第一应用对应的用户身份验证要求标识确定使用所述第一应用时需要进行用户身份验证;Determining, according to the user identity verification request identifier corresponding to the first application, that the DH needs to perform user identity verification when using the first application;
    所述DH向所述NFCC发送第二消息,包括:Sending, by the DH, the second message to the NFCC, including:
    所述DH向所述NFCC发送包括第三路由项的第二消息,所述第三路由项中包括所述第一应用所在的NFCEE的标识。The DH sends a second message including a third routing entry to the NFCC, where the third routing entry includes an identifier of the NFCEE where the first application is located.
  6. 根据权利要求4或5所述的数据处理方法,其特征在于,所述方法还包括:The data processing method according to claim 4 or 5, wherein the method further comprises:
    当本次通信结束时,或者,当所述DH在本次通信结束后的预设时间内没有再次收到所述第二终端发送的用于选择所述第一应用的数据帧时,所述DH向所述NFCC重新配置所述第二路由项。When the communication ends, or when the DH does not receive the data frame for selecting the first application sent by the second terminal again within a preset time after the end of the communication, the The DH reconfigures the second routing entry to the NFCC.
  7. 根据权利要求2至4中任一项所述的数据处理方法,其特征在于,所述用户身份验 证要求标识是所述DH根据所述第一应用的注册信息和/或用户指示确定的,其中,所述第一应用的注册信息包括所述第一应用的应用类型和/或用于表示对身份验证的要求参数。The data processing method according to any one of claims 2 to 4, wherein said user identity The certificate request identifier is determined by the DH according to the registration information and/or the user indication of the first application, where the registration information of the first application includes an application type of the first application and/or is used to indicate a pair Requirements parameters for authentication.
  8. 根据权利要求1至5中任一项所述的数据处理方法,其特征在于,所述DH执行用户身份验证操作,包括:The data processing method according to any one of claims 1 to 5, wherein the DH performs a user identity verification operation, including:
    若所述DH确定存在所述第一应用对应的用户身份验证成功标记,则所述DH根据所述用户身份验证成功标记确定所述用户身份验证操作通过;或者,If the DH determines that the user identity verification success flag corresponding to the first application exists, the DH determines, according to the user identity verification success flag, that the user identity verification operation passes; or
    若所述DH确定不存在所述第一应用对应的用户身份验证成功标记,则所述DH通过所述第一终端的身份验证模块接收并判断用户身份信息,以确定所述用户身份验证操作是否通过。If the DH determines that there is no user identity verification success flag corresponding to the first application, the DH receives and determines the user identity information by using the identity verification module of the first terminal to determine whether the user identity verification operation is by.
  9. 根据权利要求8所述的数据处理方法,其特征在于,所述用户身份验证成功标记是所述DH在通过所述第一终端的身份验证模块确定所述用户身份验证操作通过之后保存的。The data processing method according to claim 8, wherein said user identity verification success flag is that said DH is saved after said user identity verification operation is determined by said identity verification module of said first terminal.
  10. 根据权利要求8或9所述的数据处理方法,其特征在于,所述方法还包括:The data processing method according to claim 8 or 9, wherein the method further comprises:
    在所述DH在预设时间段内没有再次接收到所述NFCC发送的所述第一消息时,或者,在所述DH根据所述用户身份验证成功标记确定所述用户身份验证操作通过之后,所述DH将所述用户身份验证成功标记删除。And after the DH does not receive the first message sent by the NFCC again within a preset time period, or after the DH determines that the user identity verification operation is passed according to the user identity verification success flag, The DH deletes the user identity verification success flag.
  11. 根据权利要求1所述的数据处理方法,其特征在于,所述方法还包括:The data processing method according to claim 1, wherein the method further comprises:
    如果所述DH确定不需要进行用户身份验证,则所述DH向所述NFCC发送所述第二消息,所述第二消息为允许所述NFCC对所述数据帧进行数据处理的所述第一命令。If the DH determines that user authentication is not required, the DH sends the second message to the NFCC, and the second message is the first that allows the NFCC to perform data processing on the data frame. command.
  12. 根据权利要求1所述的数据处理方法,其特征在于,所述方法还包括:The data processing method according to claim 1, wherein the method further comprises:
    当所述用户身份验证操作未通过时,所述DH向所述NFCC发送第二消息或不发送任何消息,所述第二消息为不允许所述NFCC对所述数据帧进行数据路由的第二命令。When the user authentication operation fails, the DH sends a second message to the NFCC or does not send any message, and the second message is a second that does not allow the NFCC to perform data routing on the data frame. command.
  13. 一种数据处理方法,其特征在于,所述方法用于第一终端的近场通信控制器NFCC,所述第一终端还包括主机DH和至少一个近场通信执行环境NFCEE,所述方法包括:A data processing method, wherein the method is used for a near field communication controller NFCC of a first terminal, the first terminal further comprising a host DH and at least one near field communication execution environment NFCEE, the method comprising:
    所述NFCC接收第二终端发送的数据帧后找到匹配的第一路由项,其中所述数据帧用于表示要选择所述第一终端上的第一应用;Receiving, by the NFCC, the data frame sent by the second terminal, and finding a matching first routing item, where the data frame is used to indicate that the first application on the first terminal is to be selected;
    所述NFCC根据预设条件判断是否要向所述DH发送第一消息,其中,所述第一消息用于通知所述DH所述第二终端要选择所述第一终端上的第一应用,和/或用于请求所述DH执行用户身份验证操作;Determining, by the NFCC, whether to send a first message to the DH according to a preset condition, where the first message is used to notify the DH that the second terminal is to select a first application on the first terminal, And/or for requesting the DH to perform a user authentication operation;
    如果是,则所述NFCC向所述DH发送所述第一消息;If yes, the NFCC sends the first message to the DH;
    如果所述NFCC接收到所述DH发送的第二消息,则所述NFCC根据所述第二消息对所述数据帧进行路由处理。If the NFCC receives the second message sent by the DH, the NFCC performs routing processing on the data frame according to the second message.
  14. 根据权利要求13所述的数据处理方法,其特征在于,所述方法还包括:The data processing method according to claim 13, wherein the method further comprises:
    如果否,则所述NFCC对所述数据帧进行路由处理。If no, the NFCC routes the data frame.
  15. 根据权利要求13或14所述的数据处理方法,其特征在于,在所述NFCC接收第二终端发送的数据帧后找到匹配的第一路由项之前,还包括:The data processing method according to claim 13 or 14, wherein before the NFCC finds the matching first routing item after receiving the data frame sent by the second terminal, the method further includes:
    所述NFCC接收所述DH配置的所述第一路由项,所述第一路由项包括所述第一应用的标识与所述第一NFCEE标识,其中,所述第一NFCEE标识为所述第一应用所在的NFCEE 的标识或所述DH对应的近场通信执行环境DH-NFCEE的标识。Receiving, by the NFCC, the first routing item of the DH configuration, where the first routing item includes an identifier of the first application and the first NFCEE identifier, where the first NFCEE identifier is the first NFCEE where an application is located The identifier of the near field communication execution environment DH-NFCEE corresponding to the DH.
  16. 根据权利要求15所述的数据处理方法,其特征在于,当所述第一NFCEE标识为所述第一应用所在的NFCEE的标识时,所述第一路由项还包括所述用户身份验证要求标识;The data processing method according to claim 15, wherein when the first NFCEE identifier is an identifier of the NFCEE in which the first application is located, the first routing entry further includes the user identity verification request identifier ;
    所述NFCC根据预设条件判断是否要向所述DH发送第一消息,包括:Determining, by the NFCC, whether to send the first message to the DH according to a preset condition, including:
    所述NFCC根据所述第一路由项中的所述用户身份验证要求标识判断是否要向所述DH发送所述第一消息;Determining, by the NFCC, whether the first message is to be sent to the DH according to the user identity verification request identifier in the first routing item;
    若所述用户身份验证要求标识指示使用第一应用时需要验证用户身份,则所述NFCC确定要向所述DH发送所述第一消息;If the user identity verification request indication indicates that the user identity needs to be verified when using the first application, the NFCC determines to send the first message to the DH;
    若所述用户身份验证要求标识指示使用第一应用时不需要验证用户身份,则所述NFCC确定不向所述DH发送所述第一消息。If the user identity verification request indication indicates that the user identity does not need to be authenticated when using the first application, the NFCC determines not to send the first message to the DH.
  17. 根据权利要求13或14所述的数据处理方法,其特征在于,所述NFCC根据预设条件判断是否要向所述DH发送第一消息,包括:The data processing method according to claim 13 or 14, wherein the NFCC determines whether to send the first message to the DH according to a preset condition, including:
    所述NFCC根据所述第一终端的当前能量状态判断是否需要向所述DH发送所述第一消息;Determining, by the NFCC, whether the first message needs to be sent to the DH according to a current energy state of the first terminal;
    或者,or,
    所述NFCC根据所述第一应用对应的用户身份验证成功标记存在与否判断是否需要向所述DH发送所述第一消息,所述用户身份验证成功标记是所述NFCC在接收到,所述DH发送的表示用户身份验证操作通过的消息后保存的。Determining, by the NFCC, whether the first message is required to be sent to the DH according to the presence or absence of the user identity verification success flag corresponding to the first application, where the user identity verification success flag is that the NFCC is receiving, The message sent by the DH indicating that the user authentication operation passed is saved.
  18. 根据权利要求17所述的数据处理方法,其特征在于,所述NFCC根据所述第一终端的当前能量状态判断是否需要向所述DH发送所述第一消息,包括:The data processing method according to claim 17, wherein the NFCC determines whether the first message needs to be sent to the DH according to the current energy state of the first terminal, including:
    若所述第一终端的当前能量状态不是无电和关机状态时,则所述NFCC确定需要向所述DH发送所述第一消息;If the current energy state of the first terminal is not the powerless state and the power-off state, the NFCC determines that the first message needs to be sent to the DH;
    若所述第一终端的当前能量状态是无电或关机状态时,则所述NFCC确定不需要向所述DH发送所述第一消息。If the current energy state of the first terminal is an unpowered or powered off state, the NFCC determines that the first message does not need to be sent to the DH.
  19. 根据权利要求17所述的数据处理方法,其特征在于,所述NFCC根据所述第一应用对应的用户身份验证成功标记存在与否判断是否需要向所述DH发送所述第一消息,包括:The data processing method according to claim 17, wherein the NFCC determines whether the first message needs to be sent to the DH according to the presence or absence of the user identity verification success flag corresponding to the first application, including:
    若存在所述用户身份验证成功标记,则所述NFCC确定需要向所述DH发送所述第一消息;If the user identity verification success flag exists, the NFCC determines that the first message needs to be sent to the DH;
    若不存在所述用户身份验证成功标记,则所述NFCC确定不需要向所述DH发送所述第一消息。If the user authentication success flag does not exist, the NFCC determines that the first message does not need to be sent to the DH.
  20. 根据权利要求13或15所述的数据处理方法,其特征在于,所述NFCC根据所述第二消息对所述数据帧进行路由处理,包括:The data processing method according to claim 13 or 15, wherein the NFCC performs routing processing on the data frame according to the second message, including:
    当所述第二消息为所述DH在用户身份验证操作通过后发送的,表示允许所述NFCC进行数据路由的第一命令时,所述NFCC将所述数据帧路由至所述第一应用所在的NFCEE;When the second message is sent by the DH after the user identity verification operation is passed, indicating that the NFCC is allowed to perform the first command of data routing, the NFCC routes the data frame to the first application. NFCEE;
    或者, Or,
    当所述第二消息为所述DH在用户身份验证操作未通过后发送的,表示不允许所述NFCC进行数据路由的第二命令时,所述NFCC不路由所述数据帧至所述第一应用所在的NFCEE,或终止本次通信。When the second message is sent by the DH after the user identity verification operation fails, indicating that the NFCC is not allowed to perform the second command of data routing, the NFCC does not route the data frame to the first NFCEE where the application is located, or terminate this communication.
  21. 根据权利要求15所述的数据处理方法,其特征在于,当所述第一路由项中的所述第一NFCEE标识为所述DH-NFCEE的标识时,The data processing method according to claim 15, wherein when the first NFCEE identifier in the first routing item is the identifier of the DH-NFCEE,
    所述NFCC向所述DH发送所述第一消息,包括:Sending, by the NFCC, the first message to the DH, including:
    所述NFCC向所述DH发送包括所述数据帧的第一消息;Sending, by the NFCC, a first message including the data frame to the DH;
    所述NFCC根据所述第二消息对所述数据帧进行路由处理,包括:The NFCC performs routing processing on the data frame according to the second message, including:
    当所述第二消息为包括第二路由项的路由配置命令时,所述NFCC将所述数据帧路由至所述第一应用所在的NFCEE,所述第二消息为所述DH在用户身份验证操作通过之后或确定使用所述第一应用时不需要验证用户身份之后发送的,所述第二路由项包括所述第一应用的标识和所述第一应用所在的NFCEE的标识。When the second message is a route configuration command including a second routing item, the NFCC routes the data frame to an NFCEE where the first application is located, and the second message is that the DH is authenticated by a user. After the operation is passed or after determining that the first application is used, it is not required to verify the identity of the user, and the second routing item includes the identifier of the first application and the identifier of the NFCEE where the first application is located.
  22. 根据权利要求14所述的数据处理方法,其特征在于,所述NFCC对所述数据帧进行路由处理,包括:The data processing method according to claim 14, wherein the NFCC performs routing processing on the data frame, including:
    所述NFCC将所述数据帧路由至所述第一应用所在的NFCEE。The NFCC routes the data frame to an NFCEE where the first application is located.
  23. 根据权利要求13所述的数据处理方法,其特征在于,所述方法还包括:The data processing method according to claim 13, wherein the method further comprises:
    如果所述NFCC在预设时间段内未接收到所述DH发送的任何消息,则所述NFCC终止本次通信。If the NFCC does not receive any message sent by the DH within a preset time period, the NFCC terminates the current communication.
  24. 根据权利要求13至15中任一项所述的数据处理方法,其特征在于,所述NFCC接收第二终端发送的数据帧后找到匹配的第一路由项,包括:The data processing method according to any one of claims 13 to 15, wherein the NFCC, after receiving the data frame sent by the second terminal, finds a matching first routing item, including:
    在所述NFCC接收所述第二终端发送的所述数据帧之后,所述NFCC根据路由选择方式找到与所述第一应用相匹配的所述第一路由项,其中,所述路由选择方式包括基于应用标识AID的路由选择方式。After the NFCC receives the data frame sent by the second terminal, the NFCC finds the first routing item that matches the first application according to a routing manner, where the routing manner includes A routing method based on the application identification AID.
  25. 一种主机DH,其特征在于,所述DH包括:A host DH, wherein the DH comprises:
    第一接收单元,用于接收所述NFCC发送的第一消息,所述第一消息用于通知所述DH第二终端要选择所述第一终端上的第一应用,和/或用于请求所述DH执行用户身份验证操作;a first receiving unit, configured to receive a first message sent by the NFCC, where the first message is used to notify the DH that the second terminal is to select the first application on the first terminal, and/or for requesting The DH performs a user identity verification operation;
    验证单元,用于如果所述DH确定需要进行用户身份验证,则执行用户身份验证操作;a verification unit, configured to perform a user identity verification operation if the DH determines that user identity verification is required;
    第一发送单元,用于当所述用户身份验证操作的结果为通过时,向所述NFCC发送第二消息,所述第二消息为允许所述NFCC对数据帧进行数据路由的第一命令,所述数据帧为由所述第二终端发送至所述NFCC的,表示要选择所述第一应用的消息。a first sending unit, configured to send a second message to the NFCC when the result of the user identity verification operation is a pass, where the second message is a first command that allows the NFCC to perform data routing on the data frame, The data frame is sent by the second terminal to the NFCC, indicating that the message of the first application is to be selected.
  26. 根据权利要求25所述的DH,其特征在于,所述DH还包括:The DH of claim 25, wherein the DH further comprises:
    第二发送单元,用于向所述NFCC发送包括用户身份验证要求标识的第一路由项;其中,所述用户身份验证要求标识用于指示使用所述第一应用时需要或不需要验证用户身份。a second sending unit, configured to send, to the NFCC, a first routing item that includes a user identity verification request identifier, where the user identity verification request identifier is used to indicate whether the user identity is required or not required to use the first application .
  27. 根据权利要求25所述的DH,其特征在于,当所述第一消息用于通知所述DH所述第二终端要选择所述第一应用时,所述验证单元包括:The DH according to claim 25, wherein when the first message is used to notify the DH that the second terminal is to select the first application, the verification unit comprises:
    第一确定模块,用于根据所述第一应用对应的用户身份验证要求标识确定需要进行用 户身份验证;其中,所述用户身份验证要求标识用于指示使用所述第一应用时需要验证用户身份。a first determining module, configured to determine, according to the user identity verification request identifier corresponding to the first application, that the user needs to use User identity verification; wherein the user identity verification request is used to indicate that the identity of the user needs to be verified when using the first application.
  28. 根据权利要求25所述的DH,其特征在于,所述DH还包括:The DH of claim 25, wherein the DH further comprises:
    第三发送单元,用于如果所述第一应用对应的用户身份验证要求标识指示使用所述第一应用时需要验证用户身份,则向所述NFCC发送第二路由项,所述第二路由项包括所述DH对应的近场通信执行环境DH-NFCEE的标识,所述DH-NFCEE不是所述第一应用所在的NFCEE。a third sending unit, configured to send a second routing item, the second routing item, to the NFCC, if the user identity verification request identifier corresponding to the first application indicates that the user identity needs to be verified when the first application is used The identifier of the near field communication execution environment DH-NFCEE corresponding to the DH is included, and the DH-NFCEE is not the NFCEE where the first application is located.
  29. 根据权利要求28所述的DH,其特征在于,所述第一接收单元包括:The DH according to claim 28, wherein the first receiving unit comprises:
    第一接收模块,用于接收所述NFCC发送的包含所述数据帧的第一消息,所述数据帧用于通知所述DH所述第二终端要选择所述第一应用;a first receiving module, configured to receive, by the NFCC, a first message that includes the data frame, where the data frame is used to notify the DH that the second terminal selects the first application;
    所述验证单元,包括:The verification unit includes:
    第二确定模块,用于根据所述第一应用对应的用户身份验证要求标识确定使用所述第一应用时需要进行用户身份验证;a second determining module, configured to determine, according to the user identity verification request identifier corresponding to the first application, that user identity verification is required when using the first application;
    第一发送单元,包括:The first sending unit includes:
    第一发送模块,用于向所述NFCC发送包括第三路由项的第二消息,所述第三路由项中包括所述第一应用所在的NFCEE的标识。And a first sending module, configured to send, to the NFCC, a second message that includes a third routing item, where the third routing item includes an identifier of the NFCEE where the first application is located.
  30. 根据权利要求28或29所述的DH,其特征在于,所述DH还包括:The DH according to claim 28 or 29, wherein the DH further comprises:
    配置单元,用于当本次通信结束时,或者,当所述DH在本次通信结束后的预设时间内没有再次收到所述第二终端发送的用于选择所述第一应用的数据帧时,向所述NFCC重新配置所述第二路由项。a configuration unit, configured to: when the communication ends, or when the DH does not receive the data sent by the second terminal for selecting the first application again within a preset time after the end of the communication At the time of the frame, the second routing entry is reconfigured to the NFCC.
  31. 根据权利要求26至28中任一项所述的DH,其特征在于,所述用户身份验证要求标识是所述DH根据所述第一应用的注册信息和/或用户指示确定的,其中,所述第一应用的注册信息包括所述第一应用的应用类型和/或用于表示对身份验证的要求参数。The DH according to any one of claims 26 to 28, wherein the user identity verification request identifier is determined by the DH according to registration information and/or user indication of the first application, wherein The registration information of the first application includes an application type of the first application and/or a requirement parameter for indicating identity verification.
  32. 根据权利要求25至29中任一项所述的DH,其特征在于,所述验证单元包括:The DH according to any one of claims 25 to 29, wherein the verification unit comprises:
    第三确定模块,用于若所述DH确定存在所述第一应用对应的用户身份验证成功标记,则根据所述用户身份验证成功标记确定所述用户身份验证操作通过;或者,a third determining module, configured to determine, according to the user identity verification success flag, that the user identity verification operation passes if the DH determines that the user identity verification success flag corresponding to the first application exists; or
    第四确定模块,用于若所述DH确定不存在所述第一应用对应的用户身份验证成功标记,则通过所述第一终端的身份验证模块接收并判断用户身份信息,以确定所述用户身份验证操作是否通过。a fourth determining module, configured to: if the DH determines that the user identity verification success flag corresponding to the first application does not exist, receive and determine user identity information by using the identity verification module of the first terminal to determine the user Whether the authentication operation passed.
  33. 根据权利要求32所述的DH,其特征在于,所述用户身份验证成功标记是所述DH在通过所述第一终端的身份验证模块确定所述用户身份验证操作通过之后保存的。The DH of claim 32, wherein the user identity verification success flag is that the DH is saved after the user identity verification operation is determined by the identity verification module of the first terminal.
  34. 根据权利要求32或33所述的DH,其特征在于,所述DH还包括:The DH according to claim 32 or 33, wherein the DH further comprises:
    删除单元,用于在所述DH在预设时间段内没有再次接收到所述NFCC发送的所述第一消息时,或者,在所述DH根据所述用户身份验证成功标记确定所述用户身份验证操作通过之后,将所述用户身份验证成功标记删除。a deleting unit, configured to determine, when the DH does not receive the first message sent by the NFCC again within a preset time period, or determine, according to the user identity verification success flag, the user identity After the verification operation is passed, the user authentication success flag is deleted.
  35. 根据权利要求25所述的DH,其特征在于,所述DH还包括:The DH of claim 25, wherein the DH further comprises:
    第四发送单元,用于如果所述DH确定不需要进行用户身份验证,则向所述NFCC发 送所述第二消息,所述第二消息为允许所述NFCC对所述数据帧进行数据处理的所述第一命令。a fourth sending unit, configured to send to the NFCC if the DH determines that user identity verification is not required Sending the second message, the second message is the first command that allows the NFCC to perform data processing on the data frame.
  36. 根据权利要求25所述的第一终端,其特征在于,所述DH还包括:The first terminal according to claim 25, wherein the DH further comprises:
    第五发送单元,用于当所述用户身份验证操作未通过时,向所述NFCC发送第二消息或不发送任何消息,所述第二消息为不允许所述NFCC对所述数据帧进行数据路由的第二命令。a fifth sending unit, configured to send a second message to the NFCC or not send any message when the user identity verification operation fails, the second message is not allowing the NFCC to perform data on the data frame The second command of the route.
  37. 一种近场通信控制器NFCC,其特征在于,所述NFCC包括:A near field communication controller NFCC, characterized in that the NFCC comprises:
    第一接收单元,用于接收第二终端发送的数据帧后找到匹配的第一路由项,其中所述数据帧用于表示要选择所述第一终端上的第一应用;a first receiving unit, configured to receive a data frame sent by the second terminal, and find a matching first routing item, where the data frame is used to indicate that the first application on the first terminal is to be selected;
    第一判断单元,用于根据预设条件判断是否要向所述DH发送第一消息,其中,所述第一消息用于通知所述DH所述第二终端要选择所述第一终端上的第一应用,和/或用于请求所述DH执行用户身份验证操作;a first determining unit, configured to determine, according to a preset condition, whether to send a first message to the DH, where the first message is used to notify the DH that the second terminal is to select the first terminal a first application, and/or for requesting the DH to perform a user authentication operation;
    第一发送单元,用于如果是,则向所述DH发送所述第一消息;a first sending unit, configured to: if yes, send the first message to the DH;
    第一路由单元,用于如果所述NFCC接收到所述DH发送的第二消息,则根据所述第二消息对所述数据帧进行路由处理。a first routing unit, configured to perform routing processing on the data frame according to the second message if the NFCC receives the second message sent by the DH.
  38. 根据权利要求37所述的NFCC,其特征在于,所述NFCC还包括:The NFCC according to claim 37, wherein the NFCC further comprises:
    第二路由单元,用于如果否,则对所述数据帧进行路由处理。The second routing unit is configured to perform routing processing on the data frame if no.
  39. 根据权利要求37或38所述的NFCC,其特征在于,所述NFCC还包括:The NFCC according to claim 37 or claim 38, wherein the NFCC further comprises:
    第二接收单元,用于接收所述DH配置的所述第一路由项,所述第一路由项包括所述第一应用的标识与所述第一NFCEE标识,其中,所述第一NFCEE标识为所述第一应用所在的NFCEE的标识或所述DH对应的近场通信执行环境DH-NFCEE的标识。a second receiving unit, configured to receive the first routing item of the DH configuration, where the first routing item includes an identifier of the first application and the first NFCEE identifier, where the first NFCEE identifier The identifier of the environment DH-NFCEE is performed for the identifier of the NFCEE in which the first application is located or the near field communication corresponding to the DH.
  40. 根据权利要求39所述的NFCC,其特征在于,当所述第一NFCEE标识为所述第一应用所在的NFCEE的标识时,所述第一路由项还包括所述用户身份验证要求标识;所述第一判断单元包括:The NFCC according to claim 39, wherein when the first NFCEE identifier is an identifier of the NFCEE in which the first application is located, the first routing entry further includes the user identity verification request identifier; The first determining unit includes:
    第一判断模块,用于根据所述第一路由项中的所述用户身份验证要求标识判断是否要向所述DH发送所述第一消息;a first determining module, configured to determine, according to the user identity verification request identifier in the first routing item, whether to send the first message to the DH;
    第一确定模块,用于若所述用户身份验证要求标识指示使用第一应用时需要验证用户身份,则确定要向所述DH发送所述第一消息;a first determining module, if the user identity verification request identifier indicates that the user identity needs to be verified when using the first application, determining to send the first message to the DH;
    第二确定模块,用于若所述用户身份验证要求标识指示使用第一应用时不需要验证用户身份,则确定不向所述DH发送所述第一消息。The second determining module is configured to determine not to send the first message to the DH if the user identity verification request identifier indicates that the user identity is not required to be used when the first application is used.
  41. 根据权利要求37或38所述的NFCC,其特征在于,所述第一判断单元包括:The NFCC according to claim 37 or 38, wherein the first determining unit comprises:
    第二判断模块,用于根据所述第一终端的当前能量状态判断是否需要向所述DH发送所述第一消息;a second determining module, configured to determine, according to a current energy state of the first terminal, whether the first message needs to be sent to the DH;
    或者,or,
    第三判断模块,用于根据所述第一应用对应的用户身份验证成功标记存在与否判断是否需要向所述DH发送所述第一消息,所述用户身份验证成功标记是所述NFCC在接收到,所述DH发送的表示用户身份验证操作通过的消息后保存的。 a third determining module, configured to determine, according to the presence or absence of the user identity verification success flag corresponding to the first application, whether the first message needs to be sent to the DH, where the user identity verification success flag is that the NFCC is receiving The message sent by the DH indicating that the user authentication operation passes is saved.
  42. 根据权利要求41所述的NFCC,其特征在于,所述第二判断模块包括:The NFCC according to claim 41, wherein the second determining module comprises:
    第一确定子模块,用于若所述第一终端的当前能量状态不是无电和关机状态时,则确定需要向所述DH发送所述第一消息;a first determining submodule, configured to: if the current energy state of the first terminal is not in an unpowered or powered off state, determine that the first message needs to be sent to the DH;
    第二确定子模块,用于若所述第一终端的当前能量状态是无电或关机状态时,则确定不需要向所述DH发送所述第一消息。The second determining submodule is configured to determine that the first message does not need to be sent to the DH if the current energy state of the first terminal is an unpowered or powered off state.
  43. 根据权利要求41所述的NFCC,其特征在于,所述第三判断模块包括:The NFCC according to claim 41, wherein the third determining module comprises:
    第三确定子模块,用于若存在所述用户身份验证成功标记,则确定需要向所述DH发送所述第一消息;a third determining submodule, configured to: if the user identity verification success flag exists, determine that the first message needs to be sent to the DH;
    第四确定子模块,用于若不存在所述用户身份验证成功标记,则确定不需要向所述DH发送所述第一消息。And a fourth determining submodule, configured to determine that the first message does not need to be sent to the DH if the user identity verification success flag does not exist.
  44. 根据权利要求37或39所述的NFCC,其特征在于,所述第一路由单元包括:The NFCC according to claim 37 or 39, wherein the first routing unit comprises:
    第一路由模块,用于当所述第二消息为所述DH在用户身份验证操作通过后发送的,表示允许所述NFCC进行数据路由的第一命令时,将所述数据帧路由至所述第一应用所在的NFCEE;a first routing module, configured to: when the second message is sent by the DH after the user identity verification operation is passed, indicating that the NFCC is allowed to perform a first command of data routing, routing the data frame to the The NFCEE where the first application is located;
    或者,or,
    第二路由模块,用于当所述第二消息为所述DH在用户身份验证操作未通过后发送的,表示不允许所述NFCC进行数据路由的第二命令时,不路由所述数据帧至所述第一应用所在的NFCEE,或终止本次通信。a second routing module, configured to: when the second message is sent by the DH after the user identity verification operation fails, indicating that the NFCC is not allowed to perform the second command of data routing, the data frame is not routed to The NFCEE where the first application is located, or terminates the communication.
  45. 根据权利要求39所述的NFCC,其特征在于,当所述第一路由项中的所述第一NFCEE标识为所述DH-NFCEE的标识时,所述第一发送单元包括:The NFCC according to claim 39, wherein when the first NFCEE identifier in the first routing item is the identifier of the DH-NFCEE, the first sending unit includes:
    第一发送模块,用于向所述DH发送包括所述数据帧的第一消息;a first sending module, configured to send, to the DH, a first message that includes the data frame;
    所述第一路由单元,包括:The first routing unit includes:
    第三路由模块,用于当所述第二消息为包括第二路由项的路由配置命令时,将所述数据帧路由至所述第一应用所在的NFCEE,所述第二消息为所述DH在用户身份验证操作通过之后或确定使用所述第一应用时不需要验证用户身份之后发送的,所述第二路由项包括所述第一应用的标识和所述第一应用所在的NFCEE的标识。a third routing module, configured to: when the second message is a routing configuration command including a second routing item, routing the data frame to an NFCEE where the first application is located, where the second message is the DH After the user authentication operation is passed or after determining that the first application is used, the second routing item includes an identifier of the first application and an identifier of the NFCEE where the first application is located. .
  46. 根据权利要求38所述的NFCC,其特征在于,所述第二路由单元包括:The NFCC according to claim 38, wherein the second routing unit comprises:
    第四路由模块,用于将所述数据帧路由至所述第一应用所在的NFCEE。And a fourth routing module, configured to route the data frame to the NFCEE where the first application is located.
  47. 根据权利要求37所述的NFCC,其特征在于,所述NFCC还包括:The NFCC according to claim 37, wherein the NFCC further comprises:
    终止单元,用于如果所述NFCC在预设时间段内未接收到所述DH发送的任何消息,则终止本次通信。And a terminating unit, configured to terminate the current communication if the NFCC does not receive any message sent by the DH within a preset time period.
  48. 根据权利要求37至39中任一项所述的NFCC,其特征在于,所述第一接收单元包括:The NFCC according to any one of claims 37 to 39, wherein the first receiving unit comprises:
    第一查询模块,用于在所述NFCC接收所述第二终端发送的所述数据帧之后,根据路由选择方式找到与所述第一应用相匹配的所述第一路由项,其中,所述路由选择方式包括基于应用标识AID的路由选择方式。a first query module, configured to: after the NFCC receives the data frame sent by the second terminal, find the first routing item that matches the first application according to a routing manner, where The routing method includes a routing method based on the application identifier AID.
  49. 一种主机DH,其特征在于,所述DH包括: A host DH, wherein the DH comprises:
    输入设备、输出设备、处理器和存储设备;Input devices, output devices, processors, and storage devices;
    所述存储设备用于存储操作指令;The storage device is configured to store an operation instruction;
    所述处理器通过调用所述操作指令,执行权利要求1至12中的步骤。The processor executes the steps of claims 1 to 12 by invoking the operational instructions.
  50. 一种近场通信控制器NFCC,其特征在于,所述NFCC包括:A near field communication controller NFCC, characterized in that the NFCC comprises:
    输入设备、输出设备、处理器和存储设备;Input devices, output devices, processors, and storage devices;
    所述存储设备用于存储操作指令;The storage device is configured to store an operation instruction;
    所述处理器通过调用所述操作指令,执行权利要求13至24中的步骤。 The processor executes the steps of claims 13 to 24 by invoking the operational instructions.
PCT/CN2017/075786 2017-03-06 2017-03-06 Data processing method and related device WO2018161224A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/075786 WO2018161224A1 (en) 2017-03-06 2017-03-06 Data processing method and related device
CN201780026377.6A CN109076428B (en) 2017-03-06 2017-03-06 Data processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/075786 WO2018161224A1 (en) 2017-03-06 2017-03-06 Data processing method and related device

Publications (1)

Publication Number Publication Date
WO2018161224A1 true WO2018161224A1 (en) 2018-09-13

Family

ID=63447153

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/075786 WO2018161224A1 (en) 2017-03-06 2017-03-06 Data processing method and related device

Country Status (2)

Country Link
CN (1) CN109076428B (en)
WO (1) WO2018161224A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111383011B (en) * 2018-12-29 2023-09-29 华为技术有限公司 Method for processing relay attack and safety unit
CN112929921B (en) * 2019-12-05 2023-01-13 维沃移动通信有限公司 Beam failure recovery method, terminal and network side equipment
CN114386960A (en) * 2020-10-19 2022-04-22 中国移动通信有限公司研究院 NFC-based transaction method, device, user identification device and terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130217323A1 (en) * 2012-02-13 2013-08-22 Qualcomm Incorporated Methods and apparatus for secure updates to persistent data in a near field communication controller
CN103503323A (en) * 2013-03-05 2014-01-08 华为终端有限公司 Radio frequency communication method, device, and terminal equipment for near field communication
CN103828408A (en) * 2011-09-23 2014-05-28 高通股份有限公司 Methods and apparatus for improving a NFCEE discovery process
CN105574723A (en) * 2015-12-14 2016-05-11 联想(北京)有限公司 Information security processing method and security processing apparatus
CN105608572A (en) * 2015-07-27 2016-05-25 宇龙计算机通信科技(深圳)有限公司 NFC-based payment method, NFC-based payment system and terminal
CN105868983A (en) * 2016-04-26 2016-08-17 北京小米移动软件有限公司 Information output control method and device and intelligent terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102100121B (en) * 2008-07-20 2016-08-03 三星电子株式会社 The method and system of multiple application is managed in short-range communication
KR102081760B1 (en) * 2014-09-30 2020-02-26 후아웨이 테크놀러지 컴퍼니 리미티드 Routing method, near field communication controller, device host, and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103828408A (en) * 2011-09-23 2014-05-28 高通股份有限公司 Methods and apparatus for improving a NFCEE discovery process
US20130217323A1 (en) * 2012-02-13 2013-08-22 Qualcomm Incorporated Methods and apparatus for secure updates to persistent data in a near field communication controller
CN103503323A (en) * 2013-03-05 2014-01-08 华为终端有限公司 Radio frequency communication method, device, and terminal equipment for near field communication
CN105608572A (en) * 2015-07-27 2016-05-25 宇龙计算机通信科技(深圳)有限公司 NFC-based payment method, NFC-based payment system and terminal
CN105574723A (en) * 2015-12-14 2016-05-11 联想(北京)有限公司 Information security processing method and security processing apparatus
CN105868983A (en) * 2016-04-26 2016-08-17 北京小米移动软件有限公司 Information output control method and device and intelligent terminal

Also Published As

Publication number Publication date
CN109076428B (en) 2021-06-29
CN109076428A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
US12022290B2 (en) Secure elements broker (SEB) for application communication channel selector optimization
CN109844789B (en) Terminal transaction method and terminal
EP3633571B1 (en) Nfc payment method and terminal
US20210287204A1 (en) Near Field Communication NFC-Based Transaction Method and Device
JP6305559B2 (en) Secure element management method and terminal
CN103548395B (en) Method and device for battery with safety element
RU2481617C2 (en) Method and device of automatic selection of application of communication of near radius of coverage in electronic device
WO2019206201A1 (en) Method for transmitting configuration file, related device and storage medium
KR20100075497A (en) Wirelessly executing financial transactions
KR20120082010A (en) Amplifying radio frequency signals
WO2010022642A1 (en) Enfc mobile terminal and electronic payment control method thereof
WO2018161224A1 (en) Data processing method and related device
JP6858200B2 (en) Methods for routing data frames, near field communication controllers, and terminals
CN109408127B (en) Chip system loading method and chip card
CN205847259U (en) A kind of bluetooth equipment and bluetooth system
JP5869953B2 (en) Information terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17900154

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17900154

Country of ref document: EP

Kind code of ref document: A1

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载