Report anti-counterfeiting verification method and system based on LIMS
By extracting core data from the LIMS database and generating encrypted verification codes during the report generation phase, the problems of easy forgery and complex verification of laboratory reports are solved, and dynamic encrypted binding and instant reliable verification of report content are achieved.
Patent Information
- Application Number
- CN202511735016.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-03-06
AI Technical Summary
Existing laboratory reports are easily forged, have complex verification processes and cannot achieve dynamic traceability, lack anti-counterfeiting mechanisms deeply coupled with LIMS, and are difficult to meet the requirements for reliable management throughout the entire report lifecycle.
When the report is generated, core data fields are extracted from the LIMS database to generate a standardized data string. A digital signature is generated using a cryptographic hash algorithm and an asymmetric encryption algorithm, and a two-dimensional encrypted verification code is embedded to achieve dynamic encrypted binding between the report content and the data source.
It enables convenient, immediate, and highly reliable verification of the authenticity and completeness of reports, breaks down information silos, provides an authoritative verification method, and ensures the security and reliability of the verification process.
Smart Images

Figure CN121619087A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of laboratory information management, and more specifically, to a LIMS-based report anti-counterfeiting verification method and system. Background Technology
[0002] Laboratory Information Management (LIMS) systems, as the core business platform of modern testing and inspection organizations, significantly improve laboratory operational efficiency, data traceability, and compliance levels through end-to-end digital management of samples, data, processes, personnel, and equipment. Test or inspection reports audited and officially issued by the LIMS system are widely used in fields such as energy and power, environmental protection, quality supervision, metrological verification, and scientific research. Their authenticity and completeness are directly related to public safety, fair trade, and judicial impartiality.
[0003] Electronic reports (usually in PDF format) generated by LIMS and their corresponding paper outputs are the primary means by which laboratories provide technical conclusions. However, with the widespread adoption of digital image processing, high-precision printing, and document editing technologies, traditional report anti-counterfeiting mechanisms have serious flaws. Existing technologies generally rely on static anti-counterfeiting measures, such as preset watermarks, fixed background patterns, visible digital signatures, or physical anti-counterfeiting labels. Once these elements are embedded in the report, they are easily scanned, screenshotted, copied, or tampered with, allowing the replacement of key test data with genuine report templates to generate difficult-to-identify fake documents. Simultaneously, the verification process heavily relies on manual intervention from the original issuer or specific physical media. While electronic reports can verify document integrity through digital signatures, they cannot determine whether the content has been replaced or forged. Paper reports require specialized equipment to identify special inks or paper characteristics, making remote, real-time, and self-service verification difficult. More importantly, once a report leaves the LIMS system environment, it becomes an information silo, making it impossible to trace its source, modification history, or circulation path, resulting in a lack of authoritative criteria for judgment in cases of content conflicts or duplicate numbering. Existing solutions lack a mechanism that is deeply coupled with LIMS, dynamically generates anti-counterfeiting information, and supports lightweight independent verification, making it difficult to meet the current urgent need for trustworthy management of the entire report lifecycle. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a report anti-counterfeiting verification method and system based on LIMS, addressing the problems existing in the prior art.
[0005] The technical solution adopted by this invention to solve its technical problem is: to construct a LIMS-based report anti-counterfeiting verification method, including the following steps: Upon receiving a report generation instruction, the core data fields associated with the target report are obtained according to the report generation instruction; The core data fields are formatted to generate standardized data strings; A preset cryptographic hash algorithm is used to calculate the normalized data string to generate a first content hash value; The data is encapsulated based on the hash value of the first content, and the encapsulated data is encrypted using a preset private key to obtain a digital signature. The first content hash value, the digital signature, the unique identifier of the target report, and the network access address of the remote verification server are integrated into an anti-counterfeiting data payload, and the anti-counterfeiting data payload is encoded into a two-dimensional encrypted verification code. The two-dimensional encrypted verification code is embedded into the target report to obtain an anti-counterfeiting report.
[0006] In the LIMS-based report anti-counterfeiting verification method of the present invention, the step of formatting the core data fields to generate standardized data strings includes: Extract the field names and values of the core data fields; Define the field names as keys and the field values as values, and sort them in ascending order according to the lexicographical order of the keys; The delimiter connects each key-value pair and different key-value pairs to form the normalized data string.
[0007] In the LIMS-based report anti-counterfeiting verification method of the present invention, the step of calculating the normalized data string using a preset cryptographic hash algorithm to generate a first content hash value includes: The first content hash value is obtained by calculating the normalized data string using a secure hash algorithm.
[0008] In the LIMS-based report anti-counterfeiting verification method of the present invention, the step of encapsulating the data based on the first content hash value and performing asymmetric encryption on the encapsulated data using a preset private key to obtain a digital signature includes: The first content hash value, the target report's unique identifier, and preset metadata are encapsulated; The digital signature is obtained by using the elliptic curve digital signature algorithm and the preset private key to sign the encapsulated data.
[0009] In the LIMS-based report anti-counterfeiting verification method of the present invention, the step of encoding the anti-counterfeiting data payload into a two-dimensional encrypted verification code includes: Serialize the anti-counterfeiting data payload into a target string; The target string is binary-securely encoded and then encoded using the data matrix code standard to obtain the two-dimensional encrypted verification code.
[0010] In the LIMS-based report anti-counterfeiting verification method described in this invention, the method further includes: The remote verification server receives verification requests for anti-counterfeiting reports sent by the client; The verification request is parsed to obtain the anti-counterfeiting data payload in the two-dimensional encrypted verification code; The digital signature in the anti-counterfeiting data payload is decrypted and verified using a key paired with the preset private key. After the digital signature verification is successful, the original core data fields are obtained based on the report unique identifier in the anti-counterfeiting data payload; A second content hash value is generated based on the original core data fields; The anti-counterfeiting report is verified based on the second content hash value and the first content hash value in the anti-counterfeiting data payload.
[0011] In the LIMS-based report anti-counterfeiting verification method of the present invention, the step of verifying the anti-counterfeiting report based on the second content hash value and the first content hash value in the anti-counterfeiting data payload includes: Compare whether the second content hash value is completely identical to the first content hash value; If so, return the successful anti-counterfeiting verification result and the original core data fields to the client; If not, the anti-counterfeiting verification failure result is returned to the client.
[0012] This invention also provides a LIMS-based report anti-counterfeiting verification system, comprising: The core data extraction module is used to obtain the core data fields associated with the target report according to the report generation instruction when a report generation instruction is received; The anti-counterfeiting information generation module is used to process the core data field to generate a standardized data string; to calculate the standardized data string using a preset cryptographic hash algorithm to generate a first content hash value; to encapsulate the data based on the first content hash value; and to perform asymmetric encryption on the encapsulated data using a preset private key to obtain a digital signature. The encryption verification encoding module is used to integrate the first content hash value, the digital signature, the report unique identifier of the target report, and the network access address of the remote verification server into an anti-counterfeiting data payload, and to encode the anti-counterfeiting data payload into a two-dimensional encrypted verification code. The verification code embedding module is used to embed the two-dimensional encrypted verification code into the target report to obtain an anti-counterfeiting report; The remote verification service module is used to receive and process verification requests from clients.
[0013] In the LIMS-based report anti-counterfeiting verification system of the present invention, the anti-counterfeiting information generation module includes: The data normalization unit is used to process the format of the core data fields and generate normalized data strings; The content hash calculation unit is used to calculate the normalized data string using a preset cryptographic hash algorithm to generate a first content hash value; The digital signature unit is used to encapsulate the data based on the hash value of the first content and to perform asymmetric encryption operations on the encapsulated data using a preset private key to obtain a digital signature.
[0014] In the LIMS-based report anti-counterfeiting verification system of the present invention, the encryption verification encoding module includes: The data encapsulation unit is used to integrate the first content hash value, the digital signature, the report unique identifier of the target report, and the network access address of the remote verification server into an anti-counterfeiting data payload. A visual encoding unit is used to encode the anti-counterfeiting data payload to obtain the two-dimensional encrypted verification code.
[0015] The LIMS-based report anti-counterfeiting verification method and system of the present invention have the following beneficial effects: It includes: obtaining core data fields associated with the target report according to the report generation instruction; processing the core data fields to generate a standardized data string; calculating the standardized data string to generate a first content hash value; encapsulating the data based on the first content hash value and performing asymmetric encryption on the encapsulated data to obtain a digital signature; integrating the first content hash value, digital signature, the target report's unique identifier, and the network access address of the remote verification server into an anti-counterfeiting data payload, and encoding the anti-counterfeiting data payload into a two-dimensional encrypted verification code; embedding the two-dimensional encrypted verification code into the target report to obtain an anti-counterfeiting report. This invention enables dynamic and encrypted binding of raw data in the laboratory information management system, achieving convenient, immediate, and highly reliable verification of the authenticity and integrity of reports. Attached Figure Description
[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a flowchart illustrating the LIMS-based report anti-counterfeiting verification method provided in this embodiment of the invention. Figure 2 This is a schematic diagram of the structure of the LIMS-based report anti-counterfeiting verification system of the present invention; Figure 3This is a schematic diagram of the core principle framework for dynamic encryption binding and digital signature generation of core report data provided by the present invention; Figure 4 This is a logical flowchart of the anti-counterfeiting information construction and encrypted verification code embedding in the report generation stage provided by the present invention; Figure 5 This is a schematic diagram of the multi-level interaction relationship and data flow between the remote verification server and the laboratory information management system provided by the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. 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.
[0018] To address the technical problems of existing laboratory information management system reports, which rely on static anti-counterfeiting information and are easily forged, and whose verification processes are complex and lack dynamic traceability, this invention provides a LIMS-based report anti-counterfeiting verification method. This method dynamically and encryptedly binds report content to the original authoritative data of the laboratory information management system, enabling convenient, immediate, and highly reliable verification of report authenticity and integrity. Specifically, this LIMS-based method extracts core key data from the laboratory information management system database during the report generation stage. This core key data is serialized to generate a content summary, which is then combined with an asymmetric encryption algorithm to generate a digital signature uniquely bound to the report content. Subsequently, the content summary, digital signature, and verification service address are integrated and encoded to generate a high-density encrypted verification code, which is dynamically embedded into the generated electronic or paper report. The verifier scans the encrypted verification code to initiate a request to a remote verification server. The server verifies the digital signature and retrieves the original data from the laboratory information management system database for content summary comparison, thereby achieving immediate and reliable verification of the report's authenticity and integrity.
[0019] Specifically, in a preferred embodiment, such as Figure 1 As shown, the LIMS-based report anti-counterfeiting verification method includes the following steps: Step S10: Upon receiving a report generation instruction, retrieve the core data fields associated with the target report according to the report generation instruction.
[0020] In this embodiment of the invention, structured query language commands are used to precisely access the report table, sample table, test result table, and user permission table in the laboratory information management system database to obtain data (i.e., core data fields associated with the target report) that are pre-defined as anti-counterfeiting key items in the system configuration and are associated with the current report (i.e., target report) number. Specifically, when the laboratory information management system receives a report generation command, it automatically extracts the core data fields (pre-stored in the database) that are key to the target report from the system's database. These core data fields include, but are not limited to: a unique report identifier, a unique sample identifier, one or more key test result values, test conclusions, the report issuer, and the report issuance timestamp.
[0021] Step S20: Format the core data fields to generate a standardized data string.
[0022] Optionally, in this embodiment of the invention, formatting the core data fields to generate a normalized data string includes: extracting the field names and field values of the core data fields; defining the field names as keys and the field values as values, and arranging them in ascending order according to the lexicographical order of the keys; and using a delimiter to connect each key-value pair and different key-value pairs to form a normalized data string. This invention arranges the extracted core data fields according to a preset key-value pair format and connects them into a normalized data string. Specifically, it uses the field names of all core data fields as keys and the field values as values, arranges them in ascending order according to the lexicographical order of the keys, and uses a preset delimiter (i.e., a marker character for concatenating different fields, such as "_") to connect each key-value pair and different key-value pairs to form a string with a deterministic structure and order (i.e., a normalized data string), thereby ensuring that the generated normalized data string remains constant for reports with the same content.
[0023] Step S30: Calculate the normalized data string using a preset cryptographic hash algorithm to generate the first content hash value.
[0024] Preferably, the preset cryptographic hash algorithm is a secure hash algorithm.
[0025] Optionally, in this embodiment of the invention, calculating the first content hash value by using a preset cryptographic hash algorithm on the normalized data string includes: calculating the first content hash value by using a secure hash algorithm on the normalized data string. The length of the first content hash value is fixed. This invention generates a hash digest value by using a secure hash algorithm (SHA-256) to operate on the normalized data string, and uses this hash digest value as the first content hash value.
[0026] Step S40: Encapsulate the data based on the first content hash value, and use a preset private key to perform asymmetric encryption on the encapsulated data to obtain a digital signature.
[0027] Optionally, in this embodiment of the invention, encapsulating the data based on a first content hash value and performing asymmetric encryption on the encapsulated data using a preset private key to obtain a digital signature includes: encapsulating the first content hash value, the target report's unique identifier, and preset metadata (such as signature algorithm identifier, timestamp, etc.); and using an elliptic curve digital signature algorithm and the preset private key to perform a signature operation on the encapsulated data to obtain a digital signature. The preset private key is the private key of the laboratory information management system. Specifically, the elliptic curve digital signature algorithm (ECDSA) is used, and the private key of the laboratory information management system pre-installed in the hardware security module is used to perform a signature operation on the data packet containing the first content hash value and the report's unique identifier to generate a digital signature.
[0028] Step S50: Based on the first content hash value, digital signature, unique identifier of the target report, and network access address of the remote verification server, integrate them into an anti-counterfeiting data payload, and encode the anti-counterfeiting data payload into a two-dimensional encrypted verification code.
[0029] Optionally, in this embodiment of the invention, encoding the anti-counterfeiting data payload into a two-dimensional encrypted verification code includes: serializing the anti-counterfeiting data payload into a target string; performing binary security encoding on the target string and encoding it using the data matrix code standard to obtain a two-dimensional encrypted verification code. Specifically, firstly, the anti-counterfeiting data payload is serialized into a string in JavaScript object representation format (i.e., the target string), then the string is performed on binary security encoding, and finally encoded using the data matrix code ECC200 standard to generate a two-dimensional encrypted verification code with high information density and strong error correction capabilities.
[0030] Step S60: Embed the two-dimensional encrypted verification code into the target report to obtain the anti-counterfeiting report.
[0031] In this embodiment of the invention, embedding a two-dimensional encrypted verification code into the target report to obtain an anti-counterfeiting report specifically includes: when the report generation engine of the laboratory information management system processes the report template, calling the image insertion function to place the generated two-dimensional encrypted verification code image file as an independent graphic object at a preset coordinate position in the report header, footer, or information declaration area.
[0032] Furthermore, this LIMS-based report anti-counterfeiting verification method also includes the following steps: Step S70: The remote verification server receives the verification request of the anti-counterfeiting report sent by the client; it parses the verification request to obtain the anti-counterfeiting data payload in the two-dimensional encrypted verification code; Step S80: Decrypt and verify the digital signature in the anti-counterfeiting data payload using a key paired with the preset private key; Step S90: After the digital signature verification is successful, obtain the original core data field based on the report's unique identifier in the anti-counterfeiting data payload; generate a second content hash value based on the original core data field; and perform anti-counterfeiting verification on the anti-counterfeiting report based on the second content hash value and the first content hash value in the anti-counterfeiting data payload. Specifically, performing anti-counterfeiting verification on the anti-counterfeiting report based on the second content hash value and the first content hash value in the anti-counterfeiting data payload includes: comparing whether the second content hash value and the first content hash value are completely consistent; if yes, return a successful anti-counterfeiting verification result and the original core data field to the client; if no, return a failed anti-counterfeiting verification result to the client.
[0033] Specifically, the remote verification server receives a verification request initiated by the client via scanning a two-dimensional encrypted verification code. This request contains anti-counterfeiting data payload decoded from the two-dimensional encrypted verification code. The remote verification server uses a public key paired with the private key of the laboratory information management system to decrypt and verify the digital signature in the verification request to confirm the authenticity of the request's source and the integrity of the data. If the digital signature verification fails, a verification failure message is output. After the digital signature verification passes, the remote verification server queries and retrieves the original report core data field (i.e., the original core data field) from the laboratory information management system database based on the unique identifier of the report in the request. The remote verification server uses the same processing procedure as generating the first content hash value to generate a second content hash value for the retrieved original core data field. The second content hash value is compared with the first content hash value in the verification request for complete consistency. If they are completely consistent, a successful verification result and the original core data field are returned to the client device for visual verification by the verifier. If they are inconsistent, a verification failure result is returned. Preferably, the communication between the remote verification server and the client device is encrypted throughout using a transport layer security protocol to ensure the confidentiality and integrity of the verification request and response data during transmission.
[0034] refer to Figure 2 The present invention also provides a report anti-counterfeiting verification system based on LIMS.
[0035] Specifically, such as Figure 2 As shown, the LIMS-based report anti-counterfeiting verification system includes: The core data extraction module 201 is used to obtain the core data fields associated with the target report according to the report generation instruction received. Specifically, the core data extraction module 201 is connected to the database of the laboratory information management system and is configured to automatically extract the core data fields related to the report according to preset extraction rules when the report issuance process is triggered.
[0036] The anti-counterfeiting information generation module 202 is used to process the format of the core data fields and generate a standardized data string; to calculate the standardized data string using a preset cryptographic hash algorithm to generate a first content hash value; to encapsulate the data based on the first content hash value and to perform asymmetric encryption operation on the encapsulated data using a preset private key to obtain a digital signature.
[0037] Preferably, the anti-counterfeiting information generation module 202 includes: a data normalization unit, used to process the format of core data fields and generate a normalized data string; a content hash calculation unit, used to calculate the normalized data string using a preset cryptographic hash algorithm to generate a first content hash value; and a digital signature unit, used to encapsulate the data based on the first content hash value and perform asymmetric encryption on the encapsulated data using a preset private key to obtain a digital signature. Specifically, the data normalization unit is mainly used to concatenate multiple received core data fields into a single, deterministic normalized data string according to predetermined sorting rules and formatting requirements. The content hash calculation unit is configured to process the normalized data string generated by the data normalization unit using a secure hash algorithm (SHA-256) to output a first content hash value. The digital signature unit stores the private key of the laboratory information management system internally or calls it through a secure interface, and uses an elliptic curve digital signature algorithm to sign the first content hash value and other metadata (i.e., the aforementioned preset metadata) to ensure the non-repudiation and integrity of the anti-counterfeiting information. The anti-counterfeiting information includes the first content hash value and the digital signature. Among them, the core of the report's dynamic encryption binding and digital signature generation is as follows: Figure 3 As shown.
[0038] The encryption verification encoding module 203 is used to integrate the first content hash value, digital signature, unique report identifier of the target report, and network access address of the remote verification server into an anti-counterfeiting data payload, and encode the anti-counterfeiting data payload into a two-dimensional encrypted verification code. In this embodiment of the invention, the encryption verification encoding module 203 is connected to the anti-counterfeiting information generation module 202 and the report generation engine of the laboratory information management system, and is mainly used to encapsulate and encode the anti-counterfeiting information and the network access address of the remote verification server into a two-dimensional encrypted verification code.
[0039] Preferably, in this embodiment of the invention, the encryption verification encoding module 203 includes: a data encapsulation unit, used to integrate the first content hash value, digital signature, unique report identifier of the target report, and network access address of the remote verification server into an anti-counterfeiting data payload; and a visual encoding unit, used to encode the anti-counterfeiting data payload to obtain a two-dimensional encrypted verification code. Specifically, the data encapsulation unit assembles the first content hash value, unique report identifier, digital signature, and network access address of the remote verification server into a structured data payload according to the JavaScript object representation format. The visual encoding unit is used to call the data matrix code encoding library to convert the structured data payload of the data encapsulation unit into an image (i.e., a two-dimensional encrypted verification code) conforming to the data matrix code ECC200 standard.
[0040] The verification code embedding module 204 is used to embed a two-dimensional encrypted verification code into the target report to obtain an anti-counterfeiting report. In this embodiment of the invention, the verification code embedding module 204 is mainly used to dynamically embed the two-dimensional encrypted verification code generated by the visual encoding unit into the final generated report file (i.e., the anti-counterfeiting report). This verification code embedding module 204 can interact with the report generation engine of the laboratory information management system as a plugin or interface, dynamically embedding the two-dimensional encrypted verification code generated by the visual encoding unit into a predefined area of the report template during the report rendering process. The anti-counterfeiting information construction and encrypted verification code embedding logic flow in the report generation stage of this invention is as follows: Figure 4 As shown.
[0041] The remote verification service module 205 is used to receive and process verification requests from clients.
[0042] In this embodiment of the invention, the remote verification service module 205 is deployed on a server that can be accessed by the public network. It includes a network application interface for receiving and processing verification requests from the outside, and internally it can integrate an interface for secure communication with the database of the laboratory information management system.
[0043] Preferably, in this embodiment of the invention, the remote verification service module 205 includes: a request receiving and parsing unit, which serves as the entry point of the network application interface, responsible for listening to a specified network port, receiving verification requests based on the Hypertext Transfer Security Protocol, and parsing the anti-counterfeiting data payload from the request body; a digital signature verification unit, which has a built-in public key paired with the private key of the laboratory information management system, used to verify the received digital signature, and immediately interrupts the processing and returns a failure response if the verification fails; a data source retrieval and comparison unit, which, after the signature verification is passed, connects to the database of the laboratory information management system through a secure channel, uses the unique identifier of the report in the request as a query index, and accurately retrieves the original core data stored in the database; a hash consistency verification unit, which calls the same hash algorithm and normalization process as the content hash calculation unit, calculates the second content hash value in real time based on the original data obtained by the data source retrieval and comparison unit, and compares it bit by bit with the first content hash value carried in the request; and a verification result generation and response unit, which constructs a corresponding response message based on the comparison result of the hash consistency verification unit. If the comparison matches, a success response containing a verification success status code and the original core data fields is generated; if they do not match, a failure response containing a verification failure status code and the reason for the error is generated and returned to the client through the request receiving and parsing unit. The multi-level interaction relationship and data flow between the remote verification server and the laboratory information management system of this invention are as follows: Figure 5 As shown.
[0044] Compared with traditional solutions, the present invention has the following advantages: This invention achieves dynamic encrypted binding between report content and data source, fundamentally solving the problem of static anti-counterfeiting information being easily copied and tampered with. By generating hash values and digitally signing the core content of the report, any minor alteration to the report's key data will result in a hash value mismatch during verification, thus ensuring the unique correspondence and indivisibility between the anti-counterfeiting information and the report content.
[0045] It provides an instant, convenient, and authoritative verification method, greatly improving verification efficiency and reducing verification costs. Users do not need to rely on the original report, special verification equipment, or manually contact the issuer; they only need to use a general-purpose smart device to scan the two-dimensional encrypted verification code on the report to obtain authoritative verification results from the laboratory information management system data source within seconds.
[0046] This invention breaks down the information silos of traditional reports and establishes a reliable traceability link from the report to its original data. When disputes arise regarding authenticity, the verification mechanism provided by this invention can use the backend data of the laboratory information management system as the final basis for adjudication, quickly and clearly determining the authenticity of the report, and providing strong technical support for liability determination.
[0047] The application of asymmetric encryption technology ensures the security and reliability of the verification process. The use of digital signatures not only guarantees the integrity of the verification request data and prevents data tampering during transmission, but also verifies that the request originates from a genuine report, effectively preventing potential security attacks such as forged verification requests.
[0048] The LIMS-based report anti-counterfeiting verification method and system provided by this invention mainly address the technical problems of traditional solutions, such as reliance on static information, susceptibility to copying and tampering, complex verification processes, and inability to achieve dynamic traceability. This invention dynamically extracts core data fields from the database of the laboratory information management system during the report generation stage, generates a content hash value, and combines it with an asymmetric encryption algorithm to generate a digital signature. This digital signature, along with information such as the network access address of a remote verification server, is encoded into a two-dimensional encrypted verification code and embedded in the report. This allows the verifier to instantly, accurately, and reliably verify the authenticity and integrity of the report by scanning the two-dimensional encrypted verification code. The specific implementation steps of this invention will be described in detail below.
[0049] First, upon receiving a report generation instruction, the laboratory information management system automatically triggers the initial steps of the anti-counterfeiting verification process. This instruction is typically issued by a user with report issuance authority after completing all testing tasks, review processes, and quality control checks, by clicking the "Generate Formal Report" button on the system interface. Upon receiving this instruction, the system immediately invokes the core data extraction module 201. This module, based on pre-defined anti-counterfeiting key data field rules in the system configuration interface, sends a structured query language command to the laboratory information management system database. The query command precisely accesses the main report table, sample information table, test result details table, and user permissions and issuance record table to obtain all core data fields associated with the unique identifier of the report to be generated. These fields include, but are not limited to: the report unique identifier, the sample unique identifier, one or more key test result values, test conclusion text, the report issuer's identity identifier, and the report issuance timestamp. The selection of all core data fields is based on the principle that they have a decisive impact on the legal validity and technical conclusions of the report, ensuring that even if other parts of the report are tampered with, changes to these core fields can be accurately identified by the verification mechanism.
[0050] Secondly, after the core data fields are extracted, the system enters the data normalization processing stage. This stage is executed by the data normalization unit in the anti-counterfeiting information generation module 202. This data normalization unit receives multiple core data fields from the core data extraction module 201 and sorts them according to a preset key-value pair format. Specifically: the database field name of each field serves as the key, and its corresponding field value serves as the value, forming a key-value pair; all key-value pairs are sorted in ascending order according to the lexicographical order of the keys to ensure the determinism and repeatability of the processing order; after sorting, the system uses a preset separator to connect each key and its value, and inserts another preset separator between different key-value pairs, finally concatenating them into a single, structurally deterministic normalized data string. The generation process of this normalized data string completely eliminates randomness and external dependencies, ensuring that for reports with identical content, regardless of when or where they are generated, the output normalized data string remains constant, providing a consistent input basis for subsequent hash calculations.
[0051] Next, after obtaining the normalized data string, the system calls the content hash calculation unit to perform calculations on the string using a preset cryptographic hash algorithm. In this embodiment, the preset cryptographic hash algorithm is the secure hash algorithm (SHA-256). This algorithm receives the normalized data string as input, performs multiple rounds of nonlinear compression and bitwise operations, and outputs a hash digest value with a fixed length of 256 bits, i.e., the first content hash value. This first content hash value has a strong avalanche effect characteristic, meaning that a change in any bit in the input string will cause an unpredictable and significant change in the output hash value. Therefore, the first content hash value can be regarded as the unique digital fingerprint of the normalized data string and even its original core data fields. Any tampering with the core content of the report will cause the hash value recalculated in the verification stage to be inconsistent with the first content hash value, thus being judged as forgery.
[0052] After generating the first content hash value, the system enters the digital signature generation stage. This stage is executed by the digital signature unit. The digital signature unit first encapsulates the first content hash value, the report's unique identifier, and preset metadata (such as signature algorithm identifier, timestamp, etc.) into a structured data packet. Subsequently, the system invokes the private key of the laboratory information management system stored in the hardware security module. This private key is a dedicated key under the Elliptic Curve Digital Signature Algorithm (ECDSA) system, and its corresponding public key has been pre-distributed and deployed on a remote verification server. The digital signature unit uses this private key to perform an Elliptic Curve Digital Signature Algorithm operation on the encapsulated data packet, generating a digital signature. This signing process ensures the authenticity and integrity of the data packet's origin: only the laboratory information management system holding this private key can generate a valid signature, and any tampering with the data packet content will result in signature verification failure.
[0053] After the digital signature is completed, the data encapsulation unit of the encryption verification encoding module 203 constructs the anti-counterfeiting data payload. This anti-counterfeiting data payload consists of a first content hash value, a unique report identifier, the digital signature, and the network access address of the remote verification server. The network access address is a complete Hypertext Transfer Protocol Uniform Resource Locator (HTTPURP), pointing to the application programming interface endpoint of the remote verification service module 205 deployed in the public network environment. The system serializes the above four pieces of information according to the JavaScript object notation format, forming a well-structured, machine-readable string. This string is then sent to the data encapsulation unit of the encryption verification code encoding and embedding module as input to the visual encoding unit.
[0054] After receiving the string in JavaScript object representation format, the visual encoding unit first performs binary security encoding to ensure that all characters (including special symbols and non-ASCII characters) are correctly represented. Then, the system calls an encoding library conforming to the ECC200 data matrix code standard to convert the encoded binary data into a two-dimensional image. The ECC200 data matrix code standard has high information density and strong error correction capabilities, ensuring that the QR code can still be accurately recognized by standard barcode scanning devices even if it is printed, copied, or partially damaged. The generated two-dimensional encrypted verification code image file is in bitmap format, and its size and resolution are adaptively adjusted according to the reserved area of the report template to ensure clear readability without interfering with the report text.
[0055] During the rendering of the final report file by the report generation engine, the CAPTCHA embedding module 204 is activated. This module, acting as a plug-in interface to the laboratory information management system's report generation engine, calls an image insertion function at a specified stage of the engine's report template processing (typically during the rendering of the header, footer, or information declaration area). It precisely places the two-dimensional encrypted CAPTCHA image file generated by the visual encoding unit as an independent graphic object at a preset coordinate position within the template. This position is explicitly defined in the system configuration, ensuring that the position, size, and style of the CAPTCHA remain consistent across all generated reports, facilitating user recognition and scanning. Finally, the report file containing the two-dimensional encrypted CAPTCHA is output as a PDF or directly sent to a printer to generate a paper report.
[0056] When the report recipient (i.e., the client) needs to verify the report's authenticity, they use a universal QR code scanning application on a smartphone, tablet, or dedicated scanning device to scan the two-dimensional encrypted verification code on the report. The scanning device decodes the QR code, obtains the anti-counterfeiting data payload contained within, and automatically constructs a verification request using the Hypertext Transfer Protocol (HTTP). The target address of this request is the remote verification server's network access address within the anti-counterfeiting data payload, and the request body contains the complete anti-counterfeiting data payload. The entire communication process is end-to-end encrypted using Transport Layer Security (TLS) protocols to ensure that the data is not eavesdropped on or tampered with during transmission.
[0057] Upon receiving the verification request, the remote verification server processes it using the request receiving and parsing unit. This unit listens on a designated network port, receives the request, and parses out the anti-counterfeiting data payload. Subsequently, the digital signature verification unit is invoked. This unit has a built-in public key paired with the private key of the laboratory information management system, which is used to decrypt and verify the digital signature in the request. The verification process includes checking whether the signature was generated by the corresponding private key and whether the data packet covered by the signature is complete and unmodified. If verification fails, the system immediately interrupts subsequent processes and returns a response message containing an authentication failure status code through the verification result generation and response unit.
[0058] If the digital signature verification passes, it indicates that the verification request originates from a genuine report issued by the laboratory information management system, and that the anti-counterfeiting data payload has not been tampered with during transmission. At this point, the data source retrieval and comparison unit is activated. This unit connects to the laboratory information management system database via a pre-established secure channel (such as a virtual private network or an application programming interface with two-way certificate authentication). It uses the report's unique identifier carried in the request as a query index to accurately retrieve the core data fields of the stored original report from the database, including the report's unique identifier, sample's unique identifier, key test result values, test conclusions, report issuer, and report issuance timestamp.
[0059] After obtaining the original core data fields, the hash consistency verification unit is activated. This unit integrates the exact same processing logic as the content hash calculation unit in the laboratory information management system, including the same data normalization rules and the same cryptographic hash algorithm (SHA-256). It performs the same normalization and hash calculation on the retrieved original core data fields as in the report generation stage, generating a second content hash value. Subsequently, the hash consistency verification unit compares the second content hash value bit by bit with the first content hash value carried in the verification request.
[0060] If the two hash values match exactly, it proves that the core data in the report completely matches the original record in the laboratory information management system database, and the report has not been tampered with. The verification result generation and response unit then constructs a successful verification response, which includes a verification success status code and the plaintext content of the original core data fields retrieved from the database. Upon receiving this response, the client device can display a "Verification Successful" message to the user in its application interface and list the original core data for visual comparison with the printed content on the report. If the two hash values do not match, it indicates that the report content has been modified, and the system returns a verification failure response, clearly informing the user that the report is forged or has been tampered with.
[0061] This invention enables dynamic encrypted binding of report content and data source, providing a convenient, immediate, accurate, and reliable verification method, breaking down information silos, and establishing a trusted traceability link, fundamentally solving the inherent defects of traditional LIMS report anti-counterfeiting technology.
[0062] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0063] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0064] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0065] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They do not limit the scope of protection of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should fall within the scope of the claims of the present invention.
Claims
1. A LIMS-based report anti-counterfeiting verification method, characterized in that, The method comprises the following steps: Upon receiving a report generation instruction, obtaining core data fields associated with a target report according to the report generation instruction; performing format processing on the core data fields to generate a standardized data string; calculating the standardized data string using a preset cryptographic hash algorithm to generate a first content hash value; performing encapsulation based on the first content hash value, and performing asymmetric encryption operation on the encapsulated data using a preset private key to obtain a digital signature; integrating the first content hash value, the digital signature, a report unique identifier of the target report, and a network access address of a remote verification server into a forgery-proof data payload, and encoding the forgery-proof data payload into a two-dimensional encrypted verification code; embedding the two-dimensional encrypted verification code into the target report to obtain a forgery-proof report.
2. The LIMS-based report anti-counterfeiting verification method of claim 1, wherein, The format processing on the core data fields to generate a standardized data string comprises: extracting field names and field values of the core data fields; defining the field names as keys and the field values as values, and arranging the keys in ascending order according to their dictionary order; connecting each key-value pair and different key-value pairs by a delimiter to form the standardized data string.
3. The LIMS-based report anti-counterfeiting verification method of claim 1, wherein, The calculation of the standardized data string using a preset cryptographic hash algorithm to generate a first content hash value comprises: calculating the standardized data string using a secure hash algorithm to obtain the first content hash value.
4. The LIMS-based report anti-counterfeiting verification method of claim 1, wherein, The encapsulation based on the first content hash value and the asymmetric encryption operation on the encapsulated data using a preset private key to obtain a digital signature comprises: encapsulating the first content hash value, a report unique identifier of the target report, and preset metadata; performing signature operation on the encapsulated data using the preset private key by an elliptic curve digital signature algorithm to obtain the digital signature.
5. The LIMS-based report anti-counterfeiting verification method of claim 1, wherein, The encoding of the forgery-proof data payload into a two-dimensional encrypted verification code comprises: serializing the forgery-proof data payload into a target string; performing binary secure encoding on the target string, and encoding the target string using a data matrix code standard to obtain the two-dimensional encrypted verification code.
6. The LIMS-based report anti-counterfeiting verification method of claim 1, wherein, The method further comprises: a remote verification server receiving a verification request of a forgery-proof report sent by a client; parsing the verification request to obtain a forgery-proof data payload in the two-dimensional encrypted verification code; decrypting and verifying the digital signature in the forgery-proof data payload using a private key paired with the preset private key; after the digital signature verification is passed, obtaining original core data fields according to a report unique identifier in the forgery-proof data payload; generating a second content hash value based on the original core data fields; performing forgery-proof verification on the forgery-proof report based on the second content hash value and the first content hash value in the forgery-proof data payload.
7. The LIMS-based report anti-counterfeiting verification method according to claim 6, characterized in that, The forgery-proof verification on the forgery-proof report based on the second content hash value and the first content hash value in the forgery-proof data payload comprises: comparing whether the second content hash value and the first content hash value are completely identical; if yes, returning a result of successful forgery-proof verification and the original core data fields to the client; If not, the client is returned to the anti-counterfeiting verification failure result.
8. A LIMS based report anti-counterfeiting verification system characterized in that, Comprise: The core data extraction module is used for acquiring the core data field associated with the target report according to the report generation instruction when receiving the report generation instruction; Anti-counterfeiting information generation module, for the core data field format processing, generating a standardized data string; Adopting a preset cryptographic hash algorithm to calculate the normalized data string, generating a first content hash value; Based on the first content hash value for packaging, and using a preset private key for asymmetric encryption operation on the packaged data, obtaining a digital signature; Encryption verification coding module, for integrating the first content hash value, the digital signature, the report unique identifier of the target report and the network access address of the remote verification server into an anti-counterfeiting data payload, and encoding the anti-counterfeiting data payload into a two-dimensional encryption verification code; Verification code embedding module, for embedding the two-dimensional encryption verification code into the target report to obtain an anti-counterfeiting report; Remote verification service module, for receiving and processing the verification request from the client.
9. The LIMS-based report anti-counterfeiting verification system of claim 8, wherein, The anti-counterfeiting information generation module comprises: Data standardization unit, for the core data field format processing, generating a standardized data string; Content hash calculation unit, for calculating the normalized data string using a preset cryptographic hash algorithm, generating a first content hash value; Digital signature unit, for packaging based on the first content hash value, and using a preset private key for asymmetric encryption operation on the packaged data, obtaining a digital signature.
10. The LIMS-based report anti-counterfeit verification system of claim 8, wherein, The encryption verification coding module comprises: Data packaging unit, for integrating the first content hash value, the digital signature, the report unique identifier of the target report and the network access address of the remote verification server into an anti-counterfeiting data payload; Visual coding unit, for encoding the anti-counterfeiting data payload to obtain the two-dimensional encryption verification code.