An encrypted steganography fusion commodity traceability method

By integrating dynamic key layered encryption and improved steganography algorithms, combined with AES256 encryption and TLS/SSL channels, the problems of easy tampering and insecure transmission of product traceability information are solved, realizing encrypted protection and covert transmission of product traceability information, and improving the security and reliability of the traceability system.

CN122491320APending Publication Date: 2026-07-31NANCHANG INST OF SCI & TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-06
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing product traceability technologies are prone to tampering and forgery of traceability information, and there is a risk of information leakage during transmission. Furthermore, the integration of anti-counterfeiting and traceability is not tight, making it impossible to achieve encrypted protection and covert transmission of traceability information, and thus failing to meet the high requirements of high-end products for traceability security and confidentiality.

Method used

By deeply integrating dynamic key layered encryption technology with improved steganography algorithms, encrypted anti-counterfeiting codes are generated through double encryption processing, and traceability data is embedded in invisible QR codes. Combining AES256 encryption and hash verification, the improved LSB steganography algorithm is used for covert transmission. Combined with TLS/SSL secure channels and blockchain evidence storage technology, real-time data synchronization and immutability are achieved.

Benefits of technology

It achieves encrypted protection and covert transmission of traceability information, ensuring the integrity and immutability of data transmission and storage, solving the problems of unreliable information and untimely feedback in traditional QR code traceability, and improving the security and credibility of the traceability system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122491320A_ABST
    Figure CN122491320A_ABST
Patent Text Reader

Abstract

This invention provides a product traceability method integrating encryption and steganography, comprising: obtaining a unique anti-counterfeiting code and basic traceability information of a product through a mini-program; encrypting the anti-counterfeiting code using a dynamic key layered encryption algorithm; embedding the encrypted anti-counterfeiting information into the image of a transmission carrier using an improved steganography algorithm to complete steganographic encapsulation; simultaneously, strongly encrypting the traceability data embedded in the invisible QR code to prevent tampering and counterfeiting; after successful transmission verification, uploading the steganographic encryption carrier and associated anti-counterfeiting data to a cloud-based traceability platform in real time through a secure channel; receiving, extracting, decrypting, and verifying the anti-counterfeiting information on the cloud and completing trusted storage; and allowing consumers to directly obtain complete product traceability information and authentic circulation records by scanning the QR code with a smart terminal, thereby achieving reliable verification of the authenticity and legality of the product's origin. The following is the specific information of a patent for an encryption and steganography-integrated product traceability method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of product traceability and information security technology, specifically relating to a product traceability method based on encryption and steganography fusion. Background Technology

[0002] Product traceability technology is a core technology for ensuring product quality and safety, regulating market order, and protecting consumer rights. It is widely used in various fields such as fresh produce agriculture, food processing, pharmaceutical distribution, and high-end consumer goods. However, with the rapid development of the commodity economy and the continuous upgrading of counterfeiting technologies, the limitations of traditional product traceability methods have become increasingly apparent. Problems such as tampering and forgery of traceability information, information leakage during transmission, and the disconnect between anti-counterfeiting and traceability seriously affect the credibility and practicality of traceability systems.

[0003] With the rapid development of the Internet of Things, big data, and cyberattack technologies, the security of product traceability information faces greater challenges. According to authoritative statistics, direct economic losses due to data breaches worldwide reached $68 billion in 2024, with data breaches involving product traceability systems accounting for over 30%, a problem particularly prominent in the fresh agricultural industry chain. Current technologies have not yet deeply integrated dynamic encryption technology with improved steganography algorithms, failing to achieve dual protection of traceability information through "encryption protection + covert transmission." They either focus solely on encryption while neglecting concealment, or solely on steganography while lacking encryption strength. Furthermore, the correlation between traceability data and anti-counterfeiting codes is insufficient, making it difficult to form a complete secure traceability system. Addressing the core pain points of invisible QR code traceability, existing technologies also lack effective protection strategies, failing to combine strong encryption, data steganography, and blockchain notarization technologies. This makes it impossible to ensure the integrity and immutability of QR code data transmission and storage, or to achieve real-time response for traceability verification. It cannot meet the high requirements of high-end products for traceability security and confidentiality, nor can it effectively address the risks of information leakage and tampering brought about by new types of cyberattacks. Summary of the Invention

[0004] The technical problem to be solved by this invention is to provide a product traceability method that integrates encryption and steganography. This method aims to solve the technical bottlenecks in existing product traceability technologies, such as the ease with which traceability information can be tampered with or forged, the risk of information leakage during transmission, and the lack of close integration between anti-counterfeiting and traceability. Its core innovation lies in the deep integration of dynamic key layered encryption technology with improved steganography algorithms to achieve dual protection of traceability information through "encryption protection + covert transmission", rather than simply applying encryption or steganography alone.

[0005] The technical solution adopted by this invention to solve the above-mentioned technical problems is as follows: a product traceability method combining encryption and steganography, comprising the following steps: S1: Information collection and preprocessing: Obtain the unique anti-counterfeiting code and traceability basic information of the product through the mini-program. Perform deduplication and noise reduction preprocessing on the obtained information to ensure the integrity and accuracy of the information. The traceability basic information includes product production information, processing information, logistics flow information and inspection and testing information. S2: Dual encryption processing. A dynamic key layered encryption algorithm is used to perform layered encryption processing on the unique anti-counterfeiting code of the product, generating an encrypted anti-counterfeiting code. At the same time, the traceability basic data embedded in the invisible QR code is strongly encrypted using the AES256 encryption algorithm combined with hash verification to prevent the traceability data from being tampered with or forged. As an information security technology for the invisible QR code, this step addresses the pain points of traditional QR code traceability data being easily intercepted, tampered with, and experiencing synchronization delays. The invisible QR code adopts a dual protection strategy of "strong encryption + data steganography". Product traceability data (production information, circulation nodes, etc.) is embedded in the invisible QR code. While being encrypted with AES-256, key verification information is steganographically written to the redundant code points of the QR code. S3: Steganography encapsulation process, embedding the encrypted anti-counterfeiting code obtained in step S2 into the preset transmission carrier image using an improved steganography algorithm to complete the steganography encapsulation and generate a steganography encrypted carrier. The improved steganography algorithm is based on the LSB algorithm optimization, which improves the concealment and anti-extraction ability of the steganography information, and does not affect the visual effect of the carrier image. S4: Secure transmission and verification. Before transmission, the steganographic encrypted carrier and the strongly encrypted traceability data obtained in step S2 are verified. After the verification is passed, the two are uploaded to the cloud traceability platform in real time through a TLS / SSL secure channel. During the data synchronization to the cloud platform, end-to-end encrypted transmission and blockchain evidence storage technology are combined to ensure the integrity and immutability of data transmission and storage. S5: Cloud decryption and trusted storage. After receiving the steganographic carrier and the strongly encrypted traceability data, the cloud traceability platform first extracts the encrypted anti-counterfeiting code from the steganographic carrier and decrypts it using the corresponding dynamic key layered decryption algorithm. Then, it decrypts and performs hash verification on the strongly encrypted traceability data. After the verification is passed, it completes the trusted storage of the traceability information and establishes a unique association between the anti-counterfeiting code and the traceability data. S6: Traceability Verification. Consumers scan the invisible QR code on the product using a smart terminal. The smart terminal sends a verification request to the cloud-based traceability platform. The cloud platform retrieves the corresponding complete traceability information based on the anti-counterfeiting code associated with the QR code, decrypts it, and sends the information back to the smart terminal. Consumers can then obtain complete traceability information and authentic circulation records of the product, achieving reliable verification of the authenticity and legality of the product's origin. During the scanning process, the terminal software verifies with the cloud platform in real time, achieving a real-time "scan-verify-feedback" response, solving the core problems of traditional QR code traceability such as "unreliable information and untimely feedback."

[0006] According to the above scheme, the specific steps in step S1 are as follows: The mini-program platform includes an information collection module that supports three collection methods: manual input, QR code scanning, and batch import. It retrieves the product's unique anti-counterfeiting code (using a 16-bit random character combination to ensure uniqueness) and basic traceability information. The collected information is preprocessed, using a data deduplication algorithm to remove duplicate information and a Gaussian filter to remove noise. Missing key information is highlighted and supplemented to ensure the completeness and accuracy of the traceability information. After preprocessing, a standardized information data package is generated for subsequent encryption. This traceability information specifically includes the product name, specifications, manufacturer, production date, processing technology, tracking number, transportation temperature, inspection and testing report number, and inspection results.

[0007] Furthermore, in step S2, the specific steps are as follows: The specific implementation of the dynamic key layered encryption algorithm is as follows: It adopts a layered encryption method of "basic key + dynamic factor". The basic key is generated using the RSA2048 algorithm, and the dynamic factor is generated by combining the last 8 characters of the product's unique anti-counterfeiting code, the current timestamp, and the device ID of the mini-program. The dynamic factor is updated every 10 minutes to realize the dynamic change of the key. The product's unique anti-counterfeiting code is divided into two layers. The first layer is encrypted with the basic key, and the second layer is encrypted with the dynamic factor combined with the basic key to generate an encrypted anti-counterfeiting code, which improves the encryption strength and prevents the key from being cracked. Strong encryption processing of traceability data within the invisible QR code: The traceability basic data preprocessed in step S1 is converted into a binary data stream and encrypted using the AES256 encryption algorithm to generate an encrypted traceability data stream. Simultaneously, SHA-256 hash operation is performed on the encrypted traceability data stream to generate a hash check value. The hash check value and the encrypted traceability data stream are embedded together in the invisible QR code to achieve anti-tampering and anti-forgery of the traceability data. The data integrity must be verified by the hash check value during subsequent decryption. At the same time, key verification information is hidden in the redundant code points of the QR code to further strengthen the dual protection of "strong encryption + data steganography" and avoid the pain point of traditional QR code traceability data being easily intercepted and tampered with.

[0008] Furthermore, in step S3, the specific steps are as follows: The preset transmission carrier image is a high-resolution real-shot image of the product itself (resolution no less than 1920×1080), avoiding the use of a single solid color image to improve the concealment of steganography. The improved steganography algorithm is based on the LSB (least significant bit) algorithm optimization, and the optimization points include: adopting adaptive steganography position selection to avoid the edges and texture-dense areas of the carrier image, and selecting areas with smooth pixel value changes to embed the encrypted anti-counterfeiting code; the embedded encrypted anti-counterfeiting code is encrypted in segments before steganography, with each segment being 8 bits long, and embedded into different pixel channels of the carrier image to further improve the anti-extraction capability; during the steganography process, the pixel values ​​at the embedding position are slightly adjusted to ensure that the visual effect of the carrier image does not change significantly. After steganography is completed, a steganography encrypted carrier is generated, and a steganography position index is also generated for subsequent cloud extraction.

[0009] Furthermore, in step S4, the specific steps are as follows: Pre-transmission verification: The integrity of the steganographic carrier is verified to check whether the carrier image has been tampered with. An image hash verification algorithm is used to generate a hash value for the steganographic carrier, which is compared with a preset hash value. The strongly encrypted traceability data is also verified to check the consistency between the hash verification value and the encrypted data stream. After the dual verification passes, a TLS / SSL secure transmission channel is established, a data transmission encryption protocol is set, and the transmitted data is encrypted in real time. At the same time, a breakpoint resume mechanism is adopted to ensure that the steganographic carrier and the strongly encrypted traceability data are uploaded to the cloud traceability platform in real time, avoiding data loss or leakage during transmission. During the synchronization process, end-to-end encrypted transmission and blockchain evidence storage technology are combined to further ensure the integrity and immutability of data transmission and storage, solving the problem of synchronization delay in traditional QR code traceability data.

[0010] Furthermore, in step S5, the specific steps are as follows: After receiving the steganographic carrier and the strongly encrypted traceability data, the cloud-based traceability platform first extracts the encrypted anti-counterfeiting code from the steganographic carrier based on the steganographic location index generated in step S3. It then calls a dynamic key layered decryption algorithm to first decrypt the second layer of the encrypted anti-counterfeiting code using the basic key, and then decrypt the first layer using the dynamic factor corresponding to the timestamp, obtaining the product's unique anti-counterfeiting code. Subsequently, it performs AES256 decryption on the strongly encrypted traceability data to obtain the basic traceability data stream. Simultaneously, it performs SHA-256 hashing on the decrypted data stream and compares the result with the hash verification value of the embedded QR code to verify data integrity. If the verification fails, storage is rejected and an error message is returned. After successful verification, the product's unique anti-counterfeiting code is uniquely associated with the basic traceability information and stored in the cloud-based encrypted database. Distributed storage combined with blockchain notarization technology ensures the credibility, traceability, and immutability of the traceability information. Access control is also implemented to prevent unauthorized access.

[0011] Furthermore, in step S6, the specific steps are as follows: Before products leave the factory, an invisible QR code embedding strongly encrypted traceability data is printed on the product packaging. The invisible QR code uses nano-level optical printing technology and is invisible to the naked eye under normal light. It requires a dedicated scanning module (supporting ultraviolet light scanning) on ​​a smart terminal to identify. Consumers open a dedicated scanning app on their smart terminals, scan the invisible QR code, and the smart terminal automatically extracts the encrypted information and hidden key verification information within the QR code, sends a verification request to the cloud traceability platform, and uploads the smart terminal device ID for identity verification. The cloud traceability platform matches the encrypted information associated with the QR code with the corresponding unique anti-counterfeiting code of the product, retrieves the complete traceability information associated with it, decrypts it, organizes it into a visual format, and feeds it back to the smart terminal, realizing a real-time "scan-verify-feedback" response. This solves the core problems of traditional QR code traceability, such as "unreliable information and untimely feedback." Consumers can intuitively view the entire traceability information and real circulation records of the product's production, processing, logistics, and inspection. If the traceability information is tampered with or forged, the cloud platform will send a verification failure message, achieving reliable verification of the authenticity and legality of the product's origin.

[0012] A computer storage medium storing a computer program executable by a computer processor, the computer program performing an encrypted steganography-integrated product traceability method.

[0013] The beneficial effects of this invention are as follows: 1. The present invention provides a product traceability method that integrates encryption and steganography. It adopts a dual protection strategy of deep integration of encryption and steganography, which breaks through the technical limitations of traditional single encryption or simple steganography and realizes dual protection of traceability information through encryption and covert transmission. It effectively solves the core pain points of easy information leakage and easy tampering in existing traceability technologies.

[0014] 2. This invention addresses the shortcomings of invisible QR code traceability by innovatively employing dual protection of "AES256 strong encryption + key verification information steganography" combined with blockchain evidence storage technology to ensure the immutability of traceability data within the QR code, the security of transmission, and the real-time synchronization, thus solving the problems of "unreliable information, untimely feedback, and synchronization delay" in traditional QR code traceability.

[0015] 3. This invention adopts a dynamic key hierarchical encryption algorithm. Through the design of "basic key + dynamic factor", the key is updated in real time, which greatly improves the encryption strength, avoids the defect of fixed key being easily cracked, and further enhances the security protection level of traceability information.

[0016] 4. This invention optimizes and improves the LSB steganography algorithm, combining adaptive steganography location selection and segmented steganography design. While ensuring the concealment and anti-extraction ability of steganographic information, it does not affect the visual effect of the carrier image, thus balancing security and practicality. At the same time, through full-process verification, trusted storage and real-time verification design, it achieves security, trustworthiness and efficiency in the entire product traceability chain, and is suitable for various product fields with high requirements for traceability security. Attached Figure Description

[0017] Figure 1 This is a flowchart of an embodiment of the present invention.

[0018] Figure 2 This is a schematic diagram comparing the steganographic encryption carrier and the original carrier image in an embodiment of the present invention; Figure 3 This is a schematic diagram of the secure transmission channel in an embodiment of the present invention; Figure 4 This is a schematic diagram of the decryption and storage process of the cloud-based traceability platform in an embodiment of the present invention; Figure 5 This is a schematic diagram of the intelligent terminal traceability and verification interface in an embodiment of the present invention. Detailed Implementation

[0019] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0020] See Figure 1 The specific steps of the product traceability method combining encryption and steganography of the present invention are as follows: Step 1: Information collection and preprocessing. Obtain the unique anti-counterfeiting code and basic traceability information of the product through the mini-program. Perform deduplication and noise reduction preprocessing on the obtained information to ensure the integrity and accuracy of the information. In step 1, this embodiment uses fresh agricultural products (strawberries) as the application scenario. An information collection module is built on the mini-program, supporting three collection methods: manual entry, barcode scanning entry, and batch import. The unique anti-counterfeiting code of the collected products adopts a 16-digit random character combination (e.g., 8A3F7B9D2E4C6G8H) to ensure that the anti-counterfeiting code of each product is unique and avoids duplication. The traceability basic information specifically includes: product name (strawberries), specifications (500g / box), manufacturer (XX Ecological Agriculture Co., Ltd.), production date (March 30, 2026), processing technology (hand-picked, low-temperature preservation treatment), logistics tracking number (YT9876543210), transportation temperature (0-5℃), inspection and testing report number (JY20260330001) and inspection results (qualified, no pesticide residue).

[0021] The collected information undergoes preprocessing: a hash deduplication algorithm is used to remove duplicate anti-counterfeiting codes and traceability information, avoiding redundancy; a Gaussian filtering algorithm is used to remove noise data from logistics temperature and inspection data, ensuring data accuracy; pop-up reminders are displayed for missing key information (such as production date and inspection results), requiring users to complete the information. After preprocessing, a standardized information data package is generated for subsequent encryption. This step differs from existing technologies where information collection is not standardized and preprocessing is simplistic. By using multiple collection methods and rigorous preprocessing, the integrity and accuracy of traceability information are ensured, laying the foundation for subsequent encryption and traceability.

[0022] Step 2: Double encryption processing. A dynamic key layered encryption algorithm is used to perform layered encryption processing on the unique anti-counterfeiting code of the product to generate an encrypted anti-counterfeiting code; at the same time, the traceability basic data embedded in the invisible QR code is strongly encrypted to prevent the traceability data from being tampered with or forged. In step 2, the specific implementation of the dynamic key hierarchical encryption algorithm is as follows: a hierarchical encryption method of "basic key + dynamic factor" is adopted. The basic key is generated by the RSA2048 algorithm and the key length is 2048 bits to ensure basic encryption strength. The dynamic factor is generated by combining the last 8 characters of the product's unique anti-counterfeiting code (2E4C6G8H), the current timestamp (e.g., 1711887600), and the mini-program device ID (e.g., DEV12345678). The dynamic factor is updated every 10 minutes to realize the dynamic change of the key and avoid the defect of fixed keys being easily cracked.

[0023] The product's unique anti-counterfeiting code (8A3F7B9D2E4C6G8H) is divided into two layers. The first layer (8A3F7B9D) is encrypted using a basic key to generate the first layer of encrypted data. The second layer (2E4C6G8H) is encrypted using a dynamic factor combined with the basic key to generate the second layer of encrypted data. The two layers of encrypted data are combined to generate the final encrypted anti-counterfeiting code (e.g., E3F5A7B9D2C4E6G8H1J3K5M7N9), which enhances the encryption strength and prevents the key from being cracked.

[0024] Strong encryption processing of traceability data within the invisible QR code: As an information security technology for invisible QR codes, this embodiment addresses the pain points of traditional QR code traceability data being easily intercepted, tampered with, and experiencing synchronization delays. The invisible QR code employs a dual protection strategy of "strong encryption + data steganography." The traceability basic data (production information, circulation nodes, etc.) preprocessed in step 1 is converted into a binary data stream and encrypted using the AES256 encryption algorithm. The encryption key is a randomly generated 32-bit character, generating an encrypted traceability data stream. Simultaneously, a SHA-256 hash operation is performed on the encrypted traceability data stream to generate a hash checksum (e.g., 5D7F9A3B1C2E4G6H8J0K2M4N6P8Q0). This hash checksum is embedded along with the encrypted traceability data stream into the invisible QR code. Key verification information is also steganographically written into redundant QR code points, achieving anti-tampering and anti-forgery of the traceability data. Subsequent decryption requires verification of data integrity using the hash checksum. If the data has been tampered with, the hash checksum will not match, thus rejecting verification. This step's dual encryption design differs from the shortcomings of single encryption in existing technologies. By combining "strong encryption + data steganography" for dual protection, it achieves hierarchical and dynamic encryption of anti-counterfeiting codes and traceability data, significantly improving information security and effectively avoiding the core pain points of traditional QR code traceability.

[0025] Step 3: Steganography encapsulation process. The encrypted anti-counterfeiting code obtained in Step 2 is embedded into the preset transmission carrier image using an improved steganography algorithm to complete the steganography encapsulation and generate a steganography encryption carrier. In step 3, the preset transmission carrier image is a high-resolution real-shot image of a strawberry (resolution 1920×1080). Choosing a real-shot image of the product itself as the carrier avoids using a single solid color image, improving the stealth capabilities. Figure 2 As shown in the figure, a is the original carrier image and b is the steganographic encrypted carrier. The two have no obvious visual difference and it is difficult to identify the steganographic information with the naked eye.

[0026] The improved steganography algorithm is based on LSB (Least Significant Bit) algorithm optimization. Optimizations include: employing adaptive steganography location selection; using edge detection algorithms to avoid edges and textured areas of the carrier image (such as strawberry stems and peel textures); selecting areas with gradual pixel value changes (such as uniform strawberry flesh areas) to embed the encrypted anti-counterfeiting code, ensuring the concealment of the steganographic information; segmenting the embedded encrypted anti-counterfeiting code for encryption before steganography, with each segment being 8 bits long; dividing the encrypted anti-counterfeiting code (E3F5A7B9D2C4E6G8H1J3K5M7N9) into 4 segments, embedding each segment into the RGB three pixel channels of the carrier image, further enhancing its resistance to extraction; during steganography, making minor ±1 adjustments to the pixel values ​​at the embedding positions to ensure no significant change in the visual effect of the carrier image; generating a steganography encrypted carrier after steganography, and simultaneously generating a steganography location index (recording the embedding position and channel of each encrypted anti-counterfeiting code segment) for subsequent cloud-based extraction. The improved steganography algorithm in this step differs from the existing simple LSB steganography algorithm in that it suffers from poor concealment and weak anti-extraction capabilities. Through adaptive position selection and segmented steganography, it achieves the covert transmission of encrypted anti-counterfeiting codes without affecting the normal use of the carrier image.

[0027] Step 4: Secure transmission and verification. Before transmission, the steganographic encryption carrier and the strongly encrypted traceability data obtained in Step 2 are verified. After the verification is passed, the two are uploaded to the cloud traceability platform in real time through a TLS / SSL secure channel. In step 4, the pre-transmission verification consists of two steps: First, the integrity of the steganographic encryption carrier is verified. An image hash verification algorithm (MD5) is used to generate a hash value for the steganographic encryption carrier, which is compared with the preset hash value of the original carrier image. If they match, it indicates that the carrier has not been tampered with. Second, the strongly encrypted traceability data is verified. The decrypted encrypted traceability data stream is subjected to SHA-256 hashing, and the result is compared with the hash verification value of the embedded QR code to ensure data integrity. After the dual verification passes, a TLS / SSL secure transmission channel is established, and the TLS 1.3 encryption protocol is set to encrypt the transmitted data in real time. A breakpoint resumption mechanism is also adopted. If a network interruption occurs during transmission, transmission can continue after the network is restored, preventing data loss or leakage during transmission. The secure transmission channel uses double-layer encryption protection to further enhance transmission security. Simultaneously, during data synchronization to the cloud platform, end-to-end encrypted transmission and blockchain notarization technology are combined to ensure the integrity and immutability of data transmission and storage, solving the problem of synchronization delay in traditional QR code traceability data. This step differs from existing technologies in that it involves simple transmission verification and lacks a secure channel. By using dual verification, a secure channel, and blockchain evidence storage technology, it ensures the security, integrity, and real-time nature of traceability information during transmission.

[0028] Step 5: Cloud decryption and trusted storage. After receiving the steganographic carrier and the strongly encrypted traceability data, the cloud traceability platform first extracts the encrypted anti-counterfeiting code from the steganographic carrier and decrypts it using the corresponding dynamic key layered decryption algorithm. Then, it decrypts and performs hash verification on the strongly encrypted traceability data. After the verification is passed, the trusted storage of the traceability information is completed. In step 5, the cloud-based traceability platform is built using high-performance servers, possessing data encryption storage, rapid decryption, and verification capabilities. Its decryption and storage process is as follows: Figure 4 As shown: First, based on the steganography location index generated in step 3, the encrypted anti-counterfeiting code in the steganography encryption carrier is extracted. The embedding position and channel of each segment of the encrypted anti-counterfeiting code are quickly located by the steganography location index to avoid blind extraction. Then, the dynamic key layered decryption algorithm is called. First, the second layer of the encrypted anti-counterfeiting code is decrypted by the basic key. Then, the first layer is decrypted by combining the dynamic factor of the corresponding timestamp (1711887600, which is consistent with the encryption time) to obtain the unique anti-counterfeiting code of the product (8A3F7B9D2E4C6G8H). Next, the strongly encrypted traceability data is decrypted using AES256. The corresponding 32-bit encryption key is input to obtain the basic traceability data stream. Simultaneously, a SHA-256 hash operation is performed on the decrypted data stream. The result is compared with the hash verification value of the embedded QR code (5D7F9A3B1C2E4G6H8J0K2M4N6P8Q0). If they match, the data has not been tampered with, and the verification passes. If the verification fails, the cloud platform will refuse to store the data and send a "Data abnormal, cannot be stored" message to the mini-program. After successful verification, the product's unique anti-counterfeiting code is uniquely associated with the basic traceability information and stored in the cloud's encrypted database. A distributed storage method, combined with blockchain notarization technology, distributes the data across multiple server nodes, ensuring the credibility, traceability, and immutability of the traceability information. Access control is also implemented, allowing only authorized users (mini-program administrators and consumers) to access the corresponding traceability information to prevent unauthorized access. This cloud-based processing step differs from existing technologies that suffer from simple decryption but insecure storage. By employing layered decryption, dual verification, encrypted storage, and blockchain notarization, it achieves trusted storage and secure management of traceability information, further enhancing the security of invisible QR code data.

[0029] Step 6: Traceability verification. Consumers scan the invisible QR code on the product using their smart terminals. The smart terminals send a verification request to the cloud traceability platform. The cloud platform retrieves the corresponding complete traceability information based on the anti-counterfeiting code associated with the QR code, decrypts it, and sends the information back to the smart terminals. In step 6, before the product leaves the factory, an invisible QR code containing strongly encrypted traceability data and steganographic key verification information is printed on the strawberry packaging box. The invisible QR code uses nanoscale optical printing technology and is 10mm×10mm in size. It cannot be recognized by the naked eye under normal light and requires a dedicated scanning module (supporting 365nm ultraviolet light scanning) of a smart terminal to identify. Consumers open a dedicated scanning applet on their smartphones, enable the ultraviolet scanning function, and scan the invisible QR code on the product packaging. The smart terminal automatically extracts the encrypted information and steganographic key verification information in the QR code, sends a verification request to the cloud traceability platform, and uploads the smart terminal device ID (e.g., PHONE12345678) for identity verification to prevent malicious verification.

[0030] After receiving a verification request, the cloud-based traceability platform matches the corresponding unique anti-counterfeiting code (8A3F7B9D2E4C6G8H) based on the encrypted and key verification information within the QR code. It then retrieves the associated complete traceability information, decrypts it, and organizes it into a visual format (text + image), feeding it back to the smart terminal. This achieves a real-time "scan-verify-feedback" response, solving the core problems of traditional QR code traceability such as "unreliable information and untimely feedback." Consumers can intuitively view the entire traceability process information for strawberries, including the manufacturer, production date, processing technology, logistics records, and inspection reports. Figure 5 As shown; if the traceability information is tampered with or forged, the cloud platform will provide a message that reads "Verification failed, product traceability information is abnormal, please purchase with caution", thus ensuring reliable verification of the authenticity and legality of the product's source.

[0031] The above embodiments are only used to illustrate the design concept and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications made based on the principles and design ideas disclosed in the present invention are within the protection scope of the present invention.

Claims

1. A product traceability method combining encryption and steganography, characterized in that: Includes the following steps: S1: Information collection and preprocessing: Obtain the unique anti-counterfeiting code and traceability basic information of the product through the mini-program. Perform deduplication and noise reduction preprocessing on the obtained information to ensure the integrity and accuracy of the information. The traceability basic information includes product production information, processing information, logistics flow information and inspection and testing information. S2: Dual encryption processing. A dynamic key layered encryption algorithm is used to perform layered encryption processing on the unique anti-counterfeiting code of the product, generating an encrypted anti-counterfeiting code. At the same time, the traceability basic data embedded in the invisible QR code is strongly encrypted, using the AES256 encryption algorithm combined with hash verification to prevent the traceability data from being tampered with or forged. Furthermore, a dual protection strategy of "strong encryption + data steganography" is adopted for the invisible QR code. Product traceability data (production information, circulation nodes, etc.) is embedded in the invisible QR code. While performing AES-256 encryption processing, key verification information is steganized into the redundant code points of the QR code. S3: Steganography encapsulation process, embedding the encrypted anti-counterfeiting code obtained in step S2 into the preset transmission carrier image using an improved steganography algorithm to complete the steganography encapsulation and generate a steganography encrypted carrier. The improved steganography algorithm is based on the LSB algorithm optimization, which improves the concealment and anti-extraction ability of the steganography information, and does not affect the visual effect of the carrier image. S4: Secure transmission and verification. Before transmission, the steganographic encrypted carrier and the strongly encrypted traceability data obtained in step S2 are verified. After the verification is passed, the two are uploaded to the cloud traceability platform in real time through a TLS / SSL secure channel. During the data synchronization to the cloud platform, end-to-end encrypted transmission and blockchain evidence storage technology are combined to ensure the integrity and immutability of data transmission and storage. S5: Cloud decryption and trusted storage. After receiving the steganographic carrier and the strongly encrypted traceability data, the cloud traceability platform first extracts the encrypted anti-counterfeiting code from the steganographic carrier and decrypts it using the corresponding dynamic key layered decryption algorithm. Then, it decrypts and performs hash verification on the strongly encrypted traceability data. After the verification is passed, it completes the trusted storage of the traceability information and establishes a unique association between the anti-counterfeiting code and the traceability data. S6: Traceability Verification. Consumers scan the invisible QR code on the product using a smart terminal. The smart terminal sends a verification request to the cloud-based traceability platform. The cloud platform retrieves the corresponding complete traceability information based on the anti-counterfeiting code associated with the QR code, decrypts it, and sends the information back to the smart terminal. Consumers can then obtain complete traceability information and authentic circulation records of the product, achieving reliable verification of the authenticity and legality of the product's origin. During the scanning process, the terminal software verifies with the cloud platform in real time, achieving a real-time "scan-verify-feedback" response, solving the core problems of traditional QR code traceability such as "unreliable information and untimely feedback." 2. The product traceability method combining encryption and steganography according to claim 1, characterized in that: The specific steps in step S1 are as follows: The mini-program platform has an information collection module that supports three collection methods: manual entry, QR code entry, and batch import. It obtains the product's unique anti-counterfeiting code (using a 16-bit random character combination to ensure uniqueness) and basic traceability information. The collected information is preprocessed by using a data deduplication algorithm to remove duplicate information, a Gaussian filtering algorithm to remove noise data, and reminders to supplement missing key information to ensure the completeness and accuracy of the basic traceability information. After preprocessing, a standardized information data packet is generated for subsequent encryption processing. The traceability basic information specifically includes product name, specifications, manufacturer, production date, processing technology, logistics tracking number, transportation temperature, inspection and testing report number, and inspection results.

3. The product traceability method combining encryption and steganography according to claim 1, characterized in that: The specific steps in step S2 are as follows: The specific implementation of the dynamic key layered encryption algorithm is as follows: It adopts a layered encryption method of "basic key + dynamic factor". The basic key is generated using the RSA2048 algorithm, and the dynamic factor is generated by combining the last 8 characters of the product's unique anti-counterfeiting code, the current timestamp, and the device ID of the mini-program. The dynamic factor is updated every 10 minutes to realize the dynamic change of the key. The product's unique anti-counterfeiting code is divided into two layers. The first layer is encrypted with the basic key, and the second layer is encrypted with the dynamic factor combined with the basic key to generate an encrypted anti-counterfeiting code, which improves the encryption strength and prevents the key from being cracked. Strong encryption processing of traceability data within the invisible QR code: The traceability basic data preprocessed in step S1 is converted into a binary data stream and encrypted using the AES256 encryption algorithm to generate an encrypted traceability data stream; simultaneously, SHA-256 hash operation is performed on the encrypted traceability data stream to generate a hash check value, which is then embedded into the invisible QR code along with the encrypted traceability data stream to achieve anti-tampering and anti-forgery of the traceability data. Subsequent decryption requires verification of data integrity through the hash check value; furthermore, key verification information is steganographically written into redundant code points of the QR code, further strengthening the dual protection of "strong encryption + data steganography" and avoiding the pain point of traditional QR code traceability data being easily intercepted and tampered with.

4. The product traceability method combining encryption and steganography according to claim 1, characterized in that: The specific steps in step S3 are as follows: The default transmission carrier image is a high-definition real shot of the product itself (resolution not less than 1920×1080), avoiding the use of a single solid color image to improve the concealment of steganography; The improved steganography algorithm is based on the LSB (least significant bit) algorithm optimization. The optimization points include: adopting adaptive steganography position selection, avoiding the edges and texture-dense areas of the carrier image, and selecting areas with gentle pixel value changes to embed the encrypted anti-counterfeiting code. The embedded encrypted anti-counterfeiting code is encrypted in segments before being steganized. Each segment is 8 bits long and is embedded into different pixel channels of the carrier image to further enhance its anti-extraction capability. During the steganography process, the pixel values ​​at the embedding positions are slightly adjusted to ensure that the visual effect of the carrier image does not change significantly. After the steganography is completed, a steganographic encrypted carrier is generated, and a steganographic position index is also generated for subsequent cloud extraction.

5. The product traceability method combining encryption and steganography according to claim 1, characterized in that: The specific steps in step S4 are as follows: Pre-transmission verification: The integrity of the steganographic carrier is verified to check whether the carrier image has been tampered with. An image hash verification algorithm is used to generate a hash value for the steganographic carrier, which is compared with a preset hash value. The strongly encrypted traceability data is also verified to check the consistency between the hash verification value and the encrypted data stream. After the dual verification passes, a TLS / SSL secure transmission channel is established, a data transmission encryption protocol is set, and the transmitted data is encrypted in real time. At the same time, a breakpoint resume mechanism is adopted to ensure that the steganographic carrier and the strongly encrypted traceability data are uploaded to the cloud traceability platform in real time, avoiding data loss or leakage during transmission. During the synchronization process, end-to-end encrypted transmission and blockchain evidence storage technology are combined to further ensure the integrity and immutability of data transmission and storage, solving the problem of synchronization delay in traditional QR code traceability data.

6. The product traceability method combining encryption and steganography according to claim 1, characterized in that: The specific steps in step S5 are as follows: After receiving the steganographic carrier and the strongly encrypted traceability data, the cloud-based traceability platform first extracts the encrypted anti-counterfeiting code from the steganographic carrier based on the steganographic location index generated in step S3. It then calls a dynamic key layered decryption algorithm to first decrypt the second layer of the encrypted anti-counterfeiting code using the basic key, and then decrypt the first layer using the dynamic factor corresponding to the timestamp, obtaining the product's unique anti-counterfeiting code. Subsequently, it performs AES256 decryption on the strongly encrypted traceability data to obtain the basic traceability data stream. Simultaneously, it performs SHA-256 hashing on the decrypted data stream and compares the result with the hash verification value of the embedded QR code to verify data integrity. If the verification fails, storage is rejected and an error message is returned. After successful verification, the product's unique anti-counterfeiting code is uniquely associated with the basic traceability information and stored in the cloud-based encrypted database. Distributed storage combined with blockchain notarization technology ensures the credibility, traceability, and immutability of the traceability information. Access control is also implemented to prevent unauthorized access.

7. The product traceability method combining encryption and steganography according to claim 1, characterized in that: The specific steps in step S6 are as follows: Before products leave the factory, an invisible QR code containing strongly encrypted traceability data is printed on the product packaging. The invisible QR code uses nano-level optical printing technology and cannot be recognized by the naked eye under normal light. It requires a special scanning module (supporting ultraviolet light scanning) on ​​a smart terminal to identify it. Consumers open a special scanning applet on their smart terminal, scan the invisible QR code, and the smart terminal automatically extracts the encrypted information and the hidden key verification information in the QR code, sends a verification request to the cloud traceability platform, and uploads the smart terminal device ID for identity verification. The cloud-based traceability platform matches the encrypted information associated with the QR code with the corresponding unique anti-counterfeiting code of the product, retrieves the complete traceability information associated with it, decrypts it, organizes it into a visual format, and feeds it back to the smart terminal, realizing a real-time "scan-verify-feedback" response. This solves the core problems of traditional QR code traceability, such as "unreliable information and untimely feedback." Consumers can intuitively view the entire process of product traceability information and real circulation records, including production, processing, logistics, and inspection. If the traceability information is tampered with or forged, the cloud platform will send a verification failure message, enabling reliable verification of the authenticity and legality of the product's origin.

8. A computer storage medium, characterized in that: It contains a computer program that can be executed by a computer processor, which performs a product traceability method that combines encryption and steganography as described in any one of claims 1 to 7.