Blockchain-based micro store electronic product traceability and anti-counterfeiting verification method
Patent Information
- Application Number
- CN202610836333.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-10
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]本发明的主要目的在于提供一种基于区块链的微商城电子产品溯源及防伪验证方法,旨在解决现有微商城电子产品溯源防伪技术存在中心化数据易篡改、传统物理标识易复制、缺乏基于硬件级物理特征的动态验证机制以及未结合多节点共识与隔离执行导致验证可信度低和安全风险高的技术问题
[0016]This invention provides a blockchain-based method for tracing and anti-counterfeiting verification of electronic products in a micro-e-commerce platform. The method uses the texture signal of the physical anti-counterfeiting label on the product packaging as a physical entropy source and employs a laser scanning texture modeling method to extract unique texture feature entropy values, achieving fingerprint-level identification of the physical entity of the product. This texture feature originates from the microscopic randomness of the manufacturing process, possessing inherent non-replicability and uniqueness, effectively preventing the counterfeiting or reuse of digital identifiers such as QR codes and labels, significantly enhancing the physical credibility of anti-counterfeiting verification. The extracted texture feature entropy values are hashed to generate a dynamic random verification digest, and combined with a consortium blockchain node mapping strategy to dynamically select the target consensus node, avoiding the security risks associated with fixed verification paths. This mechanism ensures that the verification process path triggered by each verification request is random and unpredictable, effectively resisting targeted attacks and node hijacking, and improving the overall security robustness of the system. By constructing isolated verification block instances on edge service nodes and automatically deploying and running the traceability and anti-counterfeiting verification logic based on smart contracts, the verification process is ensured to execute in an independent and closed environment, preventing external interference or data tampering. This design ensures the integrity and credibility of the verification process. It introduces a multi-consensus node collaborative operation verification contract, combining a consensus mechanism of weighted voting, abnormal node removal, and threshold determination to integrate and analyze the verification results of each node, generating a comprehensive credibility score for product traceability. This multi-node collaborative decision-making mechanism effectively reduces the impact of misjudgments or malicious behavior from a single node on the results, improving the accuracy of authenticity determination and system fault tolerance. By generating a blockchain-based traceability log covering the entire product lifecycle and storing its digital fingerprint on the blockchain in a distributed ledger, it ensures that data from production, distribution, to consumption is authentic, complete, and tamper-proof. Consumers can obtain visualized verification reports in real time through a query channel, enhancing information transparency and user trust, while providing regulatory agencies with an auditable traceability evidence chain. Upon identifying counterfeit products, the system automatically executes transaction interception and merchant alerts, forming a closed-loop handling mechanism that can promptly block the transaction process of counterfeit goods, reduce economic losses and brand reputation risks, and improve the risk response efficiency and governance capabilities of the micro-mall platform.
Smart Images

Figure CN122596972A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of micro-store technology, and in particular to a blockchain-based method for tracing and verifying the authenticity of electronic products in micro-stores. Background Technology
[0002] With the rapid development of e-commerce, WeChat mini-programs, as an emerging mobile social retail model, are widely used for the sale of high-value goods such as electronic products. However, due to the complexity of the supply chain and the fragmentation of distribution channels, the phenomenon of counterfeit and substandard electronic products entering legitimate WeChat mini-program platforms through illegal channels is becoming increasingly serious, severely damaging consumer rights and brand reputation. Traditional product traceability systems mostly rely on centralized databases to record product flow information, which suffers from problems such as data tampering, opaque traceability information, and weak anti-counterfeiting verification mechanisms, making it difficult to effectively cope with the challenges of high-counterfeiting technologies. At the same time, existing anti-counterfeiting methods such as QR codes and RFID tags are easily copied or reused, lacking a security mechanism deeply bound to real physical characteristics, resulting in insufficient credibility of anti-counterfeiting verification.
[0003] Blockchain technology, with its decentralized, immutable, and traceable characteristics, offers a new technological path for product traceability and anti-counterfeiting. However, most current blockchain-based traceability systems only store product information on the chain, lacking a dynamic verification mechanism for the authenticity of the physical product. Furthermore, the verification process does not fully integrate hardware-level physical characteristics with multi-node consensus decision-making, leaving the system vulnerable to security risks when facing forged data or malicious nodes. In addition, most systems fail to automate and isolate the verification process, making it difficult to guarantee the independence and security of the verification logic.
[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this invention is to provide a blockchain-based method for tracing and verifying the authenticity of electronic products in a micro-mall. This method aims to address the technical problems of existing micro-mall electronic product traceability and anti-counterfeiting technologies, such as the ease of tampering with centralized data, the ease of copying traditional physical identifiers, the lack of a dynamic verification mechanism based on hardware-level physical characteristics, and the low reliability and high security risks resulting from the failure to combine multi-node consensus and isolated execution.
[0006] To achieve the above objectives, this invention provides a blockchain-based method for tracing and verifying the authenticity of electronic products in a micro-e-commerce platform. The method includes: Collect raw data on the entire chain of electronic products traceability in the WeChat store, compare product identification information with predefined counterfeit product characteristic rules, identify potential suspicious counterfeit products, trigger traceability verification logic, and generate traceability data of products to be verified. Based on the traceability data of the products to be verified, the texture signal of the physical anti-counterfeiting label on the product packaging is collected as the physical entropy source, and the gray-level offset parameter of the two-dimensional pixel sequence of the texture is calculated by using the laser scanning texture modeling method, and the texture feature entropy value is extracted. The texture feature entropy value is hashed to generate a dynamic random verification digest. Based on the dynamic random verification digest and the preset consortium blockchain node mapping strategy rules, the mapping rules are calculated to obtain the target blockchain consensus node sequence number. Based on the target blockchain consensus node sequence number, an isolated verification block instance is constructed on the edge service node of the micro-store through a smart contract deployment interface. The list of products to be verified is then input into the scheduling mechanism of the isolated verification block instance for filtering, and the corresponding product traceability and anti-counterfeiting verification contract is obtained. The traceability and anti-counterfeiting verification contract is run by multiple alliance consensus nodes within the isolated verification block instance, and the comprehensive credibility score of product traceability is judged based on the judgment threshold in the preset multi-node consistency consensus mechanism, thereby generating the product authenticity verification status. The system intercepts transactions and issues merchant alerts for verified counterfeit products, creating a preliminary traceability record. It then aggregates the full-chain flow node information and verification process information from the preliminary traceability record and verification result set to generate a blockchain-based traceability log covering the entire product lifecycle.
[0007] Optionally, generating the product traceability data to be verified includes: Collect transaction data of goods in the micro-store, circulation logs of each node in the supply chain, and product scanning information from the user end to generate raw data for the full-chain traceability of electronic products. Then, perform format normalization processing to generate a structured product traceability feature dataset. The structured product traceability feature dataset is matched with predefined counterfeit feature rules to identify potentially suspicious counterfeit products, trigger traceability verification logic, and generate traceability data for products to be verified.
[0008] Optionally, the extraction of texture feature entropy values includes: Based on the traceability data of the product to be verified, the high-definition optical acquisition module of the user's scanning terminal is activated to collect the physical anti-counterfeiting texture signal of the product; The texture feature signal is denoised and sharpened, and a pixel mesh modeling method is used to convert the denoised and sharpened texture signal into a two-dimensional pixel sequence of texture distribution. By using a laser texture feature modeling method, the grayscale offset parameters of the two-dimensional pixel sequence of texture distribution are calculated, and the texture feature entropy value is extracted.
[0009] Optionally, obtaining the target blockchain consensus node sequence number includes: The texture feature entropy value is calculated using the SHA-256 hash function to generate an initial hash value, and then a second perturbation process is performed in combination with the product batch number to obtain a dynamic random verification digest. Based on the dynamic random verification digest and combined with the preset consortium blockchain consensus node mapping strategy rules, a weighted reputation value scheduling algorithm is used to calculate the mapping rules and obtain the target blockchain consensus node sequence number.
[0010] Optionally, obtaining the traceability and anti-counterfeiting verification contract for the corresponding product includes: Feature extraction algorithms are used to extract product brand, model, and batch characteristic parameters from the product traceability data to be verified. By matching the corresponding product registration number in the blockchain product evidence database using product feature parameters, a list of product identifiers to be verified is generated. Based on the target consensus node sequence number, an isolated verification block instance is constructed on the edge service node of the micro-store through a smart contract deployment interface; The list of product identifiers to be verified is input into the scheduling mechanism of the isolated verification block instance for filtering, and the corresponding product traceability and anti-counterfeiting verification contract is obtained.
[0011] Optionally, generating a product authenticity verification status includes: The traceability and anti-counterfeiting verification contract is distributed to multiple consortium consensus nodes within the isolated verification block instance, and the traceability and anti-counterfeiting verification contract is run separately to generate node verification result data. The verification result data of multiple consortium consensus nodes are then aggregated to form a verification result set. Based on the statistical characteristics of the verification result set, a consensus mechanism is formed by setting a threshold, designing a voting mechanism, and using a Byzantine node detection method to set a judgment threshold, voting rules, and an abnormal node removal strategy. Based on the voting rules and abnormal node removal strategy in the consensus mechanism, the verification result set is weighted and statistically integrated to obtain the comprehensive credibility score of product traceability. Based on the judgment threshold in the consensus mechanism, the comprehensive credibility score of product traceability is judged, and the authenticity verification status of the product is generated.
[0012] Optionally, the generation of blockchain-based evidence storage and traceability logs covering the entire lifecycle of a product includes: The product authenticity verification status is used as input, matched with a predefined micro-mall transaction control rule library, to identify the corresponding transaction interception and merchant alarm operation instructions, and to form a preliminary traceability and handling record. By summarizing the information on all links of the traceability and processing nodes and the verification process information from the preliminary traceability and processing records and verification results, a blockchain-based traceability log covering the entire life cycle of the product is generated.
[0013] Optionally, after generating the blockchain-based evidence storage and traceability log covering the entire lifecycle of the product, the method further includes: Semantic encryption is applied to the blockchain-based evidence storage and traceability logs covering the entire product lifecycle to generate an unalterable digital fingerprint; The digital fingerprint is broadcast to all nodes in the blockchain network for consensus synchronization and stored in the Merkle tree structure of the distributed ledger; A user query channel is established to receive traceability verification requests from end users. The digital fingerprint in the distributed ledger is automatically retrieved and decrypted through a smart contract for comparison, generating and displaying a visualized traceability verification report.
[0014] Furthermore, to achieve the above objectives, the present invention also provides a blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification device. The device includes: a memory, a processor, and a blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification program stored on the memory and executable on the processor. The blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification program is configured to implement the steps of the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described above.
[0015] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification program. When the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification program is executed by a processor, it implements the steps of the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described above.
[0016] This invention provides a blockchain-based method for tracing and anti-counterfeiting verification of electronic products in a micro-e-commerce platform. The method uses the texture signal of the physical anti-counterfeiting label on the product packaging as a physical entropy source and employs a laser scanning texture modeling method to extract unique texture feature entropy values, achieving fingerprint-level identification of the physical entity of the product. This texture feature originates from the microscopic randomness of the manufacturing process, possessing inherent non-replicability and uniqueness, effectively preventing the counterfeiting or reuse of digital identifiers such as QR codes and labels, significantly enhancing the physical credibility of anti-counterfeiting verification. The extracted texture feature entropy values are hashed to generate a dynamic random verification digest, and combined with a consortium blockchain node mapping strategy to dynamically select the target consensus node, avoiding the security risks associated with fixed verification paths. This mechanism ensures that the verification process path triggered by each verification request is random and unpredictable, effectively resisting targeted attacks and node hijacking, and improving the overall security robustness of the system. By constructing isolated verification block instances on edge service nodes and automatically deploying and running the traceability and anti-counterfeiting verification logic based on smart contracts, the verification process is ensured to execute in an independent and closed environment, preventing external interference or data tampering. This design ensures the integrity and credibility of the verification process. It introduces a multi-consensus node collaborative operation verification contract, combining a consensus mechanism of weighted voting, abnormal node removal, and threshold determination to integrate and analyze the verification results of each node, generating a comprehensive credibility score for product traceability. This multi-node collaborative decision-making mechanism effectively reduces the impact of misjudgments or malicious behavior from a single node on the results, improving the accuracy of authenticity determination and system fault tolerance. By generating a blockchain-based traceability log covering the entire product lifecycle and storing its digital fingerprint on the blockchain in a distributed ledger, it ensures that data from production, distribution, to consumption is authentic, complete, and tamper-proof. Consumers can obtain visualized verification reports in real time through a query channel, enhancing information transparency and user trust, while providing regulatory agencies with an auditable traceability evidence chain. Upon identifying counterfeit products, the system automatically executes transaction interception and merchant alerts, forming a closed-loop handling mechanism that can promptly block the transaction process of counterfeit goods, reduce economic losses and brand reputation risks, and improve the risk response efficiency and governance capabilities of the micro-mall platform. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating an embodiment of the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method of the present invention. Figure 2 This is a flowchart illustrating another embodiment of the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method of the present invention.
[0018] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0019] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0020] Reference Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method of the present invention, which presents an embodiment of the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method of the present invention.
[0021] In one embodiment, the blockchain-based micro-store electronic product traceability and anti-counterfeiting verification method includes: Step S100: Collect raw data on the entire supply chain traceability of electronic products in the micro-store, compare product identification information with predefined counterfeit product characteristic rules, identify potential suspicious counterfeit products, trigger traceability verification logic, and generate traceability data of products to be verified.
[0022] The original data for the full-chain traceability of electronic products in the WeChat mini-program can be a collection of original business and status data recording each stage of the electronic product's production, warehousing, logistics, and sales. This data can provide basic data support for subsequent counterfeit product identification and traceability verification. In this embodiment, the original data for the full-chain traceability of electronic products in the WeChat mini-program can be automatically collected from operation logs, transaction records, and product status information at each node through the WeChat mini-program platform's connection with the supply chain system. Predefined counterfeit product characteristic rules can be a set of structured judgment conditions used to identify suspicious products. These rules can be used to initially screen products that may be counterfeit and trigger a deep verification process. For example, predefined counterfeit product characteristic rules may include, but are not limited to, rules for identifying abnormalities, rules for abnormal distribution paths, and rules for price deviations. Product identification information can be digital or physical coding information used to uniquely identify electronic products. This information can be used as a basic field for product identification and compared with counterfeit product characteristic rules. Furthermore, product identification information may include, but is not limited to, QR codes, serial numbers, and RFID tag content.
[0023] Suspicious counterfeit goods can be product instances marked as potentially counterfeit after preliminary rule matching, and can be used as input to trigger deep physical anti-counterfeiting verification. In one exemplary embodiment, suspicious counterfeit goods can be generated through collaborative determination using predefined counterfeit feature rules and product identification information. The product traceability data to be verified can be a data package containing the entire chain information of the suspicious counterfeit goods and the verification context, which can be used to provide structured input for subsequent physical feature collection and blockchain verification. In a specific embodiment, the product traceability data to be verified can be automatically generated and encapsulated by the traceability verification logic after identifying suspicious counterfeit goods.
[0024] Collecting raw data on the entire supply chain traceability of electronic products in the WeChat mini-program store can be achieved by automatically synchronizing business data from each stage within the mini-program store and its supply chain system. Furthermore, this data collection can be implemented through scheduled system retrieval or event-driven real-time push, thereby building a complete foundation of commodity circulation data and supporting subsequent counterfeit product identification. Comparing product identification information with predefined counterfeit feature rules can involve pattern matching between the product identification information and a pre-defined rule base. For example, this comparison can be achieved through a rule engine executing Boolean logic judgments or fuzzy matching algorithms, thus achieving the technical effect of preliminary screening of high-risk products. Identifying potentially suspicious counterfeit products can be achieved by marking a product as suspicious when its identification information meets any counterfeit feature rule. Further, identifying potentially suspicious counterfeit products can be achieved by setting rule hit thresholds or using multi-rule combination trigger mechanisms, thereby narrowing down the range of products requiring in-depth verification and improving system efficiency. Triggering the traceability verification logic and generating traceability data for products to be verified can be achieved by calling the verification engine and encapsulating the entire supply chain information of suspicious products into a structured data packet. In one exemplary embodiment, triggering the traceability verification logic and generating traceability data for the product to be verified can be achieved by asynchronously triggering the verification task through a message queue and generating a standardized JSON data packet, thereby achieving the technical effect of initiating the physical anti-counterfeiting verification process and preparing the necessary input data.
[0025] Step S200: Based on the traceability data of the product to be verified, the texture signal of the physical anti-counterfeiting mark on the product packaging is collected as the physical entropy source, and the grayscale offset parameter of the two-dimensional pixel sequence of the texture is calculated by using the laser scanning texture modeling method to extract the texture feature entropy value.
[0026] The physical anti-counterfeiting label on the product packaging can be a physical area with a microscopic random texture structure attached to the surface of the product packaging. It can serve as a non-replicable physical entropy source to generate unique anti-counterfeiting features. In this embodiment, the physical anti-counterfeiting label on the product packaging can form a surface texture with natural randomness through a special process during the product production stage. For example, the physical anti-counterfeiting label on the product packaging can include, but is not limited to, laser-etched texture areas, inkjet random spot areas, and embossed microstructure areas. The texture signal can be the original image data obtained by optically scanning the physical anti-counterfeiting label on the product packaging, and can be used as the input source for extracting the texture feature entropy value. Furthermore, the texture signal can be non-contactly sampled from the physical anti-counterfeiting label using a high-precision laser scanning device. The physical entropy source can be a signal source with high entropy characteristics originating from the randomness of the manufacturing process in the physical world, and can be used to provide unpredictable and non-replicable initial randomness to support the uniqueness of the anti-counterfeiting feature. In a specific embodiment, the physical entropy source can be the texture signal of the physical anti-counterfeiting label on the product packaging.
[0027] Laser scanning texture modeling methods can be processing flows that digitally model surface microstructures using laser scanning technology, transforming physical textures into computationally computable digital feature representations. Exemplarily, laser scanning texture modeling methods can include, but are not limited to, one or more of two-dimensional grayscale modeling, three-dimensional topography reconstruction, and multispectral texture analysis. The texture two-dimensional pixel sequence can be a sequence of pixel grayscale values arranged in spatial order in a two-dimensional image formed after laser scanning, serving as the basic data structure for calculating grayscale offset parameters. In an exemplary embodiment, the texture two-dimensional pixel sequence can be a normalized image matrix output by the laser scanning texture modeling method. The grayscale offset parameter can be a statistical measure describing the degree of grayscale variation in adjacent or local regions within the texture two-dimensional pixel sequence, used to quantify the microscopic randomness of the texture and generate highly discriminative feature entropy values. Furthermore, the grayscale offset parameter can be obtained through local variance calculation, gradient magnitude statistics, wavelet coefficient energy distribution, etc. The texture feature entropy value can be an information entropy value characterizing the intensity of texture randomness, calculated based on the grayscale offset parameter, and can be used as a unique fingerprint of a physical product for anti-counterfeiting verification. In one specific embodiment, the texture feature entropy value can be calculated by performing information entropy calculation on the grayscale offset parameter, reflecting the non-replicability of the microstructure during the manufacturing process.
[0028] Collecting the texture signal of the physical anti-counterfeiting label on product packaging as a physical entropy source can be achieved by using a laser scanning device to perform high-precision imaging of a specified physical area. Furthermore, collecting the texture signal of the physical anti-counterfeiting label as a physical entropy source can be achieved by using line laser scanning for line-by-line sampling or by using a planar laser array to capture the entire label area at once, thereby achieving the technical effect of obtaining non-replicable physical features originating from manufacturing randomness. Calculating the gray-level offset parameter of the two-dimensional pixel sequence of the texture using laser scanning texture modeling methods can be achieved by performing local gray-level difference analysis on the scanned image and extracting statistical features. For example, calculating the gray-level offset parameter of the two-dimensional pixel sequence of the texture using laser scanning texture modeling methods can be achieved by calculating the pixel standard deviation within a sliding window or by calculating the histogram of the difference distribution of adjacent pixel pairs, thereby achieving the technical effect of quantifying the microscopic randomness of the texture and providing a basis for entropy value calculation. Extracting the texture feature entropy value can be achieved by applying the information entropy formula based on the gray-level offset parameter. In an exemplary embodiment, the extraction of the texture feature entropy value can be achieved by using the Shannon entropy formula to calculate global randomness or by using sample entropy to evaluate sequence complexity, thereby achieving the technical effect of generating a unique fingerprint of the physical entity of the product.
[0029] Step S300: Hash the texture feature entropy value to generate a dynamic random verification digest, and calculate the mapping rule based on the dynamic random verification digest and the preset consortium blockchain node mapping strategy rules to obtain the target blockchain consensus node sequence number.
[0030] The hashing process can be a one-way cryptographic function operation that maps input data of arbitrary length to a fixed-length digest. It can be used to irreversibly compress texture feature entropy values to generate verification digests that can be used for node mapping. The dynamic random verification digest can be a digest value uniquely determined for each verification, generated by hashing texture feature entropy values. It can be used as the basis for dynamic selection of consortium blockchain nodes, ensuring unpredictable verification paths. In one specific embodiment, the dynamic random verification digest can be generated by hashing texture feature entropy values and used for mapping rule calculation. The consortium blockchain node mapping strategy rule can be a mapping logic that defines how to dynamically select consensus nodes based on the verification digest. It can be used to avoid fixed verification paths and improve the system's resistance to attacks. Furthermore, the consortium blockchain node mapping strategy rule can include, but is not limited to, hash modulo round-robin, consistent hash sharding, and random seed perturbation selection. The mapping rule calculation can be a node selection operation performed based on the dynamic random verification digest and the consortium blockchain node mapping strategy rule. It can be used to output the target blockchain consensus node sequence number, realizing dynamic verification paths. In an exemplary embodiment, the mapping rule calculation can take the dynamic random verification digest as input and substitute it into a preset mapping strategy rule for mathematical operations. The target blockchain consensus node sequence number can be a unique identifier of the consensus node participating in this verification, determined by mapping rules. It can be used to specify the consortium blockchain node that executes the verification contract, thus achieving path randomization. For example, the target blockchain consensus node sequence number can be calculated and output by mapping rules, and used to construct the isolated verification block instance.
[0031] The dynamic random verification digest is generated by hashing the texture feature entropy value. This can be achieved by inputting the texture feature entropy value into a cryptographic hash function and outputting a fixed-length digest. Furthermore, the dynamic random verification digest can be generated using SHA-256 to generate a 256-bit digest or BLAKE2 to generate a variable-length digest, thus achieving irreversible entropy compression and supporting subsequent dynamic node mapping. Mapping rules are calculated based on the dynamic random verification digest and a pre-defined consortium blockchain node mapping strategy. This can be achieved by substituting the verification digest into the mapping strategy rules and performing mathematical operations. In a specific embodiment, the mapping rule calculation based on the dynamic random verification digest and the pre-defined consortium blockchain node mapping strategy can be implemented by taking the modulo of the digest and mapping it to a node list index, or by using the digest as a random seed to select a subset of nodes, thus achieving dynamic and unpredictable verification paths. The target blockchain consensus node sequence number is obtained by outputting the result of the mapping rule calculation, i.e., the specific node identifier. For example, the target blockchain consensus node sequence number can be obtained by returning an integer index or a node public key identifier, thus determining the execution node for this verification task and avoiding the risks of fixed paths.
[0032] Step S400: Based on the target blockchain consensus node sequence number, construct an isolated verification block instance through a smart contract deployment interface on the micro-store edge service node, and input the list of product identifiers to be verified into the scheduling mechanism of the isolated verification block instance for filtering, thereby obtaining the traceability and anti-counterfeiting verification contract for the corresponding product.
[0033] The micro-mall edge service node can be a service unit deployed at the edge of the micro-mall network, possessing local computing and blockchain interaction capabilities. It can be used to host isolated verification block instances, achieving a low-latency, highly secure verification execution environment. In an exemplary embodiment, the micro-mall edge service node can be deployed as a lightweight service node close to the user or merchant using an edge computing architecture. The smart contract deployment interface can be a standard call interface for publishing and activating smart contracts in the blockchain environment, supporting the automatic loading of verification logic in the isolated verification block instance. The isolated verification block instance can be a closed execution environment temporarily built on the edge service node, independently running verification logic, ensuring the verification process is not subject to external interference and guaranteeing logical integrity and data security. In a specific embodiment, the isolated verification block instance can be instantiated on the edge node corresponding to the target blockchain consensus node sequence number through the smart contract deployment interface. Furthermore, the isolated verification block instance can receive a list of product identifiers to be verified and run a traceability and anti-counterfeiting verification contract. The list of product identifiers to be verified can be a set of product identifiers in the current batch that need anti-counterfeiting verification, which can be used as input to the isolated verification block instance scheduling mechanism to filter corresponding verification contracts. In one exemplary embodiment, the list of product identifiers to be verified can be extracted and formatted from the product traceability data. The scheduling mechanism can be control logic managing the allocation of verification tasks and contract calls within an isolated verification block instance, and can be used to match and load the corresponding traceability and anti-counterfeiting verification contract based on the product identifier. Further, the scheduling mechanism can employ methods such as searching contracts based on hash indexes or matching contracts based on metadata tags. The traceability and anti-counterfeiting verification contract can be a smart contract program encapsulating the logic for determining the authenticity of products, and can be used to perform physical feature comparison and credibility calculation in an isolated environment. In a specific embodiment, the traceability and anti-counterfeiting verification contract can be pre-deployed on a consortium blockchain and dynamically invoked by the scheduling mechanism based on the product identifier.
[0034] Constructing an isolated verification block instance on the edge service node of the micro-mall via a smart contract deployment interface can be achieved by calling the deployment interface to start a closed execution environment on a specified edge node. Furthermore, constructing the isolated verification block instance on the edge service node via a smart contract deployment interface can be based on container technology to build an isolated sandbox or on a TEE trusted execution environment to build a hardware-level isolation implementation, thereby achieving the technical effect of creating an independent, tamper-proof verification execution space. The list of product identifiers to be verified is input into the scheduling mechanism of the isolated verification block instance for filtering, which can be achieved by passing the product identifiers to the scheduling module to match the corresponding verification contract. For example, the filtering of the list of product identifiers to be verified can be achieved by passing the identifier list through a RESTful API or an internal message bus, thereby achieving the technical effect of on-demand loading and precise execution of verification logic. Obtaining the traceability and anti-counterfeiting verification contract for the corresponding product can be achieved by the scheduling mechanism retrieving and loading a matching smart contract from the contract library. In one exemplary embodiment, the traceability and anti-counterfeiting verification contract for the corresponding product can be obtained through contract name hash matching or brand-model metadata query, thereby achieving the technical effect of ensuring that the verification logic is consistent with the product type or brand strategy.
[0035] Step S500: Run the traceability and anti-counterfeiting verification contract through multiple alliance consensus nodes within the isolated verification block instance, and determine the comprehensive credibility score of product traceability based on the judgment threshold in the preset multi-node consistency consensus mechanism to generate the product authenticity verification status.
[0036] In this context, a multi-consortium consensus node can be a collection of multiple consortium blockchain member nodes participating in the same verification task. These nodes can collaboratively execute verification contracts and provide distributed verification results to support consensus decisions. In one specific embodiment, the multi-consortium consensus nodes can run traceability and anti-counterfeiting verification contracts in parallel within isolated verification block instances. The multi-node consensus mechanism can be a decision rule system that integrates the verification results of multiple nodes to reach a consensus judgment. This can be used to reduce the impact of errors or malicious behavior by a single node on the final result. For example, the multi-node consensus mechanism can include, but is not limited to, weighted voting mechanisms, abnormal node removal mechanisms, and threshold judgment mechanisms. The judgment threshold can be a critical value used to determine whether the comprehensive credibility score of product traceability reaches the genuine product standard, and can be used as a quantitative basis for determining authenticity. Furthermore, the judgment threshold can adopt static preset thresholds, dynamic adaptive thresholds, quantile thresholds based on historical data distribution, etc. The comprehensive credibility score of product traceability can be a quantitative score representing the authenticity of the product, generated by the fusion of verification results from multiple consortium consensus nodes, and can be used as a direct basis for generating the product authenticity verification status. In one exemplary embodiment, the comprehensive credibility score for product traceability can be weighted and fused based on a multi-node consensus mechanism, merging the local scores output by each node. The product authenticity verification status can be a conclusion about the product's authenticity derived from comparing the credibility score with a judgment threshold, which can be used to determine whether to execute transaction interception and alarm operations. For example, the product authenticity verification status may include, but is not limited to, genuine product confirmed, counterfeit product confirmed, and pending verification status.
[0037] Running a traceability and anti-counterfeiting verification contract by multiple consensus nodes within an isolated verification block instance allows multiple consensus nodes to execute the same verification contract in parallel, outputting partial verification results. Furthermore, running the traceability and anti-counterfeiting verification contract by multiple consensus nodes within an isolated verification block instance can be achieved by all nodes synchronously executing the same contract or by nodes grouping to execute differentiated verification sub-tasks, thereby achieving distributed verification and enhancing the reliability of the results. Determining the overall credibility score of product traceability based on the preset judgment threshold in the multi-node consensus mechanism can be achieved by comparing the fused credibility score with the threshold to determine whether it meets the standard. In a specific embodiment, determining the overall credibility score of product traceability based on the preset judgment threshold in the multi-node consensus mechanism can be achieved by setting 80% as the genuine product threshold and combining it with a weighted average of node weights, thereby generating a clear conclusion on authenticity and supporting subsequent decision-making. Generating the product authenticity verification status can output a genuine product, counterfeit product, or pending verification status based on the judgment result. For example, generating the product authenticity verification status can be achieved by outputting a three-state result through state machine transition logic, thereby providing a decision-making basis for transaction interception and alarms.
[0038] Step S600: Transaction interception and merchant alert operations are performed on the verified counterfeit product status to form a preliminary traceability and handling record. The preliminary traceability and handling record and the full-link flow node information and verification process information in the verification result set are summarized to generate a blockchain evidence storage traceability log covering the entire life cycle of the product.
[0039] The counterfeit status can refer to a specific situation in the product authenticity verification process where the product is determined to be counterfeit or substandard. This status can be used to trigger interception and alert actions in the closed-loop handling mechanism. In one exemplary embodiment, the counterfeit status can be derived from a situation in the product authenticity verification process that meets the counterfeit criteria. Transaction interception can be the operation of preventing payment or shipment of related orders after counterfeit products are identified. This can be used to promptly block the circulation of counterfeit goods and reduce consumer losses. Further, transaction interception can involve freezing order funds, canceling logistics dispatch, and rolling back transaction status. Merchant alerting can be the act of sending a counterfeit risk warning to the involved merchant. This can be used to urge merchants to conduct self-inspections and cooperate with platform governance. For example, merchant alerting can use in-site notifications, SMS alerts, API callback warnings, etc. The preliminary traceability handling record can be the initial log recording the interception and alerting operations performed after counterfeit product identification. This log can be used as a basic component for generating a complete traceability log. In one specific embodiment, the preliminary traceability handling record can be automatically generated after executing transaction interception and merchant alerting operations. The verification result set can be a data set containing all intermediate and final results during this verification process, which can be used to provide a complete data source for generating blockchain evidence storage and traceability logs. For example, the verification result set may include, but is not limited to, the original output of node verification, fusion score, authenticity status, etc.
[0040] The end-to-end flow node information can be a complete trajectory of the participants and operation records at each stage of a product's production to consumption, which can be used to demonstrate the traceability of the entire product circulation process. In an exemplary embodiment, the end-to-end flow node information can be extracted and structured from the original data of the end-to-end traceability of electronic products in the micro-store. The verification process information can be the operation logs of node selection, contract execution, consensus decision-making, etc., involved in this anti-counterfeiting verification process, which can be used to prove the compliance and immutability of the verification process. Furthermore, the verification process information can include, but is not limited to, one or more of node mapping logs, isolated instance creation logs, and multi-node voting records. The blockchain evidence storage and traceability log can be a structured log that integrates disposal records, verification results, flow information, and process information, which can be used as an immutable chain of evidence for the entire product lifecycle, supporting consumer inquiries and regulatory audits. In a specific embodiment, the blockchain evidence storage and traceability log can generate digital fingerprints from the log content and store them on the blockchain in a distributed ledger.
[0041] Transaction interception and merchant alerting for verified counterfeit product status can involve freezing transactions via the order system interface and sending risk notifications to merchants. Furthermore, transaction interception and merchant alerting for verified counterfeit product status can involve immediately terminating the payment channel or delaying shipment, followed by manual review before deciding on the interception, thus achieving a closed-loop risk management system and preventing the continued circulation of counterfeit products. Preliminary traceability records can be created, recording the time, object, and execution result of the interception and alerting operations. For example, preliminary traceability records can be created by writing to a structured log file and attaching a timestamp and operator signature, thus preserving auditable traces of the handling behavior. Summarizing the preliminary traceability records and the end-to-end flow node information and verification process information from the verification result set can involve integrating multi-source data into a unified log document. In an exemplary embodiment, summarizing the preliminary traceability records and the end-to-end flow node information and verification process information from the verification result set can be achieved by extracting, transforming, and loading them into a unified log model using ETL tools, thus achieving the technical effect of constructing a complete evidence chain covering the entire lifecycle. Generating blockchain-based traceability logs covering the entire product lifecycle can be achieved by generating hash fingerprints from aggregated logs and writing them into a distributed ledger. Furthermore, generating such logs can be accomplished by calling a consortium blockchain SDK to submit log summaries to consensus nodes and broadcast them onto the blockchain. This ensures that traceability information is tamper-proof, fully traceable, and supports consumer inquiries and regulatory audits.
[0042] Taking the anti-counterfeiting measures for high-end smartphones sold through a WeChat mini-program store as an example, the blockchain-based traceability and anti-counterfeiting verification method for electronic products in this embodiment can be as follows: When a consumer places an order for a new flagship phone in the WeChat mini-program store, the system first collects the entire supply chain data of the product from factory shipment, regional warehousing and distribution, store warehousing to shelf sales. It finds that the circulation path does not match the brand's official channels, triggering predefined counterfeit characteristic rules. The system then initiates deep verification by scanning the laser-etched anti-counterfeiting area on the phone's packaging box with a dedicated terminal to obtain texture signals and extract texture feature entropy values. These entropy values are hashed to generate a dynamic random verification digest, and combined with the consortium blockchain node mapping strategy, three brand authorized service providers are randomly selected as consensus. The system constructs isolated verification block instances on edge service nodes and loads a traceability and anti-counterfeiting verification contract specific to this phone model. Three consensus nodes run the contract, comparing current texture features with factory-stored evidence data and outputting a local credibility score. The system uses a weighted voting and anomaly removal mechanism to merge the scores, resulting in a comprehensive credibility score below the judgment threshold, thus classifying it as a counterfeit. The platform immediately intercepts the transaction, freezes the payment, and sends a counterfeit alert to the merchant. Finally, the interception record, verification process, and circulation node information of this transaction are integrated into a blockchain evidence traceability log and stored on the chain. Consumers can view a visual verification report through a mini-program to confirm that the purchased product has been identified as a high-risk counterfeit.
[0043] In one embodiment, generating product traceability data to be verified includes: Collect transaction data of goods in the micro-store, circulation logs of each node in the supply chain, and product scanning information from the user end to generate raw data for the full-chain traceability of electronic products. Then, perform format normalization processing to generate a structured product traceability feature dataset. The structured product traceability feature dataset is matched with predefined counterfeit feature rules to identify potentially suspicious counterfeit products, trigger traceability verification logic, and generate traceability data for products to be verified.
[0044] The transaction data for the WeChat mini-program store can be a collection of records of transaction behaviors such as order placement, payment, and order status changes on the mini-program store platform. This data can reflect the circulation behavior of goods at the sales end and help identify abnormal transaction patterns. In one exemplary embodiment, the transaction data can be collected in real time through the mini-program store business system logs or API interfaces. The supply chain node circulation logs can be records of the operations and status changes of various participants in the production, warehousing, logistics, and distribution stages of goods. This data can provide reliable evidence of the physical flow path of goods and support the detection of circulation anomalies. For example, the supply chain node circulation logs can be automatically synchronized to the traceability platform by the supply chain management system. User-end product scanning information can be behavioral logs generated by consumers or end-users scanning product identifiers (such as QR codes) using mobile devices. This data can reflect the initial activation or verification behavior of goods at the consumer end and help identify anomalies such as repeated scanning and high-frequency scanning in different locations. Furthermore, user-end product scanning information can be reported to the backend through the mini-program or APP scanning interface.
[0045] Collecting transaction data from the micro-store, logs from each node of the supply chain, and product scanning information from users can involve parallel acquisition of three heterogeneous data sources: the micro-store platform, the supply chain system, and user terminals. In one specific embodiment, this operation can be achieved by asynchronously pulling logs from each system via a message queue and subscribing to event streams in real time through a unified data access gateway, thereby constructing a multi-dimensional data foundation covering the entire production, distribution, and consumption chain. Generating original traceability data for electronic products can be achieved by associating and aggregating the three types of data according to product identifiers. For example, this operation can be based on primary key association based on product serial numbers and fuzzy matching association based on time windows and geographical locations, thereby forming a complete original traceability view based on products.
[0046] Format normalization is a data processing procedure that transforms raw traceability data from heterogeneous data sources into data with a unified structure and semantic standards. It can be used to eliminate data format differences and achieve comparability and fusion analysis capabilities for multi-source data. In an exemplary embodiment, format normalization can be achieved through methods such as schema-based field alignment, ontology-based semantic standardization, and unified conversion of timestamps and time zones. Format normalization of raw traceability data for the entire electronic product supply chain can be performed by applying preset data cleaning and structure transformation rules to unify field naming, data types, and temporal representations. Furthermore, this operation can be achieved by using ETL tools to execute a standardized pipeline and by using knowledge graph ontology alignment to achieve semantic normalization, thereby solving the problem that multi-source heterogeneous data is difficult to directly use for rule matching.
[0047] A structured product traceability feature dataset can be a collection of full-chain product features with a unified field structure and semantic standards, formed after format normalization. It can be used as the input basis for counterfeit product rule matching, improving the matching accuracy and efficiency of the rule engine. In a specific embodiment, the structured product traceability feature dataset can be divided according to feature dimensions, including transaction behavior features, logistics path features, user interaction features, etc. Generating a structured product traceability feature dataset can be a normalized output dataset containing feature fields that can be directly parsed by the rule engine, thus providing high-quality input for counterfeit product feature rule matching and improving recognition accuracy.
[0048] Matching a structured product traceability feature dataset with predefined counterfeit feature rules can be achieved by a rule engine traversing each record in the dataset and applying the counterfeit feature rules to each record for conditional judgment. For example, this operation can employ rule engines such as Drools to perform matching and accelerate batch comparison through vectorized rule calculations, thereby enabling automated initial screening of high-risk products. Identifying potentially suspicious counterfeit products can be achieved by marking any product record as suspicious when it meets at least one counterfeit feature rule, thus narrowing down the range of products requiring in-depth verification and improving system resource utilization efficiency. The traceability verification logic can be a control program module used to initiate the in-depth anti-counterfeiting verification process, automatically triggering subsequent physical feature collection and blockchain verification steps after identifying suspicious counterfeit products. In an exemplary embodiment, the traceability verification logic can be activated by the identification result of a suspicious counterfeit product, generating traceability data for the product to be verified. Triggering the traceability verification logic and generating the traceability data for the product to be verified can be achieved by calling a verification scheduling module to encapsulate the structured feature data of the suspicious product into a data package to be verified, thereby connecting the initial screening and in-depth physical verification stages and ensuring the accuracy of the verification target.
[0049] For example, in the scenario of anti-counterfeiting early warning for cross-border electronic product micro-malls, the blockchain-based traceability and anti-counterfeiting verification method for electronic products in micro-malls in this embodiment can be as follows: A consumer purchases imported Bluetooth headphones in a micro-mall. The system simultaneously collects the platform transaction records (showing low-price promotions), supply chain logs (showing direct shipping from unauthorized overseas warehouses), and user scanning information (showing that the same QR code was scanned by users in three different cities within 24 hours). After the three types of data are aggregated to generate full-chain traceability raw data, they are processed by format normalization to form a structured product traceability feature dataset. The rule engine detects that the product simultaneously meets the three counterfeit product feature rules of unauthorized channel transactions, abnormally low prices, and high-frequency cross-regional scanning, and marks it as a suspicious counterfeit product. The system then triggers the traceability verification logic, generates product traceability data to be verified containing the full-chain features of the product, and pushes it to the subsequent deep verification process based on physical texture entropy values.
[0050] In one embodiment, extracting texture feature entropy values includes: Based on the traceability data of the product to be verified, the high-definition optical acquisition module of the user's scanning terminal is activated to collect the physical anti-counterfeiting texture signal of the product; The texture feature signal is denoised and sharpened, and a pixel mesh modeling method is used to convert the denoised and sharpened texture signal into a two-dimensional pixel sequence of texture distribution. By using a laser texture feature modeling method, the grayscale offset parameters of the two-dimensional pixel sequence of texture distribution are calculated, and the texture feature entropy value is extracted.
[0051] The user scanning terminal can be a mobile smart device used by consumers or verifiers to scan anti-counterfeiting labels on goods. It can serve as a front-end data acquisition point, housing a high-definition optical acquisition module and performing preliminary image processing. Furthermore, the user scanning terminal can access the device's camera and image processing capabilities through a mobile application or mini-program. The high-definition optical acquisition module can be a high-resolution image acquisition component integrated into the user scanning terminal, used to capture the physical anti-counterfeiting texture signal of the goods, providing sufficient detail to support microscopic feature extraction. In an exemplary embodiment, the high-definition optical acquisition module can utilize the terminal's camera hardware and work with dedicated focusing and illumination algorithms to improve image quality. The physical anti-counterfeiting texture signal can be the original image data of the physical anti-counterfeiting area on the product packaging collected by the user scanning terminal, and can be used as an input source for subsequent denoising, modeling, and entropy extraction. In a specific embodiment, the physical anti-counterfeiting texture signal is directly acquired by the high-definition optical acquisition module from the surface of the physical anti-counterfeiting label on the product packaging. Furthermore, the physical anti-counterfeiting texture signal can include, but is not limited to, texture signals under natural light, texture signals under supplementary lighting, and multi-angle fused texture signals.
[0052] Texture feature signals can be semantically synonymous with physical anti-counterfeiting texture signals of goods, referring to the same original image data, and can be used to describe the texture data to be processed after acquisition. In an exemplary embodiment, the texture feature signal is equivalent to the physical anti-counterfeiting texture signal of the goods and enters the denoising and sharpening processing stage in the process. Activating the high-definition optical acquisition module of the user's scanning terminal can be achieved by calling the terminal's camera and enabling high-resolution acquisition mode through a mobile application. Further, activating the high-definition optical acquisition module of the user's scanning terminal can be achieved by triggering the system camera API and setting high-resolution parameters, calling the dedicated image acquisition SDK to enable focus and fill light, thereby starting the front-end physical feature acquisition process to ensure that a sufficiently detailed texture image is obtained. Acquiring the physical anti-counterfeiting texture signal of the goods can be achieved by the user pointing the product at the anti-counterfeiting area, and the terminal automatically capturing a high-definition image. Exemplarily, the acquisition of the physical anti-counterfeiting texture signal of the goods can be achieved by single static shooting acquisition and multi-frame dynamic focus fusion acquisition, so as to obtain the original signal that is irreplaceable from the physical world and anchor the verification to the entity. Denoising and sharpening processing of the texture feature signal can be performed by applying image filtering and enhancement algorithms to process the original acquired image. In one specific embodiment, the denoising and sharpening of the texture feature signal can be achieved by first using median filtering for denoising and then using an unsharpened mask for sharpening, and by using bilateral filtering and high-frequency boosting filtering in combination. This can eliminate environmental interference, highlight the real texture structure, and improve the accuracy of subsequent feature extraction.
[0053] Pixel grid modeling methods can be digital modeling techniques that map continuous texture images into regular two-dimensional pixel grids. This can be used to achieve a standardized discrete representation of texture signals, facilitating subsequent grayscale parameter calculations. Furthermore, pixel grid modeling methods can include, but are not limited to, uniform sampling grids, adaptive density grids, and feature-guided grids. The texture distribution two-dimensional pixel sequence can be a standardized grayscale pixel matrix with spatial coordinates formed after pixel grid modeling, which can be used as input to laser texture feature modeling methods to calculate grayscale offset parameters. In an exemplary embodiment, the texture distribution two-dimensional pixel sequence is generated by converting a denoised and sharpened texture signal using a pixel grid modeling method. Converting the denoised and sharpened texture signal into a texture distribution two-dimensional pixel sequence using pixel grid modeling methods can be achieved by resampling the processed image into a pixel matrix of standard size and coordinates. Furthermore, this operation can be achieved through fixed-size grid resampling and adaptive grid mapping based on feature point alignment, thereby achieving the structuring and standardization of texture data, facilitating quantitative analysis.
[0054] Laser texture feature modeling methods can be texture feature quantification modeling methods optimized based on laser imaging principles. These methods analyze grayscale changes in pixel sequences and can be used to accurately calculate grayscale offset parameters reflecting the randomness of micro-manufacturing. In one specific embodiment, the laser texture feature modeling method applies to a two-dimensional pixel sequence with a texture distribution and outputs grayscale offset parameters. Exemplary examples include, but are not limited to, local gradient modeling, regional contrast modeling, and frequency domain energy distribution modeling. Calculating the grayscale offset parameters of a two-dimensional pixel sequence with a texture distribution using the laser texture feature modeling method can involve analyzing local or global grayscale differences in the pixel sequence and outputting a statistical offset. Furthermore, this operation can be achieved by calculating the grayscale standard deviation within a sliding window as the offset parameter and statistically calculating the absolute mean of the differences between adjacent pixel pairs, thus quantifying the micro-randomness introduced by the manufacturing process and forming a highly discriminative feature basis. Extracting the texture feature entropy value can be done by applying an information entropy model based on the grayscale offset parameters. In one exemplary embodiment, the extraction of texture feature entropy values can be achieved by directly calculating Shannon entropy from the grayscale offset parameter sequence and calculating sample entropy from the offset distribution histogram, thereby generating a unique digital fingerprint of the physical entity of the commodity, supporting unforgeable verification.
[0055] Taking the real-time verification scenario at the consumer end as an example, the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method in this embodiment can be as follows: After receiving the headphones purchased online, the consumer opens the mobile application and clicks the verification function. The system automatically activates the high-definition optical acquisition module of the mobile phone camera based on the traceability data of the product to be verified in the order. The user points the lens at the frosted anti-counterfeiting area on the headphone packaging box, and the terminal automatically completes the focus and acquires a high-resolution texture image. The background immediately performs noise reduction and sharpening processing on the image to eliminate indoor light reflections and hand shakiness blur. Then, the image is uniformly converted into a 512×512 standard texture distribution two-dimensional pixel sequence using a pixel grid modeling method. The system calls the laser texture feature modeling method to calculate the grayscale standard deviation of each 8×8 sub-block as a grayscale offset parameter. Finally, the texture feature entropy value is extracted based on the offset parameter distribution of all sub-blocks, and the entropy value is passed to the main chain verification process. The entire process is completed lightweightly at the user end without the need for special equipment, yet it achieves feature extraction accuracy comparable to factory-level laser scanning, ensuring that anti-counterfeiting verification is truly bound to the physical entity.
[0056] In one embodiment, the target blockchain consensus node sequence number is obtained, including: The texture feature entropy value is calculated using the SHA-256 hash function to generate an initial hash value, and then a second perturbation process is performed in combination with the product batch number to obtain a dynamic random verification digest. Based on the dynamic random verification digest and combined with the preset consortium blockchain consensus node mapping strategy rules, a weighted reputation value scheduling algorithm is used to calculate the mapping rules and obtain the target blockchain consensus node sequence number.
[0057] The SHA-256 hash function can be a 256-bit cryptographic one-way hash algorithm used to standardize and irreversibly compress texture feature entropy values, generating a fixed-length initial hash value. In this embodiment, the SHA-256 hash function performs a hash operation on the texture feature entropy value as input, thereby achieving standardization and irreversible encoding of physical features. The initial hash value can be an intermediate digest calculated by the SHA-256 hash function on the texture feature entropy value, which can be used as the input basis for secondary perturbation processing to ensure that physical feature information is standardized and encoded. In an exemplary embodiment, the initial hash value is obtained by inputting the texture feature entropy value into the SHA-256 algorithm and performing a hash operation. The product batch number can be a unique business code identifying products produced in the same batch, which can be used as business context information to participate in dynamic verification digest generation, enhancing anti-replay and batch differentiation capabilities. Furthermore, the product batch number can include, but is not limited to, one or more of the following based on the encoding structure: timestamp batch number, factory serial number, order-associated batch number, etc.
[0058] Secondary perturbation processing can be a process of fusing the initial hash value with the product batch number to generate the final verification digest. This can be used to introduce business-dimensional perturbations on top of physical uniqueness, preventing cross-batch counterfeiting or replay attacks. In a specific embodiment, secondary perturbation processing can be implemented by concatenating the batch number to the initial hash value and then hashing it again, or by using the batch number as a salt for HMAC operations. The consortium blockchain consensus node mapping strategy rules can define a mapping logic framework for selecting target consensus nodes based on dynamic random verification digests. This can be used to provide input constraints and mapping boundaries for the weighted reputation value scheduling algorithm, ensuring that node selection conforms to network topology and permission policies. Furthermore, the consortium blockchain consensus node mapping strategy rules can work in conjunction with the weighted reputation value scheduling algorithm to jointly determine the target blockchain consensus node sequence number. The weighted reputation value scheduling algorithm can be a scheduling strategy that combines node historical behavior scores (reputation values) with randomness factors to select consensus nodes. This can be used to prioritize high-reputation nodes while ensuring the randomness of the verification path, thereby improving the reliability of verification results. In this embodiment, the weighted reputation value scheduling algorithm calculates dynamic reputation weights based on indicators such as historical verification accuracy, response time, and violation records of each alliance node. For example, the weighted reputation value scheduling algorithm may include, but is not limited to, linear weighted scheduling, exponential decay reputation scheduling, and sliding window reputation assessment scheduling, etc., which are divided according to weight fusion methods.
[0059] The texture feature entropy value is calculated using the SHA-256 hash function to generate an initial hash value. This can be achieved by inputting the texture feature entropy value into the SHA-256 algorithm, which outputs a 256-bit fixed-length hash digest. Furthermore, this operation is implemented by directly calling standard SHA-256 library functions or performing hashing in a TEE environment to prevent side-channel leakage, thereby standardizing and irreversibly encoding the physical features, providing a stable input for subsequent perturbation processing.
[0060] By combining the product batch number with a secondary perturbation process, a dynamic random verification digest is obtained. This can be achieved by cryptographically fusing the initial hash value and the product batch number to generate the final verification digest. Furthermore, this operation is implemented by performing HMAC-SHA256(initial hash value, product batch number) or concatenating and then performing SHA-256 again, ensuring that the verification digest simultaneously contains physical uniqueness and business context information, preventing cross-batch replay or obfuscation attacks.
[0061] Based on the dynamic random verification digest and combined with the pre-defined consortium blockchain consensus node mapping strategy rules, a weighted reputation value scheduling algorithm is used to calculate the mapping rules. This can be achieved by using the dynamic random verification digest as a seed, combined with node reputation weights, and executing the scheduling algorithm under the constraints of the mapping strategy. Furthermore, this operation can be implemented by generating a random index based on the verification digest and then selecting nodes by sorting them by reputation value, or by using reputation value as a probability weight for weighted random sampling. This ensures that the selection of consensus nodes balances randomness and credibility, preventing low-reputation nodes from participating in key verifications. The target blockchain consensus node sequence number is obtained, which can be the node identifier calculated jointly by the weighted reputation value scheduling algorithm and the mapping strategy. Furthermore, this operation makes the specific execution node path of this verification task both unpredictable and highly reliable.
[0062] For example, in the scenario of anti-counterfeiting verification in a high-end headphone micro-store, the blockchain-based micro-store electronic product traceability and anti-counterfeiting verification method of this embodiment can be as follows: When a consumer purchases a limited edition wireless headphone of a certain brand, the system extracts the entropy value of the laser texture feature of its packaging box, and first uses SHA-256 to generate an initial hash value; then, it combines the production batch number of the product (such as BATCH202405A) to perform HMAC secondary perturbation to generate a dynamic random verification digest; this digest is used as a seed input to the weighted reputation value scheduling algorithm, and the algorithm assigns different weights based on the verification accuracy rate of each alliance node in the past 30 days (such as 98% for authorized repair centers, 92% for third-party testing agencies, and 85% for ordinary distributors); under the premise that the alliance chain consensus node mapping strategy rules limit only the brand owner and authorized service providers to participate, the algorithm finally selects two high-reputation nodes as target consensus nodes; the verification task is then executed in an isolated environment, effectively preventing interference or malicious collusion by low-reputation nodes, and ensuring the authority and security of the authenticity determination of limited edition products.
[0063] In one embodiment, obtaining the traceability and anti-counterfeiting verification contract for the corresponding product includes: Feature extraction algorithms are used to extract product brand, model, and batch characteristic parameters from the product traceability data to be verified. By matching the corresponding product registration number in the blockchain product evidence database using product feature parameters, a list of product identifiers to be verified is generated. Based on the target consensus node sequence number, an isolated verification block instance is constructed on the edge service node of the micro-store through a smart contract deployment interface; The list of product identifiers to be verified is input into the scheduling mechanism of the isolated verification block instance for filtering, and the corresponding product traceability and anti-counterfeiting verification contract is obtained.
[0064] The feature extraction algorithm can be program logic used to automatically identify and extract key fields from structured or semi-structured data. It can be used to accurately parse identity feature parameters such as brand, model, and batch from the traceability data of the product to be verified. In an exemplary embodiment, the operating principle of the feature extraction algorithm can be explained in context, namely, calling pre-set parsing logic to perform field recognition and structured output on the traceability data of the product to be verified. Furthermore, the feature extraction algorithm can include, but is not limited to, regular expression matching algorithms, knowledge graph-based entity recognition algorithms, and lightweight natural language processing parsers. The product brand, model, and batch feature parameters can be a set of core structured attributes representing the product's identity, which can be used as a key index for matching legitimate product files on the blockchain, ensuring consistency between the verification object and the registration information. In a specific embodiment, the acquisition method of the product brand, model, and batch feature parameters can be explained in context, namely, parsed from the traceability data of the product to be verified by the feature extraction algorithm. The blockchain product evidence database can be a distributed ledger data set storing authoritative information on registered products, which can be used to provide verifiable and tamper-proof product identity benchmark data for matching the product to be verified. In this embodiment, the blockchain-based product evidence database can be described in context as follows: it is formed by the brand owner or regulatory agency storing the registration information on the blockchain before the product is put on the market.
[0065] Feature extraction algorithms are used to extract brand, model, and batch characteristics from the traceability data of the products to be verified. This can be achieved by calling pre-defined parsing logic to perform field recognition and structured output on the traceability data. Furthermore, this operation can be implemented by using rule templates to match key fields and calling a lightweight NLP model to identify model information in unstructured descriptions, thereby achieving accurate extraction of product identity information and providing reliable input for subsequent on-chain matching. The product feature parameters are then matched against the corresponding product registration number in the blockchain product evidence database. This can be achieved by using the extracted brand, model, and batch parameters as query keys to retrieve a uniquely corresponding registration record in the on-chain database. Further, this operation can be implemented by performing precise triplet matching, supporting fuzzy error-tolerant matching, and then manually verifying and confirming the result. This establishes a one-to-one mapping between the product to be verified and legitimate product files, preventing information forgery or confusion.
[0066] Generating a list of product identifiers to be verified can be achieved by encapsulating the successfully matched product registration numbers into a standardized identifier set. Furthermore, this operation can be implemented through a standardized encapsulation protocol, thus forming clear input credentials for subsequent verification processes and ensuring the verification target is clear and traceable. Based on the target consensus node sequence number, an isolated verification block instance is constructed on the micro-store edge service node through a smart contract deployment interface. In this embodiment, this step utilizes the dynamically selected target consensus node sequence number to drive edge-side resources to initialize an independent verification environment on demand, ensuring that the verification logic is physically and logically isolated from the main business system. The list of product identifiers to be verified is input into the scheduling mechanism of the isolated verification block instance for filtering, obtaining the corresponding product traceability and anti-counterfeiting verification contract. In this embodiment, the scheduling mechanism loads pre-built smart contracts adapted to the product brand and model on demand based on the registration numbers in the identifier list, achieving accurate matching and automatic execution of the verification logic.
[0067] Taking the anti-counterfeiting verification of multi-brand electronic products in a micro-mall as an example, the blockchain-based traceability and anti-counterfeiting verification method for electronic products in a micro-mall in this embodiment can be as follows: A micro-mall platform receives a batch of suspicious orders containing mobile phones from multiple brands. The system first extracts the brand, model, and production batch parameters of each product from the traceability data of the products to be verified. Then, it matches the filing numbers of brand A batch A2890, brand B batch SM-S9210, etc., in the blockchain product evidence database. After successful matching, a list of product identifiers to be verified containing these filing numbers is generated. The system constructs isolated verification block instances on the edge service nodes according to the previously dynamically selected target consensus node sequence number. The scheduling mechanism receives the identifier list and loads the traceability and anti-counterfeiting verification contracts pre-deployed by Apple and Samsung respectively. Each contract independently executes physical texture comparison and credibility calculation to ensure that the verification logic of different brands of products is accurately adapted to their anti-counterfeiting strategies.
[0068] In one embodiment, reference Figure 2 Generate product authenticity verification status, including: Step S501: Distribute the traceability and anti-counterfeiting verification contract to multiple consortium consensus nodes within the isolated verification block instance, and run the traceability and anti-counterfeiting verification contract respectively to generate node verification result data. Then, summarize the verification result data of multiple consortium consensus nodes to form a verification result set. Step S502: Based on the statistical characteristics of the verification result set, a consensus mechanism is formed by setting a threshold, designing a voting mechanism, and using a Byzantine node detection method to set a judgment threshold, voting rules, and an abnormal node removal strategy. Step S503: Based on the voting rules and abnormal node removal strategy in the consensus mechanism, perform weighted statistics and result fusion on the verification result set to obtain the comprehensive credibility score of product traceability; Step S504: Based on the judgment threshold in the consensus mechanism, determine the comprehensive credibility score of product traceability and generate the product authenticity verification status.
[0069] In this context, multiple consortium consensus nodes can be multiple consortium blockchain member nodes with consensus permissions participating in the same verification task. They can be used to execute verification contracts in parallel, providing distributed and independent verification results to support fault-tolerant consensus. In an exemplary embodiment, multiple consortium consensus nodes can receive distributed traceability and anti-counterfeiting verification contracts, run independently within isolated verification block instances, and output node verification result data. Node verification result data can be local authenticity judgments or scoring results output by each consortium consensus node after running the traceability and anti-counterfeiting verification contract. This data can be used as the basic unit for constructing a verification result set for subsequent consensus fusion analysis. Furthermore, node verification result data can be independently generated by each consortium consensus node based on its locally executed contract logic and input data. For example, node verification result data can include, but is not limited to, binary authenticity labels, continuous confidence scores, and feature matching confidence levels.
[0070] The verification result set can be a structured dataset formed by aggregating the node verification results data from multiple consortium consensus nodes. It can provide an input basis for the consensus mechanism, supporting weighted statistics and anomaly detection. In one specific embodiment, the verification result set can be uniformly collected and aggregated by isolated verification block instances after all participating nodes have completed contract execution. Furthermore, the verification result set can be coordinated with its statistical characteristics, which are used to set judgment thresholds, voting rules, and anomalous node removal strategies. The statistical characteristics of the verification result set can be mathematical features of the set in terms of distribution, dispersion, and central tendency, which can be used to guide the dynamic setting of key parameters in the consensus mechanism, improving consensus adaptability. For example, the statistical characteristics of the verification result set can use the standard deviation of the calculated results to assess dispersion, analyze the mode or median to identify mainstream opinions, and detect the proportion of extreme values.
[0071] Distributing the traceability and anti-counterfeiting verification contract to multiple consortium consensus nodes within an isolated verification block instance can be achieved by simultaneously deploying the same verification contract to all selected consortium consensus nodes within the isolated verification block instance. Furthermore, this operation can be implemented through broadcast contract push or distributed one-to-one via a peer-to-peer secure channel, ensuring that each node executes the same verification logic and providing a basis for result comparability. Running the traceability and anti-counterfeiting verification contract separately to generate node verification result data can be achieved by each consortium consensus node independently executing its contract logic in its local environment and outputting its own verification results. Furthermore, this operation can achieve distributed and decentralized verification processes, avoiding the risk of single-point control.
[0072] The verification results data from multiple consortium consensus nodes are aggregated to form a verification result set. This can involve collecting the output results of all nodes and integrating them into a unified data structure. Furthermore, this operation provides complete input for subsequent consensus mechanisms, supporting statistical analysis and anomaly detection. Based on the statistical characteristics of the verification result set, by setting thresholds, designing voting mechanisms, and employing Byzantine fault tolerance detection methods, judgment thresholds, voting rules, and anomaly removal strategies can be established. This allows for analysis of the distribution characteristics of the verification result set and dynamic configuration of the core parameters of the consensus mechanism. In a specific embodiment, this operation can preset static parameters based on the distribution of historical batch results and dynamically adjust parameters based on real-time statistics of the current batch, thereby enabling the consensus mechanism to have adaptive capabilities and improving its applicability to different verification scenarios.
[0073] Byzantine node detection methods can be technical means to identify consensus nodes that may output incorrect results due to malfunctions or malicious behavior. They can support the implementation of abnormal node removal strategies and ensure the security of the consensus process. For example, Byzantine node detection methods may include, but are not limited to, detection based on message signature consistency, detection based on output deviation thresholds, and detection based on multi-round interactive verification. Voting rules can be decision logic that specifies how to allocate weights and aggregate opinions based on the verification results of each node. They can be used to implement weighted statistics of verification results, reflecting the differences in credibility or expertise among different nodes. For example, voting rules may include, but are not limited to, dynamic weighting based on the node's historical accuracy, static weighting based on the node's identity level, and equal-weighted averaging. Abnormal node removal strategies can be filtering mechanisms that identify and exclude node outputs whose verification results significantly deviate from the group consensus. They can be used to prevent Byzantine nodes or malfunctioning nodes from polluting the final score and improve system robustness. In an exemplary embodiment, the abnormal node removal strategy can be combined with the Byzantine node detection method, setting removal conditions based on the statistical characteristics of the verification result set. Furthermore, outlier removal strategies may include, but are not limited to, one or more of the following: outlier removal based on Z-score, minority removal based on cluster consistency, and reputation removal based on sliding window historical performance.
[0074] A consensus mechanism can be established by combining judgment thresholds, voting rules, and abnormal node removal strategies into a complete decision-making process. Furthermore, this operation can establish a fault-tolerant multi-node collaborative judgment system. Based on the voting rules and abnormal node removal strategies in the consensus mechanism, the verification result set is weighted and statistically integrated. This can involve first removing abnormal node results, then performing weighted calculations according to the voting rules, and finally integrating them into a single score. Furthermore, this operation can improve the accuracy and anti-interference capability of the comprehensive credibility score for product traceability.
[0075] Weighted statistics can be a mathematical operation process that numerically fuses multiple verification results according to preset weights. This can be used to generate a more representative comprehensive score, reflecting the differences in credibility between nodes. For example, weighted statistics can employ linear weighted summation, exponential decay weighting, or objective weighting based on entropy weighting. Result fusion can be the process of integrating the multi-node outputs after weighted statistics into a single comprehensive credibility score for product traceability. This can be used to form a unified basis for authenticity judgment and eliminate conflicts between node results. In one embodiment, result fusion can normalize or map the weighted statistical results to output a standardized score. Obtaining the comprehensive credibility score for product traceability can be achieved by outputting a standardized value after weighted fusion, representing the confidence level of product authenticity. Furthermore, this operation can provide a quantitative basis for the final authenticity judgment. Based on the judgment threshold in the consensus mechanism, the comprehensive credibility score for product traceability is judged by comparing the score with a preset threshold to determine whether it meets the genuine product standard. Furthermore, this operation can realize the conversion from continuous scores to discrete states. Generating the product authenticity verification state can be achieved by outputting a clear authenticity conclusion based on the judgment result. Furthermore, this operation can provide decision signals for transaction interception and alerts.
[0076] Taking the anti-counterfeiting verification of high-end headphones in a micro-mall as an example, the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method in this embodiment can be as follows: When a consumer purchases a limited edition wireless headphone, the system triggers deep verification and distributes the traceability and anti-counterfeiting verification contract to five brand authorized service provider nodes in the isolated verification block instance; each node independently scans the packaging texture and compares it with the factory certificate, and outputs credibility scores of 92, 89, 35, 91, and 90 respectively; the system summarizes and forms a set of verification results, analyzes its statistical characteristics and finds a significant outlier (35), and determines that the node may be interfered with or has an anomaly based on the Byzantine node detection method; it is excluded according to the abnormal node removal strategy, and the remaining four nodes are weighted and statistically analyzed using a dynamic weighting rule based on historical accuracy, and the product traceability comprehensive credibility score is 90.6; this score is higher than the judgment threshold of 85 set in the consensus mechanism, the system generates a genuine product confirmation status, allows the transaction to be completed, and uploads the complete verification log to the blockchain for evidence storage.
[0077] In one embodiment, a blockchain-based evidence storage and traceability log covering the entire lifecycle of a product is generated, including: The product authenticity verification status is used as input, and the system matches the predefined micro-store transaction control rule library to identify the corresponding transaction interception and merchant alarm operation instructions, and forms a preliminary traceability and handling record.
[0078] By summarizing the information on all links of the traceability and processing nodes and the verification process information from the preliminary traceability and processing records and verification results, a blockchain-based traceability log covering the entire life cycle of the product is generated.
[0079] The predefined micro-mall transaction control rule base can be a structured set of rules containing handling strategies corresponding to different product authenticity verification statuses. This can be used to automatically match and standardize the execution of counterfeit product handling instructions. In this embodiment, the predefined micro-mall transaction control rule base can be combined with a rule engine for pattern matching, thereby automatically selecting the appropriate handling strategy based on the input product authenticity verification status. For example, the predefined micro-mall transaction control rule base may include, but is not limited to, counterfeit product confirmation handling rules, high-risk pending review handling rules, and cross-border abnormal product handling rules. Transaction interception and merchant alert operation instructions can be specific execution commands output by the transaction control rule base, which can be used to guide the system to automatically execute order interception and merchant notification behaviors. Furthermore, transaction interception and merchant alert operation instructions can be obtained from the structured operation instructions generated after matching the product authenticity verification status with the rule base. In an exemplary embodiment, transaction interception and merchant alert operation instructions may include, but are not limited to, payment freeze instructions, logistics termination instructions, and merchant risk warning instructions.
[0080] Using the product authenticity verification status as input, the system matches it against a predefined micro-mall transaction management rule library. This can be achieved by substituting the verified product authenticity status into the rule engine for pattern matching. Furthermore, this operation can be implemented through rule priority-based matching or direct lookup based on the status-action mapping table, thereby enabling automated selection of handling strategies and ensuring consistent responses. Identifying corresponding transaction interception and merchant alarm operation instructions can be done by extracting specific operation instructions from successfully matched rules. Further, this operation can be achieved by parsing JSON instruction blocks in the rules and calling pre-compiled action templates associated with the rules, generating executable handling actions to support closed-loop governance.
[0081] Taking the rapid handling of counterfeit cross-border electronic products as an example, the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method in this embodiment can be as follows: A consumer purchases imported Bluetooth headphones in a micro-mall. After the system completes physical texture verification, it determines that the product is counterfeit. This status is input into the predefined micro-mall transaction control rule library, matched with the cross-border high-value counterfeit product handling rules, and automatically identifies the operation instruction that requires immediate freezing of payment and suspension of customs clearance and logistics. The system executes the instruction to form a preliminary traceability and handling record, which includes the interception time, operation type, and associated order number. Subsequently, this record, along with the full-link flow node information generated in this verification, such as overseas warehouse outbound, international transportation, bonded zone warehousing records, and verification process information such as consensus node list and voting results, are summarized to generate a blockchain-based evidence storage and traceability log covering the entire lifecycle of the product. After hash processing, this log is written to the consortium blockchain. Consumers can view the verification failure report through the platform, and customs supervision departments can also retrieve the complete evidence chain for law enforcement verification.
[0082] In one embodiment, after generating a blockchain-based evidence storage and traceability log covering the entire lifecycle of the product, the method further includes: Semantic encryption is applied to the blockchain-based evidence storage and traceability logs covering the entire product lifecycle to generate an unalterable digital fingerprint; The digital fingerprint is broadcast to all nodes in the blockchain network for consensus synchronization and stored in the Merkle tree structure of the distributed ledger; A user query channel is established to receive traceability verification requests from end users. The digital fingerprint in the distributed ledger is automatically retrieved and decrypted through a smart contract for comparison, generating and displaying a visualized traceability verification report.
[0083] The blockchain-based evidence storage and traceability log covering the entire product lifecycle can be a structured log integrating verification results, disposal records, and process information from each stage of production to consumption. This log can serve as the input source for semantic encryption processing, generating a digital fingerprint for on-chain evidence storage. Furthermore, the blockchain-based evidence storage and traceability log covering the entire product lifecycle can be generated from preceding steps and used as the object of semantic encryption processing. Semantic encryption processing can involve performing cryptographic encryption operations on the structured log content while preserving its semantic structure. This can be used to protect sensitive information while compressing data, preventing the original log from being reverse-analyzed or misused. In an exemplary embodiment, semantic encryption processing may include, but is not limited to, field-level homomorphic encryption, structure-preserving obfuscation, and semantic hash encoding. The tamper-proof digital fingerprint can be a fixed-length digest generated after semantic encryption processing, possessing uniqueness and collision resistance. It can be used as the basic unit for on-chain storage and verification, replacing the original log to improve efficiency and security. For example, the tamper-proof digital fingerprint can be obtained by performing semantic encryption processing on the blockchain-based evidence storage and traceability log. Furthermore, the tamper-proof digital fingerprint can be broadcast to all nodes in the blockchain network and stored in a Merkle tree structure.
[0084] Semantic encryption of blockchain-based evidence storage and traceability logs covering the entire product lifecycle can be achieved by applying semantically structure-preserving encryption algorithms to transform the log content. Furthermore, semantic encryption of these logs can be implemented by encrypting log fields individually using structure-preserving encryption and mapping the logs to fixed semantic vectors using semantic hashing. This approach compresses data volume while protecting privacy and preventing the leakage of original information. Generating an immutable digital fingerprint can be achieved by outputting a fixed-length digest after semantic encryption. Alternatively, generating an immutable digital fingerprint can be achieved by directly deriving the digest value through the aforementioned semantic encryption process, thus forming a lightweight and highly secure data representation suitable for on-chain evidence storage.
[0085] A blockchain network node can be a collection of all member nodes participating in consortium blockchain consensus and data synchronization. It can be used to receive and verify digital fingerprints and participate in consensus synchronization to ensure data consistency. In one specific embodiment, a blockchain network node can include, but is not limited to, consensus nodes, verification nodes, and observation nodes. Consensus synchronization can be the process by which multiple nodes reach an agreement on newly submitted data and update their local ledgers. It can be used to ensure that digital fingerprints are stored consistently across the entire network, preventing single-point tampering. For example, consensus synchronization can be implemented using synchronization based on the PBFT protocol or log replication synchronization based on Raft. A distributed ledger can be a shared database jointly maintained by all network nodes, recording all transactions and state changes. It can be used to persistently store consensus-confirmed digital fingerprints, providing an immutable data foundation. Furthermore, the distributed ledger can support a Merkle tree structure to store digital fingerprints. A Merkle tree structure can be a binary hash tree data structure used to efficiently verify the integrity of large-scale data and can be used to support fast existence proof and tamper detection for any digital fingerprint. In an exemplary embodiment, a Merkle tree structure can be obtained by using multiple digital fingerprints as leaf nodes and constructing a tree structure through layer-by-layer hashing.
[0086] Broadcasting digital fingerprints to all nodes in the blockchain network for consensus synchronization can be achieved by submitting the digital fingerprint as a transaction to the blockchain network, triggering a consensus protocol. Furthermore, broadcasting digital fingerprints to all nodes in the blockchain network for consensus synchronization can be achieved through P2P network transaction broadcasting and submission to the consensus node pool via an API gateway, thus ensuring that all nodes in the network reach a consensus on the digital fingerprint and preventing partial tampering. Storing the digital fingerprint in the Merkle tree structure of the distributed ledger can be achieved by incorporating the consensus-confirmed digital fingerprint as a leaf node into the Merkle tree. Furthermore, storing the digital fingerprint in the Merkle tree structure of the distributed ledger can be achieved by batch packaging multiple fingerprints to construct subtrees and dynamically appending them to the end of the existing Merkle tree, thereby supporting efficient integrity verification and rapid verification of lightweight nodes.
[0087] The user query channel can be an interface service open to end users for initiating product authenticity verification requests. It can connect consumers with the blockchain verification system to achieve convenient verification. For example, the user query channel can be implemented using a WebAPI-based query interface or an SDK component embedded in a mini-program. The end-user's authenticity verification request can be a product verification request submitted by the consumer through the user query channel, which can trigger a smart contract to automatically execute the decryption and comparison process. Furthermore, the end-user's authenticity verification request can be generated after the user inputs a product identifier or scans an anti-counterfeiting code. The smart contract can be a program deployed on the blockchain that can automatically execute preset logic. It can be used to automatically retrieve and decrypt the digital fingerprint after receiving a query request. Furthermore, the smart contract can retrieve the digital fingerprint from the distributed ledger, perform decryption and comparison, and generate a authenticity verification report.
[0088] Digital fingerprints in a distributed ledger can be immutable digital fingerprint instances that are already on-chain and stored in a Merkle tree. These can serve as authoritative data sources for decryption and comparison, ensuring the reliability of verification results. For example, digital fingerprints in a distributed ledger can be securely extracted from the ledger using Merkle path proofs. Decryption and comparison can be the process of decrypting the on-chain digital fingerprint and performing consistency verification with the current query context. This can be used to verify whether the current state of a product matches the on-chain evidence, determining its authenticity. In a specific embodiment, decryption and comparison can be implemented by first decrypting and then comparing the original log hash, or by directly performing homomorphic comparisons within the ciphertext. Building a user query channel can involve developing and deploying a query interface service for consumers. Furthermore, building a user query channel can be achieved by integrating it into a WeChat mini-program app or providing a separate verification page, thus providing a standardized and secure verification entry point.
[0089] Receiving traceability verification requests from end users can be achieved by listening to user query channels and parsing and verifying request parameters. Furthermore, receiving these requests can be accomplished via RESTful APIs to receive JSON requests and using WebSockets to maintain long-term connections for real-time responses, thus initiating an automated verification process. Automatically retrieving and comparing digital fingerprints from the distributed ledger using smart contracts can involve the smart contract locating the corresponding digital fingerprint based on the query request and performing decryption and consistency checks. Further, this automatic retrieval and comparison of digital fingerprints from the distributed ledger can be performed in a TEE environment, using zero-knowledge proofs for verification without exposing the original data, thereby achieving end-to-end automated verification and preventing human intervention or intermediate layer tampering. A visualized traceability verification report can be a summary of the product's entire lifecycle trusted status presented in a graphical interface, allowing users to intuitively view the verification results and enhance trust and transparency. Generating and displaying a visualized traceability verification report can involve converting the comparison results into a user-understandable graphical interface and returning it to the terminal. Furthermore, generating and displaying visual traceability and verification reports can be achieved by generating PDF reports for download and dynamically rendering interactive timelines on mobile devices, thereby enhancing consumer trust and increasing platform transparency.
[0090] Taking high-end headphones with self-service authentication as an example, the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method in this embodiment can be as follows: After receiving a wireless headphone of a certain brand, the consumer scans the anti-counterfeiting code on the packaging box through the micro-mall mini-program to initiate a traceability and authenticity query request; the system receives the request through the user query channel and triggers a smart contract deployed on the consortium blockchain; the contract automatically extracts the digital fingerprint corresponding to the product from the Merkle tree of the distributed ledger, which was previously generated by semantic encryption and synchronized through network consensus; the smart contract decrypts the digital fingerprint in an isolated environment and compares it with the current physical characteristics and circulation path of the product; after verification, the system generates a visualized traceability and authenticity verification report containing the production factory, logistics trajectory, verification timestamp, and credibility score, which is displayed on the user's mobile phone in the form of a timeline, clearly marking the product as an official genuine product; if there is a record of counterfeit interception, the report will also display a risk warning to ensure the consumer's right to know.
[0091] Furthermore, to achieve the above objectives, the present invention also provides a blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification device. The device includes: a memory, a processor, and a blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification program stored on the memory and executable on the processor. The blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification program is configured to implement the steps of the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described above.
[0092] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification program. When the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification program is executed by a processor, it implements the steps of the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described above.
[0093] Other embodiments or specific implementations of the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification device described in this invention can refer to the above-mentioned method embodiments, and will not be repeated here.
[0094] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A blockchain-based method for tracing and verifying the authenticity of electronic products in a micro-e-commerce platform, characterized in that, The method includes: Collect raw data on the entire chain of electronic products traceability in the WeChat store, compare product identification information with predefined counterfeit product characteristic rules, identify potential suspicious counterfeit products, trigger traceability verification logic, and generate traceability data of products to be verified. Based on the traceability data of the products to be verified, the texture signal of the physical anti-counterfeiting label on the product packaging is collected as the physical entropy source, and the gray-level offset parameter of the two-dimensional pixel sequence of the texture is calculated by using the laser scanning texture modeling method, and the texture feature entropy value is extracted. The texture feature entropy value is hashed to generate a dynamic random verification digest. Based on the dynamic random verification digest and the preset consortium blockchain node mapping strategy rules, the mapping rules are calculated to obtain the target blockchain consensus node sequence number. Based on the target blockchain consensus node sequence number, an isolated verification block instance is constructed on the edge service node of the micro-store through a smart contract deployment interface. The list of products to be verified is then input into the scheduling mechanism of the isolated verification block instance for filtering, and the corresponding product traceability and anti-counterfeiting verification contract is obtained. The traceability and anti-counterfeiting verification contract is run by multiple alliance consensus nodes within the isolated verification block instance, and the comprehensive credibility score of product traceability is judged based on the judgment threshold in the preset multi-node consistency consensus mechanism, thereby generating the product authenticity verification status. The system intercepts transactions and issues merchant alerts for verified counterfeit products, creating a preliminary traceability record. It then aggregates the full-chain flow node information and verification process information from the preliminary traceability record and verification result set to generate a blockchain-based traceability log covering the entire product lifecycle.
2. The blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described in claim 1, characterized in that, The generation of product traceability data to be verified includes: Collect transaction data of goods in the micro-store, circulation logs of each node in the supply chain, and product scanning information from the user end to generate raw data for the full-chain traceability of electronic products. Then, perform format normalization processing to generate a structured product traceability feature dataset. The structured product traceability feature dataset is matched with predefined counterfeit feature rules to identify potentially suspicious counterfeit products, trigger traceability verification logic, and generate traceability data for products to be verified.
3. The blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described in claim 1, characterized in that, The extraction of texture feature entropy values includes: Based on the traceability data of the product to be verified, the high-definition optical acquisition module of the user's scanning terminal is activated to collect the physical anti-counterfeiting texture signal of the product; The texture feature signal is denoised and sharpened, and a pixel mesh modeling method is used to convert the denoised and sharpened texture signal into a two-dimensional pixel sequence of texture distribution. By using a laser texture feature modeling method, the grayscale offset parameters of the two-dimensional pixel sequence of texture distribution are calculated, and the texture feature entropy value is extracted.
4. The blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described in claim 1, characterized in that, The process of obtaining the target blockchain consensus node sequence number includes: The texture feature entropy value is calculated using the SHA-256 hash function to generate an initial hash value, and then a second perturbation process is performed in combination with the product batch number to obtain a dynamic random verification digest. Based on the dynamic random verification digest and combined with the preset consortium blockchain consensus node mapping strategy rules, a weighted reputation value scheduling algorithm is used to calculate the mapping rules and obtain the target blockchain consensus node sequence number.
5. The blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described in claim 1, characterized in that, The process of obtaining the traceability and anti-counterfeiting verification contract for the corresponding product includes: Feature extraction algorithms are used to extract product brand, model, and batch characteristic parameters from the product traceability data to be verified. By matching the corresponding product registration number in the blockchain product evidence database using product feature parameters, a list of product identifiers to be verified is generated. Based on the target consensus node sequence number, an isolated verification block instance is constructed on the edge service node of the micro-store through a smart contract deployment interface; The list of product identifiers to be verified is input into the scheduling mechanism of the isolated verification block instance for filtering, and the corresponding product traceability and anti-counterfeiting verification contract is obtained.
6. The blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described in claim 1, characterized in that, The generation of product authenticity verification status includes: The traceability and anti-counterfeiting verification contract is distributed to multiple consortium consensus nodes within the isolated verification block instance, and the traceability and anti-counterfeiting verification contract is run separately to generate node verification result data. The verification result data of multiple consortium consensus nodes are then aggregated to form a verification result set. Based on the statistical characteristics of the verification result set, a consensus mechanism is formed by setting a threshold, designing a voting mechanism, and using a Byzantine node detection method to set a judgment threshold, voting rules, and an abnormal node removal strategy. Based on the voting rules and abnormal node removal strategy in the consensus mechanism, the verification result set is weighted and statistically integrated to obtain the comprehensive credibility score of product traceability. Based on the judgment threshold in the consensus mechanism, the comprehensive credibility score of product traceability is judged, and the authenticity verification status of the product is generated.
7. The blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described in claim 1, characterized in that, The generation of blockchain-based evidence storage and traceability logs covering the entire product lifecycle includes: The product authenticity verification status is used as input, matched with a predefined micro-mall transaction control rule library, to identify the corresponding transaction interception and merchant alarm operation instructions, and to form a preliminary traceability and handling record. By summarizing the information on all links of the traceability and processing nodes and the verification process information from the preliminary traceability and processing records and verification results, a blockchain-based traceability log covering the entire life cycle of the product is generated.
8. The blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described in claim 1, characterized in that, After generating the blockchain-based evidence storage and traceability log covering the entire lifecycle of the product, it also includes: Semantic encryption is applied to the blockchain-based evidence storage and traceability logs covering the entire product lifecycle to generate an unalterable digital fingerprint; The digital fingerprint is broadcast to all nodes in the blockchain network for consensus synchronization and stored in the Merkle tree structure of the distributed ledger; A user query channel is established to receive traceability verification requests from end users. The digital fingerprint in the distributed ledger is automatically retrieved and decrypted through a smart contract for comparison, generating and displaying a visualized traceability verification report.
9. A blockchain-based traceability and anti-counterfeiting verification device for electronic products in a micro-e-commerce platform, characterized in that, The device includes: a memory, a processor, and a blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification program stored on the memory and executable on the processor, wherein the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification program is configured to implement the steps of the blockchain-based micro-mall electronic product traceability and anti-counterfeiting verification method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a blockchain-based traceability and anti-counterfeiting verification program for electronic products in a micro-mall. When the blockchain-based traceability and anti-counterfeiting verification program is executed by a processor, it implements the steps of the blockchain-based traceability and anti-counterfeiting verification method for electronic products in a micro-mall as described in any one of claims 1 to 8.