Blockchain anti-counterfeiting and traceability method and system for food and drugs

By embedding interference fringes of encrypted information in the color images of food and drugs, optically encrypted images are generated and dynamically bound to the hash value of blockchain nodes, the problem of lag in easy copying, easy tampering and cross-trash detection in food and drug anti-counterfeiting technology is solved, and the full-link trusted traceability is achieved.

CN120181874BActive Publication Date: 2025-08-22ZHONGBO INFORMATION TECH RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510653253.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-08-22
Estimated Expiration
2045-05-21

AI Technical Summary

Technical Problem

The existing food and drug anti-counterfeiting technology has problems such as easy copying of physical labels, many banned scenarios, high risk of data tampering, insufficient dynamic anti-counterfeiting capabilities, and lagging detection of goods, which is difficult to meet high security needs.

Method used

Laser interference and phase modulation technology are used to embed interference fringes of encrypted information in the color images of the product, generate optically encrypted images, and dynamically bind their phase mode to the hash value of the blockchain node to realize double interlock verification of physical and digital features.

Benefits of technology

Real-time trusted traceability of the entire chain of food and drug production, circulation and consumption, and provides safe, reliable, flexible and universal anti-counterfeiting traceability solutions, reducing costs and adapting to diversified packaging needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120181874B_ABST
    Figure CN120181874B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of blockchain technology, and provides a blockchain anti-counterfeiting and traceability method and system for food and medicine. The method comprises the following steps: S1, embedding interference fringes with encrypted information in a color image to generate an optically encrypted image of the product; S2, dynamically binding the phase pattern of the optically encrypted image to the hash value of the product of each blockchain node; S3, verifying the product based on the physical characteristics of the optically encrypted image and the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node. The present invention solves the technical problems in the circulation of food and medicine, such as the easy duplication of physical labels and the high risk of data tampering, the insufficient dynamic anti-counterfeiting capability, and the delayed detection of cross-selling. It realizes the dual interlocking verification of physical and digital characteristics, ensures real-time and reliable traceability of the entire chain of production, circulation and consumption of food and medicine, and provides a safe, reliable, flexible and universal anti-counterfeiting and traceability solution for the food and medicine industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain anti-counterfeiting and traceability method and system for food and medicine. Background Art

[0002] Food and pharmaceuticals directly impact human health. Counterfeit and substandard products (such as fake medicines, tainted milk powder, and expired food) can cause poisoning, illness, and even death. Anti-counterfeiting technologies (such as QR codes, blockchain tags, and laser anti-counterfeiting) help consumers verify product authenticity and avoid purchasing illegal products. Traditional anti-counterfeiting methods like QR codes and RFID (Radio Frequency Identification) chips have significant drawbacks, including ease of duplication, material and environmental limitations, reliance on specialized equipment for verification, and limited information capacity, making them unable to meet high security requirements. While blockchain technology has been introduced to enhance data credibility, it remains constrained by the physical label format and struggles to adapt to diverse packaging needs.

[0003] Existing image anti-counterfeiting technologies have low information capacity and poor encryption dynamics, making it difficult to achieve multi-dimensional data integration and real-time updates. This leads to high anti-counterfeiting costs and disconnected data applications for companies. Furthermore, some imported food and pharmaceutical products are not allowed to change their appearance, making it impossible to use QR codes for anti-counterfeiting verification. Therefore, a new blockchain anti-counterfeiting and traceability method with strong compatibility, low cost, and data-enabled capabilities is urgently needed, suitable for high-security anti-counterfeiting verification in scenarios where QR codes are prohibited. Summary of the Invention

[0004] In order to solve the above-mentioned technical problems, the present invention provides a blockchain anti-counterfeiting and traceability method and system for food and medicine, which solves the technical problems in the circulation of food and medicine, such as the easy duplication of physical labels and the many prohibited scenarios, the high risk of easy data tampering, the insufficient dynamic anti-counterfeiting capability and the delayed detection of cross-selling. It realizes the dual interlocking verification of physical and digital features, ensures real-time and reliable traceability of the entire chain of food and drug production, circulation and consumption, and provides a safe, reliable, flexible and universal anti-counterfeiting and traceability solution for the food and drug industry.

[0005] The technical solution adopted in the present invention is as follows:

[0006] A blockchain anti-counterfeiting and traceability method for food and medicine, comprising the following steps:

[0007] S1, through laser interference and phase modulation technology, embeds interference fringes with encrypted information into the color image of the product to generate an optically encrypted image of the product;

[0008] S2, dynamically binding the phase pattern of the optically encrypted image to the hash value of the product of each blockchain node, wherein the phase pattern is a mapping relationship between the phase component of the optically encrypted image and the binary data;

[0009] S3, verifying the product based on the physical characteristics of the optically encrypted image and the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node.

[0010] In addition, the blockchain anti-counterfeiting and traceability method proposed in the present invention may also have the following additional technical features:

[0011] According to one embodiment of the present invention, S1 specifically includes: converting the encryption information of the product into binary data; based on discrete Fourier transform and phase modulation technology, mapping the binary data into the phase component of the optical encryption image to generate the interference fringes; based on the graphics and channels of the color image, embedding the interference fringes in the color image in blocks to generate the optical encryption image of the product.

[0012] According to one embodiment of the present invention, the hash value of the blockchain node includes the core data and auxiliary data of the product, and the encrypted information includes the core data of the product.

[0013] According to one embodiment of the present invention, S2 specifically includes: when generating an optically encrypted image of the product, writing the initial phase pattern of the optically encrypted image into the initial blockchain node of the blockchain; when the product flows to a new blockchain node, updating the phase pattern of the optically encrypted image to achieve dynamic binding of the phase pattern with the hash value of the product of each blockchain node.

[0014] According to one embodiment of the present invention, a time lock mechanism is introduced when updating the phase pattern of the optically encrypted image, so that the updated phase pattern takes effect after a preset time delay after blockchain confirmation.

[0015] According to one embodiment of the present invention, S3 specifically includes: verifying the authenticity of the entity label based on the physical characteristics of the optically encrypted image; and verifying the digital characteristics of the hash value of the blockchain node where the product is located based on the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node.

[0016] According to one embodiment of the present invention, the authenticity verification of the entity tag includes initial hash value verification, microscopic verification of broken pen features and intelligent light spot excitation verification.

[0017] According to one embodiment of the present invention, the integrity and consistency of the on-chain data are verified through the smart contract of the blockchain to achieve the digital feature verification of the product.

[0018] According to one embodiment of the present invention, it also includes: S4, performing graded warnings according to different verification results of the product, specifically including: when the authenticity verification of the physical tag fails and the digital feature verification passes, triggering a first-level warning and displaying the previewable information of the product; when the authenticity verification of the physical tag passes and the digital feature verification fails, triggering a second-level warning and freezing the data tag of the product; when both the authenticity verification of the physical tag and the digital feature verification fail, triggering a third-level warning and generating a judicial evidence collection report.

[0019] In addition, to achieve the above-mentioned purpose, the present invention also proposes a blockchain anti-counterfeiting and traceability system for food and medicine.

[0020] A blockchain anti-counterfeiting and traceability system for food and pharmaceuticals includes: a generation module for embedding interference fringes with encrypted information in a color image of a product through laser interference and phase modulation technology to generate an optically encrypted image of the product; a dynamic binding module for dynamically binding the phase pattern of the optically encrypted image to the hash value of the product at each blockchain node, where the phase pattern is a mapping relationship between the phase component of the optically encrypted image and binary data; and a verification module for verifying the product based on the physical characteristics of the optically encrypted image and the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node.

[0021] Beneficial effects of the present invention:

[0022] The blockchain anti-counterfeiting and traceability method for food and medicine of the present invention generates an optically encrypted image of the product by embedding interference fringes with encrypted information in a color image, and dynamically binds the phase pattern of the encrypted image to the hash value of the blockchain node, thereby solving the technical problems in the circulation of food and medicine, such as the easy copying and many prohibited scenarios of physical labels, the high risk of easy data tampering, the insufficient dynamic anti-counterfeiting capability, and the delayed detection of channeled goods. The product is verified based on the physical characteristics of the optically encrypted image and the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node, realizing dual interlocking verification of physical and digital characteristics, ensuring real-time and reliable traceability of the entire chain of production, circulation and consumption of food and medicine, and providing a safe, reliable, flexible and universal anti-counterfeiting and traceability solution for the food and medicine industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a flowchart of a blockchain anti-counterfeiting and traceability method for food and medicine according to one embodiment of the present invention;

[0024] Figure 2 This is a schematic diagram of the data type of the hash value of a blockchain node in one embodiment of the present invention;

[0025] Figure 3This is a flowchart of a blockchain anti-counterfeiting and traceability method for food and medicine according to another embodiment of the present invention;

[0026] Figure 4 This is a block diagram of a blockchain anti-counterfeiting and traceability system for food and medicine according to one embodiment of the present invention;

[0027] Figure 5 This is a block diagram of a blockchain anti-counterfeiting and traceability system for food and medicine according to another embodiment of the present invention. DETAILED DESCRIPTION

[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0029] like Figure 1 As shown, the blockchain anti-counterfeiting and traceability method for food and medicine according to an embodiment of the present invention includes the following steps:

[0030] S1. Using laser interferometry and phase modulation technology, interference fringes containing encrypted information are embedded within the product's color image, generating an optically encrypted image of the product. This transforms the original color image into an anti-counterfeiting image carrier that combines both physical and digital features. The color image can be located on the product's packaging or on the product itself, though this embodiment is not limiting.

[0031] It is understandable that interference fringes are basically difficult to identify with the naked eye in most cases, while optically encrypted images are directly embedded in color images, such as trademarks and labels of food and medicine, without the need for dedicated label areas, and are low-cost. They meet the diverse packaging needs of food and medicine and are suitable for various usage scenarios where QR codes are prohibited. The number of data bits that can be stored in a single image corresponds to the number of channel bits of the color image, and the data volume can also be expanded through multi-region phase superposition. For example, an optically encrypted image that can store 128 bits of encrypted information can be expanded to 512 bits through multi-region phase superposition, and has a strong information carrying capacity and a large information capacity.

[0032] In one embodiment of the present invention, step S1 may specifically include the following steps S11-S13:

[0033] S11: Convert the encrypted information of the product into binary data. The encrypted information may include core product data such as the product's unique ID, production batch number, and blockchain address. A 32-byte feature digest may be generated on the initial blockchain node using the SHA-3 hash algorithm to bind the digital features of the optically encrypted image. It should be noted that the initial binding of digital features can be performed when the optically encrypted image is generated or when the product is in the initial blockchain node, and this embodiment is not limited thereto.

[0034] S12, based on discrete Fourier transform and phase modulation technology, maps binary data into the phase component of the optical encryption image, generates interference fringes, and forms the physical characteristics of the optical encryption image.

[0035] S13, based on the graphics and channels of the color image, embeds interference fringes in the color image in blocks to generate an optically encrypted image of the product.

[0036] When embedding interference fringes in blocks, priority can be given to areas less sensitive to the human eye, such as embedding phase information in the green channel of the RGB channel or in areas with complex textures, to avoid affecting the visual quality of the original image. To enhance the damage resistance of the optically encrypted image, a redundant backup area can be provided on the color image to store the most critical data in the encrypted information, such as the product's unique ID. This embodiment is not limited to this.

[0037] S2, dynamically bind the phase pattern of the optical encryption image to the hash value of the product of each blockchain node, where the phase pattern is the mapping relationship between the phase component of the optical encryption image and the binary data. Figure 1 The dynamic anti-counterfeiting upgrade of "one-time one-password" has improved the data empowerment capability of blockchain, making it easier for consumers to verify authenticity and for regulators and businesses to monitor in real time.

[0038] In one embodiment of the present invention, Figure 2As shown, the hash value of a blockchain node includes the product's core data and auxiliary data. The core data can be encrypted using the national SM9 algorithm and dynamically authorized based on role access to prevent tampering and ensure high security. After desensitization, the auxiliary data can be compressed in blocks to achieve both storage efficiency and cost optimization. After SM9 encryption, the core data, relying on the blockchain's immutability and transparency, is written to the consortium blockchain through PBFT (Practical Byzantine Fault Tolerance) consensus, recording the transaction hash and encryption strategy. After desensitization and compression, the auxiliary data is uploaded to the InterPlanetary File System (IPFS), generating a unique content identifier (CID) and binding it to the core data hash, forming a proof structure that combines lightweight on-chain indexing with massive off-chain storage.

[0039] Specifically, core data refers to key information that directly affects product safety and traceability. Core data on the production side may include raw material batch numbers, production process parameters, quality inspection report summaries, etc.; core data on the logistics side may include key node timestamps, temperature control extremes, etc.; core data on the sales side may include dealer authorization areas, first activation time, electronic certificate metadata, etc. Auxiliary data is supplementary information that is large in volume or accessed infrequently. Auxiliary data on the production side may include original files, high-definition quality inspection videos, equipment operation logs, etc.; auxiliary data on the logistics side may include complete GPS (Global Positioning System) track point sets and transportation videos; auxiliary data on the sales side may include user code scanning records, terminal sales information, etc.

[0040] In one embodiment of the present invention, S2 may specifically include the following steps S21-S22:

[0041] S21, when generating an optically encrypted image of the product, the initial phase pattern of the optically encrypted image is written into the initial blockchain node of the blockchain, so that consumers can obtain the original state data of the product based on the initial binding relationship when verifying the product.

[0042] S22, when the product flows to a new blockchain node, the phase pattern of the optical encryption image is updated to achieve dynamic binding of the phase pattern with the hash value of the product of each blockchain node.

[0043] Specifically, when the optically encrypted image on the product is photographed and identified, relevant information such as the shooting location, time, and photographer can be collected and recorded on the blockchain. At the same time, an obfuscation algorithm can be used on the blockchain. For example, homomorphic encryption and secure multi-party computing algorithms can be used to update the phase pattern of the optically encrypted image, and the updated phase pattern is bound to the hash value of the product in the current blockchain node.

[0044] To prevent the blockchain from being attacked by a man-in-the-middle, in one embodiment of the present invention, a time lock mechanism can be introduced when updating the phase pattern of the optically encrypted image, so that the updated phase pattern takes effect after a preset time delay (e.g., 10 seconds) after the blockchain is confirmed.

[0045] In one embodiment of the present invention, the logistics data of the product can also be associated with the sales area through a geographic hash algorithm. When the area where the optically encrypted image of the product is verified deviates from the preset range, an alarm is automatically triggered. Not only will the logistics status be frozen and the corresponding regulatory authorities be notified, but the abnormal event will also be recorded in the blockchain. The entire operation process is traceable and non-repudiable.

[0046] S3 verifies the product based on the physical characteristics of the optically encrypted image and the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node.

[0047] In actual application scenarios, consumers can capture multiple frames of images to obtain the physical characteristics of optically encrypted images at different times, angles, and lighting conditions. By analyzing and processing these multiple frames of images, they can effectively reduce recognition errors caused by local occlusion, blur, reflection, and other factors, thereby improving the accuracy of verification.

[0048] In one embodiment of the present invention, S3 may specifically include the following steps S31-S32:

[0049] S31, verifying the authenticity of the physical tag based on the physical features of the optically encrypted image.

[0050] Specifically, the authenticity verification of the entity tag may include initial hash value verification, microscopic verification of broken pen features, and intelligent light spot excitation verification.

[0051] Initial hash value verification, that is, verifying the product's original state data based on the initial phase pattern of the optically encrypted image when the digital features are first bound.

[0052] The surface of the optically encrypted image can be provided with a scratchable coating. When performing microscopic verification of the broken pen feature, consumers are required to scratch the scratchable coating and scan the broken pen area through the mobile phone's microscopic camera. The consumer client automatically extracts the fracture trajectory image and calculates the corresponding initial blockchain node hash value. If the deviation from the initial blockchain node hash value stored on the blockchain exceeds a preset deviation threshold, for example 5%, it can be determined to be a counterfeit label.

[0053] The surface of the optically encrypted image can also be provided with a fluorescent dot matrix layer. The intelligent light spot excitation verification requires the regulatory authorities to use a laser pen with a wavelength matching the fluorescent dot matrix to illuminate the fluorescent dot matrix layer, activate the fluorescent response of the fluorescent dot matrix layer, and capture the light spot position distribution. The light spot position corresponds to part of the bytes of the initial blockchain node hash value. If the position is offset or missing, a data tampering alarm is triggered.

[0054] S32, based on the dynamic binding relationship between the phase pattern of the optical encryption image and the blockchain node, the hash value of the blockchain node where the product is located is digitally verified.

[0055] Specifically, the integrity and consistency of the data on the chain can be verified through the smart contract of the blockchain to realize the digital feature verification of the product. When the consumer's mobile phone takes an optically encrypted image to verify the authenticity of the physical label, the smart contract of the blockchain can also be triggered through the consumer client. The smart contract compares the hash value of the current blockchain node dynamically bound to the optically encrypted image with the digital certificate stored on the chain, and at the same time calls IPFS to verify the consistency of the original file CID and the hash on the chain. If it does not match the record on the chain, the data is determined to be tampered. When the regulatory authorities view the auxiliary data, the regulatory client can pull the file from IPFS and calculate its hash value obtained by the national secret SM3 algorithm. If it does not match the record on the chain, the product will be immediately marked as "tampered with" and a signed audit report containing the tampering fragment, operation timeline and information about the equipment involved will be generated.

[0056] like Figure 3 As shown, in one embodiment of the present invention, the following may also be included: Step S4, performing graded warnings based on different verification results of the product, realizing multi-level warnings based on the multi-layer verification of "light-chain collaboration", which can effectively improve the safety of the production, circulation and consumption process of food and drugs. Step S4 may specifically include S41-S42:

[0057] S41: If the physical tag fails authenticity verification but the digital feature passes, a Level 1 anomaly is detected, triggering a Level 1 alert and displaying preview information for the product. Failure of the physical tag authenticity verification essentially refers to a discrepancy in the physical features, such as a failure in microscopic verification of a broken pen feature or intelligent light spot excitation verification.

[0058] S42: If the physical tag passes authenticity verification but fails digital feature verification, a secondary alert is triggered, freezing the product's data tag. A digital feature verification failure is essentially a blockchain data inconsistency. For example, if the logistics time is later than the scan time, the digital feature verification will be considered data tampering.

[0059] S43: When both the entity tag authenticity verification and the digital feature verification fail, that is, when there is a multimodal conflict, a third-level warning is triggered and a judicial evidence collection report is generated.

[0060] Specifically, if an abnormal situation occurs, after the consumer verifies the abnormal optically encrypted image, a red warning icon will be dynamically displayed on the consumer client interface, and the consumer will be guided to complete the report. Once the abnormal event is triggered, the enterprise side pushes a real-time warning information to the risk control dashboard, automatically issues a stop-sale order, and freezes the entry and exit rights of all in-transit and inventory products of the batch. Relevant violation evidence is automatically synchronized to chain nodes such as drug supervision and market supervision. The regulatory department enters the batch number or transaction hash, and the blockchain evidence data is automatically aggregated with the original IPFS file to generate an audit report.

[0061] In summary, the blockchain anti-counterfeiting and traceability method for food and drugs according to the embodiment of the present invention generates an optically encrypted image of the product by embedding interference fringes with encrypted information in a color image, and dynamically binds the phase pattern of the encrypted image to the hash value of the blockchain node, thereby solving the technical problems in the circulation of food and drugs, such as easy copying of physical labels and many prohibited scenarios, high risk of easy data tampering, insufficient dynamic anti-counterfeiting capabilities, and delayed detection of cross-selling. The product is verified based on the physical characteristics of the optically encrypted image and the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node, realizing dual interlocking verification of physical and digital characteristics, ensuring real-time and reliable traceability of the entire chain of production, circulation, and consumption of food and drugs, and providing the food and drug industry with a safe, reliable, flexible and universal anti-counterfeiting and traceability solution.

[0062] In addition, to achieve the above-mentioned purpose, the present invention also proposes a blockchain anti-counterfeiting and traceability system for food and medicine.

[0063] like Figure 4 As shown, the blockchain anti-counterfeiting and traceability system for food and medicine according to the embodiment of the present invention includes: a generation module 10, a dynamic binding module 20 and a verification module 30, wherein the generation module 10 is used to embed interference fringes with encrypted information in the color image of the product through laser interference and phase modulation technology to generate an optically encrypted image of the product, so that the original color image becomes an anti-counterfeiting image carrier with dual binding of physical and digital features; the dynamic binding module 20 is used to dynamically bind the phase pattern of the optically encrypted image to the hash value of the product of each blockchain node, realizing "one block chain". Figure 1 The dynamic anti-counterfeiting upgrade of "one-time one-password" enhances the data empowerment capability of blockchain, facilitates convenient authentication for consumers and real-time monitoring by regulators and enterprises; the verification module 30 is used to verify the product based on the physical characteristics of the optically encrypted image and the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node. The phase pattern is the mapping relationship between the phase component of the optically encrypted image and the binary data. The color image can be located on the product packaging or on the product itself, which is not limited in this embodiment.

[0064] In one embodiment of the present invention, the generation module 10 may include a conversion unit, a mapping unit and an embedding unit, wherein the conversion unit is used to convert the encrypted information of the product into binary data, wherein the encrypted information may include the core data of the product, such as the product unique ID, production batch number, blockchain address, etc. At the same time, the SHA-3 hash algorithm may be used to generate a 32-byte feature summary on the initial blockchain node to achieve the binding of the digital features of the optical encryption image; the mapping unit may map the binary data into the phase component of the optical encryption image based on discrete Fourier transform and phase modulation technology, generate interference fringes, and form the physical characteristics of the optical encryption image; the embedding unit may embed interference fringes in the color image in blocks based on the graphics and channels of the color image to generate the optical encryption image of the product.

[0065] It should be noted that the initial binding of digital features can be achieved when generating the optically encrypted image or when the product is in the initial blockchain node, and this embodiment does not limit this. When embedding interference fringes in blocks, it is preferable to prioritize areas that are less sensitive to the human eye, such as embedding phase information in the green channel of the RGB channel or in areas with complex textures to avoid affecting the visual quality of the original image. To enhance the damage resistance of the optically encrypted image, a redundant backup area can be set up on the color image to store the most core data of the encrypted information, such as the product's unique ID, and this embodiment does not limit this.

[0066] In one embodiment of the present invention, the hash value of a blockchain node includes the core data and auxiliary data of the product. The core data can be encrypted using the national secret SM9 algorithm and dynamically authorized to access rights based on roles to prevent tampering and ensure high security. After the auxiliary data is desensitized, it can be compressed in blocks to achieve both storage efficiency and cost optimization. After the core data is encrypted with SM9, it relies on the immutability and transparency of the blockchain and is written to the alliance chain main chain through PBFT consensus to record the transaction hash and encryption strategy. After the auxiliary data is desensitized and compressed, it is uploaded to IPFS to generate a unique content identifier CID and bind it to the core data hash, forming a lightweight index on the chain and a massive storage structure off the chain.

[0067] Specifically, core data refers to key information that directly affects product safety and traceability. Core data on the production side may include raw material batch numbers, production process parameters, quality inspection report summaries, etc.; core data on the logistics side may include key node timestamps, temperature control extremes, etc.; core data on the sales side may include dealer authorization areas, first activation time, electronic certificate metadata, etc. Auxiliary data is supplementary information with large capacity or low frequency access. Auxiliary data on the production side may include original files, high-definition quality inspection videos, equipment operation logs, etc.; auxiliary data on the logistics side may include complete GPS track point sets, transportation videos; auxiliary data on the sales side may include user code scanning records, terminal sales information, etc.

[0068] In one embodiment of the present invention, the dynamic binding module 20 may include an initial setting unit and a dynamic update unit, wherein the initial setting unit is used to write the initial phase pattern of the optically encrypted image into the initial blockchain node of the blockchain when generating the optically encrypted image of the product, so that consumers can obtain the original state data of the product based on the initial binding relationship when verifying the product; the dynamic update unit is used to update the phase pattern of the optically encrypted image when the product flows to a new blockchain node, so as to achieve dynamic binding of the phase pattern with the hash value of the product at each blockchain node. Specifically, when the optically encrypted image on the product is photographed and identified, the phase pattern of the optically encrypted image can be updated on the blockchain using an obfuscation algorithm, and the updated phase pattern can be bound to the hash value of the product at the current blockchain node.

[0069] To prevent the blockchain from being attacked by a man-in-the-middle, in one embodiment of the present invention, a time lock mechanism can be introduced when updating the phase pattern of the optically encrypted image, so that the updated phase pattern takes effect after a preset time delay (e.g., 10 seconds) after the blockchain is confirmed.

[0070] In one embodiment of the present invention, the logistics data of the product can also be associated with the sales area through a geographic hash algorithm. When the area where the optically encrypted image of the product is verified deviates from the preset range, an alarm is automatically triggered. Not only will the logistics status be frozen and the corresponding regulatory authorities be notified, but the abnormal event will also be recorded in the blockchain. The entire operation process is traceable and non-repudiable.

[0071] In one embodiment of the present invention, the verification module 30 may include a physical verification unit and a digital verification unit, wherein the physical verification unit is used to verify the authenticity of the entity label based on the physical characteristics of the optically encrypted image, wherein the authenticity verification of the entity label may include initial hash value verification, broken pen feature microscopic verification and intelligent light spot excitation verification; the digital verification unit may perform digital feature verification on the hash value of the blockchain node where the product is located based on the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node. The specific verification method has been explained in detail above and will not be repeated here.

[0072] like Figure 5 As shown, in one embodiment of the present invention, a graded warning module 40 may also be included. The graded warning module 40 is used to perform graded warnings based on different verification results of the product. Multi-level warnings are realized based on the multi-layer verification of "light-chain collaboration", which can effectively improve the safety of the production, circulation and consumption process of food and drugs.

[0073] Specifically, the graded warning module 40 can issue graded warnings based on the following: When the physical tag authenticity verification fails but the digital feature verification passes, a level 1 warning is triggered, displaying the product's previewable information. The physical tag authenticity failure is essentially a physical feature discrepancy, such as a failure in microscopic verification of a broken pen feature or intelligent light spot excitation verification. When the physical tag authenticity verification passes but the digital feature verification fails, a level 2 warning is triggered, freezing the product's data tag. The digital feature verification failure is essentially a blockchain data inconsistency, such as a logistics time later than the scan time, which would be considered data tampering during the digital feature verification. When both the physical tag authenticity verification and the digital feature verification fail, i.e., a multimodal conflict exists, a level 3 warning is triggered, generating a forensic evidence collection report.

[0074] If an abnormality occurs, the consumer will verify the optically encrypted image and a red warning icon will appear on the client interface, guiding the consumer to complete a report. Once an abnormal event is triggered, the enterprise will push a real-time warning message to the risk control dashboard, automatically issuing a stop-sale order and freezing the entry and exit rights of all in-transit and in-stock products for that batch. Relevant evidence of violations will be automatically synchronized to chain nodes such as drug administration and market supervision. Regulatory authorities will input the batch number or transaction hash, automatically aggregating blockchain evidence data with the original IPFS file to generate an audit report.

[0075] In summary, the blockchain anti-counterfeiting and traceability system for food and drugs according to the embodiment of the present invention generates an optically encrypted image of the product by embedding interference fringes with encrypted information in a color image, and dynamically binds the phase pattern of the encrypted image to the hash value of the blockchain node, thereby solving the technical problems in the circulation of food and drugs, such as easy duplication of physical labels and many prohibited scenarios, high risk of easy data tampering, insufficient dynamic anti-counterfeiting capabilities, and delayed detection of parallel trading. The product is verified based on the physical characteristics of the optically encrypted image and the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node, realizing dual interlocking verification of physical and digital characteristics, ensuring real-time and reliable traceability of the entire chain of production, circulation and consumption of food and drugs, and providing the food and drug industry with a safe, reliable, flexible and universal anti-counterfeiting and traceability solution.

[0076] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of such features. "Multiple" means two or more, unless otherwise specifically defined.

[0077] In the present invention, unless otherwise expressly specified or limited, when a first feature is "above" or "below" a second feature, it may mean that the first and second features are in direct contact, or that the first and second features are in indirect contact through an intermediary. Furthermore, when a first feature is "above," "above," or "above" a second feature, it may mean that the first feature is directly above or diagonally above the second feature, or simply means that the first feature is at a higher level than the second feature. When a first feature is "below," "below," or "below" a second feature, it may mean that the first feature is directly below or diagonally below the second feature, or simply means that the first feature is at a lower level than the second feature.

[0078] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0079] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.

[0080] The logic and / or steps represented in a flowchart or otherwise described herein, for example, can be considered a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (not exhaustive) of computer-readable media include: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.

[0081] It should be understood that various components of the present invention may be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof may be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.

[0082] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0083] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.

[0084] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A blockchain anti-counterfeiting and traceability method for food and medicine, characterized by: The following steps are involved: S1, through laser interference and phase modulation technology, embeds interference fringes with encrypted information into the color image of the product to generate an optically encrypted image of the product; S2, dynamically binding the phase pattern of the optically encrypted image to the hash value of the product of each blockchain node, wherein the phase pattern is a mapping relationship between the phase component of the optically encrypted image and the binary data; S3, verifying the product based on the physical characteristics of the optically encrypted image and the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node, S1 specifically includes: converting the encrypted information of the product into binary data; mapping the binary data into the phase components of the optically encrypted image based on discrete Fourier transform and phase modulation technology to generate the interference fringes; and embedding the interference fringes in the color image in blocks based on the graphics and channels of the color image to generate the optically encrypted image of the product; S3 specifically includes: verifying the authenticity of the physical label based on the physical characteristics of the optically encrypted image, and the authenticity verification of the physical label includes: initial hash value verification, microscopic verification of broken pen features and intelligent light spot excitation verification; based on the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node, digital feature verification is performed on the hash value of the blockchain node where the product is located.

2. The blockchain anti-counterfeiting and traceability method according to claim 1, characterized in that: The hash value of the blockchain node includes the core data and auxiliary data of the product, and the encrypted information includes the core data of the product.

3. The blockchain anti-counterfeiting and traceability method according to claim 1, characterized in that: S2 specifically includes: When generating an optically encrypted image of the product, writing an initial phase pattern of the optically encrypted image into an initial blockchain node of the blockchain; When the product flows to a new blockchain node, the phase pattern of the optically encrypted image is updated to achieve dynamic binding of the phase pattern with the hash value of the product at each blockchain node.

4. The blockchain anti-counterfeiting and traceability method according to claim 3 is characterized in that: A time lock mechanism is introduced when updating the phase pattern of the optically encrypted image, so that the updated phase pattern takes effect after a preset time delay after blockchain confirmation.

5. The blockchain anti-counterfeiting and traceability method according to claim 1, characterized in that: The integrity and consistency of the data on the chain are verified through the smart contract of the blockchain to achieve the digital feature verification of the product.

6. The blockchain anti-counterfeiting and traceability method according to claim 1 or 5, characterized in that: Also includes: S4: Provide graded warnings based on the different verification results of the product. S4 specifically includes: When the authenticity verification of the physical tag fails but the digital feature verification passes, a first-level warning is triggered and preview information of the product is displayed; When the authenticity verification of the physical tag passes but the digital feature verification fails, a secondary warning is triggered and the data tag of the product is frozen; When both the authenticity verification of the physical tag and the digital feature verification fail, a third-level warning is triggered and a judicial evidence collection report is generated.

7. A blockchain anti-counterfeiting and traceability system for food and medicine, characterized by: include: A generation module is used to embed interference fringes with encrypted information into the color image of the product through laser interference and phase modulation technology to generate an optically encrypted image of the product; a dynamic binding module, configured to dynamically bind a phase pattern of the optically encrypted image to a hash value of the product of each blockchain node, the phase pattern being a mapping relationship between a phase component of the optically encrypted image and binary data; A verification module is used to verify the product based on the physical characteristics of the optically encrypted image and the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node, The generation module specifically includes a conversion unit, a mapping unit, and an embedding unit. The conversion unit is used to convert the encrypted information of the product into binary data; the mapping unit uses discrete Fourier transform and phase modulation technology to map the binary data into the phase components of the optical encryption image to generate interference fringes; the embedding unit embeds interference fringes in the color image in blocks based on the graphics and channels of the color image to generate the optical encryption image of the product; The verification module includes a physical verification unit and a digital verification unit. The physical verification unit is used to verify the authenticity of the entity label based on the physical characteristics of the optically encrypted image. The authenticity verification of the entity label includes initial hash value verification, broken pen feature microscopic verification and intelligent light spot excitation verification. The digital verification unit verifies the digital characteristics of the hash value of the blockchain node where the product is located based on the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node.

Citation Information

Patent Citations

  • Block chain data encryption system based on continuous variable quantum secret key distribution and implementation method thereof

    CN108880809A

  • Block chain food quality supervision traceability system and method

    CN114511333A