Host Card Emulation Prediction Queue for NFC Transaction Latency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Host card emulation (HCE) systems in mobile phones experience significant delays due to the time it takes for commands and responses to traverse the HCE stack, primarily caused by context switches required for secure processing, leading to inconvenient user experiences during transactions like payments.
Innovation Solution
Implementing a prediction system that uses a learning algorithm to anticipate the next command and pre-compute responses, storing them in a prediction queue at the lower layer of the HCE stack, allowing direct transmission to the NFC reader without traversing the entire stack, thereby reducing the number of stack traversals.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If commands and responses traverse the entire HCE stack for secure processing, then security is improved, but execution time increases
Solution Approach 1:
The system pre-computes responses to predicted commands before they are actually received from the NFC reader. The learning algorithm anticipates the next command in the sequence and the corresponding response is calculated in advance and stored in the prediction queue, eliminating the need to traverse the entire HCE stack when the predicted command arrives.
Solution Approach 2:
When a predicted command is received from the NFC reader, the system skips the normal stack traversal process by directly retrieving the pre-computed response from the prediction queue. This rushes through the HCE stack traversal step, reducing execution time while maintaining security through the learning algorithm's prediction mechanism.
2Reliability
If context switches are used for secure command processing, then security is improved, but the number of stack traversals increases
Solution Approach 1:
The system performs preliminary computation of responses to predicted commands before they are actually executed. The learning algorithm anticipates the next command and the response is pre-calculated and stored in the prediction queue, eliminating the need for subsequent stack traversals when the predicted command arrives.
Solution Approach 2:
When a predicted command is received, the system skips the normal stack traversal process by directly retrieving the pre-computed response from the prediction queue. This reduces the number of stack traversals while maintaining security through the prediction mechanism.
3Measurement precision
If the HCE stack is traversed completely for each command, then processing accuracy is improved, but transaction speed decreases
Solution Approach 1:
The system pre-computes responses to predicted commands using the learning algorithm before they are actually received from the NFC reader. This preliminary action allows the system to maintain processing accuracy by pre-validating responses while significantly improving transaction speed by eliminating subsequent stack traversals.
Solution Approach 2:
When a predicted command is received, the system skips the complete stack traversal process by directly retrieving the pre-computed response from the prediction queue. This maintains processing accuracy through the learning algorithm's prediction mechanism while dramatically improving transaction speed.
Data Source
AI summary
A method for implementing a host card emulation (HCE) service in a remote near field communication (NFC) device is provided. In the method, a first command application protocol data unit (APDU) is received at the remote NFC device from an NFC reader. A first response to the first command APDU is computed. A second command APDU from the NFC reader is predicted that is likely to follow receipt of the first command APDU from the NFC reader. A second response to the predicted second command APDU is computed. A third command APDU is received from the NFC reader. It is determined if the prediction of the second command APDU matches the third command APDU. If the second and third command APDUs match, then the computed second response is send directly to the NFC reader without having to traverse a NFC stack.


