Smart card read-write method and system, storage medium and program product
By acquiring the temperature and voltage characteristics of the smart card and the directional antenna array, identifying legal and illegal signals, and adjusting the resonant circuit parameters, the wear and theft problems of traditional smart card reading and writing are solved, achieving improved security and convenience.
Patent Information
- Application Number
- CN202510790648.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-26
AI Technical Summary
Traditional smart card reading and writing technology has problems with hardware wear and inconvenience in operation. At the same time, contactless reading and writing methods are vulnerable to highly concealed theft attacks, resulting in reduced information and property security.
By obtaining the temperature change rate of the smart card chip, the voltage fluctuation value of the internal circuit and the radio frequency signal characteristics, combined with the directional antenna array and resonant circuit parameter adjustment, legal and illegal signals can be identified, a secure communication channel can be established, and illegal reading can be prevented.
It improves the security of smart card data interaction, enhances information and property security, prevents illegal theft, and maintains normal communication functions.
Smart Images

Figure CN120706446A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things and radio frequency identification, and in particular to a smart card reading and writing method, system, storage medium and program product. Background Art
[0002] Smart card reading and writing technology is widely used in scenarios such as access control, transportation payment, and campus card access. Traditionally, the user must physically contact the smart card with the reader to complete the data read and write operation. This contact-based reading and writing method not only easily causes wear and tear on the interface between the card and the reader, but also increases user inconvenience, especially in crowded places, which can easily cause congestion.
[0003] To address the above issues, relevant technologies have proposed a contactless smart card reading and writing method based on near-field communication (NFC). Users only need to place the smart card close to the sensing area of the reading and writing device to complete data transmission. This method uses radio frequency signals to achieve wireless data transmission, effectively solving the hardware wear problem caused by contact reading and writing, while improving user convenience.
[0004] However, due to the propagation characteristics of radio frequency signals in space, others may be able to steal sensitive information from smart cards without the user's knowledge by setting up hidden reading and writing devices. This attack method is highly concealed and difficult to detect, reducing the user's information security and property security. Summary of the Invention
[0005] The present application provides a smart card reading and writing method, system, storage medium and program product for improving the information security and property security of users.
[0006] In a first aspect, the present application provides a smart card reading and writing method, which receives a read and write instruction triggered by a user, wherein the read and write instruction includes an operation type for interacting with data on the smart card; Obtaining the temperature change rate of the smart card chip, the voltage fluctuation value of the internal circuit, and the signal characteristics of the radio frequency signals received by the smart card within a preset time window, the signal characteristics including the signal strength of each radio frequency signal; The number of valid RF signals received by the smart card is determined based on the ratio between the temperature change rate and the voltage fluctuation value, and the ratio represents the temperature and voltage response characteristics caused by a single RF signal; When the number of valid radio frequency signals detected is greater than a preset value, the directional antenna array of the smart card is activated, where the directional antenna array includes at least three antenna units arranged in different directions; Collect the radio frequency signal strength received by each antenna unit respectively and calculate the signal strength difference of each antenna unit; Determine the incident direction of each RF signal based on the signal strength difference, and compare each incident direction with the preset user operation range; When an incident direction beyond the preset user operation range is detected, the radio frequency signal corresponding to the incident direction beyond the preset user operation range is determined to be a stolen signal; Adjusting the resonant circuit parameters of the smart card according to the temperature change rate so that the smart card selectively responds to radio frequency signals within the user's operating range; Establish a secure communication channel between the smart card and the read / write device within the preset user operation range, and execute data interaction operations corresponding to the read / write instructions.
[0007] By adopting the above technical solution, by acquiring the temperature change rate of the smart card chip, the voltage fluctuation value of the internal circuit, and the RF signal characteristics, and establishing a correspondence between the temperature and voltage response characteristics and the RF signal, the actual number of RF signals can be accurately identified. Combined with the signal strength difference in each direction collected by the directional antenna array, the incident direction of the RF signal can be accurately located, thereby distinguishing between legitimate user operation signals and potential malicious theft signals. When the system detects an incident direction outside the preset user operation range, it adjusts the resonant circuit parameters so that the smart card only responds to legitimate signals within the preset range and does not respond to theft signals from other directions, preventing illegal reading devices from obtaining sensitive data in the smart card. This protection mechanism based on multi-dimensional signal characteristics and intelligent tuning improves the security of smart card data interaction while ensuring normal communication functions, thereby improving the information security and property security of users.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, determining the incident direction of each radio frequency signal based on the signal strength difference specifically includes: Calculate the signal strength ratios between adjacent antenna units to obtain a sequence of signal strength ratios in multiple directions; Perform peak detection on the signal strength ratio sequence to determine the antenna unit combination with the largest signal strength; Calculate the main incident direction of the RF signal based on the physical installation angle of the antenna unit combination; Set the angular scanning range and scanning step size based on the main incident direction; Determine the secondary incident direction according to the signal strength distribution of each antenna unit within the angular scanning range; The main incident direction and the secondary incident direction are combined to obtain the incident direction of each radio frequency signal.
[0009] By adopting the above technical solution, the system can accurately identify the primary incident direction of RF signals by calculating the signal strength ratio between adjacent antenna units and performing peak detection, combined with the physical installation angle of the antenna units. Furthermore, by setting a reasonable angular scanning range and scanning step size, the secondary incident direction can be further determined based on the distribution characteristics of the signal strength received by each antenna unit. This improves the accuracy and reliability of direction detection, enabling the system to more accurately distinguish between legitimate and illegitimate signals, reducing the probability of misjudgment and missed detection, and providing more reliable technical support for smart card security protection.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, adjusting the resonant circuit parameters of the smart card according to the temperature change rate so that the smart card selectively responds to radio frequency signals within the user's operating range specifically includes: Calculate the temperature change trend according to the temperature change rate, and divide the temperature change trend into rising interval, stable interval and falling interval; The adjustment direction and adjustment step of the resonant circuit are determined based on the temperature change characteristics of different intervals. The adjustment direction represents the increase or decrease of the resonant frequency, and the adjustment step represents the frequency change of a single adjustment. The charging and discharging process of the variable capacitor module is controlled according to the adjustment direction and the adjustment step size to achieve dynamic adjustment of the resonant frequency and obtain the initial resonant frequency; Collecting the frequency characteristics of the radio frequency signal within the preset user operation range and calculating the matching degree between the frequency characteristics and the initial resonant frequency; Adjusting the damping resistance value of the resonant circuit based on the matching degree to control the coverage of the resonant bandwidth so that the resonant bandwidth completely covers the RF signal frequency within the preset user operation range; Real-time detection of the standing wave ratio and quality factor of the resonant circuit, and triggering a fine-tuning mechanism for the resonance parameters when the standing wave ratio is greater than a first preset threshold or the quality factor is less than a second preset threshold; The initial resonant frequency is corrected through a fine-tuning mechanism to obtain a final resonant frequency, so that the smart card only responds to radio frequency signals within a preset user operation range.
[0011] By adopting the above technical solution, the system can precisely control the adjustment direction and adjustment step size of the resonant circuit based on the temperature variation characteristics by analyzing the temperature variation trend and dividing it into different intervals. By controlling the charging and discharging process of the variable capacitor module, the resonant frequency is dynamically adjusted, and the damping resistance value of the resonant circuit is adjusted based on the matching degree of the frequency characteristics, so that the resonant bandwidth can accurately cover the RF signal frequency within the preset user operation range. By real-time monitoring of the standing wave ratio and quality factor, triggering the fine-tuning mechanism of the resonant parameters, the system can continuously optimize the resonant frequency and maintain a stable response to legitimate signals. This improves the smart card's selective response capability to legitimate signals and enhances the system's protection against illegal reading.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, after executing the data interaction operation corresponding to the read and write instructions, the method further includes: Collect the RF signal peak value, signal period and phase offset during the data interaction process to obtain the modulation parameters of the RF signal; The modulation parameters are segmented according to the preset time window, and the signal fluctuation range and waveform distortion rate are calculated in each segment; Generate a feature sequence based on the fluctuation range and waveform distortion rate, and use the feature sequence as the signal fingerprint of the reading and writing device; Collect the induced current value of the smart card and convert the induced current value into a voltage value; Perform fast Fourier transform on the voltage value to obtain the amplitude of the frequency component; Determine the frequency band and strength of the stolen signal based on the amplitude of the frequency component; Compare the frequency band and strength of the stolen signal with the signal fingerprint to identify abnormal RF signals; When the strength of the abnormal radio frequency signal is detected to exceed a preset threshold, the gain weights of the antenna array in different directions are calculated; By adjusting the gain weight, the directivity of the antenna array is changed to suppress the gain of the stolen signal.
[0013] By adopting the above technical solution, the system establishes the signal fingerprint characteristics of the reader / writer device by collecting the RF signal modulation parameters during data exchange and combining them with fluctuation range and waveform distortion rate analysis. Through frequency domain analysis of the smart card's induced current, the system can effectively identify the frequency band and intensity characteristics of the stolen signal. By comparing these characteristics with the established signal fingerprint and combining them with the directional gain control of the antenna array, the system can apply directional suppression to abnormal RF signals that exceed the threshold. This active protection mechanism based on signal feature analysis not only promptly detects potential attacks, but also effectively suppresses illegal signals through dynamic adjustment of antenna gain, thereby improving the security protection level of smart cards during data exchange.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, the modulation parameters are segmented according to a preset time window, and the signal fluctuation range and waveform distortion rate are calculated in each segment, specifically including: Dividing the sampled data of the radio frequency signal into multiple signal segments according to a preset time window; Extract the difference between the maximum and minimum values of the signal in each signal segment to obtain the signal fluctuation range; Perform Fourier series expansion on the signal segment to obtain the fundamental component and harmonic component; Calculate the ratio of the harmonic component to the fundamental component to obtain the waveform distortion rate.
[0015] By adopting the above technical solution, the RF signal is divided into multiple signal segments according to a preset time window. The difference between the maximum and minimum signal values in each segment is extracted to obtain the signal fluctuation range. The signal segments are then subjected to Fourier series expansion to obtain the fundamental and harmonic components. Their ratio is then calculated to obtain the waveform distortion rate. This allows accurate capture of the changing characteristics of the RF signal in the time and frequency domains. The fluctuation range reflects the dynamic changes in the signal amplitude and can detect abnormal fluctuations when the signal is interfered with. The waveform distortion rate characterizes the purity of the signal and quantitatively describes the degree of signal distortion through the ratio of the harmonic component to the fundamental component. When an illegal device attempts to interfere with or tamper with the RF signal, it will inevitably cause abnormal changes in the signal fluctuation range or waveform distortion rate. The system can promptly detect such anomalies and take protective measures, thereby improving the security and reliability of the smart card data interaction process.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, comparing the frequency band and intensity of the stolen signal with the signal fingerprint to identify abnormal radio frequency signals specifically includes: Extract the frequency band distribution characteristics and energy distribution characteristics of the stolen signal; Calculate the correlation coefficient between the modulation parameters of the stolen signal and the characteristic sequence; When the correlation coefficient is less than a preset correlation coefficient threshold, the stolen signal is marked as a suspicious signal; Count the duration and frequency of suspicious signals; When the duration exceeds a preset time or the frequency of occurrence exceeds a preset frequency, the suspicious signal is confirmed to be an abnormal radio frequency signal.
[0017] By employing the above technical solution, the frequency and energy distribution characteristics of the stolen signal are extracted, the correlation coefficient between its modulation parameters and the characteristic sequence is calculated, and a multi-dimensional judgment is made based on the correlation coefficient, the duration of the suspicious signal, and the frequency of occurrence. The correlation coefficient reflects the degree of similarity between the suspicious signal and the normal signal, while the duration and frequency of occurrence characterize the behavioral characteristics of the suspicious signal. The combination of these three forms a more reliable basis for judgment. This multi-level recognition method can effectively distinguish between occasional signal interference and persistent malicious theft, reducing the false alarm rate while improving the detection rate of real theft, giving smart cards more precise security protection capabilities.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, calculating the gain weights of the antenna array in different directions specifically includes: Obtaining the amplitude of the frequency component of the abnormal radio frequency signal and the arrival direction of the abnormal radio frequency signal; Divide the coverage area of the antenna array into multiple spatial sectors based on the direction of arrival; Calculate the average power of abnormal RF signals in each spatial sector; Calculate the power attenuation coefficient of each spatial sector based on the average power; Based on the power attenuation coefficient, the antenna gain coefficient of each spatial sector is calculated using the minimum mean square error criterion; The antenna gain coefficient is normalized to obtain the gain weights of the antenna array in different directions.
[0019] By adopting the above technical solution, the frequency component amplitude and arrival direction of the abnormal RF signal are obtained, the antenna array coverage range is divided into multiple spatial sectors, and the average power of the abnormal signal in each sector is statistically calculated. The power attenuation coefficient is calculated, and the antenna gain coefficient is determined using the minimum mean square error criterion and normalized to obtain the gain weight, thereby achieving precise control of the directional performance of the antenna array. The power attenuation coefficient reflects the attenuation law of the abnormal signal in different spatial regions. The minimum mean square error criterion ensures the optimal solution of the gain coefficient, and the normalization process ensures good numerical stability of the gain weight. This antenna gain optimization method based on spatial characteristics can adaptively adjust the directional performance of the antenna array according to the actual distribution characteristics of the abnormal signal. While maintaining good reception performance for normal signals, it effectively suppresses abnormal signals in specific directions, thereby improving the ability of smart cards to resist spatial domain attacks.
[0020] In a second aspect, an embodiment of the present application provides a smart card reading and writing system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the system to execute the method described in the first aspect and any possible implementation method of the first aspect.
[0021] In a third aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on a system, enables the system to execute the method described in the first aspect and any possible implementation of the first aspect.
[0022] In a fourth aspect, an embodiment of the present application provides a computer program product, which, when executed on a system, enables the system to execute the method described in any possible implementation manner in the first aspect.
[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. The present application provides a smart card reading and writing method. By acquiring the temperature change rate of the smart card chip, the voltage fluctuation value of the internal circuit, and the radio frequency signal characteristics, a corresponding relationship between the temperature and voltage response characteristics and the radio frequency signal is established, and the number of real radio frequency signals can be accurately identified. Combined with the signal strength difference in each direction collected by the directional antenna array, the incident direction of the radio frequency signal can be accurately located, thereby distinguishing between legitimate user operation signals and potential malicious theft signals. When the system detects that there is an incident direction that exceeds the preset user operation range, the resonant circuit parameters are adjusted so that the smart card only responds to legitimate signals within the preset range, and does not respond to theft signals in other directions, thereby preventing illegal reading devices from obtaining sensitive data in the smart card. This protection mechanism based on multi-dimensional signal characteristics and intelligent tuning improves the security of smart card data interaction while ensuring normal communication functions, thereby improving the user's information security and property security.
[0024] 2. The present application provides a smart card reading and writing method. By collecting the modulation parameters of the radio frequency signal during the data interaction process, combined with the fluctuation range and waveform distortion rate analysis, the system establishes the signal fingerprint characteristics of the reading and writing device. Through the frequency domain analysis of the induced current of the smart card, the system can effectively identify the frequency band and intensity characteristics of the stolen signal. By comparing these characteristics with the established signal fingerprint and combining the directional gain control of the antenna array, the system can apply directional suppression to abnormal radio frequency signals that exceed the threshold. This active protection mechanism based on signal feature analysis can not only detect potential attack behaviors in a timely manner, but also effectively suppress illegal signals through dynamic adjustment of the antenna gain, thereby improving the security protection level of the smart card during data interaction.
[0025] 3. The present application provides a smart card reading and writing method. By adopting the above technical solution, the frequency component amplitude and arrival direction of the abnormal radio frequency signal are obtained, the coverage range of the antenna array is divided into multiple spatial sectors, and the average power of the abnormal signal is statistically calculated in each sector. The power attenuation coefficient is calculated, and the antenna gain coefficient is determined by the minimum mean square error criterion and normalized to obtain the gain weight, thereby realizing precise control of the directional performance of the antenna array. The power attenuation coefficient reflects the attenuation law of the abnormal signal in different spatial regions, the minimum mean square error criterion ensures the optimal solution of the gain coefficient, and the normalization process makes the gain weight have good numerical stability. This antenna gain optimization method based on spatial characteristics can adaptively adjust the directional performance of the antenna array according to the actual distribution characteristics of the abnormal signal. While maintaining good reception performance for normal signals, it effectively suppresses abnormal signals in specific directions, thereby improving the ability of smart cards to resist spatial domain attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a flow chart of a smart card reading and writing method in an embodiment of the present application.
[0027] Figure 2 This is a flow chart of an abnormal signal suppression method based on signal fingerprint and antenna gain control in an embodiment of the present application.
[0028] Figure 3 This is a schematic diagram of the physical device structure of a smart card reading and writing system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The terms used in the following examples of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in this application refers to any or all possible combinations comprising one or more of the listed items.
[0030] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0031] The following uses an embodiment and combines Figure 1, a smart card reading and writing method in an embodiment of the present application is described: See also Figure 1 , which is a flow chart of a smart card reading and writing method in an embodiment of the present application.
[0032] S101, receiving a read / write instruction triggered by a user; The system receives user-triggered read / write instructions, which include the type of operation for interacting with the smart card. In this step, the system receives user-triggered read / write instructions, which include the type of operation for interacting with the smart card. Users can trigger read / write instructions in a variety of ways, such as by inputting commands through buttons, touch screens, voice, gestures, or sending commands through external devices such as card readers. The system receives user-triggered read / write instructions through various input and communication interfaces.
[0033] When the system receives a read or write command, it can parse and verify it to determine its validity and integrity. The system can check the command's format, parameters, permissions, and other aspects to ensure compliance with regulations and security requirements. If the command is incorrect or the permissions are insufficient, the system can refuse to execute the command and return an appropriate error message to the user.
[0034] S102, obtaining the temperature change rate of the smart card chip, the voltage fluctuation value of the internal circuit, and the signal characteristics of the radio frequency signal received by the smart card within a preset time window; The system acquires the temperature change rate of the smart card chip, the voltage fluctuation value of the internal circuit, and the signal characteristics of the radio frequency signals received by the smart card within a preset time window. These characteristics include the signal strength of each radio frequency signal. In this step, the system acquires the temperature change rate of the smart card chip, the voltage fluctuation value of the internal circuit, and the signal characteristics of the radio frequency signals received by the smart card within a preset time window. The signal characteristics include the signal strength of each radio frequency signal. These parameters reflect the operating status and environmental conditions of the smart card and can be used for subsequent security analysis and control.
[0035] The system can obtain these parameters through the smart card's built-in sensors and measurement circuits. For example, the smart card can include a temperature sensor, voltage detection circuit, and RF receiver circuit to monitor chip temperature, power supply voltage, and received RF signals in real time. The system can periodically read the outputs of these sensors and detection circuits to obtain the corresponding parameter values.
[0036] S103, determining the number of valid radio frequency signals received by the smart card according to the ratio between the temperature change rate and the voltage fluctuation value; The system determines the number of valid RF signals received by the smart card based on the ratio between the temperature change rate and the voltage fluctuation value. This ratio characterizes the temperature and voltage response characteristics caused by a single RF signal. In this step, the system determines the number of valid RF signals received by the smart card based on the ratio between the temperature change rate and the voltage fluctuation value. This ratio reflects the temperature and voltage response characteristics caused by a single RF signal. By analyzing this ratio, the system can determine whether the received RF signal is a valid signal and count the number of valid signals.
[0037] Specifically, the system can divide the temperature change rate by the voltage fluctuation value to obtain a ratio. This ratio represents the temperature change rate caused by a unit voltage fluctuation. Different RF signals will cause different temperature and voltage responses, and therefore the corresponding ratio values will also be different. The system can set a ratio threshold based on empirical values or historical data. When the ratio is greater than the threshold, the corresponding RF signal is considered a valid signal; when the ratio is less than the threshold, the corresponding RF signal is considered an invalid signal or an interference signal. By performing ratio judgment on all received RF signals, the system can count the number of valid RF signals.
[0038] S104, when the number of valid radio frequency signals detected is greater than a preset value, activating the directional antenna array of the smart card; When the number of valid RF signals detected exceeds a preset value, the smart card's directional antenna array is activated. The directional antenna array comprises at least three antenna elements arranged in different directions. In this step, when the system detects that the number of valid RF signals exceeds a preset value, it activates the smart card's directional antenna array. The directional antenna array comprises at least three antenna elements arranged in different directions. By activating the directional antenna array, the system can achieve directional reception and recognition of RF signals.
[0039] Specifically, the system can design and deploy a directional antenna array based on application requirements and the size of the smart card. For example, the system can arrange multiple antenna elements at different angles, such as 90 and 120 degrees, along the edges or corners of the smart card. Each antenna element can be a highly directional antenna, such as a Yagi antenna or microstrip antenna. The system can control the operating state of each antenna element through switching circuits, activating and deactivating the antenna array.
[0040] When there are a large number of valid RF signals, the smart card may be exposed to RF signals from multiple directions. In this case, the system needs to use a directional antenna array to separate and identify RF signals from different directions to determine the signal's source and intent. Based on the geometric arrangement of the antenna array and the reception characteristics of each antenna element, the system can calculate parameters such as the incident angle and distance of RF signals from different directions.
[0041] S105, respectively collecting the radio frequency signal strength received by each antenna unit, and calculating the signal strength difference of each antenna unit; In this step, the system collects the RF signal strength received by each antenna element in the directional antenna array and calculates the signal strength difference between the antenna elements. By analyzing the signal strength difference, the system can estimate the incident direction of the RF signal.
[0042] Specifically, the system can equip each antenna unit with a signal strength detection circuit to measure the strength of the RF signal received by the antenna in real time. Signal strength can be expressed in physical quantities such as voltage, current, and power. The system can convert the analog signal strength value into a digital value using an analog-to-digital converter and store it in memory.
[0043] After obtaining the signal strength values for each antenna element, the system calculates the signal strength differences between each antenna element. For example, for three antenna elements A, B, and C, the system can calculate the signal strength differences for AB, AC, and BC. The magnitude and sign of the signal strength differences reflect the relative strength of the RF signal between the different antenna elements and can be used to estimate the signal's incident direction.
[0044] It's important to note that in real-world environments, the receiving sensitivity of different antenna units may vary due to factors such as antenna manufacturing processes and circuit parameters. To eliminate estimation errors caused by these differences, the system can calibrate the antenna units to obtain calibration coefficients for their sensitivity. When calculating signal strength differences, the system can factor these calibration coefficients into its calculations to improve the accuracy of direction estimation.
[0045] Furthermore, when a smart card is simultaneously exposed to RF signals from multiple directions, the signal received by each antenna unit may be a superposition of multiple signals. To distinguish signals from different directions, the system can incorporate blind source separation algorithms, such as independent component analysis and sparse decomposition, to separate the aliased signals into independent signal components and then estimate the direction of each component. This approach can improve the system's adaptability and reliability in complex signal environments.
[0046] S106. Determine the incident direction of each radio frequency signal based on the signal strength difference, and compare each incident direction with a preset user operation range; The incident direction of each RF signal is determined based on the signal strength difference, and each incident direction is compared with the preset user operation range. Specifically, the signal strength ratio between adjacent antenna units is calculated to obtain a sequence of signal strength ratios in multiple directions; the signal strength ratio sequence is peak detected to determine the antenna unit combination with the largest signal strength; the main incident direction of the RF signal is calculated based on the physical installation angle of the antenna unit combination; the angle scanning range and scanning step size are set based on the main incident direction; the secondary incident direction is determined based on the signal strength distribution of each antenna unit within the angle scanning range; the main incident direction and the secondary incident direction are combined to obtain the incident direction of each RF signal. In this step, the system determines the incident direction of each RF signal based on the signal strength difference, and compares each incident direction with the preset user operation range. Based on the comparison results, the system can determine whether the RF signal comes from user operation, and then identify potential security threats.
[0047] Specifically, the system first calculates the angle of incidence of each RF signal based on the signal strength difference between each antenna element. The system leverages the geometric arrangement of the antenna array and the directional characteristics of each antenna element to establish a model that correlates signal strength differences with angle of incidence. Common angle estimation algorithms include direction of arrival, MUSIC, and ESPRIT. By substituting the signal strength difference into the model, the system can determine the horizontal and vertical angles of incidence of the RF signal.
[0048] After determining the incident angle of the RF signal, the system compares it with a preset user operation range. This range is pre-set based on the smart card's application scenario and usage habits, indicating the possible directions from which a user might operate the smart card. For example, for an access card, the user operation range might be set to a certain angle from the front of the smart card; for a mobile phone SIM card, the user operation range might be set to a certain angle from the back of the phone.
[0049] The system can use different comparison methods to determine whether the RF signal's incident angle falls within the user's operating range. One method sets an angle threshold. If the difference between the incident angle and the center angle of the user's operating range is less than the threshold, the signal is considered to be from a user operation; otherwise, the signal is considered to be from a non-user operation. Another method models the user's operating range as one or more angle intervals. If the incident angle falls within any of these intervals, the signal is considered to be from a user operation; otherwise, the signal is considered to be from a non-user operation.
[0050] S107: When an incident direction beyond the preset user operation range is detected, determining that the radio frequency signal corresponding to the incident direction beyond the preset user operation range is a stolen signal; In this step, when the system detects an incident direction that is beyond the preset user operation range, the system will determine that the RF signal corresponding to this direction is a stealing signal. The stealing signal indicates that there may be an illegal reading and writing device attempting to steal data from the smart card.
[0051] Through the comparison in step S106, the system can detect that the incident angles of some RF signals significantly deviate from the normal user operating range. These abnormal signals are likely from third-party illegal reading and writing devices. Illegal devices may use high-powered directional antennas to conduct contactless attacks on smart cards from a long distance or hidden location, attempting to obtain sensitive data from the smart card.
[0052] Once a tapping signal is confirmed, the system must implement appropriate security measures to prevent unauthorized access to the smart card data. A common approach is to generate a random number within the smart card and obfuscate it with the sensitive data being transmitted, preventing eavesdroppers from directly accessing the original data. The system can also dynamically adjust the intensity and frequency of data obfuscation based on the threat level of the tapping signal.
[0053] The system can also enhance smart card security through other means, such as using secure storage chips and encrypted transmission protocols. Upon detecting a theft signal, the system can immediately interrupt the current data exchange and issue a warning to the user and administrator. Furthermore, the system can record characteristic parameters of the theft signal, such as signal strength and modulation method, for subsequent analysis and tracking.
[0054] S108, adjusting the resonant circuit parameters of the smart card according to the temperature change rate, so that the smart card selectively responds to radio frequency signals within the user's operating range; The system adjusts the resonant circuit parameters of the smart card based on the temperature change rate, so that the smart card selectively responds to radio frequency signals within the user operation range. The system specifically includes: calculating the temperature change trend based on the temperature change rate and dividing the temperature change trend into an increasing range, a stable range, and a decreasing range; determining the adjustment direction and adjustment step size of the resonant circuit based on the temperature change characteristics of different ranges, where the adjustment direction represents the rise and fall of the resonant frequency, and the adjustment step size represents the frequency change of a single adjustment; controlling the charging and discharging process of the variable capacitor module based on the adjustment direction and adjustment step size to achieve dynamic adjustment of the resonant frequency and obtain an initial resonant frequency; collecting the frequency characteristics of the radio frequency signals within a preset user operation range and calculating the matching degree between the frequency characteristics and the initial resonant frequency; adjusting the damping resistance value of the resonant circuit based on the matching degree to control the coverage range of the resonant bandwidth so that the resonant bandwidth completely covers the radio frequency signal frequencies within the preset user operation range; detecting the standing wave ratio and quality factor of the resonant circuit in real time, and triggering a resonant parameter fine-tuning mechanism when the standing wave ratio is greater than a first preset threshold or the quality factor is less than a second preset threshold; and correcting the initial resonant frequency through the fine-tuning mechanism to obtain a final resonant frequency, so that the smart card only responds to radio frequency signals within the preset user operation range.
[0055] In this step, the system dynamically adjusts the parameters of the smart card's internal resonant circuit based on the temperature gradient of the smart card chip, enabling the smart card to selectively respond to RF signals within a preset user operating range. This step is intended to prevent the smart card from responding to RF signals emitted by unauthorized readers or writers, thereby enhancing the security of the smart card. In addition to adjusting the resonant circuit parameters based on the temperature gradient, the system can also consider other factors, such as voltage fluctuations and environmental noise, to further improve the accuracy and reliability of the resonant circuit parameter adjustment.
[0056] Specifically, the system first calculates the temperature change rate of the smart card chip based on data collected by the temperature sensor. Then, based on the magnitude and trend of the temperature change rate, it is divided into different temperature change characteristic intervals: rising interval, stable interval, and falling interval. For each temperature change characteristic interval, the system pre-sets corresponding resonant circuit adjustment strategies, including the direction of adjusting the resonant frequency (increase or decrease) and the adjustment step size (the amount of frequency change per adjustment). Based on the current temperature change characteristic interval, the system selects the corresponding adjustment strategy and dynamically adjusts the resonant frequency by controlling the charging and discharging process of the variable capacitor module in the resonant circuit to obtain an initial resonant frequency. The system then further collects legitimate RF signals within a preset user operating range, extracts their frequency characteristics, and calculates the degree of match between these frequency characteristics and the current resonant frequency. Based on the degree of match, the system adaptively adjusts the damping resistance value of the resonant circuit. By controlling the frequency response attenuation rate within a certain range near the resonant frequency, the system adjusts the frequency selectivity of the resonant circuit, namely the resonant bandwidth, to fully cover all RF signal frequencies within the preset user operating range while ignoring RF signals outside this range. During the operation of the resonant circuit, the system also needs to monitor the working status of the resonant circuit in real time and obtain some key parameters reflecting the quality of the resonant circuit, such as standing wave ratio, quality factor, etc. When it is detected that the standing wave ratio is too large or the quality factor is too small, the parameter fine-tuning mechanism is started to further optimize and adjust the initial resonant frequency to obtain the corrected final resonant frequency, thereby dynamically maintaining the resonant circuit's selective response to RF signals within the preset user operating range.
[0057] S109: Establish a secure communication channel between the smart card and a read / write device within a preset user operation range, and execute data interaction operations corresponding to the read / write instructions.
[0058] After the smart card successfully and selectively responds to RF signals within the preset user operation range, this step establishes secure data communication with a legitimate reader / writer within that range, executes the user-triggered read / write instructions, and completes the corresponding data exchange operation. This step is the final step in the smart card user operation process and is a key step in the smart card's data storage and security authentication functions. The system can adopt a variety of communication security protocols and data encryption algorithms, such as SSL and TLS, to ensure the confidentiality, integrity, and non-repudiation of data exchange between the smart card and the reader / writer.
[0059] To establish a secure communication channel, the smart card and the reader / writer must first perform an authentication process. The system uses an asymmetric encryption algorithm (such as RSA or ECC) to generate a public-private key pair for the smart card. The private key is stored in the smart card's secure storage area, and the public key is sent to the reader / writer. The reader / writer then encrypts a random value using the smart card's public key and sends it to the smart card. The smart card decrypts the random value with its private key, signs the value, and returns the signature to the reader / writer. The reader / writer verifies the signature using the smart card's public key. If verification succeeds, the smart card's identity is confirmed and access is granted. If verification fails, the smart card's access request is denied. After authentication is complete, the smart card and reader / writer must negotiate a session key for subsequent encrypted data exchange. Key exchange algorithms such as Diffie-Hellman can be used to negotiate a shared session key without directly transferring keys. All subsequent data exchanges between the two parties are symmetrically encrypted using the session key to ensure secure communication.
[0060] During the execution of read / write instructions, the smart card needs to perform a validity check on the instructions sent by the read / write device to prevent illegal instructions from tampering with the smart card's internal data. The smart card and the read / write device agree on a set of instruction format specifications and encoding methods. After decoding the received instruction, the smart card first determines whether its format and content comply with the specifications. If the instruction does not comply, the smart card directly discards it and does not respond. The smart card then performs an instruction permission check, setting appropriate permission requirements (such as access control and identity authentication) based on the instruction type. Only instructions with sufficient permissions can pass the smart card's security check and be allowed to execute. For instructions involving sensitive data operations (such as key generation and PIN code verification), the smart card also needs to isolate execution within a secure operating environment (such as ARM TrustZone and Intel SGX) to prevent unauthorized access to sensitive data by the read / write device and intermediaries.
[0061] In the above embodiment, by obtaining the temperature change rate of the smart card chip, the voltage fluctuation value of the internal circuit, and the radio frequency signal characteristics, and establishing a correspondence between the temperature and voltage response characteristics and the radio frequency signal, the actual number of radio frequency signals can be accurately identified. Combined with the signal strength difference in each direction collected by the directional antenna array, the incident direction of the radio frequency signal can be accurately located, thereby distinguishing between legitimate user operation signals and potential malicious theft signals. When the system detects that there is an incident direction that exceeds the preset user operation range, by adjusting the resonant circuit parameters, the smart card only responds to legitimate signals within the preset range, and does not respond to theft signals in other directions, thereby preventing illegal reading devices from obtaining sensitive data in the smart card. This protection mechanism based on multi-dimensional signal characteristics and intelligent tuning improves the security of smart card data interaction while ensuring normal communication functions, thereby improving the user's information security and property security.
[0062] In the first embodiment, a protection mechanism based on multi-dimensional signal characteristics and intelligent tuning in the process of reading and writing smart cards is introduced. This mechanism can effectively identify and prevent stolen signals from illegal directions. In order to further improve the security performance of smart cards in the process of data interaction, this application also provides an abnormal signal suppression method based on signal fingerprint and antenna gain control. This method achieves more accurate identification and suppression of stolen signals by deeply analyzing the modulation characteristics and energy distribution characteristics of radio frequency signals and combining the spatial selectivity of antenna arrays. Figure 2 , a method for suppressing abnormal signals based on signal fingerprint and antenna gain control in an embodiment of the present application is described: See also Figure 2 , which is a flow chart of an abnormal signal suppression method based on signal fingerprint and antenna gain control in an embodiment of the present application.
[0063] S201, collecting the peak value, signal period and phase offset of the radio frequency signal during the data interaction process to obtain the modulation parameters of the radio frequency signal; In this step, the system collects the RF communication signal from the smart card when it interacts with the reader / writer device, extracting characteristic parameters such as the signal's peak value, period, and phase offset as key metrics for characterizing the modulation characteristics of the RF signal. The system employs a variety of signal acquisition and feature extraction techniques, such as analog-to-digital conversion and Fourier transform, to accurately sample and analyze the RF signal. In addition to the basic modulation parameters mentioned above, the system can further extract other RF signal features, such as the spectrum, envelope, and power spectral density, to obtain a more comprehensive and fine-grained description of the signal characteristics.
[0064] Specifically, the system acquires the RF signal through the receiving antenna in the RF front-end circuit. It then uses an analog-to-digital converter to convert the RF signal from the analog domain to the digital domain, generating discrete signal sampling data. The sampled data is preprocessed to filter out noise and interference. The system then calculates the peak value of the RF signal by maximizing and minimizing the signal sampling data. The period of the RF signal is determined by detecting the time interval between adjacent peaks or troughs. The phase offset of the RF signal is determined by calculating the phase difference between the carrier signal and the modulated signal. The peak value, period, and phase offset are used as a set of feature vectors to characterize the modulation characteristics of the RF signal.
[0065] S202, segmenting the modulation parameters according to a preset time window, and calculating the signal fluctuation range and waveform distortion rate in each segment; The system divides the modulation parameters into segments according to a preset time window, and calculates the signal fluctuation range and waveform distortion rate in each segment. Specifically, it divides the sampling data of the RF signal into multiple signal segments according to the preset time window; extracts the difference between the maximum and minimum values of the signal in each signal segment to obtain the signal fluctuation range; performs Fourier series expansion on the signal segment to obtain the fundamental component and harmonic component; calculates the ratio of the harmonic component to the fundamental component to obtain the waveform distortion rate.
[0066] In this step, the system further analyzes the dynamic variation characteristics of the modulation parameters in the time domain based on the RF signal modulation parameters extracted in the previous step. The system first segments the sampled data stream of the RF signal according to fixed time windows (such as 10ms, 50ms, etc.) to obtain a series of time segments of the modulation parameters. Then, within each time segment, the system calculates the fluctuation range and waveform distortion of the modulation parameters within the segment as two key indicators to characterize the dynamic variation characteristics of the modulation parameters. These two indicators can reflect the stability and dynamic range of the RF signal modulation state and are of great significance for identifying abnormal modulation behavior.
[0067] Specifically, for each time segment of the modulation parameter, the system first extracts the maximum and minimum values of the parameter within the segment. The difference between the two is the fluctuation range of the modulation parameter within the segment, which characterizes the dynamic range of the modulation parameter change within the segment. Then, the system performs Fourier transform on the modulation parameter within the segment, converts the time domain signal into a frequency domain signal, and obtains a series of frequency components and their corresponding amplitudes. In the frequency domain, the fundamental component (i.e., the component with the lowest frequency) is regarded as an ideal modulation signal, and other high-frequency components are regarded as distortion components introduced by waveform distortion. The ratio of the sum of the amplitudes of all distortion components to the amplitude of the fundamental component is calculated as the waveform distortion rate of the modulation parameter in the segment, which characterizes the degree to which the modulation waveform in the segment deviates from the ideal sine wave. Repeat the above process to calculate the fluctuation range and waveform distortion rate for each segment of all modulation parameters.
[0068] S203, generating a feature sequence based on the fluctuation range and the waveform distortion rate, and using the feature sequence as a signal fingerprint of the read / write device; In this step, the system arranges the modulation parameter fluctuation range and waveform distortion rate calculated in the previous step in time-segment order to form a multi-dimensional feature sequence vector. This feature sequence reflects the dynamic changes and detailed characteristics of the modulation parameters and can serve as a unique fingerprint to distinguish the RF signals of different reader / writer devices. The system treats each reader / writer's feature sequence as a standard fingerprint and stores it in the fingerprint library in the secure area of the smart card. During subsequent data exchange, the feature sequence of the received RF signal can be compared with the standard fingerprints in the fingerprint library to identify the source of the RF signal, verify the true identity of the reader / writer, and prevent counterfeit and spoofing attacks.
[0069] Specifically, when generating a feature sequence, the system can use different encoding and mapping methods to quantize the fluctuation range and distortion rate into a series of discrete feature values. For example, the fluctuation range and distortion rate can be linearly quantized and encoded, mapping continuous values to several discrete quantization levels. The fluctuation range and distortion rate can also be nonlinearly quantized and encoded, and the mapping conversion from continuous values to discrete values can be achieved according to a preset mapping curve. After quantization encoding, the fluctuation range features and distortion rate features within each time segment are arranged in sequence to form a fixed-length feature sequence vector. In order to improve the efficiency and accuracy of fingerprint matching, the system can perform dimensionality reduction and compression on the feature sequence to remove information redundancy and obtain a more compact feature fingerprint.
[0070] S204, collecting the induced current value of the smart card and converting the induced current value into a voltage value; This step is an important part of the smart card abnormal signal detection process. By collecting the induced current of the smart card, the RF signal energy received by the antenna array is monitored in real time. The smart card integrates multiple independent induction coils, which are connected to the antenna units in different directions in the antenna array. When the antenna array receives an external RF signal, a corresponding current signal will be induced in the induction coil. The system samples the current signal of each induction coil through a dedicated sampling circuit to obtain a series of discrete current values that reflect the spatial distribution characteristics of the RF signal. To facilitate subsequent processing, the system converts the sampled current value into a corresponding voltage value through a conversion circuit (such as an I / V converter) as an equivalent representation of the spatial energy distribution of the RF signal.
[0071] Specifically, the system can use a high-speed ADC (analog-to-digital converter) to implement current sampling of each induction coil. Since the frequency of the RF signal is relatively high, in order to avoid sampling distortion, the sampling frequency of the ADC needs to be high enough, at least to meet the requirements of the Nyquist sampling theorem. At the same time, in order to ensure sampling accuracy, the quantization bit number of the ADC also needs to be high enough, usually not less than 12 bits. By connecting the input end of the high-speed ADC in series with the induction coil, real-time sampling of the induced current can be achieved. The original current value obtained by sampling is a discrete data point of the time series, and the time interval of the data point is determined by the sampling frequency of the ADC. In order to reduce the complexity of data processing, the system can downsample the sampled data and appropriately reduce the time resolution of the data point.
[0072] The system then uses an I / V conversion circuit to convert the current sampled values into voltage values. This conversion circuit can be implemented using analog circuits such as transimpedance amplifiers and operational amplifiers, or it can be performed directly in the digital domain. The voltage and current values conform to Ohm's law, and the conversion factor is determined by the sampling resistor. By controlling the value of the sampling resistor, the amplification factor of the conversion circuit can be adjusted to ensure that the output voltage falls within the optimal range of the ADC. After the conversion is complete, the voltage values corresponding to the individual induction coils are permuted and combined to produce a multidimensional voltage vector that reflects the spatial energy distribution of the RF signal.
[0073] S205, performing fast Fourier transform on the voltage value to obtain the amplitude of the frequency component; In this step, the system performs frequency domain analysis on the induced voltage values converted in the previous step. Using a Fourier transform, the discrete voltage sequence in the time domain is mapped to the frequency domain, yielding frequency components and their corresponding amplitudes that reflect the spectral characteristics of the RF signal. By observing the amplitude distribution of these frequency components, the energy distribution of the RF signal across different frequency bands can be determined, further enabling the identification of possible abnormal modulation signals and their strength. Compared to time domain analysis, frequency domain analysis more intuitively reveals the signal's spectral structure and energy distribution patterns, providing new criteria for identifying abnormal signals.
[0074] Specifically, the system uses the Fast Fourier Transform (FFT) algorithm to transform the discrete voltage sequence. The FFT is an efficient Fourier transform calculation method. Through a clever divide-and-conquer approach, it reduces the computational complexity of the discrete Fourier transform from O(n^2) to O(nlogn), significantly reducing the computational overhead of frequency domain analysis. The system reorganizes the discrete voltage sequence according to the FFT input requirements, forming a complex vector of length N (usually an integer power of 2), where the real part is the original voltage value and the imaginary part is zero. The FFT library is then called to perform an FFT on this complex vector, resulting in a complex vector of the same length N, representing the frequency components of the original signal at N discrete frequency points. These frequency components are squared modulo the energy amplitude at each frequency point. Based on the sampling frequency and the number of FFT points, the actual frequency value corresponding to each frequency point can be calculated.
[0075] S206. Determine the frequency band and intensity of the stolen signal according to the amplitude of the frequency component; This step aims to identify potential theft signals by analyzing the frequency characteristics of the induced current of the smart card, determine its main frequency distribution range (i.e., frequency band) and signal strength, and provide a basis for subsequent abnormal signal judgment. Since theft signals usually have specific modulation methods and coding rules, their spectral characteristics also show certain regularity. The system can summarize the spectral feature templates of common theft signals through a large amount of data analysis and modeling in advance. During the actual detection process, the collected frequency component amplitudes are matched with these templates to identify the frequency bands of suspected theft signals. In addition, the system can also calculate the signal power in different frequency bands through algorithms such as energy detection to determine the strength of the theft signals.
[0076] In specific implementation, the system first normalizes the frequency component amplitude data obtained in step S205 to eliminate dimensional differences between different frequency components, facilitating subsequent feature extraction and comparison. The system then uses a sliding window approach to perform local feature extraction across the entire frequency axis. Specifically, a fixed-width frequency window is set and slid from low frequency to high frequency along the frequency axis. Within each window, statistical features of the amplitude, such as mean, variance, and kurtosis, are extracted to produce a series of feature vectors. The system then performs a similarity match between these feature vectors and pre-established stolen signal spectrum templates. If the degree of match between a feature vector within a frequency window and a stolen signal template exceeds a preset threshold, the frequency range within that window is marked as a suspected stolen signal frequency band. Within each suspected stolen signal frequency band, the system further calculates the sum or root mean square value of the frequency component amplitudes as a measure of the strength of the stolen signal within that frequency band.
[0077] S207, comparing the frequency band and intensity of the stolen signal with the signal fingerprint to identify abnormal radio frequency signals; The system compares the frequency band and intensity of the stolen signal with the signal fingerprint to identify abnormal RF signals, specifically including: extracting the frequency band distribution characteristics and energy distribution characteristics of the stolen signal; calculating the correlation coefficient between the modulation parameters of the stolen signal and the characteristic sequence; when the correlation coefficient is less than the preset correlation coefficient threshold, marking the stolen signal as a suspicious signal; counting the duration and frequency of occurrence of the suspicious signal; when the duration exceeds the preset time or the frequency of occurrence exceeds the preset frequency, confirming that the suspicious signal is an abnormal RF signal.
[0078] Based on the determination of the suspected stolen signal frequency band in the previous step, this step further compares it with the signal fingerprint of a normal read / write device to identify the real abnormal RF signal from the suspected frequency band. The so-called signal fingerprint is to extract a series of stable feature parameters through long-term learning of the RF signal of a normal read / write device, and form a multi-dimensional feature vector to characterize the inherent properties of the normal signal. When the frequency band and intensity characteristics of the detected suspected stolen signal are significantly different from the normal signal fingerprint, it can be determined that the signal is an abnormal RF signal. This abnormal signal detection method based on deep learning can effectively reduce the false positive rate. In addition to using a pre-trained signal fingerprint model, the system can also support incremental learning during actual use, continuously optimize the signal fingerprint model, and improve the detection rate of abnormal signals.
[0079] When performing signal fingerprint comparison, the system first extracts a series of signal features from the suspected stolen signal frequency band, including the energy distribution within the frequency band, modulation parameters (such as carrier frequency and modulation mode), and symbol rate, to form a feature vector with the same dimensions as the signal fingerprint. The system then uses an appropriate similarity measurement method, such as Euclidean distance or cosine similarity, to calculate the degree of match between the feature vector and the signal fingerprint. If the degree of match is lower than a preset threshold, the signal in the suspected frequency band is determined to be an abnormal RF signal, and the abnormal signal's strength, duration, and occurrence time, among other attributes, are recorded for subsequent analysis and disposal. If the degree of match is higher than the threshold, the suspected frequency band is marked as a normal signal and no further processing is performed. The system can count the frequency and regularity of abnormal signals over multiple consecutive detection cycles to comprehensively assess the security status of the current RF environment.
[0080] S208. When the strength of the abnormal radio frequency signal is detected to exceed a preset threshold, calculating the gain weights of the antenna array in different directions; When the strength of the abnormal RF signal is detected to exceed a preset threshold, the gain weights of the antenna array in different directions are calculated. Specifically, the amplitude of the frequency component of the abnormal RF signal and the arrival direction of the abnormal RF signal are obtained; the coverage range of the antenna array is divided into multiple spatial sectors according to the arrival direction; the average power of the abnormal RF signal is statistically calculated in each spatial sector; the power attenuation coefficient of each spatial sector is calculated based on the average power; based on the power attenuation coefficient, the antenna gain coefficient of each spatial sector is calculated using the minimum mean square error criterion; the antenna gain coefficient is normalized to obtain the gain weights of the antenna array in different directions.
[0081] This step aims to suppress the impact of abnormal signals in the signal direction dimension by adjusting the gain characteristics of the smart card antenna array when the system detects abnormal RF signals with high strength. Compared with traditional single-antenna systems, antenna arrays can provide greater freedom to control the spatial selectivity of the system. By rationally designing the geometric arrangement of antenna units and applying appropriate amplitude and phase weights, the antenna array can form the desired radiation pattern and selectively receive or suppress signals from different directions. Therefore, this characteristic of the antenna array can be used to specifically weaken the signal strength of abnormal RF signals and improve the communication environment of the smart card. The system can also strike a balance between gain suppression and radiation pattern conformality based on actual needs, taking into account the needs of suppressing abnormal signals and ensuring normal communication.
[0082] In its implementation, the system first needs to estimate the direction of incidence of the anomalous RF signal. Due to the size limitations of the smart card, the antenna array's aperture is small, making it difficult to directly estimate the direction with high accuracy. Therefore, the system can employ a coarse direction estimation method based on signal strength. Based on the differences in signal strength received by different antenna elements in the antenna array, the system estimates the approximate angle of incidence of the anomalous signal. Specifically, the system divides the array's omnidirectional field of view into several sectors, with the direction of the anomalous signal falling within the sector with the highest intensity. Based on the anomalous signal's direction, the system further calculates the gain suppression weight in that direction. A commonly used method is the zero-point constraint method, which aims to suppress the anomalous signal by creating a zero or minimum point of radiation intensity in the direction of the anomalous signal. Using the anomalous signal's direction as a constraint and optimizing suppression strength and minimizing mainlobe gain loss as the optimization objectives, the system calculates the complex weights for each antenna array element, resulting in low gain in the direction of the anomalous signal. Due to resource and power constraints on the smart card, the system also needs to minimize algorithm complexity and hardware implementation costs when calculating the gain weights. While meeting the suppression criteria, an optimization algorithm with low computational complexity and good real-time performance is selected.
[0083] S209: Changing the directivity of the antenna array by adjusting the gain weight, thereby achieving gain suppression for the stolen signal.
[0084] This step applies the gain weights calculated in the previous step to the antenna array of the smart card. By adjusting the feed network of each antenna unit, the array produces the expected directional pattern, forming a low-gain area in the incident direction of the stolen signal, weakening the strength of the stolen signal, thereby achieving the purpose of suppressing the stolen signal and protecting the normal communication of the smart card. Compared with traditional RF interference defense methods (such as filtering, interference suppression, etc.), this method can respond to complex and changeable stolen signals more flexibly and specifically, providing smart cards with an efficient means of defending against abnormal signals. In addition to suppressing abnormal signals, reasonable adjustment of gain weights can also be used to optimize the receiving performance of the antenna array, such as improving the signal-to-noise ratio, suppressing multipath interference, etc., providing more optimization freedom for the RF front-end design of the smart card.
[0085] In practical systems, gain adjustment of smart card antenna arrays is typically achieved through controllable RF switches or phase shifters. The system converts the complex weights calculated in step S208 into corresponding voltage control signals, applies them to the feed circuits of each antenna element, and applies amplitude and phase modulation to the signals to synthesize the desired array response. Because smart card RF front-end resources are very limited, the design must fully consider the requirements of RF integration and miniaturization, selecting gain control circuits with low power consumption, good linearity, and strong reconfigurability. For example, replacing analog phase shifters with digitally controlled phase shifters reduces the complexity of the control circuit while improving the accuracy and stability of phase adjustment. Similarly, replacing analog attenuators with switched capacitor arrays can significantly reduce the area and power consumption of the gain control circuit. Furthermore, the system should integrate necessary detection circuitry near the antenna array to monitor the output signals of each antenna element in real time. Through closed-loop feedback, necessary corrections to the gain weights should be applied to compensate for the non-ideal characteristics of RF components, ensuring optimal operation of the entire array.
[0086] In the above embodiment, by collecting the modulation parameters of the RF signal during the data interaction process and combining the fluctuation range and waveform distortion rate analysis, the system establishes the signal fingerprint characteristics of the reader / writer device. Through frequency domain analysis of the induced current of the smart card, the system can effectively identify the frequency band and intensity characteristics of the stolen signal. By comparing these characteristics with the established signal fingerprint and combining the directional gain control of the antenna array, the system can apply directional suppression to abnormal RF signals that exceed the threshold. This active protection mechanism based on signal feature analysis can not only detect potential attack behaviors in a timely manner, but also effectively suppress illegal signals through dynamic adjustment of the antenna gain, thereby improving the security protection level of the smart card during the data interaction process.
[0087] The following describes the system in the embodiment of the present invention from the perspective of hardware processing. Figure 3 , is a schematic diagram of the physical device structure of a smart card reading and writing system provided in an embodiment of the present application.
[0088] It should be noted that Figure 3 The structure of the system shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0089] like Figure 3 As shown, the system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes, such as the methods described in the above embodiments, based on programs stored in a read-only memory (ROM) 302 or programs loaded from a storage unit 308 into a random access memory (RAM) 303. RAM 303 also stores various programs and data required for system operation. CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to bus 304.
[0090] The following components are connected to the I / O interface 305: an input section 306 including a camera, infrared sensor, and the like; an output section 307 including a liquid crystal display (LCD) and speakers; a storage section 308 including a hard disk and the like; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. Removable media 311, such as a magnetic disk, optical disk, magneto-optical disk, or semiconductor memory, is installed in the drive 310 as needed, so that computer programs read from the media can be installed in the storage section 308 as needed.
[0091] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for executing the methods illustrated in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 309 and / or installed from removable media 311. When executed by the central processing unit (CPU) 301, the computer program performs the various functions defined in the present invention.
[0092] It should be noted that the computer-readable medium described in the embodiments of the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium may include a data signal transmitted in baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal may take any of a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0094] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the system described in the above embodiments, or may exist independently and not incorporated into the system. The storage medium carries one or more computer programs, and when executed by a processor of a system, the system implements the methods provided in the above embodiments.
[0095] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0096] As used in the above embodiments, the term “when…” may be interpreted as “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (stated condition or event) is detected” may be interpreted as “if determining…” or “in response to determining…” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.
[0097] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, hard disk, tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).
[0098] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium. When executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A smart card reading and writing method, characterized in that: include: receiving a read / write instruction triggered by a user, wherein the read / write instruction includes an operation type for data interaction with a smart card; Acquiring the temperature change rate of the smart card chip, the voltage fluctuation value of the internal circuit, and the signal characteristics of the radio frequency signals received by the smart card within a preset time window, wherein the signal characteristics include the signal strength of each radio frequency signal; determining the number of valid radio frequency signals received by the smart card based on a ratio between the temperature change rate and the voltage fluctuation value, wherein the ratio represents temperature and voltage response characteristics caused by a single radio frequency signal; When it is detected that the number of the valid radio frequency signals is greater than a preset value, activating the directional antenna array of the smart card, the directional antenna array comprising at least three antenna units arranged in different directions; respectively collecting the radio frequency signal strength received by each of the antenna units and calculating the signal strength difference of each of the antenna units; determining an incident direction of each of the radio frequency signals according to the signal strength difference, and comparing each of the incident directions with a preset user operation range; When an incident direction beyond the preset user operation range is detected, determining that the radio frequency signal corresponding to the incident direction beyond the preset user operation range is a stolen signal; adjusting the resonant circuit parameters of the smart card according to the temperature change rate, so that the smart card selectively responds to radio frequency signals within the user operation range; A secure communication channel is established between the smart card and the read / write device within the preset user operation range, and a data interaction operation corresponding to the read / write instruction is executed.
2. The method according to claim 1, characterized in that Determining the incident direction of each of the radio frequency signals according to the signal strength difference specifically includes: Calculating signal strength ratios between adjacent antenna units to obtain a sequence of signal strength ratios in multiple directions; Performing peak detection on the signal strength ratio sequence to determine the antenna unit combination with the largest signal strength; Calculating the main incident direction of the radio frequency signal according to the physical installation angle of the antenna unit combination; Setting an angular scanning range and a scanning step size based on the main incident direction; determining a secondary incident direction according to the signal strength distribution of each antenna unit within the angular scanning range; The main incident direction and the secondary incident direction are combined to obtain the incident direction of each radio frequency signal.
3. The method according to claim 1, characterized in that The adjusting the resonant circuit parameters of the smart card according to the temperature change rate so that the smart card selectively responds to the radio frequency signal within the user operation range specifically includes: Calculating a temperature change trend according to the temperature change rate, and dividing the temperature change trend into an increasing interval, a stable interval, and a decreasing interval; Determining an adjustment direction and an adjustment step of the resonant circuit based on temperature variation characteristics in different intervals, wherein the adjustment direction represents the rise and fall of the resonant frequency, and the adjustment step represents the frequency variation of a single adjustment; Controlling the charging and discharging process of the variable capacitance module according to the adjustment direction and the adjustment step size to achieve dynamic adjustment of the resonant frequency and obtain an initial resonant frequency; Collecting frequency characteristics of radio frequency signals within the preset user operation range, and calculating a matching degree between the frequency characteristics and the initial resonant frequency; Adjusting the damping resistance value of the resonant circuit based on the matching degree to control the coverage range of the resonant bandwidth so that the resonant bandwidth completely covers the RF signal frequency within the preset user operation range; detecting the standing wave ratio and quality factor of the resonant circuit in real time, and triggering a fine-tuning mechanism of the resonance parameters when the standing wave ratio is greater than a first preset threshold or the quality factor is less than a second preset threshold; The initial resonant frequency is corrected by the fine-tuning mechanism to obtain a final resonant frequency, so that the smart card only responds to radio frequency signals within the preset user operation range.
4. The method according to claim 1, wherein After executing the data interaction operation corresponding to the read and write instructions, the method further includes: Collecting the peak value, signal period and phase offset of the radio frequency signal during the data interaction process to obtain the modulation parameters of the radio frequency signal; Dividing the modulation parameters into segments according to the preset time window, and calculating the signal fluctuation range and waveform distortion rate in each segment; generating a characteristic sequence based on the fluctuation range and the waveform distortion rate, and using the characteristic sequence as a signal fingerprint of the read / write device; collecting the induced current value of the smart card and converting the induced current value into a voltage value; Performing a fast Fourier transform on the voltage value to obtain an amplitude of a frequency component; determining the frequency band and intensity of the stolen signal according to the amplitude of the frequency component; Comparing the frequency band and intensity of the stolen signal with the signal fingerprint to identify abnormal radio frequency signals; When it is detected that the strength of the abnormal radio frequency signal exceeds a preset threshold, calculating the gain weights of the antenna array in different directions; The directivity of the antenna array is changed by adjusting the gain weight, thereby achieving gain suppression of the stolen signal.
5. The method according to claim 4, characterized in that The step of segmenting the modulation parameters according to the preset time window and calculating the signal fluctuation range and waveform distortion rate in each segment specifically includes: Dividing the sampled data of the radio frequency signal into a plurality of signal segments according to the preset time window; Extracting the difference between the maximum and minimum values of the signal in each signal segment to obtain the signal fluctuation range; Performing Fourier series expansion on the signal segment to obtain fundamental wave components and harmonic wave components; The ratio of the harmonic component to the fundamental component is calculated to obtain a waveform distortion rate.
6. The method according to claim 4, characterized in that The comparing the frequency band and intensity of the stolen signal with the signal fingerprint to identify abnormal radio frequency signals specifically includes: Extracting frequency band distribution characteristics and energy distribution characteristics of the stolen signal; Calculating the correlation coefficient between the modulation parameter of the stolen signal and the characteristic sequence; When the correlation coefficient is less than a preset correlation coefficient threshold, marking the stolen signal as a suspicious signal; Counting the duration and frequency of occurrence of the suspicious signal; When the duration exceeds a preset duration or the occurrence frequency exceeds a preset frequency, the suspicious signal is confirmed to be an abnormal radio frequency signal.
7. The method according to claim 4, characterized in that The calculating the gain weights of the antenna array in different directions specifically includes: Acquiring the amplitude of the frequency component of the abnormal radio frequency signal and the arrival direction of the abnormal radio frequency signal; dividing the coverage of the antenna array into a plurality of spatial sectors according to the arrival direction; Counting the average power of the abnormal radio frequency signal in each of the spatial sectors; Calculating a power attenuation coefficient of each of the spatial sectors according to the average power; Based on the power attenuation coefficient, the antenna gain coefficient of each of the spatial sectors is calculated using a minimum mean square error criterion; The antenna gain coefficient is normalized to obtain gain weights of the antenna array in different directions.
8. A smart card reading and writing system, characterized in that: The system comprises: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the system to execute the method according to any one of claims 1 to 7.
9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a system, the system is caused to perform the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product is run on a system, the system is caused to perform the method according to any one of claims 1 to 7.