A commodity anti-counterfeiting traceability method and system based on two-stage verification
By employing a two-stage verification method, utilizing static QR codes and dynamically activated authentication buttons, combined with H5 web pages and mini-program verification, the problem of contactless pre-sale inquiry and high-security post-sale authentication in existing anti-counterfeiting technologies has been solved. This approach achieves low-cost, lightweight deployment and easy operation, enhancing the security of anti-counterfeiting traceability and improving user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGHUI (GUIZHOU) TECH CO LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-19
Smart Images

Figure CN122243519A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of anti-counterfeiting and traceability technology, specifically to product data management, product process management, and IoT item coding technologies in the Internet of Things (IoT) field. In particular, it relates to a product anti-counterfeiting and traceability method and system based on two-stage verification. Background Technology
[0002] Anti-counterfeiting technology, as a key means to maintain market order and protect consumers' legitimate rights and brand reputation, is being increasingly applied alongside the rapid development of the commodity economy. QR codes, with their low cost, ease of identification, and convenient deployment, have become the core information carrier in the field of anti-counterfeiting and traceability, widely used in the authentication, traceability, and quality control of various commodities. RFID (Radio Frequency Identification) technology and e-commerce platform-specific one-item-one-code verification technology have been promoted in specific fields due to their scenario-based advantages, providing technological attempts for the secure management of the entire product lifecycle.
[0003] However, existing technologies all have technical flaws and limitations in adaptability to different scenarios. Firstly, current QR code technologies mostly employ a simple "scan and get" verification mode, allowing counterfeiters to forge query pages to mislead consumers, posing serious security risks. Secondly, there is a conflict between pre-sales and after-sales needs; consumers cannot check basic information such as batch number and production date without damaging the anti-counterfeiting coating and retaining their right to return or exchange goods. Thirdly, ordinary QR codes are easily copied and reused by photographing; counterfeiters can simply affix a genuine QR code to a counterfeit product, rendering the anti-counterfeiting measures ineffective. Furthermore, some system designs require consumers to access specific mini-programs or apps, making the verification process cumbersome and resulting in a poor user experience.
[0004] To address the aforementioned issues, some improved solutions for dual-code systems have been proposed. For example, patent (CN110116866A) describes an anti-counterfeiting bottle cap that combines a QR code and a digital anti-counterfeiting code. The QR code and digital anti-counterfeiting code are distributed on the outside and inside of the bottle cap, attempting to combine anti-counterfeiting and anti-counterfeiting measures. However, this method has limitations. First, it fails to effectively differentiate between user roles and usage scenarios; basic product information cannot be directly displayed after scanning the code. Second, consumers scanning the code before purchase only obtain a link to input, still unable to complete information retrieval without damaging the packaging, and requiring multiple steps for verification, resulting in a lengthy operation path.
[0005] Meanwhile, existing RFID-based anti-counterfeiting and traceability technologies rely on dedicated RFID reading and writing equipment to complete information writing and reading, resulting in high hardware costs and complex system construction. Furthermore, existing one-item-one-code anti-counterfeiting and traceability methods used on e-commerce platforms only focus on product control at the platform and supply chain levels, neglecting pre-sale information retrieval and post-sale authentication.
[0006] In summary, to address the technical challenges of existing technologies in simultaneously achieving contactless pre-sales inquiry, high-security after-sales authentication, low-cost lightweight deployment, and easy operation for end users, a product anti-counterfeiting and traceability method and system based on two-stage verification is proposed. Summary of the Invention
[0007] The main objective of this invention is to provide a product anti-counterfeiting and traceability method and system based on two-stage verification, so as to solve the technical problems in the prior art that cannot simultaneously achieve contactless pre-sale inquiry, high-security post-sale authentication, low-cost lightweight deployment, and easy operation for end users.
[0008] Based on the first main aspect of the present invention, a product anti-counterfeiting and traceability method based on two-stage verification is provided, comprising the following steps: S1, the product manufacturer generates a unique product identification code for each product through a computer system, associates the product identification code with the product's basic information and activation status, stores it in a server database, and assigns a pre-stored verification code to each product's identification code in the server database; S2, the server database generates a QR code based on the product identification code, and attaches the QR code to the product packaging or the product itself; S3, the user scans the QR code with a scanning tool to display the product basic information query page; the product basic information query page contains product basic information and an activation authentication button; S4. When the user clicks the activation authentication button, they will be redirected to the official anti-counterfeiting verification interface corresponding to the server database, prompting the user to enter the anti-counterfeiting verification code. S5, the server database compares the anti-counterfeiting verification code entered by the user with the pre-stored verification code, obtains the comparison result, and updates the activation status based on the comparison result.
[0009] The above design clarifies the basic information dimensions of the product, allowing users to obtain comprehensive core product information by scanning the code, thus improving the integrity of traceability information. At the same time, the static QR code ensures the fixity of the information, reduces the generation and use costs of the QR code, and the fixed information is not easily tampered with, thereby improving the security of the label.
[0010] As a further preferred embodiment, in the aforementioned method, activating the authentication button specifically includes: When the product identification code is inactive, the activation and authentication button is clickable. When the product identification code is in the activated state, the activation authentication button is either hidden or displayed as activated.
[0011] By dynamically controlling the status of the activation authentication button, the system avoids duplicate authentication of already verified products from an operational perspective, thus reducing the unnecessary computational load on the computer system.
[0012] At the same time, it intuitively displays the verification status of the product to the user, allowing the user to quickly know the operation permissions, improving the user's anti-counterfeiting verification operation experience, and avoiding process loopholes caused by repeated counterfeiting verification.
[0013] As a further preferred embodiment, the anti-counterfeiting verification code described in the aforementioned method is placed under the anti-counterfeiting coating of the product and can be seen after scratching it off; The execution steps for comparing the anti-counterfeiting verification code with the pre-stored verification code include: If the anti-counterfeiting verification code matches the pre-stored verification code, the comparison is successful, the activation status of the product identification code is updated to activated, and the user is returned a genuine product verification result; if the comparison fails, the user is returned a verification failure message. If the anti-counterfeiting verification code does not match the pre-stored verification code, the comparison will fail and a verification failure message will be returned to the user (or an invalid QR code will be displayed directly). If the same QR code is scanned repeatedly after the verification is completed, the "Activate Authentication" button will not be displayed on the product basic information query page, or the product will be displayed as already activated after clicking the "Activate Authentication" button.
[0014] The physical protection of the anti-counterfeiting coating prevents the verification code from being illegally obtained at the source. Combined with verification code comparison and status update, a dual anti-counterfeiting system of physical and technological cooperation is formed, reducing the risk of verification codes being stolen or counterfeited.
[0015] Security measures after failure prevent malicious CAPTCHA cracking, and repeated scanning status prompts further enhance the rigor of the verification process, allowing users to quickly understand the verification history of the product.
[0016] As a further preferred option, in the aforementioned method, the steps for guiding the user to the official anti-counterfeiting verification interface corresponding to the server database are as follows: In response to the user clicking the activation authentication button, a redirect request is generated; the redirect request contains an instruction verification token. The temporary verification token will guide users from the product basic information query page to the official verification mini-program. The temporary verification token is valid for 1 to 30 minutes, uses JWT format, and includes product identification code, expiration time, and random number information.
[0017] The use of temporary tokens prevents the redirection links from being illegally stolen or tampered with. The exclusive information encapsulated in JWT format uniquely binds the redirection process to the specific product, preventing the link from being hijacked.
[0018] As a further preferred embodiment, the aforementioned method further includes an invalid QR code determination step, as detailed below: When a user scans a QR code using a scanning tool, if a valid product identification code cannot be parsed or the product identification code does not exist in the computer server database, an invalid QR code message will be displayed.
[0019] Based on a second key aspect of the present invention, a product anti-counterfeiting and traceability system based on two-stage verification is provided, comprising: The coding module is used to generate a unique product identification code for each product and set a corresponding pre-stored verification code for it, and associate it with the product's basic information. Database module: Used to store product identification codes, basic product information, and activation status markers, and to assign a pre-stored verification code to each product identification code; QR code generation module: used to generate QR codes based on product identification codes and provide them to product manufacturers to be affixed to products; Front-end query module: Used to receive user requests to scan QR codes, display the product basic information query page, and control the display status of the activation and authentication button according to the activation status; Redirect control module: Used to generate a temporary verification token and redirect the user to the official anti-counterfeiting verification mini-program when the user clicks the activation authentication button; Anti-counterfeiting verification module: Used to receive the anti-counterfeiting verification code entered by the user, compare it with the pre-stored verification code in the database, and update the activation status according to the comparison result; Result feedback module: used to return verification results to the user. As a further preferred embodiment, in the aforementioned system, the front-end query module is an H5 webpage, and the jump control module realizes the jump from the H5 webpage to the mini-program through the WeChat jump interface; The database module maintains an activation status flag for each product identification code, including two states: inactive and activated. The activation status is updated from inactive to activated after the anti-counterfeiting verification code is successfully matched for the first time.
[0020] Based on a third key aspect of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; The memory stores a computer program, which, when executed by the processor, causes the processor to perform a product anti-counterfeiting and traceability method based on two-stage verification as described above.
[0021] Based on a fourth key aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed, implements the aforementioned product anti-counterfeiting and traceability method based on two-stage verification.
[0022] Compared with existing technologies, this invention provides a product anti-counterfeiting and traceability method and system based on two-stage verification. First, the method adopts a two-stage separation verification design, separating the pre-sale product information query and the post-sale final anti-counterfeiting authentication process. By maintaining the activation status of the product identification code in a database and achieving dynamic management, it meets the needs of consumers to query basic product information without damaging the anti-counterfeiting coating before purchase, ensuring the integrity of the product and their rights to return and exchange. Furthermore, the uniqueness of the activation status limits the risk of QR codes being repeatedly pasted and reused, solving the problems of conflicting pre-sale and post-sale needs and the easy copying and reuse of QR codes that lead to the failure of anti-counterfeiting technology in existing technologies. It realizes contactless query before sale and high-security authentication after sale, while eliminating the security risks of counterfeit query pages misleading consumers under the single verification mode.
[0023] Secondly, this invention constructs a verification scheme that integrates an H5 webpage with an official anti-counterfeiting mini-program. It uses a static QR code to carry the product identification code to support direct redirection by general scanning tools. It configures a temporary verification token with a validity period for the redirection request and adds a pre-judgment step for invalid QR codes. This solves the problems of cumbersome verification processes, high hardware deployment costs of RFID technology, and the failure of the one-code-one-item solution to take into account pre-sales and after-sales needs in the existing technology. It achieves a convenient user experience of scanning the code to view the product, and enhances the anti-counterfeiting capability by leveraging the closed environment of the mini-program, effectively preventing the risk of fake query pages.
[0024] Finally, this invention designs a protection mechanism for anti-counterfeiting verification codes that can only be entered within the mini-program and become invalid after a single successful verification. Combined with a two-stage verification architecture throughout the entire process, it forms a closed-loop control, solving the problem of existing anti-counterfeiting codes being easily reused and achieving high-security after-sales authentication. At the same time, this invention does not change the existing QR code generation and attachment process, is compatible with existing production lines, has low implementation costs, and is easy to promote. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, obtaining other drawings based on these drawings without creative effort still falls within the scope of the present invention.
[0026] Figure 1 The following is a flowchart illustrating the execution of a product anti-counterfeiting and traceability method based on two-stage verification in one embodiment of the present invention; Figure 2 The diagram shows an overall flowchart of a product anti-counterfeiting and traceability method based on two-stage verification in one embodiment of the present invention. Figure 3 The diagram shows an interface schematic of the pre-sales query stage of a product anti-counterfeiting and traceability method based on two-stage verification in one embodiment of the present invention. Figure 4 The diagram shows an interface schematic of the anti-counterfeiting verification stage of a product anti-counterfeiting and traceability method based on two-stage verification in one embodiment of the present invention. Detailed Implementation
[0027] The preferred embodiments of the present invention will be described in detail below to provide a clearer understanding of the purpose, features, and advantages of the invention. It should be understood that the following embodiments are not intended to limit the scope of the invention, but are merely illustrative of the essential spirit of the technical solution of the invention.
[0028] In the following description, certain specific details are set forth for the purpose of illustrating various disclosed embodiments in order to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the art will recognize that embodiments may be practiced without one or more of these specific details. In other instances, well-known techniques associated with the invention may not have been shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
[0029] Throughout this specification, references to "an embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Therefore, the appearance of "in an embodiment" or "an embodiment" in various places throughout the specification does not necessarily refer to the same embodiment. Furthermore, a particular feature, structure, or characteristic may be combined in any manner in one or more embodiments.
[0030] Explanation of the specific meanings of technical terms, English abbreviations, and formula parameters that may be involved in this invention: H5 page: A type of webpage developed based on the HTML5 (Hypertext Markup Language 5th Edition) standard. It is a webpage format that uses HTML5 as the core markup language, combined with CSS3 and JavaScript, and is adapted to multiple terminals.
[0031] A URL (Uniform Resource Locator) is a standardized string used to uniquely identify and locate resources on the Internet.
[0032] MySQL Relational Database: An open-source relational database management system, and one of the most mainstream open-source relational databases in the world. It is built on the relational model and follows the Structured Query Language (SQL) standard. Its core function is to securely and efficiently store, manage and retrieve structured data.
[0033] QR code (Quick Response Code): A matrix-style two-dimensional barcode standard, its core features are high-speed reading, high fault tolerance, and large-capacity data storage. It uses black and white square modules arranged in a square pattern to store structured data such as text, URLs, and other data, which can be quickly scanned and recognized by optical devices.
[0034] Combination Figure 1 As shown, this invention provides a product anti-counterfeiting and traceability method based on two-stage verification, including the following steps S1-S5: S1, the product manufacturer generates a unique product identification code for each product through a computer system, associates the product identification code with the product's basic information and activation status, stores it in a server database, and assigns a pre-stored verification code to each product's identification code in the server database; S2, the server database generates a QR code based on the product identification code, and attaches the QR code to the product packaging or the product itself; S3, the user scans the QR code with a scanning tool to display the product basic information query page; the product basic information query page contains product basic information and an activation authentication button; S4. When the user clicks the activation authentication button, they will be redirected to the official anti-counterfeiting verification interface corresponding to the server database, prompting the user to enter the anti-counterfeiting verification code. S5, the server database compares the anti-counterfeiting verification code entered by the user with the pre-stored verification code, obtains the comparison result, and updates the activation status based on the comparison result.
[0035] Combination Figure 2 As shown, in one feasible embodiment, taking a certain milk powder brand as an example, the present invention provides a detailed description of a product anti-counterfeiting and traceability method based on two-stage verification.
[0036] (1) Generation of commodity information coding and identification A certain milk powder brand generates a unique product identification code (ID) for each can of milk powder it produces.
[0037] The product identification code ID consists of the brand code "NMP-", the batch number "20260315-", and the serial number "00001", namely "NMP-20260315-00001".
[0038] The product identification code ID is associated with the basic product information (brand name: XX milk powder, specification: 800g, production date: 2026-03-15, shelf life: 2028-03-14, batch number: 20260315) and stored in the server database.
[0039] The server database sets a pre-stored verification code for each product identification code and maintains the activation status flag of the product identification code ID, which is initially set to "inactive".
[0040] (2) QR code generation and attachment A QR code is generated based on the product identification code "NMP-20260315-00001". The content of the QR code is a URL link containing this ID: https: / / verify.brand.com / product?id=NMP-20260315-00001.
[0041] Print the QR code on an adhesive label and affix it to the outside of the milk powder can lid.
[0042] (3) Pre-sales inquiry stage Consumers see the milk powder on the supermarket shelf and use WeChat's scan function to scan the QR code on the can lid. After scanning, they are automatically redirected to an H5 page for basic product information (https: / / verify.brand.com / product id=NMP-20260315-00001). Figure 3 As shown, the page displays the following content: Brand Name: [Brand Name] Milk Powder
[0043] Product Name: Stage 3 Infant Formula Milk Powder
[0044] Specifications: 800g.
[0045] Production date: 2026-03-15.
[0046] Shelf life: 2028-03-14.
[0047] Batch number: 20260215.
[0048] At the bottom of the page, a blue "Activate Authentication" button is displayed, along with the prompt: "Click the Activate Authentication button to scratch off the coating and verify authenticity."
[0049] Since the product identification code ID is inactive in the database, the activation authentication button is clickable.
[0050] (4) Jump and authentication stage The consumer decides to buy the milk powder and clicks the "activate authentication" button after checkout.
[0051] The system backend generates a temporary verification token token="a1b2c3d4e5f6" with a validity period of 5 minutes, and redirects the user with the token to the official anti-counterfeiting verification mini-program, named "XX Milk Powder Anti-counterfeiting Center".
[0052] After opening the mini-program, the first thing that appears is a prompt: "Please scratch off the anti-counterfeiting coating on the bottom of the milk powder can and enter the 16-digit anti-counterfeiting verification code."
[0053] Consumers can scratch off the coating on the bottom of the can to see a 16-digit anti-counterfeiting verification code (hereinafter referred to as the anti-counterfeiting code) "1234567890123456". They can then enter the anti-counterfeiting verification code in the input box of the mini program and click "verify".
[0054] (5) Status update and result feedback Combination Figure 4 As shown, after receiving the anti-counterfeiting verification code, the server compares it with the anti-counterfeiting code corresponding to the ID pre-stored in the database.
[0055] If both match, the comparison is successful. The server updates the activation status of the ID to "activated" and returns the verification result to the mini-program.
[0056] The mini-program interface displays: "Verification successful! The product you searched for is an authentic product of [Brand Name]".
[0057] First query time: 2026-03-20 15:30:25.
[0058] The message also reads: "This product has been successfully activated. The activation button will no longer be displayed when you scan it again." A week later, if someone scans the QR code on the milk powder can again, they will be taken to the same H5 page, but the "Activate and Verify Authenticity" button is no longer present at the bottom of the page. Instead, a line of gray text is displayed: "This product was activated on 2026-03-20 and its authenticity has been verified."
[0059] In one feasible embodiment, the determination of invalid QR codes is described in detail: Suppose a counterfeiter creates a batch of fake QR codes and affixes them to counterfeit milk powder cans.
[0060] If a consumer scans a counterfeit QR code using a scanning tool, or if the parsed product identification code ID "FAKE-123" does not exist in the database, the server will directly return an "Invalid QR Code" prompt page, informing the consumer that "The QR code you scanned is invalid, please purchase with caution."
[0061] If a counterfeiter copies the QR code of a genuine product, scanning it will lead to the correct H5 page, but because the ID has already been marked as activated when the genuine product was first activated, the page will not display the activation and authentication button.
[0062] Consumers cannot complete the authentication process through the QR code, nor can they obtain any verification results, thus identifying a problem with the product.
[0063] In one feasible embodiment, the present invention also provides a product anti-counterfeiting and traceability system based on two-stage verification, comprising: The input coding module is used to input basic product information and pre-stored verification codes, generate a unique product identification code for each product, and associate it with the basic product information.
[0064] In this embodiment, the input encoding module uses a hash algorithm combined with random numbers to generate a unique product identification code ID, ensuring the global uniqueness and unpredictability of the product identification code ID.
[0065] Database module: Used to store product identification codes, basic product information, and activation status markers, and to set a pre-stored verification code for each product identification code.
[0066] The database uses a MySQL relational database and indexes are created for the activation status field to improve query efficiency.
[0067] QR code generation module: Used to generate QR codes based on product identification codes and provide them to product manufacturers to be attached to products.
[0068] In this embodiment, the QR code generation module adopts the QR code standard and outputs high-resolution vector graphics to meet different printing needs.
[0069] Front-end query module: Used to receive user requests to scan QR codes, display the product basic information query page, and control the display status of the activation and authentication button according to the activation status.
[0070] Specifically, in this embodiment, the front-end query module adopts a responsive H5 design to adapt to various mobile devices.
[0071] Redirect control module: Used to generate a temporary verification token and redirect the user to the official anti-counterfeiting verification mini-program when the user clicks the activation authentication button.
[0072] The jump control module uses the WeChat JS-SDK to achieve a smooth jump from H5 to mini-program.
[0073] Anti-counterfeiting verification module: Used to receive the anti-counterfeiting verification code entered by the user, compare it with the pre-stored verification code in the database, and update the activation status according to the comparison result.
[0074] The anti-counterfeiting verification module also includes a brute-force protection mechanism, specifically: If the same anti-counterfeiting verification code is entered incorrectly 5 times consecutively, the account will be temporarily locked for 30 minutes.
[0075] Results feedback module: Used to return verification results to users, including various statuses such as verification success, verification failure, and activation prompt.
[0076] In one feasible embodiment, the temporary verification token is described in detail: To prevent malicious users from bypassing the H5 page and directly accessing the verification mini-program by intercepting redirect links, the temporary verification token generated by the redirect control module of this invention adopts the JWT (JSON Web Token) format and contains the following information: {"id":"NMP-20260315-00001", “exp”: 17442463028, / / Expiration timestamp (5 minutes later). "nonce": "7f8d3a2b1c9e4f6d", / / Random number to prevent replay attacks "sign": "HMACSHA256(base64UrlEncode(header)+"."+base64YrlEnocode(payload), secret)"}.
[0077] When the server receives a redirect request, it first verifies the validity of the token's signature, then checks whether the exp field has expired, and finally verifies whether it has been used through the nonce field.
[0078] Only those that pass all verifications are allowed to be included in the anti-counterfeiting verification process.
[0079] In one feasible embodiment, the present invention also includes an electronic device for implementing a hardware execution carrier for a two-stage verification-based product anti-counterfeiting and traceability method. Its hardware architecture includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.
[0080] The communication interface serves as the interaction interface between the electronic device and external user terminals, anti-counterfeiting verification mini-programs, and barcode scanning devices, enabling the reception and transmission of data.
[0081] The memory uses both volatile and non-volatile memory. In addition to storing a computer program that implements a two-stage verification-based product anti-counterfeiting and traceability method, it also pre-stores various types of data required for product anti-counterfeiting and traceability, including a product identification code database, a product basic information database, etc. The data in these databases can be retrieved and updated in real time.
[0082] When the computer program in the memory is executed by the processor, the processor will execute operations sequentially according to the steps of the aforementioned two-stage verification-based product anti-counterfeiting and traceability method, based on various data such as QR code scanning requests and anti-counterfeiting verification code input information transmitted from the external communication interface. These operations include parsing the product identification code, judging the validity of the QR code, controlling the display state of the activation verification button according to the activation status, generating a temporary verification token, guiding the user to the anti-counterfeiting verification terminal, comparing the anti-counterfeiting verification code, updating the product activation status, etc., while simultaneously generating and feeding back various verification results.
[0083] This embodiment also provides a computer-readable storage medium, including but not limited to USB flash drives, portable hard drives, read-only memory, random access memory, etc. The computer-readable storage medium can be identified and accessed by various electronic devices with data reading and program execution capabilities. It stores machine instructions of computer programs, and the instruction logic corresponds one-to-one with the steps of the aforementioned two-stage anti-counterfeiting and traceability method for goods.
[0084] When the computer program stored on the computer-readable storage medium is called and executed by the processor, it can drive the processor to complete all operations of the aforementioned two-stage anti-counterfeiting and traceability method for goods. The computer program contains multiple functional instruction modules, which correspond to the execution logic of steps such as product information encoding and identification generation, QR code parsing, pre-sale query page display, anti-counterfeiting jump control, anti-counterfeiting verification code comparison, and activation status update. The instructions of each module are interconnected to ensure the continuity of the method execution.
[0085] This invention provides a product anti-counterfeiting and traceability method and system based on two-stage verification, which can be widely used in the anti-counterfeiting and traceability field of various products such as food, medicine, cosmetics, electronic products, and luxury goods.
[0086] This invention does not change the existing production line process, has low implementation cost, is compatible with existing QR code printing and coding equipment, and has good industrial application prospects and promotion value.
[0087] The technical terms, principles, or means related to the technical solutions of the present invention mentioned in the above embodiments, which are not described in detail above, are all well-known technologies or common practices that are known to those skilled in the art.
[0088] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A product anti-counterfeiting and traceability method based on two-stage verification, characterized in that, Includes the following steps: S1, the product manufacturer generates a unique product identification code for each product through a computer system, stores the product identification code in the server database in association with the product's basic information and activation status, and sets a pre-stored verification code for each product identification code in the server database. S2, the server database generates a QR code based on the product identification code, and attaches the QR code to the product packaging or the product itself; S3, the user scans the QR code with a scanning tool to display the product basic information query page; the product basic information query page contains product basic information and an activation authentication button; S4. When the user clicks the activation authentication button, they will be redirected to the official anti-counterfeiting verification interface corresponding to the server database, prompting the user to enter the anti-counterfeiting verification code. S5, the server database compares the anti-counterfeiting verification code entered by the user with the pre-stored verification code, obtains the comparison result, and updates the activation status based on the comparison result.
2. The product anti-counterfeiting and traceability method based on two-stage verification according to claim 1, characterized in that, The basic product information includes one or more of the following: brand name, product name, specifications, production date, shelf life, and production batch. The QR code is a static QR code, and its content only includes the product identification code or a URL link containing the product identification code.
3. The product anti-counterfeiting and traceability method based on two-stage verification according to claim 1, characterized in that, The activation authentication button specifically includes: When the product identification code is inactive, the activation and authentication button is clickable. When the product identification code is in the activated state, the activation authentication button is either hidden or displayed as activated.
4. The product anti-counterfeiting and traceability method based on two-stage verification according to claim 1, characterized in that, The anti-counterfeiting verification code is located under the anti-counterfeiting coating of the product and can be seen after scratching it off; The execution steps for comparing the anti-counterfeiting verification code with the pre-stored verification code include: If the anti-counterfeiting verification code matches the pre-stored verification code, the comparison is successful, the activation status of the product identification code is updated to activated, and the user is returned a genuine product verification result; if the comparison fails, the user is returned a verification failure message. If the anti-counterfeiting verification code does not match the pre-stored verification code, the comparison will fail and a verification failure message will be returned to the user. If the same QR code is scanned repeatedly after the verification is completed, the "Activate Authentication" button will not be displayed on the product basic information query page, or the product will be displayed as already activated after clicking the "Activate Authentication" button.
5. The product anti-counterfeiting and traceability method based on two-stage verification according to claim 1, characterized in that, The steps that redirect users to the official anti-counterfeiting verification interface corresponding to the server database are as follows: In response to a user clicking the activation authentication button, the server database generates a redirect request; the redirect request contains an instruction verification token. The server database uses the temporary verification token to guide users from the product basic information query page to the official verification mini-program. The temporary verification token is valid for 1 to 30 minutes, uses JWT format, and includes product identification code, expiration time, and random number information.
6. The product anti-counterfeiting and traceability method based on two-stage verification according to claim 1, characterized in that, The method also includes an invalid QR code determination step, as detailed below: When a user scans a QR code using a scanning tool, if a valid product identification code cannot be parsed or the product identification code does not exist in the server database, an invalid QR code message will be displayed.
7. A product anti-counterfeiting and traceability system based on two-stage verification for implementing the method of any one of claims 1-6, characterized in that, The system is deployed in the server database and includes: The coding module is used to generate a unique product identification code for each product and set a corresponding pre-stored verification code for it, and associate it with the product's basic information. Database module: Used to store product identification codes, basic product information, and activation status markers, and to assign a pre-stored verification code to each product identification code; QR code generation module: used to generate QR codes based on product identification codes and provide them to product manufacturers to be affixed to products; Front-end query module: Used to receive user requests to scan QR codes, display the product basic information query page, and control the display status of the activation and authentication button according to the activation status; Redirect control module: Used to generate a temporary verification token and redirect the user to the official anti-counterfeiting verification mini-program when the user clicks the activation authentication button; Anti-counterfeiting verification module: Used to receive the anti-counterfeiting verification code entered by the user, compare it with the pre-stored verification code in the database, and update the activation status according to the comparison result; Results feedback module: Used to return verification results to the user.
8. The product anti-counterfeiting and traceability system based on two-stage verification according to claim 1, characterized in that, The front-end query module is an H5 webpage, and the jump control module realizes the jump from the H5 webpage to the mini-program through the official jump interface; The database module stores an activation status marker for each product identification code, including two states: inactive and activated. The activation status is updated from inactive to activated after the anti-counterfeiting verification code is successfully matched for the first time.
9. An electronic device, comprising: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The feature is that the memory stores a computer program, which, when executed by the processor, causes the processor to perform a product anti-counterfeiting and traceability method based on two-stage verification as described in any one of claims 1-6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed, it implements a product anti-counterfeiting and traceability method based on two-stage verification as described in any one of claims 1-6.