Fool-proof test method and system based on safety equipment
By employing a foolproof testing method based on security equipment, the method utilizes light spot vision and touch matrix to guide card placement, combines two-dimensional scanning and Kalman estimation to obtain optimal radio frequency parameters, and uses blockchain for evidence storage. This solves the consistency and security issues in the calibration of contactless smart card production lines, achieving efficient, reliable calibration and tamper-proof operation.
Patent Information
- Application Number
- CN202511288670.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2025-12-23
AI Technical Summary
Existing contactless smart card production lines suffer from several issues during contactless card reader calibration. Operators manually place reference cards with eccentricity or tilt, leading to scattered sampling data and poor calibration consistency. Single-point power scanning cannot balance communication margin and EMC performance, often resulting in optimal parameters but excessive radiation or insufficient power causing card reading failures. Furthermore, the lack of anti-tampering measures leads to RF performance drift in the equipment.
A foolproof testing method based on safety equipment is adopted. The reference card is accurately placed by using light spot vision and touch matrix. The optimal radio frequency parameters that balance communication performance and electromagnetic compatibility are quickly obtained by combining two-dimensional scanning and Kalman optimal estimation. Blockchain is used to ensure that the parameters cannot be tampered with. This includes the system process and module design of steps S1 to S6.
It significantly improves calibration efficiency and product consistency, reduces rework rates, enhances traceability throughout the entire lifecycle, and ensures the safety and accuracy of RF parameters.
Smart Images

Figure CN121189352A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of contactless smart card production line calibration technology, and in particular to a foolproof testing method and system based on security equipment. Background Technology
[0002] Existing production lines generally suffer from the following defects when calibrating contactless card readers:
[0003] When operators manually place the reference card, it is easy to cause it to be off-center or tilted, resulting in scattered sampling data and poor calibration consistency.
[0004] Single-point power scanning cannot simultaneously take into account both communication margin and EMC performance, often resulting in the dilemma of "optimal parameters but excessive radiation" or "power too low and card reading fails".
[0005] Once the optimal parameters are written, there is a lack of anti-tampering measures, making it difficult for the production line to detect bit flips or malicious rewriting, resulting in RF performance drift of the same batch of equipment. Summary of the Invention
[0006] The purpose of this invention is to provide a foolproof testing method and system based on safety equipment, thereby solving the aforementioned problems existing in the prior art.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] A foolproof testing method based on safety devices includes the following steps:
[0009] Step S1: Run the test system and select the system language mode;
[0010] Step S2: Enter the main function menu and select "Calibration", "Contactless A Card Test" or "Contactless B Card Test";
[0011] Step S3: If "calibrate" is selected, the radio frequency parameters of card A and card B are calibrated at distances of 0 cm and 4 cm respectively, and the optimal drive power, signal gain and demodulation threshold are calculated and stored.
[0012] Step S4: If "Contactless A Card Test" or "Contactless B Card Test" is selected, the test distance is set to 0 cm or 4 cm, and the corresponding optimal radio frequency parameters are called to drive the card reader to attempt to activate the card.
[0013] Step S5: If the card reader successfully reads the card at a test distance of 4 cm, the foolproof function is deemed to be ineffective and needs to be recalibrated; if the card reader fails to read the card, the foolproof function is deemed to be effective.
[0014] Step S6: Record and output the test results.
[0015] Furthermore, step S1 also includes:
[0016] S11. When the test system starts, the factory language configuration word stored in the non-volatile memory is read through the security element (SE). If the read fails or the verification fails, the system is forced to enter English mode and a security alarm is issued.
[0017] S12. Perform bidirectional verification between the read factory language configuration word and the work order language field issued by the host computer MES system. Only when the two are consistent will the user be allowed to enter the subsequent calibration and error prevention test process. Otherwise, lock the human-machine interface and report the tampering anomaly.
[0018] S13. After the verification is passed, the final confirmed language identifier is written into the reserved field of the reader's RF parameter set, so that all subsequent calibration, foolproof test instructions and result logs are encapsulated in this language, ensuring that the parameter script and language version of the same batch of products cannot be separated.
[0019] Furthermore, step S2 also includes:
[0020] S21. After the human-computer interaction module is powered on and initialized, the system verifies the signature of the menu executable file through a security algorithm. If the verification fails, the system will refuse to enter the main function menu and trigger a security lock.
[0021] S22. The main function menu is dynamically arranged in a fixed order of "calibration → contactless A card test → contactless B card test". The system generates a menu hash value corresponding to the language in real time according to the current language mode, and compares the hash value with the baseline hash value saved at the end of the last successful calibration. If they are inconsistent, it is determined that the menu resource has been tampered with and the subsequent process is immediately stopped.
[0022] S23. When a user selects any function, the system concatenates the selected function code, the current language hash value, and the device serial number into a one-time token, and signs the token with the private key to form a digital signature package. This package is then sent to the card reader along with all subsequent calibration or test instructions to achieve tamper-proof, replay-proof, and traceability of the function selection process.
[0023] Furthermore, step S3 also includes:
[0024] Step S31: Prompt the operator to place the reference card;
[0025] Step S32: The card reader automatically collects signal strength and bit error rate;
[0026] Step S33: Calculate the optimal drive power, signal gain, and demodulation threshold;
[0027] Step S34: Store the calculated optimal radio frequency parameters in a non-volatile memory.
[0028] Furthermore, step S31 further includes the following sub-steps:
[0029] S311. The system displays a scrolling graphic prompt on the LCD screen in the current language mode that reads "Please place the reference card horizontally in the center of the positioning frame". At the same time, the positioning frame, which coincides with the center of the antenna, is projected in a green breathing light spot through the RGB light ring. The size of the light spot periodically shrinks and expands over time to form a visual pulse, guiding the operator to control the card error within ±1mm.
[0030] S312. After the operator places the card, the system detects the card coverage area through a capacitive touch matrix. If the area is less than the preset threshold or the eccentricity is greater than 0.5mm, the placement is deemed unqualified. The light ring immediately switches to red flashing and pauses subsequent sampling until the detection is qualified, and then the light spot is automatically turned off, thereby eliminating the influence of manual placement error on calibration accuracy.
[0031] S313. After the qualified signal is triggered, the system reads the card UID and compares it with the reference card UID in the MES work order. Only if the comparison is consistent will the subsequent RF sampling be unlocked. Otherwise, a "card mismatch" voice alarm will be issued and entry into S32 will be refused, ensuring that the calibration process uses a traceable standard reference card.
[0032] Step S32 further includes the following sub-steps:
[0033] S321. The card reader transmits the radio frequency field in a two-dimensional scanning method of "step power - step gain": the power P starts from Pmin and increases in steps of ΔP≈0.2dB. At the same time, the gain G is traversed from Gmin to Gmax at each power point to form a (P,G) scanning matrix, and the load modulation depth D(P,G) and bit error rate BER(P,G) returned by the card are recorded.
[0034] S322. Perform a two-dimensional Laplace-Gaussian filter on matrix D(P,G) to remove measurement noise and extract local maxima. If the same (P,G) point satisfies D≥Dmin and BER≤BERmax, then mark the point as a "feasible working point" and continue scanning until the entire matrix is covered.
[0035] S323. After the scan is completed, the system calculates the power distribution histogram of all feasible operating points, selects the power value at the point with a cumulative probability of 10% as P0,min, and records the corresponding gain G0 and demodulation threshold T0, thereby obtaining the lowest radiated power while ensuring communication margin and reducing interference from adjacent production lines.
[0036] Step S33 further includes the following sub-steps:
[0037] S331. The system uses P0,min, G0,T0 as a benchmark, and uses a Kalman filter to make optimal estimates of the subsequent N sets of real-time sampled values Dk and BERk, dynamically updates the covariance matrix, and obtains the converged optimal estimates D* and BER*.
[0038] S332. Compare D with the target modulation depth Dtarget. If |D-Dtarget|>ε, then use the gradient descent method to simultaneously fine-tune the three-dimensional parameters P, G, and T. Iterate until |D*-Dtarget|≤ε and BER* is minimized, and finally lock the global optimal operating point (Popt,Gopt,Topt).
[0039] S333. After the iteration is completed, the system performs anti-collision verification on (Popt, Gopt, Topt): calculate the adjacent channel leakage ratio ACLR and the second harmonic distortion HD2. Only when ACLR ≤ -40dBc and HD2 ≤ -35dBc is the optimal parameter set confirmed to meet the production line EMC requirements. Otherwise, the search range is expanded and the iteration is repeated to ensure that the optimal parameters take into account both communication performance and electromagnetic compatibility.
[0040] Step S34 further includes the following sub-steps:
[0041] S341. Before the actual writing, the system uses the national cryptographic SM4 algorithm to encrypt (Popt, Gopt, Topt) to generate ciphertext Cparam, and then concatenates it with the current device serial number and timestamp to calculate the SM3 digest Hauth, forming a "parameter-identity-time" binding package;
[0042] S342. Write the binding packet to the UFS embedded secure storage area with physical anti-tamper features. After writing, immediately read back and compare the Hauth. If the read digest is inconsistent with the original digest, trigger the "storage exception" interrupt, roll back to the factory default parameters and report to MES to prevent the parameters from being tampered with or bit-flipped during the writing process.
[0043] S343. After successful writing, the system uploads the Hauth to the factory-level blockchain node and generates an immutable parameter storage transaction TXhash. Any subsequent operation that requires calling calibration parameters must first verify the TXhash to ensure the traceability and integrity of the optimal RF parameters throughout the entire lifecycle.
[0044] Furthermore, step S4 also includes:
[0045] Step S41: Based on the card type and test distance selected by the user, retrieve the corresponding optimal RF parameters from the non-volatile memory;
[0046] Step S42, the driver reader attempts to activate the card using the optimal RF parameters called;
[0047] Step S43: Based on the card reading result, determine whether the foolproof function is effective and output the test conclusion.
[0048] Furthermore, step S6 specifically includes:
[0049] Step S61: Record the test time, test card type, test distance, test results, and signal strength data for each test;
[0050] Step S62: Display the test results on the LCD screen or print the test report using a printer.
[0051] Furthermore, the system language modes include Chinese and English, which users can select via keyboard or touchscreen.
[0052] Based on the same concept, a foolproof testing system based on safety equipment includes:
[0053] The human-computer interaction module provides multilingual menus and receives user-selected test card type, test distance, and calibration instructions.
[0054] The calibration module, which communicates with the human-machine interaction module, is used to calibrate the radio frequency parameters of card A and card B at distances of 0 cm and 4 cm respectively according to the calibration instructions, and generate and store the corresponding optimal drive power, signal gain and demodulation threshold.
[0055] The foolproof test module communicates with the human-machine interaction module and the calibration module. It is used to call the corresponding optimal radio frequency parameters according to the test card type and test distance selected by the user, drive the card reader to attempt to activate the card, and determine whether the card can be successfully read at a test distance of 4 cm. If it is successful, the foolproof function is deemed to be ineffective and needs to be recalibrated.
[0056] The results recording and output module is used to record the results of calibration and mistaken-proof tests and output them through display or printing.
[0057] Furthermore, the calibration module includes:
[0058] The signal acquisition unit is used to acquire the signal strength and bit error rate of the reference card at distances of 0 cm and 4 cm.
[0059] The parameter calculation unit is used to calculate the optimal drive power, signal gain, and demodulation threshold based on the acquired signal strength and bit error rate.
[0060] The storage unit is used to store the calculated optimal RF parameters into non-volatile memory for subsequent testing.
[0061] The mistake-proof testing module includes:
[0062] The parameter retrieval unit is used to retrieve the corresponding optimal RF parameters from the storage unit based on the test card type and test distance selected by the user.
[0063] The card reader control unit is used to drive the card reader to attempt to activate the card using the optimal radio frequency parameters called.
[0064] The judgment unit is used to determine whether the card was successfully read at a test distance of 4 cm based on the card reading result, and outputs a conclusion on whether the foolproof function is effective;
[0065] The human-computer interaction module includes: a language selection unit, which provides Chinese and English menu options;
[0066] The test selection unit provides menu options for "calibration", "contactless A card test" and "contactless B card test";
[0067] Input device interface, used to connect a keyboard or touch screen and receive selection commands input by the user.
[0068] The results recording and output module includes:
[0069] The recording unit is used to record the test time, test card type, test distance, test results, and signal strength data for each calibration and mistaken-proof test;
[0070] The output unit is used to display test results on an LCD screen or to print test reports via a printer.
[0071] The beneficial effects of this invention are:
[0072] This invention achieves precise placement of the reference card through dual guidance of light spot vision and touch matrix. It combines two-dimensional scanning and Kalman optimal estimation to quickly obtain the optimal radio frequency parameters that balance communication performance and electromagnetic compatibility. At the same time, it uses blockchain to ensure that the parameters cannot be tampered with, which significantly improves calibration efficiency and product consistency, reduces rework rate and enhances traceability throughout the entire life cycle. Attached Figure Description
[0073] Figure 1 This is a flowchart of the application program of the present invention;
[0074] Figure 2 This is a flowchart of the error-proof testing process of the present invention;
[0075] Figure 3 This is a flowchart of the parameter verification process of the present invention;
[0076] Figure 4 This is a flowchart of the performance testing process of the present invention;
[0077] Figure 5 This is a flowchart of the method of the present invention;
[0078] Figure 6 This is a system structure diagram of the present invention. Detailed Implementation
[0079] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0080] Reference Figures 1 to 5 The method for error-proofing testing based on safety devices, as shown, includes the following steps:
[0081] Step S1: Run the test system and select the system language mode;
[0082] Step S2: Enter the main function menu and select "Calibration", "Contactless A Card Test" or "Contactless B Card Test";
[0083] Step S3: If "calibrate" is selected, the radio frequency parameters of card A and card B are calibrated at distances of 0 cm and 4 cm respectively, and the optimal drive power, signal gain and demodulation threshold are calculated and stored.
[0084] Step S4: If "Contactless A Card Test" or "Contactless B Card Test" is selected, the test distance is set to 0 cm or 4 cm, and the corresponding optimal radio frequency parameters are called to drive the card reader to attempt to activate the card.
[0085] Step S5: If the card reader successfully reads the card at a test distance of 4 cm, the foolproof function is deemed to be ineffective and needs to be recalibrated; if the card reader fails to read the card, the foolproof function is deemed to be effective.
[0086] Step S6: Record and output the test results.
[0087] Furthermore, step S1 also includes:
[0088] S11. When the test system starts, the factory language configuration word stored in the non-volatile memory is read through the security element (SE). If the read fails or the verification fails, the system is forced to enter English mode and a security alarm is issued.
[0089] S12. Perform bidirectional verification between the read factory language configuration word and the work order language field issued by the host computer MES system. Only when the two are consistent will the user be allowed to enter the subsequent calibration and error prevention test process. Otherwise, lock the human-machine interface and report the tampering anomaly.
[0090] S13. After the verification is passed, the final confirmed language identifier is written into the reserved field of the reader's RF parameter set, so that all subsequent calibration, foolproof test instructions and result logs are encapsulated in this language, ensuring that the parameter script and language version of the same batch of products cannot be separated.
[0091] Furthermore, step S2 also includes:
[0092] S21. After the human-computer interaction module is powered on and initialized, the system verifies the signature of the menu executable file through a security algorithm. If the verification fails, the system will refuse to enter the main function menu and trigger a security lock.
[0093] S22. The main function menu is dynamically arranged in a fixed order of "calibration → contactless A card test → contactless B card test". The system generates a menu hash value corresponding to the language in real time according to the current language mode, and compares the hash value with the baseline hash value saved at the end of the last successful calibration. If they are inconsistent, it is determined that the menu resource has been tampered with and the subsequent process is immediately stopped.
[0094] S23. When a user selects any function, the system concatenates the selected function code, the current language hash value, and the device serial number into a one-time token, and signs the token with the private key to form a digital signature package. This package is then sent to the card reader along with all subsequent calibration or test instructions to achieve tamper-proof, replay-proof, and traceability of the function selection process.
[0095] Furthermore, step S3 also includes:
[0096] Step S31: Prompt the operator to place the reference card;
[0097] Step S32: The card reader automatically collects signal strength and bit error rate;
[0098] Step S33: Calculate the optimal drive power, signal gain, and demodulation threshold;
[0099] Step S34: Store the calculated optimal radio frequency parameters in a non-volatile memory.
[0100] Furthermore, step S31 further includes the following sub-steps:
[0101] S311. The system displays a scrolling graphic prompt on the LCD screen in the current language mode that reads "Please place the reference card horizontally in the center of the positioning frame". At the same time, the positioning frame, which coincides with the center of the antenna, is projected in a green breathing light spot through the RGB light ring. The size of the light spot periodically shrinks and expands over time to form a visual pulse, guiding the operator to control the card error within ±1mm.
[0102] S312. After the operator places the card, the system detects the card coverage area through a capacitive touch matrix. If the area is less than the preset threshold or the eccentricity is greater than 0.5mm, the placement is deemed unqualified. The light ring immediately switches to red flashing and pauses subsequent sampling until the detection is qualified, and then the light spot is automatically turned off, thereby eliminating the influence of manual placement error on calibration accuracy.
[0103] S313. After the qualified signal is triggered, the system reads the card UID and compares it with the reference card UID in the MES work order. Only if the comparison is consistent will the subsequent RF sampling be unlocked. Otherwise, a "card mismatch" voice alarm will be issued and entry into S32 will be refused, ensuring that the calibration process uses a traceable standard reference card.
[0104] Step S32 further includes the following sub-steps:
[0105] S321. The card reader transmits the radio frequency field in a two-dimensional scanning method of "step power - step gain": the power P starts from Pmin and increases in steps of ΔP≈0.2dB. At the same time, the gain G is traversed from Gmin to Gmax at each power point to form a (P,G) scanning matrix, and the load modulation depth D(P,G) and bit error rate BER(P,G) returned by the card are recorded.
[0106] S322. Perform a two-dimensional Laplace-Gaussian filter on matrix D(P,G) to remove measurement noise and extract local maxima. If the same (P,G) point satisfies D≥Dmin and BER≤BERmax, then mark the point as a "feasible working point" and continue scanning until the entire matrix is covered.
[0107] S323. After the scan is completed, the system calculates the power distribution histogram of all feasible operating points, selects the power value at the point with a cumulative probability of 10% as P0,min, and records the corresponding gain G0 and demodulation threshold T0, thereby obtaining the lowest radiated power while ensuring communication margin and reducing interference from adjacent production lines.
[0108] Step S33 further includes the following sub-steps:
[0109] S331. The system uses P0,min, G0,T0 as a benchmark, and uses a Kalman filter to make optimal estimates of the subsequent N sets of real-time sampled values Dk and BERk, dynamically updates the covariance matrix, and obtains the converged optimal estimates D* and BER*.
[0110] S332. Compare D with the target modulation depth Dtarget. If |D-Dtarget|>ε, then use the gradient descent method to simultaneously fine-tune the three-dimensional parameters P, G, and T. Iterate until |D*-Dtarget|≤ε and BER* is minimized, and finally lock the global optimal operating point (Popt,Gopt,Topt).
[0111] S333. After the iteration is completed, the system performs anti-collision verification on (Popt, Gopt, Topt): calculate the adjacent channel leakage ratio ACLR and the second harmonic distortion HD2. Only when ACLR ≤ -40dBc and HD2 ≤ -35dBc is the optimal parameter set confirmed to meet the production line EMC requirements. Otherwise, the search range is expanded and the iteration is repeated to ensure that the optimal parameters take into account both communication performance and electromagnetic compatibility.
[0112] Step S34 further includes the following sub-steps:
[0113] S341. Before the actual writing, the system uses the national cryptographic SM4 algorithm to encrypt (Popt, Gopt, Topt) to generate ciphertext Cparam, and then concatenates it with the current device serial number and timestamp to calculate the SM3 digest Hauth, forming a "parameter-identity-time" binding package;
[0114] S342. Write the binding packet to the UFS embedded secure storage area with physical anti-tamper features. After writing, immediately read back and compare the Hauth. If the read digest is inconsistent with the original digest, trigger the "storage exception" interrupt, roll back to the factory default parameters and report to MES to prevent the parameters from being tampered with or bit-flipped during the writing process.
[0115] S343. After successful writing, the system uploads the Hauth to the factory-level blockchain node and generates an immutable parameter storage transaction TXhash. Any subsequent operation that requires calling calibration parameters must first verify the TXhash to ensure the traceability and integrity of the optimal RF parameters throughout the entire lifecycle.
[0116] Furthermore, step S4 also includes:
[0117] Step S41: Based on the card type and test distance selected by the user, retrieve the corresponding optimal RF parameters from the non-volatile memory;
[0118] Step S42, the driver reader attempts to activate the card using the optimal RF parameters called;
[0119] Step S43: Based on the card reading result, determine whether the foolproof function is effective and output the test conclusion.
[0120] This step specifically involves: Step S41, parameter calling.
[0121] The system first generates a one-time random number R using a true random number generator within the secure element. This R is then concatenated with the current device serial number and the test timestamp to form the challenge value. The challenge value, signed with the secure element's private key, is sent along with the "parameter call" command to the chip containing the non-volatile memory. Upon receiving the command, the memory chip verifies the signature using the secure element's public key. Only if the verification is successful is access to the secure storage area allowed; otherwise, a "certificate invalid" status is returned, and the subsequent process terminates. Once the secure area is opened, the chip locates the corresponding optimal RF parameter block in its internal address mapping table based on the user's previously selected card type identifier (Card A or Card B) and test distance identifier (0 cm or 4 cm). Each parameter block consists of three parts: drive power, signal gain, and demodulation threshold. All three are stored as 16-bit signed integers, with a parity bit inserted between every two bytes. During the reading process, the chip verifies the parity bit in real time. If a single-bit error is detected, it is immediately corrected via ECC logic. If a double-bit error occurs, the read operation is abandoned and a "storage anomaly" is reported to prevent erroneous parameters from entering the RF link. After the read is complete, the chip encrypts the parameter block content using the secure element public key and sends it back to the main controller. The main controller then writes it into the dedicated register group of the card reader hardware, completing the calling process.
[0122] Step S42, Card reader activation attempt
[0123] After receiving the optimal RF parameters, the card reader hardware first writes the drive power value to the digitally controlled attenuator register, the signal gain value to the intermediate frequency amplifier register, and the demodulation threshold to the comparator register. The writing operation is controlled by a hardware state machine, which is in an "idle" state after power-on reset. Only after receiving the "start test" pulse from the main controller does it sequentially enter five sub-states: "field on - modulation sampling - card activation - command interaction - field off". A fixed delay is inserted between each sub-state to allow the RF field and card response to stabilize. During state machine transitions, if any step times out or an error occurs, it immediately enters the "error" state and latches the error code. The latched value can only be cleared by the next power-on reset, preventing the software from skipping critical steps. During the card activation phase, the card reader sends REQA or REQB commands at a standard rate of 106 kbit / s. If the card returns ATQA or ATQB within the protocol-specified time, the hardware sets the "card present" flag; if no response is received, the "card absent" flag is set. Once the flag is set, it is latched by the hardware, and the main controller can only read it and cannot modify it, ensuring that the activation result is true and reliable.
[0124] Step S43: Judgment and Conclusion Output of Mistake-Proof Function
[0125] At a test distance of 4 cm, the judgment unit uses spectrum analysis to make real-time judgments on the card's returned signal: First, it continuously samples 256 points of the I / Q signals output from the card reader's receiving link, and then performs a Fast Fourier Transform on the sampled values to obtain the frequency domain amplitude spectrum. If a significant energy peak appears at the frequency point corresponding to the card's subcarrier frequency in the spectrum, and the peak value is higher than a preset threshold, the card is determined to still be in the effective communication area. At this time, regardless of whether the protocol layer has completed a complete transaction, the conclusion "foolproofing failed" is output; if there is no corresponding peak in the spectrum, or the peak value is lower than the threshold, the conclusion "foolproofing effective" is output. The conclusion status code is a single byte, with the high four bits fixed as 0xA, and the low four bits using 0x0 to indicate "effective" and 0xF to indicate "failed". The high four bits are fixed for subsequent visual rapid identification. After the status code is generated, it is immediately sent to the secure element for private key signing to form a digital signature packet; the signature packet, together with the status code, timestamp, and device serial number, constitutes a complete test conclusion and is sent to the result recording and output module through the internal bus. Since the conclusions are locked at the hardware level and accompanied by a signature, they cannot be tampered with by any subsequent software, thus ensuring the authenticity and traceability of the mistake-proof test conclusions.
[0126] Furthermore, step S6 specifically includes:
[0127] Step S61: Record the test time, test card type, test distance, test results, and signal strength data for each test;
[0128] Step S62: Display the test results on the LCD screen or print the test report using a printer.
[0129] This step is specifically as follows:
[0130] Step S61: Test Data Recording
[0131] After each calibration or mistaken-proof test, the main control chip immediately initiates the "result packaging" subtask: First, it reads the year, month, day, hour, minute, and second registers of the real-time clock chip and concatenates them into a 14-bit BCD format timestamp. Then, it obtains the card type code (A card or B card) and test distance code (0 cm or 4 cm) selected by the user from the human-machine interface module, and combines them with the conclusion status code, digital signature packet, and instantaneous signal strength value generated in step S43 to form a fixed-length original record. A 16-bit cyclic redundancy check field is reserved at the end of the original record. The main control chip uses polynomial division to calculate all preceding bytes, filling the remainder into the check field to form a complete record. The complete record is first written to the ferroelectric memory (FRAM). After writing, the check value is read back and compared. If the read value matches the calculated value, the record is considered successful; if they do not match, a "record failure" flag is immediately written to the "abnormal area" of the FRAM, and simultaneously reported to the MES via the CAN bus to ensure that data integrity is not silently compromised. When the number of records in the FRAM reaches the set limit, the main controller automatically uploads the earliest record to the MES server via the CAN bus. Only after the upload is completed is it allowed to overwrite the local space, thus realizing cyclic storage and cloud backup synchronization.
[0132] Step S62 Result Output
[0133] The system provides a two-way parallel output mechanism. The first path is for LCD display: the main controller parses the conclusion status code into a text string corresponding to the current language, and sends it along with a signal strength bar graph, device serial number, and timestamp via an 8-bit parallel bus to a 5.6-inch industrial-grade LCD module. The module has a built-in character memory, supporting mixed display of Chinese dot matrix and ASCII characters. The backlight driver circuit has short-circuit protection, ensuring clear readability even in strong production line lighting conditions. The second path is for print output: the main controller communicates with the built-in thermal printer core via a UART interface, with a fixed baud rate of 9600. The data format is 1 start bit, 8 data bits, and 1 stop bit, with no parity check. The printed content includes the text conclusion, a QR code, and a blockchain transaction hash. The QR code uses the universal QR code system, version 5, with an error correction level of M, capable of correcting 15% of damage. The string order within the QR code is: device serial number, timestamp, conclusion status code, FRAM record index number, and blockchain transaction hash. After printing is complete, the printhead temperature sensor reports the current temperature. If the temperature exceeds the allowable range, the main controller immediately pauses printing and displays "Printhead Abnormality" on the LCD screen to prevent overheating from causing blurred text or paper burnt. The two outputs are mutually verified: if the LCD displays "Foolproofing Effective" but the print report displays "Foolproofing Ineffective," the system determines it as "Output Inconsistency" and immediately enters a stop-and-latch state. This state can only be reset via an administrator's key switch, thus preventing erroneous conclusions from flowing into the next process.
[0134] Furthermore, the system language modes include Chinese and English, which users can select via keyboard or touchscreen.
[0135] System language mode selection
[0136] During the host power-on initialization phase, the security element first performs a CRC32 check on the language resource table. If the check passes, a "Chinese / English" switching icon is displayed in the lower right corner of the LCD screen. Users can switch in real-time using the "Fn" key combination on the external keyboard or by clicking the icon on the touchscreen. The switching action triggers a random number update, which is written into the header of all subsequent command messages to prevent replay attacks. The Chinese language pack uses GB2312 encoding, and the English language pack uses ASCII encoding; both language pack strings are stored with a length byte to ensure the parser does not truncate. If the check fails, the system forces itself into English mode and displays a scrolling message "Language pack error, please maintain" at the top of the LCD screen. Simultaneously, the error is reported via the CAN bus to ensure the production line can promptly replace faulty resources.
[0137] Reference Figure 6 The shown is a foolproof testing system based on safety equipment, comprising:
[0138] The human-computer interaction module provides multilingual menus and receives user-selected test card type, test distance, and calibration instructions.
[0139] The calibration module, which communicates with the human-machine interaction module, is used to calibrate the radio frequency parameters of card A and card B at distances of 0 cm and 4 cm respectively according to the calibration instructions, and generate and store the corresponding optimal drive power, signal gain and demodulation threshold.
[0140] The foolproof test module communicates with the human-machine interaction module and the calibration module. It is used to call the corresponding optimal radio frequency parameters according to the test card type and test distance selected by the user, drive the card reader to attempt to activate the card, and determine whether the card can be successfully read at a test distance of 4 cm. If it is successful, the foolproof function is deemed to be ineffective and needs to be recalibrated.
[0141] The results recording and output module is used to record the results of calibration and mistaken-proof tests and output them through display or printing.
[0142] Furthermore, the calibration module includes:
[0143] The signal acquisition unit is used to acquire the signal strength and bit error rate of the reference card at distances of 0 cm and 4 cm.
[0144] The parameter calculation unit is used to calculate the optimal drive power, signal gain, and demodulation threshold based on the acquired signal strength and bit error rate.
[0145] The storage unit is used to store the calculated optimal RF parameters into non-volatile memory for subsequent testing.
[0146] The mistake-proof testing module includes:
[0147] The parameter retrieval unit is used to retrieve the corresponding optimal RF parameters from the storage unit based on the test card type and test distance selected by the user.
[0148] The card reader control unit is used to drive the card reader to attempt to activate the card using the optimal radio frequency parameters called.
[0149] The judgment unit is used to determine whether the card was successfully read at a test distance of 4 cm based on the card reading result, and outputs a conclusion on whether the foolproof function is effective;
[0150] The human-computer interaction module includes: a language selection unit, which provides Chinese and English menu options;
[0151] The test selection unit provides menu options for "calibration", "contactless A card test" and "contactless B card test";
[0152] Input device interface, used to connect a keyboard or touch screen and receive selection commands input by the user.
[0153] The results recording and output module includes:
[0154] The recording unit is used to record the test time, test card type, test distance, test results, and signal strength data for each calibration and mistaken-proof test;
[0155] The output unit is used to display test results on an LCD screen or to print test reports via a printer.
[0156] I. Overall System Connection Relationship
[0157] The entire mistake-proof testing system is deployed within an industrial ruggedized host unit. The host unit connects to the human-machine interface module, calibration module, mistake-proof testing module, and result recording and output module via a high-speed parallel bus. At the physical level, each module is interconnected using board-to-board connectors and shielded cables. At the logical level, encrypted communication is achieved through a custom security protocol, ensuring that instructions and data cannot be intercepted or replayed by a man-in-the-middle during transmission between modules. The human-machine interface module provides two standard interfaces: an RS-232 serial port for connecting an external keyboard or barcode scanner, and a USB-HID interface for connecting a touchscreen or printer. The host unit's backplane also has an isolated CAN bus for interfacing with the production line's MES system, enabling work order downloading and test result uploading. The calibration module and mistake-proof testing module share a high-frequency shielded coaxial cable, connected to the RF port of the card reader hardware, ensuring that the signal acquisition and transmission paths are completely consistent at distances of 0 cm and 4 cm, avoiding additional errors introduced by differences in wiring harnesses.
[0158] II. Detailed Composition of the Human-Computer Interaction Module
[0159] Language selection unit
[0160] Internally, two language resource tables are stored, one for Chinese and one for English menu strings, voice prompts, and error codes. The resource tables are encoded in UTF-8 and appended with a CRC32 checksum. After power-on, the security element first performs an integrity check on the resource tables; only after successful check is the language selection menu allowed to appear in the display buffer. Users can switch languages in real-time using the "Fn" key on the keyboard or the language icon in the upper right corner of the touchscreen. Each switching action triggers a random token update, which is written into the header of every subsequent command to prevent replay attacks.
[0161] Test Selection Unit
[0162] The main menu displays only three functions: "Calibration", "Contactless A Card Test", and "Contactless B Card Test". The menu order is fixed and cannot be changed by dragging with the keyboard or touch screen to avoid accidental operation. Each function corresponds to a 16-bit function code, which is signed with the private key of the secure element and sent with the instruction; if the function code and signature do not match, the downstream module will directly discard the instruction and report a "menu tampering" exception.
[0163] Input device interface
[0164] The keyboard interface supports standard PS / 2 or TTL level serial ports, with a default baud rate of 115200, 8 data bits, 1 stop bit, and no parity. The touchscreen interface supports the USB-HID protocol, and touch coordinates are uploaded in absolute value format. The driver layer performs anti-bounce filtering on five consecutive identical coordinates. The two input methods are redundant: when the keyboard interface fails, the system automatically switches to the touchscreen virtual keyboard; if both fail simultaneously, the host reports "input channel failure" to the MES via the CAN bus and shuts down to prevent continued operation without commands.
[0165] III. Detailed Composition of the Calibration Module
[0166] Signal acquisition unit
[0167] Employing a 13.56MHz continuous wave architecture, the transmit link includes a digitally controlled attenuator, a temperature-compensated power detector, and a directional coupler; the receive link uses a high-sensitivity quadrature demodulator, capable of simultaneously outputting I / Q signals for calculating load modulation amplitude and phase. During acquisition, the digitally controlled attenuator decreases from its maximum value in 0.2dB steps until the load modulation depth returned by the card meets a preset threshold; after each power switch, the hardware automatically waits 2ms to stabilize the RF field before continuously sampling for 32 modulation cycles, averaging the results to obtain the signal strength and bit error rate at that point.
[0168] Parameter calculation unit
[0169] Internally, it integrates a 32-bit floating-point DSP, running a vendor-prescribed "two-dimensional scanning-Kalman optimal estimation" algorithm. The algorithm first establishes a matrix with power P and gain G as the horizontal and vertical axes, storing the load modulation depth D and bit error rate (BER) within each matrix cell. Then, it performs Laplace-Gaussian filtering on the matrix to remove outliers, and finally uses Kalman iteration to find the globally optimal operating point, ensuring that the obtained optimal drive power, signal gain, and demodulation threshold simultaneously meet communication margin and EMC requirements. The entire calculation process is completed within the hardware DSP; the external bus can only read the final result and cannot capture intermediate data.
[0170] storage unit
[0171] Employing UFS 2.1 embedded flash memory, the system is internally divided into a general area and a secure area. The general area stores publicly accessible logs; the secure area is accessed via secure write commands using the UFS standard, requiring prior verification of the key issued by the secure element. Before writing optimal RF parameters, the system encrypts the parameters using the national cryptographic SM4 algorithm, then signs the ciphertext using the private key within the secure element, forming a "parameter-serial number-timestamp" binding packet before writing it to the secure area. After writing, the host immediately reads back and compares it with the original signature. If they do not match, a "storage failure" exception is triggered, and a report is simultaneously sent to the MES via the CAN bus to prevent the device from flowing to the next workstation.
[0172] IV. Detailed Composition of the Mistake-Proof Testing Module
[0173] Parameter calling unit
[0174] During runtime, the calibration certificate is first read from the storage unit. The certificate contains the card type, distance identifier, and a signed optimal parameter set. The parameter call unit verifies the certificate using the secure element public key. Only after successful verification is the parameter loaded into the reader hardware. If verification fails, the parameter call unit immediately clears the register and reports "invalid certificate" to ensure that invalid parameters cannot enter the RF link.
[0175] Card reader control unit
[0176] The test timing is controlled using a hardware state machine: upon power-up, it defaults to an "idle" state; upon receiving a start command, it sequentially completes five sub-states: RF field activation, modulation depth sampling, card activation, command interaction, and field deactivation. The timeout for each sub-state is configurable; upon timeout, it transitions to an "error" state and saves the error code. State machine transition signals are latched by dedicated registers, preventing external software intervention from skipping any state and thus preventing bypassing of the test process.
[0177] Judgment Unit
[0178] At the 4cm test position, the subcarrier spectrum returned by the card is analyzed in real time using Fast Fourier Transform. If an energy peak consistent with the specified frequency appears and the signal-to-noise ratio is higher than the threshold, the card is determined to still be in the active area. In this case, regardless of whether the command interaction is successful, the conclusion "foolproofing failed" is output. If there is no corresponding peak in the spectrum, the conclusion "foolproofing effective" is output. The judgment result is sent to the result recording module in the form of a one-byte status code. The status code is signed with the private key of the secure element to ensure that it cannot be tampered with during subsequent tracing.
[0179] V. Detailed Structure of the Result Recording and Output Module
[0180] Recording unit
[0181] The built-in ferroelectric RAM (FRAM) stores the date and time, card type, test distance, success / failure flag, signal strength, and foolproof status code for each test. FRAM features data retention even when power is off and can withstand trillions of write / erase cycles, making it suitable for high-frequency production line environments. For each record written, the recording unit automatically calculates a CRC32 checksum and appends it to the end to prevent bit flipping. When the storage capacity reaches a set threshold, the recording unit actively uploads the earliest batch of data to the MES via the CAN bus, then cyclically overwrites it, ensuring that the most recent tens of thousands of records are always retained locally for traceability.
[0182] Output unit
[0183] It provides two parallel outputs: one drives a 5.6-inch industrial-grade LCD screen with a resolution of 640×480 and a backlight lifespan of over 50,000 hours. The interface displays test results, signal strength bar charts, and prompts for the next operation in the current language in real time. The other output drives a 58mm wide printhead through a built-in thermal printer interface, capable of printing test reports containing QR codes. The QR codes include the device serial number, test time, result status code, and blockchain transaction hash. On-site operators can immediately obtain the electronic report using a barcode scanning terminal. The two outputs are mutually verified: if the results displayed on the screen and printed on the printer are inconsistent, the system immediately enters an "output anomaly" state and stops to prevent erroneous results from flowing into the next process.
[0184] Example:
[0185] At the end of a production line producing 3,000 card readers per day, the mistaken-proof testing system described in this invention is deployed. The host computer uses a fanless industrial computing node, connected to the card reader hardware via a shielded coaxial cable; the reader antenna is fixed on a height-adjustable testing fixture with a travel accuracy of ±0.1mm, ensuring repeatable positioning at distances of 0 cm and 4 cm. Each host computer is equipped with a UPS to prevent loss of calibration data due to sudden power outages.
[0186] The workflow is as follows: The operator clicks the "Chinese" icon on the "Language Selection" interface. After the system completes resource verification, it enters the main menu. The operator then selects "Calibration," and the LCD displays the message "Please place the reference card horizontally in the center of the light spot." The RGB light ring projects a 30mm diameter green breathing light spot. After the operator places the card, the capacitive touch matrix detects the coverage area and eccentricity in real time. If the coverage area is less than 80% or the eccentricity is greater than 0.5mm, the light ring flashes red and announces "Placement Deviation" via voice. The light spot is extinguished only after the card passes inspection, and the system enters the RF sampling stage.
[0187] The card reader completes a 40×20-point two-dimensional power-gain scan in 0.2dB increments. After five iterations of Kalman filtering within the DSP, it outputs the optimal parameter set: drive power -1.2dBm, signal gain 28dB, demodulation threshold 22mV. Simultaneously, the adjacent channel leakage ratio is measured to be -42dBc and second harmonic distortion to be -37dBc, meeting the production line's EMC requirements. The parameters are then encrypted with SM4 and signed by a secure element before being written to the UFS secure area and uploaded to the blockchain to generate a transaction hash TXhash = 0x8a9b…cdef, completing the calibration.
[0188] After calibration, the operator selects "Contactless A-card Test" on the same interface, setting the distance to 4 cm. The system retrieves the 4 cm dedicated parameters from the UFS and drives the card reader to attempt to activate the card. The spectrum detection unit performs a 256-point FFT on the returned signal and finds no energy peak matching the subcarrier frequency, determining that "foolproofing is effective." The conclusion status code 0xA0 is written to the FRAM after being signed by the security element, and "4cm foolproofing passed" is displayed on the LCD. The printer outputs a test report containing a QR code. The QR code contains the device serial number, timestamp, status code, and the aforementioned TXhash for subsequent scanning and traceability.
[0189] Throughout the implementation process, if any improper placement, EMC exceeding limits, or spectrum peak exceeding the limit occurs, the system will immediately shut down and report to the MES to ensure that non-conforming products cannot enter the packaging station. After three months of continuous operation, the first calibration pass rate of the production line increased from 78% to 96%, the 4cm misread rate decreased from 5‰ to 0.1‰, and the average calibration time per unit was reduced by 30%, meeting the needs of high-speed mass production.
[0190] By adopting the above-disclosed technical solution of this invention, the following beneficial effects are obtained:
[0191] This invention reduces reference card placement errors to the micrometer level through dual positioning using "spot + touch" at the production line. Two-dimensional power-gain scanning combined with Kalman optimal estimation obtains optimal RF parameters in a single step, satisfying both read margin and EMC limits. The calibration process is documented using blockchain to ensure data immutability. A 4cm spectrum determination mechanism detects errors in error prevention within milliseconds and automatically reverts parameters, achieving a closed loop of "calibration-error prevention-traceability." Actual operation shows a significant improvement in the first-time calibration pass rate, a substantial decrease in the 4cm misread rate, shorter calibration time per device, reduced rework rate, and simultaneous improvement in production line capacity and consistency. Furthermore, all parameters and conclusions are traceable throughout their entire lifecycle, providing reliable, controllable, and auditable RF quality assurance for high-speed mass production.
[0192] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A foolproof testing method based on safety equipment, characterized in that, Includes the following steps: Step S1: Run the test system and select the system language mode; Step S2: Enter the main function menu and select "Calibration", "Contactless A Card Test" or "Contactless B Card Test"; Step S3: If "calibrate" is selected, the radio frequency parameters of card A and card B are calibrated at distances of 0 cm and 4 cm respectively, and the optimal drive power, signal gain and demodulation threshold are calculated and stored. Step S4: If "Contactless A Card Test" or "Contactless B Card Test" is selected, the test distance is set to 0 cm or 4 cm, and the corresponding optimal radio frequency parameters are called to drive the card reader to attempt to activate the card. Step S5: If the card reader successfully reads the card at a test distance of 4 cm, the foolproof function is deemed to be ineffective and needs to be recalibrated; if the card reader fails to read the card, the foolproof function is deemed to be effective. Step S6: Record and output the test results.
2. The method according to claim 1, characterized in that, Step S1 further includes: S11. When the test system starts, the factory language configuration word stored in the non-volatile memory is read through the security element (SE). If the read fails or the verification fails, the system is forced to enter English mode and a security alarm is issued. S12. Perform bidirectional verification between the read factory language configuration word and the work order language field issued by the host computer MES system. Only when the two are consistent will the user be allowed to enter the subsequent calibration and error prevention test process. Otherwise, lock the human-machine interface and report the tampering anomaly. S13. After the verification is passed, the final confirmed language identifier is written into the reserved field of the reader's RF parameter set, so that all subsequent calibration, foolproof test instructions and result logs are encapsulated in this language, ensuring that the parameter script and language version of the same batch of products cannot be separated.
3. The method according to claim 1, characterized in that, Step S2 further includes: S21. After the human-computer interaction module is powered on and initialized, the system verifies the signature of the menu executable file through a security algorithm. If the verification fails, the system will refuse to enter the main function menu and trigger a security lock. S22. The main function menu is dynamically arranged in a fixed order of "calibration → contactless A card test → contactless B card test". The system generates a menu hash value corresponding to the language in real time according to the current language mode, and compares the hash value with the baseline hash value saved at the end of the last successful calibration. If they are inconsistent, it is determined that the menu resource has been tampered with and the subsequent process is immediately stopped. S23. When a user selects any function, the system concatenates the selected function code, the current language hash value, and the device serial number into a one-time token, and signs the token with the private key to form a digital signature package. This package is then sent to the card reader along with all subsequent calibration or test instructions to achieve tamper-proof, replay-proof, and traceability of the function selection process.
4. The method according to claim 1, characterized in that, Step S3 further includes: Step S31: Prompt the operator to place the reference card; Step S32: The card reader automatically collects signal strength and bit error rate; Step S33: Calculate the optimal drive power, signal gain, and demodulation threshold; Step S34: Store the calculated optimal radio frequency parameters in a non-volatile memory.
5. The method according to claim 4, characterized in that, Step S31 further includes the following sub-steps: S311. The system displays a scrolling graphic prompt on the LCD screen in the current language mode: "Please place the reference card horizontally in the center of the positioning frame." At the same time, the positioning frame, which coincides with the center of the antenna, is projected in a green breathing light spot through an RGB light ring. The size of the light spot periodically shrinks and expands over time, forming a visual pulse to guide the operator to control the card error within ±1mm. S312. After the operator places the card, the system detects the card coverage area through a capacitive touch matrix. If the area is less than the preset threshold or the eccentricity is greater than 0.5mm, the placement is deemed unqualified. The light ring immediately switches to red flashing and pauses subsequent sampling until the detection is qualified, and then the light spot is automatically turned off, thereby eliminating the influence of manual placement error on calibration accuracy. S313. After the qualified signal is triggered, the system reads the card UID and compares it with the reference card UID in the MES work order. Only if the comparison is consistent will the subsequent RF sampling be unlocked. Otherwise, a "card mismatch" voice alarm will be issued and entry into S32 will be refused, ensuring that the calibration process uses a traceable standard reference card. Step S32 further includes the following sub-steps: S321. The card reader transmits the radio frequency field in a two-dimensional scanning method of "step power - step gain": the power P starts from Pmin and increases in steps of ΔP≈0.2dB. At the same time, the gain G is traversed from Gmin to Gmax at each power point to form a (P,G) scanning matrix and the load modulation depth D(P,G) and bit error rate BER(P,G) returned by the card are recorded. S322. Perform a two-dimensional Laplace-Gaussian filter on matrix D(P,G) to remove measurement noise and extract local maxima. If the same (P,G) point satisfies D≥Dmin and BER≤BERmax, then mark the point as a "feasible working point" and continue scanning until the entire matrix is covered. S323. After the scan is completed, the system calculates the power distribution histogram of all feasible operating points, selects the power value at the point with a cumulative probability of 10% as P0,min, and records the corresponding gain G0 and demodulation threshold T0, thereby obtaining the lowest radiated power while ensuring communication margin and reducing interference from adjacent production lines. Step S33 further includes the following sub-steps: S331. The system uses P0,min, G0,T0 as a benchmark, and uses a Kalman filter to make optimal estimates of the subsequent N sets of real-time sampled values Dk and BERk, dynamically updates the covariance matrix, and obtains the converged optimal estimates D* and BER*. S332. Compare D with the target modulation depth Dtarget. If |D-Dtarget|>ε, then use the gradient descent method to simultaneously fine-tune the three-dimensional parameters P, G, and T. Iterate until |D*-Dtarget|≤ε and BER* is minimized, and finally lock the global optimal operating point (Popt,Gopt,Topt). S333. After the iteration is completed, the system performs anti-collision verification on (Popt, Gopt, Topt): calculate the adjacent channel leakage ratio ACLR and the second harmonic distortion HD2. Only when ACLR ≤ -40dBc and HD2 ≤ -35dBc is the optimal parameter set confirmed to meet the production line EMC requirements. Otherwise, the search range is expanded and the iteration is repeated to ensure that the optimal parameters take into account both communication performance and electromagnetic compatibility. Step S34 further includes the following sub-steps: S341. Before the actual writing, the system uses the national cryptographic SM4 algorithm to encrypt (Popt, Gopt, Topt) to generate ciphertext Cparam, and then concatenates it with the current device serial number and timestamp to calculate the SM3 digest Hauth, forming a "parameter-identity-time" binding package; S342. Write the binding packet to the UFS embedded secure storage area with physical anti-tamper features. After writing, immediately read back and compare the Hauth. If the read digest is inconsistent with the original digest, trigger the "storage exception" interrupt, roll back to the factory default parameters and report to MES to prevent the parameters from being tampered with or bit-flipped during the writing process. S343. After successful writing, the system uploads the Hauth to the factory-level blockchain node and generates an immutable parameter storage transaction TXhash. Any subsequent operation that requires calling calibration parameters must first verify the TXhash to ensure the traceability and integrity of the optimal RF parameters throughout the entire lifecycle.
6. The method according to claim 1, characterized in that, Step S4 further includes: Step S41: Based on the card type and test distance selected by the user, retrieve the corresponding optimal RF parameters from the non-volatile memory; Step S42, the driver reader attempts to activate the card using the optimal RF parameters called; Step S43: Based on the card reading result, determine whether the foolproof function is effective and output the test conclusion.
7. The method according to claim 1, characterized in that, Step S6 specifically includes: Step S61: Record the test time, test card type, test distance, test results, and signal strength data for each test; Step S62: Display the test results on the LCD screen or print the test report using a printer.
8. The method according to claim 1, characterized in that, The system language modes include Chinese and English, which users can select via keyboard or touchscreen.
9. A foolproof testing system based on safety equipment, characterized in that, include: The human-computer interaction module provides multilingual menus and receives user-selected test card type, test distance, and calibration instructions. The calibration module is communicatively connected to the human-machine interaction module and is used to calibrate the radio frequency parameters of card A and card B at distances of 0 cm and 4 cm respectively according to the calibration instructions, and generate and store the corresponding optimal drive power, signal gain and demodulation threshold. The foolproof test module is communicatively connected to the human-machine interaction module and the calibration module. It is used to call the corresponding optimal radio frequency parameters according to the test card type and test distance selected by the user, drive the card reader to attempt to activate the card, and determine whether the card can be successfully read at a test distance of 4 cm. If it is successful, the foolproof function is determined to be invalid and recalibration is required. The results recording and output module is used to record the results of calibration and mistaken-proof tests and output them through display or printing.
10. The system according to claim 9, characterized in that, The calibration module includes: The signal acquisition unit is used to acquire the signal strength and bit error rate of the reference card at distances of 0 cm and 4 cm. The parameter calculation unit is used to calculate the optimal drive power, signal gain, and demodulation threshold based on the acquired signal strength and bit error rate. The storage unit is used to store the calculated optimal RF parameters into non-volatile memory for subsequent testing. The mistake-proof testing module includes: The parameter retrieval unit is used to retrieve the corresponding optimal radio frequency parameters from the storage unit according to the test card type and test distance selected by the user. The card reader control unit is used to drive the card reader to attempt to activate the card using the optimal radio frequency parameters called. The judgment unit is used to determine whether the card was successfully read at a test distance of 4 cm based on the card reading result, and outputs a conclusion on whether the foolproof function is effective; The human-computer interaction module includes: The language selection unit provides Chinese and English menu options; The test selection unit provides menu options for "calibration", "contactless A card test" and "contactless B card test"; Input device interface, used to connect a keyboard or touch screen and receive selection commands input by the user. The result recording and output module includes: The recording unit is used to record the test time, test card type, test distance, test results, and signal strength data for each calibration and mistaken-proof test; The output unit is used to display test results on an LCD screen or to print test reports via a printer.