POS terminal interaction state determination method based on I / Q channel load analysis

CN123015010APending Publication Date: 2026-10-30FUJIAN NEWLAND PAYMENT TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611174954.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

不同移动终端的NFC协议栈初始化时延存在差异,且在弱信号、操作不规范或者中途移开移动终端的情况下,POS终端需要区分未靠近、已靠近但未发起读卡、读取完成、中途离场和读取超时等状态

Benefits of technology

1、本发明通过I/Q双通道的幅值、斜率和方差联合判定,能够利用真实非接触卡耦合变化与局部金属扰动在双通道特征上的差异,降低将磁条卡、接触式IC卡或相邻金属构件误判为非接触卡的概率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015010A_ABST
    Figure CN123015010A_ABST
Patent Text Reader

Abstract

The application discloses a POS terminal interaction state judgment method based on IQ channel load analysis, and belongs to the field of financial payment terminals and near field communication. The method establishes I and Q channel reference values in the idle state; in the card reader mode, combined with the first card searching result and the I and Q channel load change amount, the rising slope and the variance, joint determination is carried out, and the weakly coupled card is identified through continuous polling evidence; in the card simulation mode, low-grade close-to-threshold perception mobile terminals approach, card reading initiation, data complete transmission, load backfall and reading timeout events are sequentially monitored, and the approach, data interaction, interaction completion, midway departure or abnormal interruption state are output. The two modes share I / Q load detection hardware and reference values, and adapt to different state judgment requirements through threshold gear switching. The scheme can effectively reduce the transaction channel misjudgment of the multi-mode POS terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of financial payment terminal technology, and specifically to a method for determining the interaction status of a POS terminal based on I / Q channel load analysis. Background Technology

[0002] As payment terminals evolve towards miniaturization, portability, and multi-mode convergence, a single POS terminal typically includes a magnetic stripe card reader, a contact IC card slot, and a contactless sensing area. Due to internal space limitations, the distance between these reading areas is relatively small, and the radio frequency field generated by the contactless antenna may spill over into the vicinity of the magnetic stripe card reader or the contact IC card slot. When a magnetic stripe card, contact IC card, or adjacent metal component causes a weak load disturbance at the antenna port, the terminal may misinterpret this disturbance as a contactless card entering the system based solely on a single load amplitude or a single sampling result, leading to an incorrect switching of the transaction channel.

[0003] Existing solutions can reduce false positives by adding a card insertion sensor to confirm the card's position or by dynamically adjusting the radio frequency field strength. However, adding a sensor increases material costs and structural layout complexity, while dynamically adjusting the field strength may introduce response delays and adjustment accuracy issues. Especially when the card is in a weakly coupled region at the edge of the contactless radio frequency field, single-threshold judgment may miss real contactless cards.

[0004] On the other hand, in NFC tag payment scenarios, the POS terminal can operate in card emulation mode, with NFC-enabled mobile terminals such as smartphones acting as active card readers to read the tag data provided by the POS terminal. This interaction process involves the mobile terminal entering the field, initiating the card reading process, reading data, completing the reading, and the mobile terminal leaving the field. Different mobile terminals have varying NFC protocol stack initialization latency, and in cases of weak signals, improper operation, or the mobile terminal being moved midway, the POS terminal needs to distinguish between states such as not approaching, approaching but not initiating card reading, reading completed, leaving midway, and reading timeout. Relying solely on protocol layer instructions cannot confirm whether the mobile terminal is still present before the card reading instruction appears, nor can it promptly identify midway departure during the data reading process.

[0005] Therefore, there is a need for a technical solution that can reuse the existing contactless radio frequency channel of the POS terminal and improve the accuracy of transaction type identification in reader mode and the observability of interaction status in card emulation mode without adding a position sensor. Summary of the Invention

[0006] To address the aforementioned issues, the present invention aims to provide a POS terminal interaction state determination method based on I / Q channel load analysis. This method utilizes the I / Q dual-channel load information of the contactless antenna port to distinguish between coupling changes caused by real contactless objects and interference caused by adjacent card slots or metal components. Furthermore, it continuously determines the interaction state of the mobile terminal from its entry into the field to the end of data reading in card emulation mode, thereby reducing problems such as erroneous switching of transaction channels in multi-mode POS terminals.

[0007] To achieve the above-mentioned technical objectives, the technical solution adopted by this invention is as follows: This invention proposes a method for determining the interaction state of a POS terminal based on I / Q channel load analysis. The POS terminal has a reader mode and a card emulation mode. The contactless antenna port of the POS terminal is equipped with an I-channel load detection channel and a Q-channel load detection channel. The method includes: In an unloaded state where no non-contact object is near the non-contact antenna, the I-channel load detection channel and the Q-channel load detection channel are sampled to obtain the I-channel reference value and the Q-channel reference value. When the POS terminal is in card reader mode, it performs the first contactless card search and determines that the transaction is a contactless transaction when a contactless card response is received. If no contactless card response is received, the load values ​​of the I-channel and Q-channel are sampled multiple times before the card search command is sent in the subsequent polling cycle. Based on the sampling results, the load change, rise slope, and variance of the I-channel and Q-channel relative to the corresponding reference values ​​are obtained. If the load change, rise slope, and variance of the I / Q channel simultaneously meet the set threshold conditions, the transaction is determined to be a contactless transaction; otherwise, polling continues. If a physical layer contactless card signal is detected in N consecutive polls and the set threshold conditions are not met simultaneously in each poll, the interaction state is determined to be an edge weakly coupled card state, and the transaction is forcibly determined to be a contactless transaction. When the POS terminal is in card emulation mode, the load values ​​of the I channel and the Q channel are detected according to the detection cycle. When the load change of both channels relative to the corresponding reference value exceeds the corresponding proximity detection threshold, the interaction state is switched from standby state to NFC mobile terminal entry state. When the NFC mobile terminal is in the field, listen for the card reading command initiated by the NFC mobile terminal within the listening time window. When the card reading command is heard, switch the interaction state to the data interaction state. In the data interaction state, monitor the data complete transmission, load change amount fallback and data reading timeout events, and output the interaction completion state, mid-term departure state or abnormal interruption state according to the monitored events. If the card reading command is not detected, the load detection of the I channel and Q channel is performed again, and the NFC mobile terminal in the field state (i.e., the NFC mobile terminal is in the field state but has not yet initiated card reading) or returns to the standby state (i.e., the NFC mobile terminal is in the field state) is maintained or returned to the standby state (i.e., the NFC mobile terminal is in the field state) depending on whether the determination conditions of the NFC mobile terminal in the field state are still met.

[0008] Furthermore, obtaining the I-channel reference value and the Q-channel reference value includes: Under the no-load condition, the load values ​​of channel I and channel Q are continuously sampled at least 100 times and the corresponding reference values ​​are calculated. During the operation of the POS terminal, the reference values ​​of the I channel and the Q channel are updated using a sliding average filter to compensate for reference drift caused by changes in ambient temperature and device aging. The sliding window width is 10~200ms.

[0009] Furthermore, the sampling window for sampling the I-channel load value and the Q-channel load value multiple times is 0.5~5ms, and the number of sampling times is no less than 3. The load change is determined by the absolute value of the difference between the mean of the sampling sequence and the corresponding benchmark value. The rising slope is determined by the rate of change of the sampling sequence with the sampling time. The variance is determined by the degree of dispersion of the sampling sequence relative to the mean.

[0010] Furthermore, the I-channel reference value and the Q-channel reference value are shared by the card reader mode and the card emulation mode, and the card reader mode and the card emulation mode use the same I / Q channel load detection hardware. The sampling timing of the card reader mode is to perform no less than 3 sampling cycles after the start of the operation; the sampling timing of the card emulation mode is to perform no less than 3 cycles of "start-sampling-stop" operation.

[0011] Furthermore, the listening time window is 100~1500ms; the card reading command is any card reader initiation command defined in the ISO / IEC 14443 protocol, including WUPA / WUPB / REQA commands.

[0012] Furthermore, in the data interaction state, when a read completion command is detected or the interacted data reaches the expected data length, the interaction completion status is output; When the load change of the I channel and the Q channel no longer meets the determination condition of the mobile terminal entering the field, the mid-term departure state is output. When the data reading duration exceeds the preset data reading timeout, the abnormal interruption status is output, wherein the data reading timeout is not less than 1500ms.

[0013] Furthermore, when no card reading command is detected within the listening time window, the load values ​​of the I channel and the Q channel are sampled at least three times and the average value is calculated. When the load changes of both channels still exceed the corresponding proximity detection threshold, the listening time window is restarted (i.e., the operation of listening for card reading commands initiated by the NFC mobile terminal within the listening time window is re-executed). When the load changes of both channels no longer exceed the corresponding proximity detection threshold, the NFC mobile terminal is output as an off-site state and returns to the standby state. When returning to standby mode, the operation of determining whether the interaction state is the mobile terminal's entry state continues.

[0014] Furthermore, when the load change, rise slope, and variance of the I / Q channels simultaneously meet the set threshold conditions, the transaction will be determined to be a contactless transaction. The set threshold conditions are: the load change of both channels exceeds the corresponding high amplitude threshold, the rise slope of both channels exceeds the slope threshold, and the variance of both channels is lower than the corresponding stability threshold.

[0015] Furthermore, the detection period is 200~2500ms; the proximity detection threshold and the amplitude high threshold are provided by different threshold levels of the same set of hardware comparators and are switched through register configuration; The proximity detection threshold for the I / Q channel is lower than the amplitude high threshold for the same channel; the expression for the proximity detection threshold of the I / Q channel is as follows: Th_I_High = I_base × α, Th_Q_High = Q_base × β; where Th_I_High represents the high threshold of the I channel amplitude, Th_Q_High is the high threshold of the Q channel amplitude, I_base is the reference value of the I channel, Q_base is the reference value of the Q channel, and the values ​​of α and β range from 1.05 to 1.30. The Th_I_approach = I_base × γ, Th_Q_approach = Q_base × δ; where Th_I_approach is the proximity detection threshold for the I channel, Th_Q_approach is the proximity detection threshold for the Q channel, and the values ​​of γ and δ range from 1.01 to 1.10.

[0016] Furthermore, after determining that the card is in a weakly coupled edge state, the system enters the contactless transaction process and increases the output power of the contactless radio frequency field; if the contactless transaction process fails after determining that it is a contactless transaction, the system returns to the polling state of the card reader mode.

[0017] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: 1. This invention uses the amplitude, slope and variance of the I / Q dual channels for joint determination. It can utilize the differences in the dual-channel characteristics of the actual contactless card coupling changes and local metal disturbances to reduce the probability of misjudging magnetic stripe cards, contact IC cards or adjacent metal components as contactless cards.

[0018] 2. This invention, through the fast path of the first card search and the short sampling window at the millisecond level, can obtain multi-point statistical features while controlling the judgment delay; through the accumulation of physical layer evidence in N consecutive times, it can cover weakly coupled scenarios where the card is located at the edge of the radio frequency field and the single load characteristics are not typical.

[0019] 3. This invention, through the transitions between the states of entry, card reading initiation, data interaction, completion, departure, and timeout, can continuously monitor whether the mobile terminal is present before and after the occurrence of protocol instructions, and promptly end abnormal interactions; 4. In this invention, the card reader mode and card emulation mode share the same I / Q load detection hardware and reference value. Different working modes can be adapted by sampling timing, switching threshold levels and state machine parameters. This reduces hardware complexity and processor overhead while ensuring the reliability of threshold sampling. It also effectively solves the problem of Android and HarmonyOS phones popping up the mobile wallet due to sampling. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments will be briefly introduced below.

[0021] Figure 1 This is a schematic diagram illustrating the process of accurate transaction type identification in the Reader mode of the present invention; Figure 2 This is a schematic diagram of the simulated card mode state of the present invention; Figure 3 This invention describes the process for determining the NFC mobile phone interaction status in the card simulation mode. Detailed Implementation

[0022] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] This invention provides a method for determining the interaction state of a POS terminal based on I / Q channel load analysis. The POS terminal has a reader mode and a card emulation mode, and the contactless antenna port of the POS terminal is equipped with an I-channel load detection channel and a Q-channel load detection channel. The method includes: Under no-load conditions with no non-contact objects near the non-contact antenna, the I-channel load detection channel and the Q-channel load detection channel are sampled at least 100 times; and the I-channel reference value I_base and the Q-channel reference value Q_base are calculated. During POS terminal operation, the I-channel reference value and the Q-channel reference value are updated using a moving average filter to compensate for reference drift caused by changes in ambient temperature and device aging. The moving window width is 10~200ms.

[0024] The I-channel and Q-channel reference values ​​obtained here are shared by both reader mode and card emulation mode. Both modes use the same I / Q channel load detection hardware, and adaptation between the two modes is achieved through differentiated configurations in two dimensions: sampling timing and judgment threshold. Specifically, the sampling timing for reader mode involves at least three sampling cycles after the start of the operation; the sampling timing for card emulation mode involves at least three cycles of the "start-sampling-stop" operation.

[0025] When the POS terminal is in card reader mode, it performs the first contactless card search (i.e., turns on contactless mode and sends the WUPA / WUPB command for the first time). When it receives the contactless card response, it determines that the transaction is a contactless transaction. If no contactless card response is received, the load values ​​of channel I and channel Q are sampled multiple times before the card search command is sent in the subsequent polling cycle. The sampling window for sampling the load values ​​of channel I and channel Q is 0.5~5ms, and the number of samplings is no less than 3. The load change is determined by the absolute value of the difference between the mean of the sampling sequence and the corresponding benchmark value. The rising slope is determined by the rate of change of the sampling sequence with the sampling time. The variance is determined by the degree of dispersion of the sampling sequence relative to the mean.

[0026] Based on the sampling results, the load change, rise slope, and variance of the I and Q channels relative to the corresponding baseline values ​​are obtained respectively. When the load change, rise slope, and variance of the I / Q channels simultaneously meet the set threshold conditions, the transaction is determined to be a contactless transaction; otherwise, polling continues.

[0027] The threshold conditions are as follows: the load change of both channels exceeds the corresponding high amplitude threshold, the rise slope of both channels exceeds the slope threshold, and the variance of both channels is lower than the corresponding stability threshold.

[0028] When a physical layer contactless card signal is detected in N consecutive polls, and the set threshold condition is not met simultaneously in each poll, the interaction state is determined to be an edge weakly coupled card state, and the transaction is forcibly determined to be a contactless transaction. Specifically, after determining the edge weakly coupled card state, the contactless transaction process is initiated and the output power of the contactless radio frequency field is increased; if the contactless transaction process fails after being determined to be a contactless transaction, the polling state in reader mode is returned.

[0029] When the POS terminal is in card emulation mode, the load values ​​of the I channel and Q channel are detected according to the detection cycle. Specifically, in card emulation mode, the sampling process is performed in a "start-sampling-stop" cycle according to the set number of sampling times, with no less than 3 cycles. This method reduces the start-up duration, which ensures the reliability of channel load value sampling and effectively solves the problem of Android and HarmonyOS phones popping up the mobile wallet during the start-up. When the load change of both channels relative to the corresponding benchmark value exceeds the corresponding proximity detection threshold, the interaction state is switched from standby state to NFC mobile terminal approach state.

[0030] The detection period is 200~2500ms; the proximity detection threshold and the amplitude high threshold are provided by different threshold levels of the same set of hardware comparators and are switched through register configuration. The proximity detection threshold for the I / Q channels is less than the amplitude high threshold for the same channel; the expression for the proximity detection threshold for the I / Q channels is as follows: Th_I_High = I_base × α, Th_Q_High = Q_base × β; where Th_I_High represents the high threshold of the I channel amplitude, Th_Q_High is the high threshold of the Q channel amplitude, I_base is the reference value of the I channel, Q_base is the reference value of the Q channel, and the values ​​of α and β range from 1.05 to 1.30. Th_I_approach = I_base × γ, Th_Q_approach = Q_base × δ; where Th_I_approach is the proximity detection threshold for the I channel, Th_Q_approach is the proximity detection threshold for the Q channel, and the values ​​of γ and δ range from 1.01 to 1.10.

[0031] When the NFC mobile terminal is in the field, listen for card reading commands initiated by the NFC mobile terminal within the listening time window, where the listening time window is 100~1500ms; card reading commands include any card reader-initiated commands defined in the ISO / IEC14443 protocol, such as WUPA / WUPB / REQA commands.

[0032] Upon receiving a card read command, the interaction state is switched to data interaction state. In data interaction state, the system monitors for complete data transmission, load change decline, and data read timeout events, and outputs an interaction completion status, a mid-term departure status, or an abnormal interruption status based on the monitored events. Specifically, in data interaction state, an interaction completion status is output when a read completion command is detected or the exchanged data reaches the expected data length; a mid-term departure status is output when the load change of the I and Q channels no longer meets the mobile terminal entry status determination conditions; and an abnormal interruption status is output when the data read duration exceeds the preset data read timeout time, where the data read timeout time is no less than 1500ms.

[0033] If no card reading command is detected, the load detection of the I channel and Q channel is performed again. Depending on whether the conditions for determining the NFC mobile terminal's presence are still met, the NFC mobile terminal's presence state is maintained (i.e., the NFC mobile terminal is in the presence state but has not yet initiated card reading) or it returns to the standby state (i.e., the NFC mobile terminal is in the absence state).

[0034] If no card reading command is detected within the listening time window, the load values ​​of the I channel and Q channel are sampled at least three times and the average value is calculated. Specifically, in card emulation mode, the sampling process cycles through "open-sampling-close" according to the set number of samplings. This method reduces the opening duration, ensuring the reliability of channel load value sampling and effectively solving the problem of Android and HarmonyOS phones popping up the mobile wallet during the opening. When the load change of both channels still exceeds the corresponding proximity detection threshold, the listening time window is restarted (i.e., the card reading command operation initiated by the NFC mobile terminal is re-executed within the listening time window). When the load change of both channels no longer exceeds the corresponding proximity detection threshold, the NFC mobile terminal is output as an off-field state and returns to standby state. When returning to standby mode, the operation of determining whether the interaction state is an NFC mobile terminal approach state continues (i.e., determining whether the load change of the two channels relative to the corresponding reference value exceeds the corresponding proximity detection threshold).

[0035] For ease of understanding, the following embodiments further illustrate the present invention in the form of steps.

[0036] This embodiment provides a method for determining the interaction status of a POS terminal based on I / Q channel load analysis, including the following steps: Part 1: Precise Distinction of Transaction Types in Reader Mode, as shown in the appendix. Figure 1 As shown.

[0037] Step S1: During the POS device power-on initialization, under the condition that no card or metal object is near the contactless sensing area, perform the no-load calibration of the contactless RF channel: continuously sample the load value of the I channel and the load value of the Q channel of the contactless antenna port, with no less than 100 sampling times; calculate the I channel reference value I_base and the Q channel reference value Q_base respectively; wherein, the reference value is continuously updated during the operation of the POS device, and a moving average filtering algorithm is used to suppress the influence of environmental temperature drift and device aging, with a sliding window width of 10~200ms.

[0038] Step S2: Start the Reader polling transaction process and perform the first contactless card search operation: If a response signal from the contactless card is received, it is determined that the card was already in the contactless sensing area before the transaction was initiated, and the transaction is determined to be a contactless transaction, and the contactless transaction process is initiated; if no response signal from the contactless card is received, proceed to step S3.

[0039] Step S3: In subsequent polling cycles, load sampling is performed before sending the card search command to obtain the current I / Q channel load values ​​I_current and Q_current; specifically, load value sampling is performed multiple times within a time window of 0.5~5ms, with no less than 3 sampling times, to obtain the instantaneous load data sequence of the I / Q channel. The load data sequence includes the mean, variance, and rising slope of the sampling sequence. Preferably, the sampling window is 3-4 ms. The selection of this sampling parameter is based on the following considerations: a window length of 3-4 ms is sufficient to capture the transient characteristics of load changes when cards enter the market, while keeping the sampling delay within 1-3 ms to avoid affecting the transaction response time. The load change is determined by the absolute value of the difference between the mean of the sampled sequence (which reflects the overall load level) and the corresponding baseline value, as expressed below: ΔI = |I_current - I_base|, ΔQ = |Q_current - Q_base|; The rising slope is determined by the rate of change of the sampling sequence with the sampling time, and is used to reflect the speed characteristics of the card entering the field; the variance is determined by the degree of dispersion of the sampling sequence relative to the mean, and is used to reflect the load stability. To determine whether the current load change conforms to the characteristics of contactless card access, all of the following conditions must be met simultaneously: (1) Amplitude variation condition: ΔI>Th_I_High and ΔQ>Th_Q_High; (2) Condition for rising slope: slope_I>Th_slope and slope_Q>Th_slope; (3) Stability conditions: Var(I) < σ²_I and Var(Q) < σ²_Q; Wherein, Th_I_High is the high threshold of I channel amplitude, Th_Q_High is the high threshold of Q channel amplitude, Th_slope is the slope threshold, σ²_I is the stability threshold of I channel, and σ²_Q is the stability threshold of Q channel. If all of the above conditions are met at the same time, the transaction is determined to be a contactless transaction and the contactless transaction process is initiated. Furthermore, if the contactless transaction process fails after being determined to be a contactless transaction, the process will revert to the polling detection state and re-execute step S2.

[0040] If all of the above conditions are not met simultaneously, the contactless transaction will not be executed this time, and the next round of polling will continue.

[0041] Step S4: Statistically analyze the results of N consecutive polling detections, where N is a preset value (N>3). If a contactless card signal is detected at the physical layer in each iteration, but the load characteristics do not meet the contactless card entry characteristic judgment conditions in Step S3, then the contactless card is determined to be at the edge of the radio frequency field and in a weakly coupled state. The transaction is then forcibly determined to be a contactless transaction, and the process is initiated. Preferably, after determining it to be a contactless transaction, the process is initiated and power enhancement measures are activated.

[0042] Part Two: Determining the NFC Mobile Phone Interaction Status in Card Emulation Mode (see attached document) Figures 2-3 As shown.

[0043] Step S6: When the POS terminal switches to card emulation mode, the contactless load detection function is activated periodically with a detection cycle of T1, continuously monitoring the load change of the I / Q channel at the antenna port. Calculate the deviation between the current load value and the baseline value: ΔI_load = |I_current - I_base|, ΔQ_load = |Q_current - Q_base|; When ΔI_load>Th_I_approach and ΔQ_load>Th_Q_approach, it is determined that an NFC mobile phone is approaching / entering the field, and the process proceeds to step S7. Wherein, Th_I_approach is the proximity detection threshold for the I channel, and Th_Q_approach is the proximity detection threshold for the Q channel. The values ​​of Th_I_approach and Th_Q_approach are less than Th_I_High and Th_Q_High in step S3, so as to improve the sensitivity of the approach sensing.

[0044] Furthermore, the expressions for the high amplitude threshold and the proximity detection threshold of the I / Q channels are as follows: Th_I_High = I_base × α, Th_Q_High = Q_base × β; where Th_I_High represents the high threshold of the I channel amplitude, Th_Q_High is the high threshold of the Q channel amplitude, I_base is the reference value of the I channel, Q_base is the reference value of the Q channel, and the values ​​of α and β range from 1.05 to 1.30. The Th_I_approach = I_base × γ, Th_Q_approach = Q_base × δ; where Th_I_approach is the proximity detection threshold for the I channel, Th_Q_approach is the proximity detection threshold for the Q channel, and the values ​​of γ and δ range from 1.01 to 1.10.

[0045] In this embodiment, the detection period T1 is set based on a combination of the POS terminal's power consumption requirements and response sensitivity, with a value ranging from 200 to 2500 ms. This detection period balances standby power consumption optimization with real-time response upon arrival.

[0046] Step S7: After determining that the NFC mobile phone is close, the POS terminal starts the monitoring process and sets the monitoring time window TW1 to detect whether the NFC mobile phone initiates the standard card reading process. The value of TW1 is 100~1500ms. Setting TW1 to 100~1500ms can cover the response delay distribution range of mainstream mobile phone systems under normal working conditions, ensuring that all types of mobile phone users can be correctly identified.

[0047] If a card reading command initiated by an NFC mobile phone (including any card reader-initiated command defined in the ISO / IEC 14443 protocol such as WUPA / WUPB / REQA commands) is detected within the TW1 time window, it is determined that the NFC mobile phone has initiated the card reading process, and the process proceeds to step S9. If no card reading process is detected within the TW1 time window, proceed to step S8.

[0048] Step S8: After determining in step S7 that the card reading process has not been initiated, perform load detection again; wherein, the load detection adopts the method of sampling multiple times and taking the average value, and the number of samplings is not less than 3 times, in order to eliminate instantaneous noise interference.

[0049] If the current load value still satisfies ΔI_load>Th_I_approach and ΔQ_load>Th_Q_approach, then it is determined that the NFC mobile phone is still in a close proximity state but has not yet initiated card reading, and returns to step S7 to continue waiting for card reading to be initiated (TW1 timing restarts). If the current load value falls below Th_I_approach and Th_Q_approach, it is determined that the NFC mobile phone has left the field, the entry status is cleared, and the process returns to step S6 to continue the periodic load detection.

[0050] Step S9: After the card reading process is detected in step S7, continuously monitor whether the NFC mobile phone has completed all data reading, that is, monitor whether the card reader sends a read completion command or whether the data interaction has reached the expected length; If it is confirmed that the data has been completely transmitted, the transaction is considered complete, the entry status is cleared, and the process returns to step S6. If the load value falls below Th_I_approach and Th_Q_approach during the data reading process, it is determined that the NFC mobile phone has left the site midway, the current card reading process is terminated, and the process returns to step S6. If the data reading timeout occurs (the data reading timeout time TW2 is not less than 1500ms), the card reading process is determined to be abnormally interrupted, the current card reading process is terminated, and the process returns to step S6.

[0051] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for determining the interactive state of a POS terminal based on I / Q channel load analysis, wherein the POS terminal has a card reader mode and a card emulation mode, and the contactless antenna port of the POS terminal is provided with an I-channel load detection channel and a Q-channel load detection channel, characterized in that, The method includes: In an unloaded state where no non-contact object is near the non-contact antenna, the I-channel load detection channel and the Q-channel load detection channel are sampled to obtain the I-channel reference value and the Q-channel reference value. When the POS terminal is in card reader mode, it performs the first contactless card search. Upon receiving a contactless card response, it determines that the transaction is a contactless transaction. If no contactless card response is received, the load values ​​of the I-channel and Q-channel are sampled multiple times before the card search command is sent in the subsequent polling cycle. Based on the sampling results, the load change, rise slope, and variance of the I-channel and Q-channel relative to the corresponding reference values ​​are obtained. If the load change, rise slope, and variance of the I / Q channel simultaneously meet the set threshold conditions, the transaction is determined to be a contactless transaction; otherwise, polling continues. If a physical layer contactless card signal is detected in N consecutive polls and the set threshold conditions are not met simultaneously in each poll, the interaction state is determined to be an edge weakly coupled card state, and the transaction is forcibly determined to be a contactless transaction. When the POS terminal is in card emulation mode, the load values ​​of the I channel and the Q channel are detected according to the detection cycle. When the load change of both channels relative to the corresponding reference value exceeds the corresponding proximity detection threshold, the interaction state is switched from standby state to NFC mobile terminal arrival state. When the NFC mobile terminal is in the field, listen for the card reading command initiated by the NFC mobile terminal within the listening time window. When the card reading command is heard, switch the interaction state to the data interaction state. In the data interaction state, monitor the data complete transmission, load change amount fallback and data reading timeout events, and output the interaction completion state, mid-term departure state or abnormal interruption state according to the monitored events. If no card reading command is detected, the load detection of the I and Q channels is performed again, and the NFC mobile terminal is maintained in the NFC mobile terminal state or returned to the standby state depending on whether the conditions for determining the NFC mobile terminal's entry state are still met.

2. The POS terminal interaction status determination method based on I / Q channel load analysis according to claim 1, characterized in that, Obtaining the I-channel reference value and the Q-channel reference value includes: Under the no-load condition, the load values ​​of channel I and channel Q are continuously sampled at least 100 times and the corresponding reference values ​​are calculated. During the operation of the POS terminal, the reference values ​​of the I channel and the Q channel are updated using a sliding average filter to compensate for reference drift caused by changes in ambient temperature and device aging. The sliding window width is 10~200ms.

3. The POS terminal interaction status determination method based on I / Q channel load analysis according to claim 1, characterized in that, The sampling window for sampling the load values ​​of the I channel and the Q channel multiple times is 0.5~5ms, and the number of sampling times is no less than 3. The load change is determined by the absolute value of the difference between the mean of the sampling sequence and the corresponding benchmark value. The rising slope is determined by the rate of change of the sampling sequence with the sampling time. The variance is determined by the degree of dispersion of the sampling sequence relative to the mean.

4. The POS terminal interaction status determination method based on I / Q channel load analysis according to claim 1, characterized in that, The I-channel reference value and the Q-channel reference value are shared by the card reader mode and the card emulation mode. The card reader mode and the card emulation mode use the same I / Q channel load detection hardware. The sampling timing of the card reader mode is to perform no less than 3 sampling cycles after the start of the operation. The sampling timing of the card emulation mode is to perform no less than 3 cycles of "start-sampling-stop" operation.

5. The POS terminal interaction status determination method based on I / Q channel load analysis according to claim 1, characterized in that, The listening time window is 100~1500ms; the card reading command is any card reader-initiated command defined in the ISO / IEC 14443 protocol, including WUPA / WUPB / REQA commands.

6. The POS terminal interaction status determination method based on I / Q channel load analysis according to claim 1, characterized in that, In the data interaction state, when a read completion command is detected or the interacted data reaches the expected data length, the interaction completion status is output. When the load change of the I channel and the Q channel no longer meets the determination condition of the mobile terminal entering the field, the mid-way departure state is output. When the data reading duration exceeds the preset data reading timeout, the abnormal interruption status is output, wherein the data reading timeout is not less than 1500ms.

7. The POS terminal interaction status determination method based on I / Q channel load analysis according to claim 1, characterized in that, If no card reading command is detected within the listening time window, the load value of the I channel and the load value of the Q channel are sampled at least 3 times and the average value is calculated. When the load change of both channels still exceeds the corresponding proximity detection threshold, the listening time window is restarted. When the load change of both channels no longer exceeds the corresponding proximity detection threshold, the NFC mobile terminal is output as an off-field state and returns to the standby state. When returning to standby mode, the operation of determining whether the interaction state is the mobile terminal's entry state continues.

8. The POS terminal interaction status determination method based on I / Q channel load analysis according to claim 1, characterized in that, When the load change, rise slope, and variance of the I / Q channels simultaneously meet the set threshold conditions, the transaction will be determined to be a contactless transaction. The set threshold conditions are: the load change of both channels exceeds the corresponding high amplitude threshold, the rise slope of both channels exceeds the slope threshold, and the variance of both channels is lower than the corresponding stability threshold.

9. The POS terminal interaction status determination method based on I / Q channel load analysis according to claim 1, characterized in that, The detection period is 200~2500ms; the proximity detection threshold and the amplitude high threshold are provided by different threshold levels of the same set of hardware comparators and are switched through register configuration; The proximity detection threshold for the I / Q channel is lower than the amplitude high threshold for the same channel; the expressions for the amplitude high threshold and proximity detection threshold for the I / Q channel are as follows: Th_I_High = I_base × α, Th_Q_High = Q_base × β; where Th_I_High represents the high threshold of the I channel amplitude, Th_Q_High is the high threshold of the Q channel amplitude, I_base is the reference value of the I channel, Q_base is the reference value of the Q channel, and the values ​​of α and β range from 1.05 to 1.

30. The Th_I_approach = I_base × γ, Th_Q_approach = Q_base × δ; where Th_I_approach is the proximity detection threshold for the I channel, Th_Q_approach is the proximity detection threshold for the Q channel, and the values ​​of γ and δ range from 1.01 to 1.

10.

10. The POS terminal interaction status determination method based on I / Q channel load analysis according to claim 1, characterized in that, After determining that the card is in a weakly coupled edge state, the system enters the contactless transaction process and increases the output power of the contactless radio frequency field; if the contactless transaction process fails after the card is determined to be a contactless transaction, the system returns to the polling state of the card reader mode.