A report anti-counterfeiting system and method combining dynamic two-dimensional codes and electronic seals
By combining dynamic QR codes and electronic signatures into a report anti-counterfeiting system, the problems of weak anti-counterfeiting capabilities, cumbersome verification processes, and insufficient data security in lifting machinery inspection and testing reports have been solved, achieving rapid and secure report verification and data protection.
Patent Information
- Application Number
- CN202510994268.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-07-18
AI Technical Summary
The existing paper-based inspection and testing reports for lifting machinery have problems such as weak anti-counterfeiting capabilities, cumbersome and inefficient verification processes, and lack of data security, which cannot meet the needs of rapid verification and equipment safety assessment at construction sites.
The report anti-counterfeiting system, which combines dynamic QR codes and electronic signatures, achieves the uniqueness, timeliness, data integrity, and non-repudiation of reports through dynamic QR code generation, dynamic watermark generation, electronic signature, and verification modules. It employs DES and RSA nested encryption technologies to ensure data security and utilizes WeChat QR code scanning for rapid verification.
This improved the report's anti-counterfeiting capabilities and verification efficiency, enhanced data security, reduced security incidents, and increased the report's credibility.
Smart Images

Figure CN120874135B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of crane machinery inspection and testing technology, and more specifically, to a report anti-counterfeiting system and method that combines dynamic QR codes and electronic signatures. Background Technology
[0002] As key equipment in fields such as construction engineering, rail transportation, and industrial manufacturing, the safe operation of lifting machinery is directly related to project quality and personnel safety. In various large-scale infrastructure projects, tower cranes, construction hoists, and other lifting machinery undertake core operations such as material transportation and equipment installation. The reliability of their operational status needs to be evaluated through regular inspection and testing. As authoritative documents recording equipment safety performance and determining operational status, inspection and testing reports are important bases for project acceptance and safety supervision. Their authenticity and completeness directly affect the compliant use of equipment and the prevention of safety accidents.
[0003] Currently, inspection and testing reports for lifting machinery are still mainly in paper form, and traditional anti-counterfeiting methods have significant technical shortcomings:
[0004] Paper reports have weak anti-counterfeiting capabilities: existing reports rely on static anti-counterfeiting measures such as fixed watermarks and stamps. When faced with high-precision scanning and tampering technology, the cost of counterfeiting is low and it is difficult to identify. Especially in scenarios such as construction sites, counterfeit reports may lead to the misuse of unqualified equipment and create safety hazards.
[0005] The verification process is cumbersome and inefficient: The traditional verification method of manually checking report numbers, test data and archived information takes a lot of time and is easily affected by subjective factors. It cannot meet the needs of rapid verification at the construction site, resulting in low efficiency in equipment acceptance and supervision.
[0006] Lack of data security: The report lacks encryption protection during transmission and storage, making the test data vulnerable to malicious tampering or theft, thus undermining the report's credibility and failing to provide a reliable basis for equipment security assessment.
[0007] With the large-scale development of urban rail transit, high-rise buildings, and other projects, the application scenarios of lifting machinery are becoming increasingly complex, making the demand for anti-counterfeiting and real-time verification of inspection and testing reports more urgent. Existing technologies can no longer meet the industry's requirements for the authenticity, security, and convenience of reports.
[0008] Therefore, a report anti-counterfeiting system and method combining dynamic QR codes and electronic signatures is proposed. Summary of the Invention
[0009] In order to overcome the above-mentioned defects of the prior art, the present invention provides a report anti-counterfeiting system and method that combines dynamic QR codes and electronic signatures to solve the problems mentioned in the background art.
[0010] To achieve the above objectives, the present invention provides the following technical solution: a report anti-counterfeiting system combining dynamic QR codes and electronic signatures, comprising:
[0011] The data management module is used to store and manage relevant data of inspection and testing reports, including the client, equipment information, test results, and corresponding regulatory platform filing number.
[0012] The dynamic QR code generation module is used to generate a unique and dynamically valid QR code based on key information in the report. The key information includes the report link, the name of the commissioning unit, the project name, the model and filing number, the testing date, the report number, and the unique physical identifier of the equipment. The dynamic validity is achieved by dual binding of real-time timestamps and equipment status data, and the encryption key is automatically updated every hour.
[0013] The dynamic watermark generation module is used to generate a dynamic watermark on each page of the report based on key information. The key information includes segmented information such as project name, detection date, filing number and electronic signature hash value. The segmented position of the watermark is dynamically offset according to the page number through a preset algorithm and has a mathematical mapping relationship with the dynamic QR code.
[0014] The electronic signature module is used to implement electronic signatures on inspection and testing reports using nested encryption technology and digital certificates. The nested encryption technology is as follows: first, the key information of the report is encrypted using the DES algorithm, and then the DES key is encrypted using the RSA algorithm. The double encryption result, together with the hardware encryption module information of the testing institution, serves as a component of the electronic signature to ensure the integrity and non-repudiation of the report.
[0015] The verification module is used to verify the dynamic QR code and determine the authenticity of the report. The verification includes information comparison, consistency verification of the mapping between the dynamic QR code and the watermark, correlation verification between the digital certificate and the hardware encryption module, and matching verification of the environmental parameters of the scanning device with the detection location associated with the report.
[0016] Preferably, in the dynamic QR code generation module, the dynamic QR code corresponds one-to-one with the report, possessing uniqueness and timeliness;
[0017] The dynamic QR code generation module has a dynamic update mechanism: it generates a new key based on a real-time timestamp, replaces the encryption parameters in the QR code every hour, and synchronizes the key update record to the data management module and the special equipment supervision platform.
[0018] Preferably, in the dynamic watermark generation module, the mathematical mapping relationship is implemented through an XOR operation. That is, after performing an XOR operation on the encryption key of the dynamic QR code and the hash value of each page watermark, the result must be consistent with the first 8 bits of the hash value of the report number.
[0019] Preferably, in the electronic signature module, the digital certificate is issued by a Certificate Authority (CA) and includes the testing authority's public key, authority information, and hardware encryption module information. The formula for generating the electronic signature is:
[0020]
[0021] in, Indicates an electronic signature;
[0022] Indicates the use of the testing agency's private key The decryption operation performed;
[0023] The hash value obtained by hashing the DES encryption result is calculated as follows: , The key information in the report is encrypted using DES encryption;
[0024] The hash value obtained by hashing the RSA encryption result is calculated as follows: , Indicates the use of RSA public key DES key The encryption operation performed;
[0025] The XOR operation is used to decompose or multiply the XOR values. and Perform fusion processing.
[0026] Preferably, the verification method of the verification module includes:
[0027] The WeChat QR code redirects to a verification page, displaying key report information, number of scans, environmental parameter matching results, and the mapping verification results between the dynamic QR code and the watermark.
[0028] Automatic verification is achieved by scanning a QR code through the WeChat service account menu. The system simultaneously retrieves the filing data from the special equipment supervision platform for cross-verification and returns a verification result containing a risk score.
[0029] A report anti-counterfeiting method based on the above-described report anti-counterfeiting system combining dynamic QR codes and electronic signatures includes the following steps:
[0030] Data management steps: Store and manage relevant data from inspection and testing reports, including equipment status data synchronized with the special equipment supervision platform;
[0031] Dynamic QR code generation steps: Extract key information from the report, embed a real-time timestamp and the device's unique physical identifier, and generate a dynamic QR code after DES encryption. The encryption key is updated hourly based on the timestamp.
[0032] Dynamic watermark generation steps: Extract key information from the report and segment the hash value of the electronic signature, generate a watermark that dynamically shifts with the page number using a preset algorithm, and establish a mathematical mapping relationship with the dynamic QR code;
[0033] Electronic signature steps: Generate an electronic signature using nested encryption technology, and attach the electronic signature and a digital certificate containing hardware encryption module information to the electronic document;
[0034] Verification steps: After scanning the dynamic QR code, the verification module sequentially completes information comparison, mapping relationship verification, hardware correlation verification, environmental parameter matching, and cross-verification of data from the regulatory platform, and returns the verification results and risk score.
[0035] Preferably, in the verification step, the risk score is calculated based on parameters such as the number of scans, the frequency of device replacement, and sudden changes in geographical location. When the score is higher than a threshold, a manual review process is triggered.
[0036] Preferably, in the verification step, the verification module uses the public key of the testing agency to decrypt the electronic signature to obtain the original hash value, recalculates the hash value of the report content, and compares the two hash values to determine whether the report has been tampered with, along with the validity of the digital certificate. The formula for the verification process is as follows:
[0037]
[0038]
[0039] in, This represents the recalculated hash value; This indicates the report content that needs to be verified; This indicates the verification result, expressed as a boolean value. A result is achieved when both hash values match and the CA certificate is valid. If true, then false; This function is used to determine the validity of a digital certificate.
[0040] Preferably, in the dynamic watermark generation step, the dynamic watermark includes key information such as project name, detection date, and filing number, which is dynamically displayed as the page changes, increasing the difficulty of forgery.
[0041] The technical effects and advantages of this invention are as follows:
[0042] This invention features a unique and timely dynamic QR code that prevents duplication, and an electronic signature that ensures data integrity and non-repudiation. Verification can be completed by scanning the code with a mobile phone, improving verification efficiency. Encryption algorithms safeguard data security, reduce the risk of tampering, and enhance security. It also enhances the credibility of inspection and testing reports and reduces security incidents caused by equipment problems.
[0043] When the dynamic watermark is generated, it is associated with the hash value fragment of the electronic signature. Each page of watermark contains different segments of hash value, and the position of the segments is dynamically shifted according to the page numbering algorithm. The watermark information and the dynamic QR code are associated through an XOR operation. During verification, the mapping consistency between the QR code and the watermark must be analyzed at the same time.
[0044] The electronic signature uses a nested algorithm of symmetric encryption (DES) and asymmetric encryption (RSA): first, DES is used to encrypt key information in the report, and then RSA is used to encrypt the DES key. The result of the double encryption is used as part of the electronic signature. The digital certificate embeds the hardware encryption module information of the testing agency. During verification, the validity of the certificate and the physical existence of the hardware device must be verified at the same time.
[0045] The verification module can perform environmental parameter verification. When scanning the code, it obtains the location latitude and longitude information and network IP address of the verification device and matches them with the detection location associated with the report. If the deviation exceeds the threshold, it triggers secondary verification. It also performs risk rating on the scanning behavior: based on data such as the number of scans, the frequency of device replacement, and sudden changes in geographical location, it automatically generates a risk score. High-risk cases require manual review before the results are returned. Attached Figure Description
[0046] Figure 1 This is a system architecture diagram of the present invention. Detailed Implementation
[0047] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] As attached Figure 1 The report anti-counterfeiting system shown combines dynamic QR codes and electronic signatures, including:
[0049] Data Management Module: The storage architecture is built using a MySQL database. It includes a client table with name, contact person, and qualification number; an equipment information table with equipment name, manufacturer, registration number, and model; and a test result table with test items, standard values, measured values, and conclusions. It provides data access services to other modules through an API interface.
[0050] By using a structured database to classify and store data, an indexing mechanism to ensure efficient data retrieval, and access control strategies (such as role-based access) to prevent unauthorized modifications, the system ensures complete storage of detection data and supports high-frequency data calls of more than 100 times per second, providing an accurate data source for dynamic QR code generation and electronic signatures.
[0051] Dynamic QR code generation module: Uses the Zxing open-source library as the QR code generation engine to extract information such as report number, commissioning unit, and testing date. After DES encryption of the report link, it embeds the QR code and generates a PNG format QR code with a resolution of 300dpi.
[0052] The Zxing library stores encrypted URLs and key information through a QR code matrix. It uses error correction algorithms to ensure high scanning recognition rates and DES encryption to ensure that the links cannot be tampered with. As a result, the generation time of a single QR code is less than 100ms. It supports recognition by mainstream scanning tools such as WeChat and Alipay, and the probability of the encrypted link being tampered with is less than 0.001%.
[0053] When generating a dynamic QR code, a timestamp and validity period parameters are embedded. During verification, the system checks if the current time - generation time is less than or equal to the validity period; if it is, it displays the message "QR code has expired".
[0054] This allows for synchronization with the server clock via timestamps. The validity period parameter is set by the testing agency in the management backend (default 24 hours). Expired QR codes automatically become invalid, thus preventing QR codes from being screenshotted and used for a long time. Tests show that the probability of an expired QR code being successfully verified is <0.0001%.
[0055] Dynamic watermark generation module: A watermark plugin developed based on the iTextPDF library. When generating a PDF report, the project name, inspection date, and filing number are superimposed as semi-transparent text in the upper left corner of each page. The watermark text dynamically adjusts its position (offset ±10px) as the page scrolls.
[0056] The watermark is generated synchronously with the content through PDF streaming technology. The dynamic offset is controlled by JavaScript to prevent fixed-position watermarks from being removed in batches. This ensures that the watermark embedding does not affect the reading of the report. The cost of batch watermark removal (manual + software) is more than 3 times higher than that of forging paper reports.
[0057] Electronic signature module: Integrates Shanghai CA (Shanghai Digital Certificate Authentication Center) digital certificate service, and uses OpenSSL to sign report hash values using the RSA algorithm (2048-bit key). Specific steps:
[0058] 1. Calculate the report hash value using SHA-256;
[0059] 2. Use the testing agency's private key to encrypt the hash value and generate a signature;
[0060] 3. Embed the signature and CA certificate (including public key) into the PDF metadata.
[0061] This ensures content uniqueness through hash algorithms (any modification will change the hash value), makes signatures unforgeable through asymmetric encryption (only the public key can decrypt them), and ensures the credibility of the institution's identity through the CA certificate chain. This results in signature verification time of <50ms and 100% accuracy in detecting content tampering, meeting the requirements of the "Electronic Signature Law of the People's Republic of China" for legitimate electronic signatures.
[0062] Verification module: Develop a web-based verification system, deployed on an Alibaba Cloud server, supporting two verification methods:
[0063] 1. Scanning the QR code redirects to an H5 page that displays key information and the number of scans.
[0064] 2. The WeChat service account integrates with the API, automatically querying the database for comparison information after scanning the QR code. Verification logic: Parse the report number in the QR code → Query the database to obtain the original data → Compare the submitted content with the database records.
[0065] This ensures high availability through a distributed database, prevents data hijacking by using HTTPS and TLS 1.3 protocol for API interfaces, and prevents duplicate verification attacks by using a barcode scan counter.
[0066] Results: Single verification response time <800ms, supports 1000 concurrent verification requests, and the probability of QR code tampering is <10%. -6 .
[0067] A report anti-counterfeiting method combining dynamic QR codes and electronic signatures includes the following steps:
[0068] Data management steps: Store and manage relevant data from inspection and testing reports, including equipment status data synchronized with the special equipment supervision platform.
[0069] Dynamic QR code generation steps: Extract key information from the report, embed a real-time timestamp and the device's unique physical identifier, and generate a dynamic QR code after DES encryption. The encryption key is updated hourly based on the timestamp.
[0070] Dynamic watermark generation steps: Extract key information from the report and segment the electronic signature hash value, generate a watermark that dynamically shifts with the page number using a preset algorithm, and establish a mathematical mapping relationship with the dynamic QR code.
[0071] Electronic signature steps: Generate an electronic signature using nested encryption technology, and attach the electronic signature and a digital certificate containing hardware encryption module information to the electronic document;
[0072] The digital certificate is issued by a Certificate Authority (CA) and contains the authority's public key, authority information, and hardware encryption module information. The formula for generating the electronic signature is:
[0073]
[0074] in, Indicates an electronic signature;
[0075] Indicates the use of the testing agency's private key The decryption operation performed;
[0076] The hash value obtained by hashing the DES encryption result is calculated as follows: , The key information in the report is encrypted using DES encryption;
[0077] The hash value obtained by hashing the RSA encryption result is calculated as follows: , Indicates the use of RSA public key DES key The encryption operation performed;
[0078] The XOR operation is used to decompose or multiply the XOR values. and Perform fusion processing.
[0079] Verification steps: After scanning the dynamic QR code, the verification module sequentially completes information comparison, mapping relationship verification, hardware correlation verification, environmental parameter matching, and cross-verification of data from the regulatory platform, and returns the verification results and risk score.
[0080] In practice, the DES encryption parameters are set as follows: block length 64 bits, key length 56 bits (actual input 64 bits including 8 parity bits), number of iteration rounds 16, encryption mode CBC (Cryptographic Block Chaining), and initialization vector IV generated from the system timestamp (accurate to milliseconds). Core code snippet:
[0081] SecretKeySpeckey=newSecretKeySpec(keyBytes,"DES");
[0082] Ciphercipher=Cipher.getInstance("DES / CBC / PKCS5Padding");
[0083] cipher.init(Cipher.ENCRYPT_MODE, key, newIvParameterSpec(ivBytes));
[0084] byte[]encrypted=cipher.doFinal(plainText.getBytes());
[0085] Among them, keyBytes is the master key, such as the byte array converted from "12345678", ivBytes is the initial vector, and plainText is the plaintext of the report link.
[0086] By using the CBC (Confirmation-Blocking) mode, each ciphertext block depends on the previous plaintext block, preventing the same plaintext from generating the same ciphertext. The timestamp IV (Instantaneous Virtualization) ensures the uniqueness of each encryption result, avoiding replay attacks. This increases the length of the encrypted link by approximately 1.5 times, making brute-force attacks take >10 seconds. 16 Year, at 10 per second 6 This is the second attempt at calculation.
[0087] The hash calculation uses the SHA-256 algorithm to generate a 256-bit hash value, and the private key signing uses the BouncyCastle cryptographic library.
[0088] MessageDigestdigest=MessageDigest.getInstance("SHA-256");
[0089] byte[]hash=digest.digest(reportBytes);
[0090] PrivateKeyprivateKey=getPrivateKeyFromPKCS8(pkcs8Bytes);
[0091] Signaturesignature=Signature.getInstance("SHA256withRSA");
[0092] signature.initSign(privateKey);
[0093] signature.update(hash);
[0094] byte[]signedHash=signature.sign();
[0095] Among them, reportBytes is the binary data of the report, and pkcs8Bytes is the private key of the testing agency (PKCS#8 format).
[0096] By leveraging the avalanche effect of SHA-256—where a change in one bit of the input results in a 50% change in the hash value—RSA signatures ensure content integrity, achieving "non-repudiation by the signer and non-forgery by others." This increases the size of the signed file by approximately 2KB, and ensures a 100% hash value comparison failure rate when the content is tampered with.
[0097] The specific verification process for WeChat service accounts is as follows:
[0098] 1. Users scan the QR code to access the official WeChat account, which contains the report number and an encrypted link;
[0099] 2. The server parses the report number and retrieves the original report hash value and CA certificate from the database;
[0100] 3. Decrypt the digital signature using the public key in the CA certificate to obtain the original hash value;
[0101] 4. Calculate the hash value of the report to be verified and compare whether the two are consistent;
[0102] 5. Return the verification result ("Valid" or "Tampered") and the number of scans.
[0103] The system employs a double hash comparison mechanism, comparing the original hash with the current hash to directly determine content consistency. CA certificate chain verification ensures the public key's legitimacy, and the number of scans prevents the same QR code from being forged and used multiple times. The entire process, from scanning to receiving the result, takes less than 1.5 seconds, and it achieves a 100% interception rate for illegal QR codes such as those with incorrect formats or missing numbers.
[0104] During the digital signature generation process, the private key signature uses the PKCS#1v1.5 padding scheme to ensure that the signature format conforms to the RFC3447 standard. The signature data structure includes: 1. a signature algorithm identifier; 2. a signature value, i.e., the encrypted hash value.
[0105] PKCS padding prevents small exponent attacks, algorithm identifiers ensure signature compatibility across different systems, and the public and private keys in the CA certificate are strictly paired. Signature compatibility testing passed 10 mainstream PDF readers, including Adobe Acrobat and Foxit Reader, with a signature format error rate of <0.01%.
[0106] The dynamic watermark text uses gradient colors, such as gray with 0.3 transparency, and the font changes randomly, including switching between Song / Hei / Fangsong every 5 pages. The position offset is generated by pseudo-random numbers with an offset range of ±10px. The watermark content includes tiny random noise for pixel-level interference.
[0107] This increases the difficulty of watermark removal through visual obfuscation techniques, prevents batch processing by using random font / position, and disrupts the regularity of watermarks by using noise. As a result, professional image software, such as Photoshop, takes more than 5 minutes to remove a single page watermark, and the cost of batch removal is significantly higher than re-forging the report.
[0108] Specifically, it includes:
[0109] (1) Report generation stage
[0110] (1.1) Testing institutions enter commission information: Fill in the commissioning unit, equipment information, and test results through the Web management backend;
[0111] (1.2) The system automatically generates reports: PDF documents are generated based on Word templates, including a cover, a table of test items, and a conclusion page;
[0112] (1.3) Dynamic element embedding:
[0113] Dynamic QR code generation module: Extracts information such as report number and link, encrypts it with DES to generate a QR code, and places it in the lower right corner of the cover;
[0114] Dynamic watermark generation module: Adds a semi-transparent watermark to the top left corner of each page, with the position randomly offset;
[0115] (1.4) Electronic signature:
[0116] Calculate the report hash value (SHA-256);
[0117] A digital signature is generated by signing the hash value with the private key of the testing agency.
[0118] Embed the digital certificate (including public key) issued by the Shanghai CA to complete the signing.
[0119] (2) Verification phase
[0120] (2.1) User scans the QR code with WeChat: Scan the QR code on the report cover;
[0121] (2.2) Redirect to the verification page: Display key data such as the client, project name, equipment information, and the words "Verification 1st time";
[0122] (2.3) Verify information: The user compares whether the content of the report is consistent with the page display;
[0123] (2.4) Deep verification (optional): Click the “View electronic report” link. The system will verify the validity of the electronic signature (hash value comparison + CA certificate verification) and display “Signature is valid and has not been tampered with”.
[0124] The specific anti-counterfeiting verification process includes the following methods:
[0125] Method 1: When users need to verify the authenticity of an inspection and testing report, they can scan the dynamic QR code on the report using WeChat or other scanning devices. After scanning, the verification link in the QR code will redirect to a verification page. The page displays key information about the report and the number of times the QR code has been scanned for verification. Clicking the report link will allow users to view the electronic report. Users can then compare the key information or the content of the electronic report with the content of the report to be verified. If the content matches, the report is valid.
[0126] Method 2: Users can follow the "Jianke Equipment Testing" WeChat service account, then click on the bottom menu "Testing Services" -> "Report Authenticity" to scan the dynamic QR code on the report. The system will automatically transmit the information in the QR code to the verification module. The verification module first verifies the validity of the QR code, including whether the QR code format is correct. If the QR code is valid, the system retrieves the corresponding report data from the data management module based on the report number in the QR code for verification and returns the verification result.
[0127] This enables dynamic anti-counterfeiting to support three different dimensions: dynamically generating watermarks for report information to prevent reports from being easily counterfeited; verifying anti-counterfeiting by comparing the QR code information with the report content through QR code scanning by personnel from any software; and verifying anti-counterfeiting by scanning database data via WeChat official accounts.
[0128] Secondly, the anti-counterfeiting verification function can display the number of anti-counterfeiting queries and is equipped with a GPS positioning module. When a user queries, the system can retrieve the user's location, record the time, and upload it to the system synchronously.
[0129] Example: Anti-counterfeiting process for tower crane inspection reports
[0130] China Railway 24th Bureau Group Co., Ltd. commissioned Jianke Equipment Testing Agency to conduct a periodic inspection of the tower crane (registration number: Hu AJ-T14833) used in the Shanghai Metro Line 23 project. The inspection date is June 10, 2025.
[0131] (1) Data entry and report generation
[0132] 1. The testing personnel enter the equipment information into the management system:
[0133] Manufacturer: Shaanxi Construction Machinery Co., Ltd.
[0134] Model: STT293;
[0135] The inspection covered 12 items, including metal structure, safety protection devices, and electrical system, and all of them passed the inspection.
[0136] 2. The system automatically generates a PDF report with the report number JXXH1H-250698-01, which is stored in the MySQL database of the data management module.
[0137] (2) Generation of Dynamic Anti-counterfeiting Elements
[0138] 1. Generation of Dynamic QR Codes:
[0139] Extract key information: report link (https: / / jkjxjc.com / S.aspx?p=7iQfAOsEn7o&z=...), client unit (China Railway 24th Bureau), project name (Shanghai Rail Transit Line 23), report number, etc.;
[0140] DES encryption parameters: the main key is "jkjc202506" (64 bits, including 8 - bit check bits), the initial vector IV is "202506101430" (detection completion time), and the encrypted link is:
[0141] kO9L5m7a+JzQ6w5R3n2T7y8u9i0p1K2j3h4g5f6d7s8a9w0e1r2t3y... (schematic value);
[0142] Generate a QR code with a size of 3cm × 3cm and an error correction level of H, which can correct 30% damage.
[0143] 2. Generation of Dynamic Watermarks:
[0144] Add watermark text "Shanghai Rail Transit Line 23 - 2025 - 06 - 10 - Hu AJ - T14833" in the upper left corner of each page. The font is Song typeface, the transparency is 30%, the offset for the first page is (5px, 5px), the offset for the second page is (-3px, 8px), and so on.
[0145] (3) Implementation of Electronic Signatures
[0146] 1. Calculate the report hash value:
[0147] The hash value is obtained by calculating the report binary data through SHA - 256:
[0148] a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8 (schematic value);
[0149] 2. Private key signature:
[0150] The testing institution uses a 2048 - bit RSA private key to sign the hash value, generating 64 - byte electronic signature data:
[0151] 56a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6 (schematic value);
[0152] 3. Embedded digital certificate:
[0153] The certificates issued by Shanghai CA include: institutional public key, validity period (from January 1, 2025 to December 31, 2026), certificate serial number (1234567890ABCDEF), which are embedded in the PDF metadata together with the electronic signature.
[0154] (4) Verification process
[0155] 1. Construction worker Zhang scans the QR code on the report cover with WeChat, and jumps to the verification page, which shows:
[0156] Entrusting unit: China Railway 24th Bureau Group Co., Ltd.;
[0157] Project name: Phase I Project of Shanghai Rail Transit Line 23;
[0158] Equipment name: Tower crane;
[0159] Registration number: Shanghai AJ-T14833;
[0160] Number of scans: The 1st time.
[0161] 2. Zhang checks that the report content is consistent with the page information and clicks "View Electronic Report", the system:
[0162] Decrypt the electronic signature with the public key in the CA certificate to obtain the original hash value;
[0163] Calculate the hash value of the current report and compare it with the original value, which is consistent;
[0164] Displays "Verification passed, the report has not been tampered with".
[0165] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A report anti-counterfeiting system combining dynamic QR codes and electronic signatures, characterized in that, include: The data management module is used to store and manage relevant data of inspection and testing reports, including the client, equipment information, test results, and corresponding regulatory platform filing number. The dynamic QR code generation module is used to generate a unique and dynamically valid QR code based on key information in the report. The key information includes the report link, the name of the commissioning unit, the project name, the model and filing number, the testing date, the report number, and the unique physical identifier of the equipment. The dynamic validity is achieved by dual binding of real-time timestamps and equipment status data, and the encryption key is automatically updated every hour. The dynamic watermark generation module is used to generate a dynamic watermark on each page of the report based on key information. The key information includes the project name, inspection date, filing number, and segmented information of the electronic signature hash value. The segmented position of the watermark is dynamically offset according to the page number through a preset algorithm, and there is a mathematical mapping relationship with the dynamic QR code. The mathematical mapping relationship is achieved through XOR operation. That is, after performing XOR operation between the encryption key of the dynamic QR code and the hash value segment of each page's watermark, the result must be consistent with the first 8 digits of the hash value of the report number. The electronic signature module is used to implement electronic signatures on inspection and testing reports using nested encryption technology and digital certificates. The nested encryption technology is as follows: first, the key information of the report is encrypted using the DES algorithm, and then the DES key is encrypted using the RSA algorithm. The double encryption result, together with the hardware encryption module information of the testing institution, serves as a component of the electronic signature to ensure the integrity and non-repudiation of the report. The verification module is used to verify the dynamic QR code and determine the authenticity of the report. The verification includes: Information comparison: The user scans the code to obtain the QR code content, including the report number. Then the server parses the report number, queries the original report hash value and CA certificate from the database, decrypts the electronic signature with the public key in the CA certificate to obtain the original hash value, and finally calculates the hash value of the report to be verified, compares whether the two are consistent, and returns the verification result and the number of scans. Verification of the consistency between the dynamic QR code and the watermark: Performed according to the verification method of the mathematical mapping relationship described above; Verification of the association between digital certificate and hardware encryption module: The public key of the testing agency is used to decrypt the electronic signature to obtain the original hash value. The hash value of the report content is recalculated. The two hash values are compared to determine whether the report has been tampered with, as well as the validity of the digital certificate. At the same time, the hardware encryption module information of the testing agency is embedded in the digital certificate. During verification, the validity of the certificate and the physical existence of the hardware device must be verified simultaneously. Verification of the matching between the environmental parameters of the scanning device and the detection location associated with the report: When scanning the code, the latitude and longitude information and network IP address of the verification device are obtained and matched with the detection location associated with the report. If the deviation exceeds the threshold, a secondary verification is triggered.
2. The report anti-counterfeiting system combining dynamic QR codes and electronic signatures according to claim 1, characterized in that, In the dynamic QR code generation module, each dynamic QR code corresponds one-to-one with the report, possessing uniqueness and timeliness; The dynamic QR code generation module has a dynamic update mechanism: it generates a new key based on a real-time timestamp, replaces the encryption parameters in the QR code every hour, and synchronizes the key update record to the data management module and the special equipment supervision platform.
3. The report anti-counterfeiting system combining dynamic QR codes and electronic signatures according to claim 1, characterized in that, In the electronic signature module, the digital certificate is issued by a Certificate Authority (CA) and includes the testing authority's public key, authority information, and hardware encryption module information. The formula for generating the electronic signature is: in, Indicates an electronic signature; Indicates the use of the testing agency's private key The decryption operation performed; The hash value obtained by hashing the DES encryption result is calculated as follows: , The key information in the report is encrypted using DES encryption; The hash value obtained by hashing the RSA encryption result is calculated as follows: , Indicates the use of RSA public key DES key The encryption operation performed; The XOR operation is used to decompose or multiply the XOR values. and Perform fusion processing.
4. The report anti-counterfeiting system combining dynamic QR codes and electronic signatures according to claim 1, characterized in that, The verification methods of the verification module include: Scanning the QR code via WeChat redirects to a verification page that displays key report information, the number of scans, environmental parameter matching results, and the mapping verification results between the dynamic QR code and the watermark. Automatic verification is achieved by scanning a QR code through the WeChat service account menu. The system simultaneously retrieves the filing data from the special equipment supervision platform for cross-verification and returns a verification result containing a risk score.
5. A report anti-counterfeiting method based on the report anti-counterfeiting system combining dynamic QR codes and electronic signatures as described in any one of claims 1-4, characterized in that, Includes the following steps: Data management steps: Store and manage data related to inspection and testing reports, including equipment status data synchronized with the special equipment supervision platform; Dynamic QR code generation steps: Extract key information from the report, embed a real-time timestamp and the device's unique physical identifier, and generate a dynamic QR code after DES encryption. The encryption key is updated hourly based on the timestamp. Dynamic watermark generation steps: Extract key information from the report and segment the hash value of the electronic signature, generate a watermark that dynamically shifts with the page number using a preset algorithm, and establish a mathematical mapping relationship with the dynamic QR code; Electronic signature steps: Generate an electronic signature using nested encryption technology, and attach the electronic signature and a digital certificate containing hardware encryption module information to the electronic document; Verification steps: After scanning the dynamic QR code, the verification module sequentially completes information comparison, mapping relationship verification, hardware correlation verification, environmental parameter matching, and cross-verification of data from the regulatory platform, and returns the verification results and risk score.
6. The report anti-counterfeiting method combining dynamic QR codes and electronic signatures according to claim 5, characterized in that, In the verification step, the risk score is calculated based on parameters such as the number of scans, the frequency of device replacement, and sudden changes in geographical location. When the score is higher than the threshold, a manual review process is triggered.
7. A report anti-counterfeiting method combining dynamic QR codes and electronic signatures according to claim 5, characterized in that, In the verification step, the verification module uses the public key of the testing agency to decrypt the electronic signature to obtain the original hash value, recalculates the hash value of the report content, and compares the two hash values to determine whether the report has been tampered with, along with the validity of the digital certificate. The formula for this verification step is: in, This represents the recalculated hash value; This indicates the report content that needs to be verified; This indicates the verification result, expressed as a boolean value. A result is achieved when both hash values match and the CA certificate is valid. If true, then false; This function represents the determination of the validity of a digital certificate.
8. The report anti-counterfeiting method combining dynamic QR codes and electronic signatures according to claim 5, characterized in that, In the dynamic watermark generation step, the dynamic watermark includes information such as project name, detection date, and filing number, which is dynamically displayed as the page changes, increasing the difficulty of forgery.
Citation Information
Patent Citations
Examination anti-cheating method based on dynamic two-dimensional code
CN117495624A
Two-dimensional code with watermark, authentication system, authentication method, and program
JP2016035751A