Block chain anti-counterfeiting traceability method and system for food and medicine
By embedding the interference fringes of encrypted information in the color images of food and drugs, and dynamically binding their phase patterns with the hash value of blockchain nodes, the problems of easy copying of physical tags and easy tampering of data in food and drug circulation are solved, real-time trusted traceability and high-security anti-counterfeiting verification of the entire food and drug link are achieved.
Patent Information
- Application Number
- CN202510653253.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-05-21
AI Technical Summary
In the circulation of food and drug, physical tags are easy to copy and have many banned scenarios, high risk of data tampering, insufficient dynamic anti-counterfeiting capabilities, and lagging in cross-trading detection.
Through laser interference and phase modulation technology, the interference fringes with encrypted information are embedded in the color image of the product, and the optically encrypted image of the product is generated, and the phase mode of the encrypted image is dynamically bound to the hash value of the blockchain node, realizing the double interlock verification of physical and digital features.
Ensure real-time trusted traceability of the entire chain of food and drug production, circulation and consumption, and provides a safe, reliable, flexible and universal anti-counterfeiting traceability solution, suitable for high-security anti-counterfeiting verification in the scenario of disabling QR codes.
Smart Images

Figure CN120181874A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and particularly relates to a blockchain anti-counterfeiting and traceability method and system for food and drugs. Background Art
[0002] Food and drugs are directly related to human health. Counterfeit and shoddy products (such as fake drugs, melamine-tainted milk powder, expired food, etc.) may cause poisoning, diseases, and even death. Anti-counterfeiting technologies (such as two-dimensional codes, blockchain tags, laser anti-counterfeiting) help consumers verify the authenticity of products and avoid purchasing illegal products. Traditional anti-counterfeiting means such as two-dimensional codes and RFID (Radio Frequency Identification) chips have significant defects, such as being easily replicated, limited by materials and environments, relying on professional equipment for verification, and having limited information carrying capacity, etc., and cannot meet the high-security requirements. In related technologies, although blockchain technology is introduced to improve the credibility of data, it still cannot break through the morphological constraints of physical tags and is difficult to adapt to diverse packaging requirements.
[0003] Due to the low information capacity and poor encryption dynamics of existing image anti-counterfeiting technologies, it is difficult to achieve multi-dimensional data fusion and real-time update, resulting in problems such as high anti-counterfeiting costs and disjointed data applications for enterprises. Moreover, there are some imported food and drugs that do not allow the product appearance to be changed, so it is impossible to use two-dimensional codes for anti-counterfeiting verification. Based on this, there is an urgent need for a new type of blockchain anti-counterfeiting and traceability method with strong compatibility, low cost, and data empowerment capabilities, which is suitable for high-security anti-counterfeiting verification in scenarios where two-dimensional codes are disabled. Summary of the Invention
[0004] To solve the above technical problems, the present invention provides a blockchain anti-counterfeiting and traceability method and system for food and drugs, which solves the technical problems of easy replication of physical tags, many disabled scenarios, high risk of data tampering, insufficient dynamic anti-counterfeiting capabilities, and lagging counterfeit goods detection in the circulation of food and drugs, realizes the dual interlocking verification of physical characteristics and digital characteristics, ensures real-time and credible traceability of the entire production, circulation, and consumption chain of food and drugs, and provides a safe, reliable, flexible, and universal anti-counterfeiting and traceability solution for the food and drug industry.
[0005] The technical solution adopted by the present invention is as follows: A blockchain anti-counterfeiting and traceability method for food and drugs, comprising the following steps: S1, by using laser interference and phase modulation technology, embed interference fringes with encrypted information in the color image of the product to generate an optical encrypted image of the product; S2, dynamically bind the phase pattern of the optical encrypted image with 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 encrypted image and binary data; S3. 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.
[0006] In addition, the blockchain anti-counterfeiting and traceability method proposed by the present invention may further have the following additional technical features: According to an embodiment of the present invention, S1 specifically includes: converting the encrypted information of the product into binary data; based on the discrete Fourier transform and phase modulation technology, mapping the binary data into the phase component of the optically encrypted image to generate the interference fringes; embedding the interference fringes in blocks in the color image based on the graphics and channels of the color image to generate the optically encrypted image of the product.
[0007] According to an 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.
[0008] According to an embodiment of the present invention, S2 specifically includes: when generating the 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 is transferred to a new blockchain node, updating the phase pattern of the optically encrypted image to achieve dynamic binding between the phase pattern and the hash value of the product at each blockchain node.
[0009] According to an 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 being confirmed by the blockchain.
[0010] According to an embodiment of the present invention, S3 specifically includes: verifying the authenticity of the physical label based on the physical characteristics of the optically encrypted image; 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.
[0011] According to an embodiment of the present invention, the authenticity verification of the physical label includes initial hash value verification, microscopic verification of broken pen features, and intelligent light spot excitation verification.
[0012] According to an embodiment of the present invention, the integrity and consistency of the data on the chain are verified through the smart contract of the blockchain to achieve the digital characteristic verification of the product.
[0013] According to an embodiment of the present invention, it further includes: S4, performing hierarchical early warning according to different verification results of the product, specifically including: when the authenticity verification of the physical label fails and the digital feature verification passes, triggering a first-level early warning and displaying the previewable information of the product; when the authenticity verification of the physical label passes and the digital feature verification fails, triggering a second-level early warning and freezing the data label of the product; when both the authenticity verification of the physical label and the digital feature verification fail, triggering a third-level early warning and generating a judicial evidence-taking report.
[0014] In addition, to achieve the above object, the present invention also proposes a blockchain anti-counterfeiting and traceability system for food and drugs.
[0015] A blockchain anti-counterfeiting and traceability system for food and drugs 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 optical encrypted image of the product; a dynamic binding module for dynamically binding the phase pattern of the optical encrypted image with 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 encrypted image and binary data; a verification module for verifying the product based on the physical characteristics of the optical encrypted image and the dynamic binding relationship between the phase pattern of the optical encrypted image and the blockchain node.
[0016] Advantages of the present invention: The blockchain anti-counterfeiting and traceability method for food and drugs of the present invention embeds interference fringes with encrypted information in a color image to generate an optical encrypted image of the product, and dynamically binds the phase pattern of the encrypted image with the hash value of the blockchain node, solving the technical problems of easy replication of physical labels and many disabled scenarios, high risk of data tampering, insufficient dynamic anti-counterfeiting ability, and lag in counterfeit goods detection in the circulation of food and drugs; verifying the product based on the physical characteristics of the optical encrypted image and the dynamic binding relationship between the phase pattern of the optical encrypted image and the blockchain node, realizing double interlocking verification of physical characteristics and digital characteristics, ensuring real-time credible traceability of the entire link of food and drug production, circulation, and consumption, and providing a safe, reliable, flexible, and universal anti-counterfeiting and traceability solution for the food and drug industry. Description of the Drawings
[0017] Figure 1 It is a flowchart of the blockchain anti-counterfeiting and traceability method for food and drugs according to an embodiment of the present invention; Figure 2 It is a schematic diagram of the data type of the hash value of the blockchain node in an embodiment of the present invention; Figure 3 It is a flowchart of the blockchain anti-counterfeiting and traceability method for food and drugs according to another embodiment of the present invention; Figure 4 A block diagram of a blockchain anti-counterfeiting and traceability system for food and drugs according to an embodiment of the present invention; Figure 5 A block diagram of a blockchain anti-counterfeiting and traceability system for food and drugs according to another embodiment of the present invention. Detailed implementation manners
[0018] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0019] As Figure 1 shown, the blockchain anti-counterfeiting and traceability method for food and drugs in the embodiment of the present invention includes the following steps: S1, through laser interference and phase modulation technology, embed interference fringes with encrypted information in the color image of the product to generate an optical encrypted image of the product, making the original color image become an anti-counterfeiting image carrier with dual binding of physical characteristics and digital characteristics. Among them, the color image can be located on the outer packaging of the product or on the product itself, and this embodiment does not limit it.
[0020] It can be understood that the interference fringes are basically difficult to be recognized by the naked eye in most cases, and the optical encrypted image is directly embedded in the color image, such as the trademarks, labels, etc. of food and drugs, without a dedicated label area, with low cost, meeting the diverse packaging needs of food and drugs and adapting to various scenarios where two-dimensional codes are prohibited; and the number of data bits that can be stored in a single image corresponds to the number of channels of the color image, and the data volume can also be expanded through multi-region phase superposition. For example, an optical encrypted image that can store 128-bit encrypted information can support expansion to 512 bits through multi-region phase superposition, with strong information-bearing capacity and large information capacity.
[0021] In an embodiment of the present invention, step S1 may specifically include the following steps S11-S13: S11, convert the encrypted information of the product into binary data. Among them, the encrypted information may include the core data of the product, such as the unique ID of the product, the production batch number, the blockchain address, etc. At the same time, the SHA-3 hash algorithm may also be used to generate a 32-byte feature digest on the initial blockchain node to realize the binding of the digital characteristics of the optical encrypted image. It should be noted that the initial binding of the digital characteristics can be realized when generating the optical encrypted image or when the product is at the initial blockchain node, and this embodiment does not limit it.
[0022] S12, based on discrete Fourier transform and phase modulation technology, maps binary data into phase components of the optical encryption image, generates interference fringes, and forms the physical characteristics of the optical encryption image.
[0023] S13, based on the graphics and channels of the color image, embed interference fringes in the color image in blocks to generate an optically encrypted image of the product.
[0024] When embedding interference fringes in blocks, priority may be given to areas that are not sensitive to the human eye, such as embedding phase information in the green channel of the RGB channel or in complex texture areas to avoid affecting the visual effect of the original image. To enhance the damage resistance of the optically encrypted image, a redundant backup area may be set on the color image to store the most core data in the encrypted information, such as a unique product ID, etc. This embodiment is not limited thereto.
[0025] 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 password, one time, one password" has improved the data empowerment capability of blockchain, making it easier for consumers to verify authenticity and for regulators and enterprises to monitor in real time.
[0026] In one embodiment of the present invention, Figure 2 As shown in the figure, the hash value of the 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 the access rights can be dynamically authorized based on the role to prevent tampering and ensure high security. After the auxiliary data is desensitized, it can be compressed in blocks to take into account storage efficiency and cost optimization. After the core data is encrypted by SM9, it relies on the immutability and transparency of the blockchain to call the PBFT (Practical Byzantine Fault Tolerance) consensus to write to the main chain of the alliance chain, record the transaction hash and encryption strategy; after the auxiliary data is desensitized and compressed, it is uploaded to IPFS (InterPlanetary File System), generates a unique content identifier CID (Content IDentifier), and is bound to the core data hash to form a lightweight index on the chain and a massive storage structure off the chain.
[0027] Specifically, the core data are the key information directly affecting product safety and traceability credibility. The core data at the production end may include raw material batch numbers, production process parameters, quality inspection report summaries, etc.; the core data at the logistics end may include key node timestamps, temperature control extreme values, etc.; the core data at the sales end may include dealer authorized areas, first activation times, electronic certificate metadata, etc. The auxiliary data are supplementary information with large capacity or low-frequency access. The auxiliary data at the production end may include original documents, high-definition quality inspection videos, equipment operation logs, etc.; the auxiliary data at the logistics end may include complete GPS (Global Positioning System) trajectory point sets, transportation videos; the auxiliary data at the sales end may include user scan records, terminal sales information, etc.
[0028] In an embodiment of the present invention, S2 may specifically include the following steps S21 - S22: S21, when generating the optical encryption image of the product, write the initial phase pattern of the optical encryption image into the initial blockchain node of the blockchain, so that consumers can obtain the original state data of the product according to the initial binding relationship when verifying the product.
[0029] S22, when the product is transferred to a new blockchain node, update the phase pattern of the optical encryption image to achieve dynamic binding of the phase pattern with the hash value of the product at each blockchain node.
[0030] Specifically, when the optical encryption image on the product is photographed and recognized, relevant information such as the photographing location, time, and photographer can be collected and recorded on the blockchain. At the same time, on the blockchain, a confusion algorithm can be used, for example: using homomorphic encryption and secure multi-party computing algorithms to update the phase pattern of the optical encryption image, and binding the updated phase pattern with the hash value of the product at the current blockchain node.
[0031] To prevent the blockchain from being attacked by a man-in-the-middle, in an embodiment of the present invention, a time lock mechanism can also be introduced when updating the phase pattern of the optical encryption image, so that the updated phase pattern takes effect after a preset time, such as 10 seconds, after being confirmed by the blockchain.
[0032] In an embodiment of the present invention, the logistics data of the product can also be associated with the sales area through a geohash algorithm. When the area where the optical encryption 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 department be notified, but at the same time, the abnormal event will be recorded on the blockchain, and the entire operation process is traceable and non-repudiable.
[0033] S3, verify the product based on the physical characteristics of the optical encryption image and the dynamic binding relationship between the phase pattern of the optical encryption image and the blockchain node.
[0034] In actual application scenarios, consumers can capture multiple frames of images to obtain the physical characteristics of the optically encrypted image at different times, different angles, and different lighting conditions. By analyzing and processing these multiple frames of images, the recognition errors caused by factors such as partial occlusion, blurring, and reflection can be effectively reduced, thereby improving the accuracy of verification.
[0035] In an embodiment of the present invention, S3 may specifically include the following steps S31 - S32: S31, verify the authenticity of the entity label based on the physical characteristics of the optically encrypted image.
[0036] Specifically, the authenticity verification of the entity label may include initial hash value verification, microscopic verification of broken pen features, and intelligent light point excitation verification.
[0037] Initial hash value verification, that is, verify the original state data of the product according to the initial phase pattern of the optically encrypted image when the digital features are initially bound.
[0038] A scratchable coating may be provided on the surface layer of the optically encrypted image. When performing microscopic verification of broken pen features, consumers need to scratch off the scratchable coating, scan the broken pen area through the microscopic camera of the mobile phone, and 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 the preset deviation threshold, such as 5%, it can be determined as a forged label.
[0039] A fluorescent dot matrix layer may also be provided on the surface layer of the optically encrypted image. For intelligent light point excitation verification, the regulatory department needs to use a laser pen with a wavelength matching the fluorescent dot matrix to irradiate the fluorescent dot matrix layer, activate the fluorescent response of the fluorescent dot matrix layer, capture the distribution of light point positions. The light point positions correspond to partial bytes of the initial blockchain node hash value. If the position is offset or missing, a data tampering alarm is triggered.
[0040] S32, 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.
[0041] Specifically, the integrity and consistency of the data on the blockchain can be verified through the smart contract of the blockchain to achieve the verification of the digital features of the product. When the consumer's mobile phone takes an optically encrypted image for verifying the authenticity of the physical label, the smart contract of the blockchain can also be triggered through the consumer client. The hash value of the current blockchain node dynamically bound to the optically encrypted image is compared with the digital certificate stored on the chain through the smart contract, and at the same time, IPFS is called to verify the consistency between the original file CID and the hash on the chain. If it does not match the record on the chain, it is determined that data has been tampered with. When the regulatory department views the auxiliary data, the regulatory client can pull the file from IPFS and calculate the hash value obtained through the national cryptographic SM3 algorithm. If it does not match the record on the chain, the product is immediately marked as "tampered", and a signed audit report containing the tampered segment, operation timeline, and information of the involved device is generated.
[0042] As Figure 3 shown, in an embodiment of the present invention, it may further include: step S4, performing hierarchical early warning according to different verification results of the product, realizing multi-level early warning on the basis of the multi-layer verification of "light-chain collaboration", and being able to effectively improve the safety of the food and drug production, circulation, and consumption processes. Step S4 may specifically include S41 - S42: S41, when the verification of the authenticity of the physical label fails and the verification of the digital features passes, it indicates that there is a first-level anomaly, triggering a first-level early warning and displaying the previewable information of the product. Among them, the failure of the verification of the authenticity of the physical label is essentially a mismatch of physical features, such as the failure of the microscopic verification of the broken pen feature or the intelligent light point excitation verification.
[0043] S42, when the verification of the authenticity of the physical label passes and the verification of the digital features fails, triggering a second-level early warning and freezing the data label of the product. Among them, the failure of the verification of the digital features is essentially a contradiction in the blockchain data. For example, if the logistics time is later than the scanning time, it will be determined that data has been tampered with during the numerical feature verification.
[0044] S43, when both the verification of the authenticity of the physical label and the verification of the digital features fail, that is, when there is a multimodal conflict, triggering a third-level early warning and generating a judicial evidence collection report.
[0045] Specifically, if an abnormal situation occurs, after the consumer verifies the abnormal optically encrypted image, a red warning icon is dynamically displayed on the consumer client interface, and the consumer is guided to complete the report. After the abnormal event is triggered, the enterprise side real-time pushes the early warning information to the risk control dashboard, automatically issues a stop-sale instruction, freezes the inbound and outbound permissions of all in-transit and inventory products of this batch, and the relevant violation evidence is automatically synchronized to the chain nodes such as the drug regulatory department and the market supervision department. The regulatory department inputs the batch number or transaction hash, automatically aggregates the blockchain evidence data and the IPFS original file, and generates an audit report.
[0046] In summary, according to the blockchain anti-counterfeiting and traceability method for food and drugs of the embodiments of the present invention, by embedding interference fringes with encrypted information in a color image to generate an optical encrypted image of the product and dynamically binding the phase pattern of the encrypted image to the hash value of the blockchain node, the technical problems in the circulation of food and drugs, such as easy replication of physical labels, many disabling scenarios, high risk of data tampering, insufficient dynamic anti-counterfeiting ability, and lagging of cross-border goods detection, are solved; the product is verified based on the physical characteristics of the optical encrypted image and the dynamic binding relationship between the phase pattern of the optical encrypted image and the blockchain node, realizing the dual interlocking verification of physical characteristics and digital characteristics, ensuring real-time and credible traceability of the entire link of food and drug production, circulation, and consumption, and providing a safe, reliable, flexible, and universal anti-counterfeiting and traceability solution for the food and drug industry.
[0047] In addition, to achieve the above object, the present invention also proposes a blockchain anti-counterfeiting and traceability system for food and drugs.
[0048] As Figure 4 shown, the blockchain anti-counterfeiting and traceability system for food and drugs of the embodiments of the present invention includes: a generation module 10, a dynamic binding module 20, and a verification module 30. Among them, 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 optical encrypted image of the product, making the original color image become an anti-counterfeiting image carrier with dual binding of physical characteristics and digital characteristics; the dynamic binding module 20 is used to dynamically bind the phase pattern of the optical encrypted image to the hash value of the product of each blockchain node, realizing the dynamic anti-counterfeiting upgrade of "one Figure 1 key, one-time key", improving the data enabling ability of the blockchain, facilitating consumers to verify authenticity conveniently and real-time monitoring by the regulatory side and the enterprise side; the verification module 30 is used to verify the product based on the physical characteristics of the optical encrypted image and the dynamic binding relationship between the phase pattern of the optical encrypted image and the blockchain node. Among them, the phase pattern is the mapping relationship between the phase component of the optical encrypted image and binary data, and the color image can be located on the outer package of the product or on the product itself, which is not limited in this embodiment.
[0049] 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, the production batch number, the blockchain address, etc., and 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 to 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.
[0050] It should be noted that the initial binding of digital features can be achieved when generating an 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, priority can be given to areas that are insensitive to the human eye, such as embedding phase information in the green channel of the RGB channel or in complex texture areas to avoid affecting the visual effect of the original image. In order to enhance the damage resistance of the optically encrypted image, a redundant backup area can also be set on the color image to store the most core part of the encrypted information, such as the product unique ID, etc., and this embodiment does not limit this.
[0051] In one embodiment of the present invention, the hash value of the 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 take into account storage efficiency and cost optimization. After the core data is encrypted by SM9, it relies on the immutability and transparency of the blockchain to be written to the main chain of the alliance chain through the PBFT consensus, recording 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 is bound to the core data hash to form a lightweight index on the chain and a storage structure of massive storage off the chain.
[0052] Specifically, core data is key information that directly affects product safety and traceability credibility. The core data on the production side may include raw material batch numbers, production process parameters, quality inspection report summaries, etc.; the core data on the logistics side may include key node timestamps, temperature control extremes, etc.; the 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. The auxiliary data on the production side may include original files, high-definition quality inspection videos, equipment operation logs, etc.; the auxiliary data on the logistics side may include complete GPS track point sets, transportation videos; the auxiliary data on the sales side may include user code scanning records, terminal sales information, etc.
[0053] In an embodiment of the present invention, the dynamic binding module 20 may include an initial setting unit and a dynamic update unit. The initial setting unit is used to write the initial phase pattern of the optical encryption image into the initial blockchain node of the blockchain when generating the optical encryption image of the product, so that consumers can obtain the original state data of the product according to the initial binding relationship during product verification; the dynamic update unit is used to update the phase pattern of the optical encryption image when the product is transferred to a new blockchain node, so as to realize the dynamic binding of the phase pattern and the hash value of the product at each blockchain node. Specifically, when the optical encryption image on the product is captured and recognized, the phase pattern of the optical encryption image can be updated by using a confusion algorithm on the blockchain, and the updated phase pattern is bound to the hash value of the product at the current blockchain node.
[0054] To prevent the blockchain from being attacked by a man-in-the-middle, in an embodiment of the present invention, a time lock mechanism may also be introduced when updating the phase pattern of the optical encryption image, so that the updated phase pattern takes effect after a preset time, such as 10 seconds, after being confirmed by the blockchain.
[0055] In an embodiment of the present invention, the logistics data of the product and the sales area may also be associated through a geohash algorithm. When the area where the optical encryption 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 department be notified, but also the abnormal event will be recorded on the blockchain, and the entire operation process is traceable and non-repudiable.
[0056] In an embodiment of the present invention, the verification module 30 may include 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 optical encryption image. The authenticity verification of the entity label may include initial hash value verification, broken pen feature microscopic verification, and intelligent light point excitation verification; the digital verification unit can 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 optical encryption image and the blockchain node. The specific verification method has been elaborated in detail above and will not be repeated here.
[0057] As Figure 5 shown, in an embodiment of the present invention, a hierarchical early warning module 40 may also be included. The hierarchical early warning module 40 is used to perform hierarchical early warning according to different verification results of the product, and realizes multi-level early warning on the basis of the multi-layer verification of "light-chain collaboration", which can effectively improve the safety of the production, circulation and consumption processes of food and drugs.
[0058] Specifically, the hierarchical warning module 40 can issue hierarchical warnings based on the following: when the authenticity verification of the entity label fails and the digital feature verification passes, a first-level warning is triggered to display the previewable information of the product. Among them, the failure of the authenticity verification of the entity label actually means that the physical features do not match, such as the failure of the microscopic verification of the broken pen feature or the intelligent light spot excitation verification. When the authenticity verification of the entity label passes and the digital feature verification fails, a second-level warning is triggered to freeze the data label of the product. Among them, the failure of the digital feature verification actually means a contradiction in the blockchain data, such as the logistics time being later than the scanning time, and data tampering will be determined during the numerical feature verification. When both the authenticity verification of the entity label and the digital feature verification fail, that is, when there is a multimodal conflict, a third-level warning is triggered to generate a forensic evidence report.
[0059] In case of an abnormal situation, after the consumer verifies the abnormal optical encryption image, a red warning icon is dynamically displayed on the consumer client interface, and the consumer is guided to complete the report. After the abnormal event is triggered, the enterprise side real-time pushes the warning information to the risk control dashboard, automatically issues a stop-sale order, freezes the inbound and outbound permissions of all in-transit and inventory products in this batch, and automatically synchronizes the relevant illegal evidence to the chain nodes such as the drug regulatory and market supervision departments. The regulatory department inputs the batch number or transaction hash, and automatically aggregates the blockchain evidence data and the IPFS original file to generate an audit report.
[0060] In summary, for the blockchain anti-counterfeiting and traceability system for food and drugs according to the embodiments of the present invention, by embedding interference fringes with encrypted information in the color image to generate the optical encryption image of the product, and dynamically binding the phase pattern of the encrypted image with the hash value of the blockchain node, the technical problems of easy replication of physical labels and many disabled scenarios, high risk of data tampering, insufficient dynamic anti-counterfeiting ability, and lag in counterfeit goods detection in the circulation of food and drugs are solved; the product is verified based on the physical features of the optical encryption image and the dynamic binding relationship between the phase pattern of the optical encryption image and the blockchain node, realizing the dual interlocking verification of physical features and digital features, ensuring real-time and reliable traceability of the entire food and drug production, circulation, and consumption chain, and providing a safe, reliable, flexible, and universal anti-counterfeiting and traceability solution for the food and drug industry.
[0061] In the description of the present invention, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The meaning of "plurality" is two or more, unless otherwise specifically defined.
[0062] In the present invention, unless otherwise clearly specified or limited, a first feature being "on" or "under" a second feature may mean that the first and second features are in direct contact, or the first and second features are indirectly in contact via an intermediate medium. Moreover, a first feature being "above", "over" and "on top of" a second feature may mean that the first feature is directly above or obliquely above the second feature, or merely indicates that the horizontal height of the first feature is higher than that of the second feature. A first feature being "under", "below" and "beneath" a second feature may mean that the first feature is directly below or obliquely below the second feature, or merely indicates that the horizontal height of the first feature is less than that of the second feature.
[0063] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection 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 have to refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without conflict, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0064] Any process or method description shown in a flowchart or described in other ways herein may be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process, and the scope of the preferred embodiments of the present invention includes additional implementations, where the functions may be executed in a manner not shown or discussed, including in a substantially simultaneous manner according to the functions involved or in a reverse order, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0065] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in combination with these instruction execution systems, apparatus, or devices. For the 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 connection with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then storing it in a computer memory.
[0066] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0067] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the method of the above embodiments can be completed by a program instructing relevant hardware, 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 embodiments.
[0068] In addition, in each embodiment of the present invention, each functional unit may be integrated into a processing module, may exist physically alone for each unit, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0069] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A blockchain anti-counterfeiting and traceability method for food and medicine, characterized in that: The following steps are involved: S1, through laser interference and phase modulation technology, the interference fringes with encrypted information are embedded in the color image of the product to generate an optically encrypted image of the product; S2, dynamically binding the phase pattern of the optical encryption 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 optical encryption image and the binary data; S3, verifying the product based on the physical characteristics of the optical encryption image and the dynamic binding relationship between the phase pattern of the optical encryption image and the blockchain node.
2. The blockchain anti-counterfeiting and traceability method according to claim 1 is characterized in that: S1 specifically includes: converting the encrypted information of the product into binary data; Based on discrete Fourier transform and phase modulation technology, the binary data is mapped into the phase component of the optical encryption image to generate the interference fringes; Based on the graphics and channels of the color image, the interference fringes are embedded in the color image in blocks to generate an optically encrypted image of the product.
3. The blockchain anti-counterfeiting and traceability method according to claim 1 is 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.
4. The blockchain anti-counterfeiting and traceability method according to claim 1 is 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 optical encryption image is updated to achieve dynamic binding of the phase pattern with the hash value of the product of each blockchain node.
5. The blockchain anti-counterfeiting and traceability method according to claim 4 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.
6. The blockchain anti-counterfeiting and traceability method according to claim 1 is characterized in that: S3 specifically includes: Performing authenticity verification of the physical tag based on the physical features of the optically encrypted image; Based on the dynamic binding relationship between the phase pattern of the optically encrypted image and the blockchain node, the hash value of the blockchain node where the product is located is digitally verified.
7. The blockchain anti-counterfeiting and traceability method according to claim 6 is characterized in that: The authenticity verification of the entity tag includes: initial hash value verification, broken pen feature microscopic verification and intelligent light spot excitation verification.
8. The blockchain anti-counterfeiting and traceability method according to claim 6 is characterized in that: The integrity and consistency of the data on the chain are verified through the smart contract of the blockchain to realize the digital feature verification of the product.
9. The blockchain anti-counterfeiting and traceability method according to claim 6 or 8, characterized in that: Also includes: S4, providing graded warnings based on 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 previewable 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 to freeze the data tag of the product; When both the authenticity verification of the entity tag and the digital feature verification fail, a third-level warning is triggered and a judicial evidence collection report is generated.
10. A blockchain anti-counterfeiting and traceability system for food and medicine, characterized in that: include: A generation module, used to embed interference fringes with encrypted information in a color image of a product through laser interference and phase modulation technology, thereby generating an optically encrypted image of the product; A dynamic binding module, used to dynamically bind the phase pattern of the optical encryption 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 optical encryption image and the binary data; A verification module is used to verify the product based on the physical characteristics of the optical encryption image and the dynamic binding relationship between the phase pattern of the optical encryption image and the blockchain node.
Citation Information
Patent Citations
Holographic watermark authentication method for notarization document
CN108615216A
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
Food production unique identifier management system
CN119809669A
Transparent anti-fake lead sealing system with embedded unique two-dimensional code
CN120012813A
Cited By
Seed packaging bag AI intelligent anti-counterfeiting traceability management system and method
CN120494856A
Seed packaging bag AI intelligent anti-fake traceability management system and method
CN120494856B