Block chain-based cross-border e-commerce commodity tracing method and system

By using blockchain technology to generate unique traceability codes and anti-counterfeiting hash values ​​for cross-border e-commerce products, and combining digital signatures and consensus mechanisms, the problems of tampering and transparency in traditional traceability methods are solved, enabling full-process credible traceability and transparent monitoring of cross-border e-commerce products.

CN121120097AActive Publication Date: 2025-12-12GUANGZHOU DORA TECH CO LTD

Patent Information

Application Number
CN202511322094.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-12-12
Estimated Expiration
2045-09-16

AI Technical Summary

Technical Problem

Traditional cross-border e-commerce traceability methods rely on centralized data storage, which is easily tampered with or forged. They cannot monitor the status of goods in real time, making it difficult to guarantee the authenticity of goods and the transparency of the supply chain, and they also lack data privacy protection.

Method used

Using blockchain technology, unique traceability codes and anti-counterfeiting hash values ​​are generated for cross-border e-commerce products. Digital signatures and consensus mechanisms ensure that the data is tamper-proof. Anomaly detection algorithms are used to monitor logistics nodes in real time. Zero-knowledge proofs are used to achieve efficient privacy verification and display the traceability path.

Benefits of technology

It enables full-process credible traceability of cross-border e-commerce goods, ensuring product authenticity and supply chain transparency. The traceability path is displayed through a visual interface, providing transparent and credible product information and supply chain monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121120097A_ABST
    Figure CN121120097A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cross-border logistics, and discloses a cross-border e-commerce commodity traceability method and system based on a block chain, and the method comprises the following steps: generating a unique traceability code for each cross-border e-commerce commodity, extracting an original information field of the cross-border e-commerce commodity, and calculating an anti-counterfeiting hash value; performing structured packaging on the original information field and the anti-counterfeiting hash value according to a preset template, confirming a transaction through a consensus mechanism, writing the transaction into a block chain, and generating a block hash value; operation information of all logistics nodes is collected, abnormity is recognized through an abnormity detection algorithm, and data fingerprints obtained after abnormity recognition are encrypted and stored; the encrypted and signed operation information is submitted to a block chain network, and a block chain node verifies the validity of a digital signature through a public key of a producer and verifies the legality through a consensus mechanism; and proving an aggregation verification result by using zero knowledge. According to the invention, a complete traceability path is displayed, and full-chain transparent management from production to consumption is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cross-border logistics, in particular to a cross-border e-commerce commodity traceability method and system based on a blockchain. BACKGROUND

[0002] Under the wave of the global digital economy booming, cross-border e-commerce, as an important innovative industry in the field of Internet economy, is reshaping the international trade pattern at an unprecedented speed; the new trade model not only gives birth to a new consumer market, but also, in the context of the deepening development of economic globalization, promotes the increasingly close trade exchanges among countries around the world, and has become the mainstream trend and core driving force of contemporary international trade development.

[0003] Cross-border e-commerce commodities refer to commodities traded internationally through cross-border e-commerce platforms. These commodities usually involve cross-border logistics, payment and compliance processes; with the development of globalization and Internet technology, cross-border e-commerce provides consumers with more convenient global shopping channels, and also opens up a wider international market for merchants. This industry covers a wide range of commodity types, including but not limited to electronic products, clothing, cosmetics, home goods, etc., involving international payment systems, cross-border logistics, customs management and other fields, and is an important part of global trade. Cross-border e-commerce commodities circulate among multiple countries and involve multiple parties, and there are problems such as counterfeiting, unclear origin and opaque logistics process, so it is necessary to establish a traceability mechanism to ensure the authenticity of the commodities, the traceability of the logistics process and the trust of consumers.

[0004] Traditional traceability methods often rely on centralized data storage, which is vulnerable to tampering or forgery, and cannot monitor the status of commodities at each logistics node in real time, making it difficult to ensure the authenticity of the commodities and the transparency of the supply chain. At the same time, there are risks in data privacy protection, making it difficult to verify without revealing information. SUMMARY

[0005] In order to solve the problem that traditional traceability methods often rely on centralized data storage, which is vulnerable to tampering or forgery, and cannot monitor the status of commodities at each logistics node in real time, making it difficult to ensure the authenticity of the commodities and the transparency of the supply chain, the present application provides a cross-border e-commerce commodity traceability method and system based on a blockchain.

[0006] In a first aspect, the present application provides a cross-border e-commerce commodity traceability method based on a blockchain, which comprises the following steps: S1, in the production link of cross-border e-commerce commodities, a unique traceability code is generated for each cross-border e-commerce commodity, the original information field of the cross-border e-commerce commodity is extracted, and a counterfeit-proof hash value is calculated using an encryption hash algorithm; S2. The original information fields and anti-counterfeiting hash values ​​are encapsulated in a structured manner according to a preset template. The producer's private key is used for digital signature. After verifying the signature, the blockchain node confirms the transaction through the consensus mechanism and writes it into the blockchain, generating a block hash value. S3. In the cross-border e-commerce commodity circulation process, the operation information of each logistics node is collected in real time, the block hash value is used as the data fingerprint, and anomalies are identified through an anomaly detection algorithm. The blockchain node encrypts and stores the data fingerprint after anomaly identification, and the producer uses the node's private key to generate a digital signature. S4. Submit the encrypted and signed operation information to the blockchain network. The blockchain nodes verify the validity of the digital signature using the producer's public key and verify its legality through the consensus mechanism. After verification, the transaction is recorded in the blockchain nodes. S5. By inputting a unique traceability code, the blockchain node verifies the authenticity of the product, traces back the transaction records of the logistics nodes in chronological order, aggregates the verification results using zero-knowledge proofs, and displays a visual interface showing the product traceability path.

[0007] Optionally, in the production stage of cross-border e-commerce goods, a unique traceability code is generated for each cross-border e-commerce product, the original information fields of the cross-border e-commerce product are extracted, and an anti-counterfeiting hash value is calculated using a cryptographic hash algorithm, including the following steps: S11. Generate a unique traceability code for each product during the production stage, including the production batch number, raw material code, and quality inspection report number. S12. Extract the production date, origin coordinates, and equipment number as raw information; S13. Based on the unique traceability code, use the cryptographic hash algorithm to calculate the original information and generate a unique anti-counterfeiting hash value; S14. Store the original information and anti-counterfeiting hash value in the manufacturer's off-chain encrypted database, and mark the anti-counterfeiting hash value as to be uploaded to the chain and store it in the Redis cache queue.

[0008] Optionally, the original information fields and anti-counterfeiting hash values ​​are structurally encapsulated according to a preset template, and digital signatures are performed using the producer's private key. After verifying the signature, the blockchain node confirms the transaction through the consensus mechanism and writes it into the blockchain. Generating a block hash value includes the following steps: S21. Using a preset standard structure template, the original information fields and anti-counterfeiting hash values ​​are structured and encapsulated to generate a standardized data packet; S22. Digitally sign the standardized data packet using the private key held by the producer; S23. Encapsulate structured data, digital signatures, and timestamps into complete transaction data and broadcast it to blockchain nodes for verification. The producer's public key can be obtained through public records on the blockchain. S24. After receiving the transaction data, the blockchain node uses the producer's public key to verify the digital signature, ensuring that the data has not been tampered with and was initiated by the producer. S25. After verification, the blockchain node verifies the transaction content through the IBFT consensus mechanism and packages the verified transaction content into a new block to generate a block hash value.

[0009] Optionally, after receiving the transaction data, the blockchain node uses the producer's public key to verify the digital signature, ensuring that the data has not been tampered with and was initiated by the producer, including the following steps: S241. Blockchain nodes receive broadcast transaction data and extract the producer's public key from the transaction data. S242. Verify the digital signature using the producer's public key to obtain the hash value of the transaction data; S243. Blockchain nodes recalculate the hash value of transaction data to generate a new hash value; S244. Compare the verified hash value with the hash value calculated by the blockchain node; S245. When the comparison results match, it proves that the digital signature is valid, the transaction data has not been modified, and it was indeed initiated by the producer. After verification, the transaction is marked as valid.

[0010] Optionally, in the cross-border e-commerce commodity circulation process, operational information of each logistics node is collected in real time, the block hash value is used as the data fingerprint, and anomalies are identified through an anomaly detection algorithm. The blockchain node encrypts and stores the data fingerprint after anomaly identification, and the producer uses the node's private key to generate a digital signature, including the following steps: S31. Collect and store operational information of each logistics node in the cross-border e-commerce commodity circulation process; S32. Each operation message will be assigned a block hash value as a data fingerprint, whereby the data fingerprint is the unique identifier of the operation record; S33. By extracting the feature vector of the operation information, training the anomaly recognition model, continuously updating the weight of the feature vector, and combining it with the generalization risk function to calculate the anomaly score. S34. Based on the anomaly score, perform cluster analysis on the feature vector of the operation information, and combine it with the preset dynamic threshold to determine whether there is abnormal behavior. S35. Based on the judgment result, all operation information marked as normal or abnormal is encrypted and protected, and a digital signature is generated for each operation information using the producer's private key. S36. The encrypted and signed operation information is submitted to the blockchain network. The blockchain nodes verify the validity of the digital signature through the producer's public key and confirm the legality of the data through the IBFT consensus mechanism.

[0011] Alternatively, the expression for the generalized risk function is: ; In the formula, This indicates the risk of the anomaly detection model generalizing the feature vectors of operational information across various logistics nodes. This represents the empirical risk of the anomaly detection model on the training data; n represents the number of operational information items collected. Indicates the complexity of the anomaly detection model; Represents any specified low probability value; Represents the natural constant.

[0012] Optionally, the expression for calculating the anomaly score is: ; In the formula, This indicates an abnormal metric value for operational information; This indicates the risk of the anomaly detection model generalizing the feature vectors of operational information across various logistics nodes. This represents the inverse function output of the i-th classifier on the feature vector; The confidence weight assigned to the feature vector by the m-th classifier is given; M represents the total number of weak classifiers; and m represents the m-th weak classifier.

[0013] Optionally, by inputting a unique traceability code, blockchain nodes verify the authenticity of goods, trace back transaction records of logistics nodes in chronological order, aggregate verification results using zero-knowledge proofs, and display a visual interface showing the product traceability path, including the following steps: S51. When the verifier enters the unique traceability code of the cross-border e-commerce product, the blockchain node reads the corresponding data fingerprint. S52. Verify the authenticity of cross-border e-commerce goods through numerical signatures and anti-counterfeiting hash values; S53. Blockchain nodes record the transactions of each logistics node in chronological order, verify the authenticity and continuity of the cross-border e-commerce goods processing process one by one, and finally generate a zero-knowledge proof to efficiently and privately prove the validity of the entire chain. S54. Build a visual display interface that dynamically shows the traceability path of cross-border e-commerce products.

[0014] Optionally, blockchain nodes trace back the transaction records of each logistics node in chronological order, verifying the processing of cross-border e-commerce goods at each logistics node one by one, and aggregating the verification results through zero-knowledge proofs, including the following steps: S531. Locate the initial data fingerprint of the product on the blockchain based on the traceability code; S532. Starting from the production stage, extract the transaction records of logistics nodes in sequence, including transportation, customs clearance, warehousing and distribution. S533. Extract the verification elements of all logistics transactions and construct a zero-knowledge proof circuit to verify the signature validity and hash chain continuity of each transaction. S534. Map the verification elements to the input of the zero-knowledge proof circuit, perform aggregation encoding, and generate an aggregated zero-knowledge proof. S535. Submit a zero-knowledge proof to a smart contract on the blockchain, which will then verify the proof and provide the result.

[0015] Secondly, this application also provides a blockchain-based cross-border e-commerce product traceability system, which is implemented based on the aforementioned blockchain-based cross-border e-commerce product traceability method.

[0016] In summary, this application includes at least one of the following beneficial technical effects: 1. This application uses blockchain technology to build a trusted traceability system for cross-border e-commerce products throughout the entire process. It uses unique traceability codes and anti-counterfeiting hash values ​​to ensure the authenticity of products, digital signatures and consensus mechanisms to ensure the immutability of data, anomaly detection algorithms to monitor logistics nodes in real time, zero-knowledge proofs to achieve efficient privacy verification, and finally displays the complete traceability path through a visual interface, realizing transparent management of the entire chain from production to consumption.

[0017] 2. This application collects logistics node operation information in real time and assigns a unique block hash value as a data fingerprint. It uses an anomaly identification model to calculate feature vector weights and anomaly scores, combines dynamic thresholds to perform cluster analysis to determine abnormal behavior, and encrypts and digitally signs all operation information. It also uses blockchain node verification signatures and the IBFT consensus mechanism to ensure the legality and immutability of data, thereby achieving trusted monitoring and anomaly detection of the entire logistics node process.

[0018] 3. This application utilizes zero-knowledge proofs to efficiently and privately aggregate verification results, ensuring the authenticity and continuity of goods at every stage from production to delivery. It displays the complete traceability path through a visual interface, providing transparent and reliable product information and supply chain monitoring. Attached Figure Description

[0019] Figure 1 This is a flowchart of the method in this application. Detailed Implementation

[0020] The embodiments of this application are described in detail below, and examples of the embodiments are shown in the accompanying drawings.

[0021] In the description of this specification, the references to "certain embodiments," "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples" refer to specific features, structures, materials, or characteristics described in connection with the described embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0022] The first embodiment of this application discloses a blockchain-based method for tracing the origin of goods in cross-border e-commerce, referring to... Figure 1 The method for tracing the origin of cross-border e-commerce goods includes the following steps: S1. In the production process of cross-border e-commerce goods, a unique traceability code is generated for each cross-border e-commerce product, the original information fields of the cross-border e-commerce product are extracted, and an anti-counterfeiting hash value is calculated using an encrypted hash algorithm.

[0023] Preferably, in the production stage of cross-border e-commerce goods, a unique traceability code is generated for each cross-border e-commerce product, the original information fields of the cross-border e-commerce product are extracted, and an anti-counterfeiting hash value is calculated using an encrypted hash algorithm, including the following steps: S11. Generate a unique traceability code for each product during the production stage, including the production batch number, raw material code, and quality inspection report number. S12. Extract the production date, origin coordinates, and equipment number as raw information; S13. Based on the unique traceability code, use the cryptographic hash algorithm to calculate the original information and generate a unique anti-counterfeiting hash value; S14. Store the original information and anti-counterfeiting hash value in the manufacturer's off-chain encrypted database, and mark the anti-counterfeiting hash value as to be uploaded to the chain and store it in the Redis cache queue.

[0024] It should be explained that, in order to ensure that each product can be traced back to its detailed production information (such as production batch, raw materials used, and quality inspection reports), a unique traceability code needs to be generated. The traceability code is typically a composite identifier composed of multiple pieces of information, ensuring that each product has a unique identifier throughout its entire lifecycle, specifically including the following: (1) Production batch number: used to identify goods produced in the same batch during the production process; usually a combination of production date and batch number; (2) Raw material code: A unique identifier representing the raw materials used in the product, which may be the raw material batch number or product ID provided by the supplier; (3) Quality inspection report number: Every product needs to undergo quality inspection, and the quality inspection report number can be used to record the inspection standards and results; (4) Production date: Record the actual production date of the goods to ensure that the production time can be accurately traced; (5) Origin coordinates: The production location of a commodity is often related to its quality and origin. By recording GPS coordinates, the production location of the commodity can be identified, providing geographical information for future traceability. (6) Equipment number: Record the equipment number used in the production process. This can be used to trace the equipment's operating status, maintenance history, and other information to ensure the normal operation of the equipment and its impact on product quality.

[0025] Information such as production batch number, raw material code, quality inspection report number, production date, place of origin coordinates, and equipment number are concatenated. A hash algorithm is used to calculate the concatenated string to generate a unique hash value (e.g., abcdef123456...). Commonly used cryptographic hash algorithms (the cryptographic hash algorithm in this application is SHA-256) include SHA-256, SHA-3, or BLAKE2. This hash value is the anti-counterfeiting hash value of the product. It serves as the product's identity identifier and is recorded in the blockchain for subsequent verification and traceability.

[0026] S2. The original information fields and anti-counterfeiting hash values ​​are encapsulated in a structured manner according to a preset template. The producer's private key is used for digital signature. After verifying the signature, the blockchain node confirms the transaction through the consensus mechanism and writes it into the blockchain, generating a block hash value.

[0027] Preferably, the original information fields and anti-counterfeiting hash values ​​are structurally encapsulated according to a preset template, and digital signatures are performed using the producer's private key. After verifying the signature, the blockchain node confirms the transaction through the consensus mechanism and writes it into the blockchain, generating a block hash value, which includes the following steps: S21. Using a preset standard structure template, the original information fields and anti-counterfeiting hash values ​​are structurally encapsulated to generate standardized data packets.

[0028] S22. Digitally sign the standardized data packets using the private key held by the producer.

[0029] S23. The structured data, digital signature, and timestamp are encapsulated into complete transaction data and broadcast to blockchain nodes for verification. The producer's public key can be obtained through public records on the blockchain.

[0030] S24. After receiving the transaction data, the blockchain node uses the producer's public key to verify the digital signature, ensuring that the data has not been tampered with and was initiated by the producer.

[0031] Preferably, after receiving transaction data, the blockchain node uses the producer's public key to verify the digital signature, ensuring that the data has not been tampered with and was initiated by the producer, including the following steps: S241. Blockchain nodes receive broadcast transaction data and extract the producer's public key from the transaction data. S242. Verify the digital signature using the producer's public key to obtain the hash value of the transaction data; S243. Blockchain nodes recalculate the hash value of transaction data to generate a new hash value; S244. Compare the verified hash value with the hash value calculated by the blockchain node; S245. When the comparison results match, it proves that the digital signature is valid, the transaction data has not been modified, and it was indeed initiated by the producer. After verification, the transaction is marked as valid.

[0032] S25. After verification, the blockchain node verifies the transaction content through the IBFT consensus mechanism and packages the verified transaction content into a new block to generate a block hash value.

[0033] It's important to explain that the IBFT consensus mechanism is a fault-tolerant blockchain consensus algorithm suitable for private or permissioned blockchains requiring high reliability. The IBFT consensus mechanism is designed to ensure the correctness of consensus even when faced with up to one-third malicious nodes. In the IBFT consensus mechanism, participating nodes are divided into proposers and validators. Proposers propose candidate content for new blocks, and validators confirm the validity of the block through voting. To reach consensus, multiple stages of voting are required, and after confirmation by a majority of nodes, a new block is finally generated and broadcast. If the transaction content passes verification, the blockchain nodes will package it into a new block and generate a block hash value, ensuring data security and immutability.

[0034] Specific examples are described below: A certain brand produced a batch of imported skincare face creams.

[0035] The factory generates a unique traceability code for this batch of face cream during the production process, for example: 1. Production batch number: 20250912-001; 2. Raw material code: RM-AH12345 (indicates a batch of hyaluronic acid raw materials from a certain supplier); 3. Quality Inspection Report Number: QC-20250912-789; After combining all the above information, the resulting unique traceability code is as follows: 20250912-001-RM-AH12345-QC-20250912-789.

[0036] Simultaneous extraction: 1. Production date: September 12, 2025; 2. Location coordinates: 31.2304°N, 121.4737°E (a production plant in Shanghai); 3. Equipment number: EQP-998877; The original field and the traceability code are concatenated into a string, and the SHA-256 algorithm is used to calculate the anti-counterfeiting hash value: ab56b4d92b40713acc5af89985d4b786...; The factory encapsulates the "original information field + anti-counterfeiting hash value" into a data packet according to a standard template, and digitally signs the data packet using the factory's private key; The data packet, along with its digital signature and timestamp, is broadcast to the blockchain network. Upon receiving it, the blockchain nodes use the public key published by the factory on the chain to verify the signature, confirming that the data has not been tampered with and was indeed initiated by the factory. After successful verification, the blockchain nodes reach a consensus through the IBFT consensus mechanism, package the transaction and related information into a new block, and generate a new block hash value, for example: 0000abc7654ff789c23d...; Ultimately, when consumers purchase this skincare product, they can simply enter the traceability code on the packaging to access anti-counterfeiting and traceability data on the blockchain, including the production batch, source of raw materials, quality inspection information, and coordinates of the production plant.

[0037] S3. In the cross-border e-commerce commodity circulation process, the operation information of each logistics node is collected in real time, the block hash value is used as the data fingerprint, and anomalies are identified through an anomaly detection algorithm. The blockchain node encrypts and stores the data fingerprint after anomaly identification, and the producer uses the node's private key to generate a digital signature.

[0038] Preferably, in the cross-border e-commerce commodity circulation process, operational information of each logistics node is collected in real time, the block hash value is used as the data fingerprint, and anomalies are identified through an anomaly detection algorithm. The blockchain node encrypts and stores the data fingerprint after anomaly identification, and the producer uses the node's private key to generate a digital signature, including the following steps: S31. Collect and store operational information of each logistics node in the cross-border e-commerce commodity circulation process.

[0039] S32. Each operation message will be assigned a block hash value as a data fingerprint, where the data fingerprint is the unique identifier of the operation record.

[0040] S33. By extracting the feature vector of the operation information, the anomaly recognition model is trained, the weights of the feature vector are continuously updated, and the anomaly score is calculated by combining the generalization risk function.

[0041] It needs to be explained that during the production and logistics of cross-border e-commerce goods, a large amount of data is generated from operational information (such as the usage of production equipment, the production process of goods, the usage of raw materials, and the results of product inspection). In order to use this data for abnormal behavior detection, meaningful features must first be extracted from it. For example, the timestamp, operation type, equipment number, and place of origin coordinates of each operation may be extracted. All of this information will be transformed into a set of feature vectors, which can represent the core content of the operational information.

[0042] Preferably, the expression for the generalized risk function is: ; In the formula, This indicates the risk of the anomaly detection model generalizing the feature vectors of operational information across various logistics nodes. This represents the empirical risk of the anomaly detection model on the training data; n represents the number of operational information items collected. Indicates the complexity of the anomaly detection model; Represents any specified low probability value; Represents the natural constant.

[0043] Preferably, the expression for calculating the anomaly score is: ; In the formula, This indicates an abnormal metric value for operational information; This indicates the risk of the anomaly detection model generalizing the feature vectors of operational information across various logistics nodes. This represents the inverse function output of the i-th classifier on the feature vector; The confidence weight assigned to the feature vector by the m-th classifier is given; M represents the total number of weak classifiers; and m represents the m-th weak classifier.

[0044] It should be explained that after each operation information is calculated by the anomaly identification model, an anomaly score will be generated; the higher the score, the more the operation deviates from the normal range, which may indicate a potential anomaly.

[0045] S34. Based on the anomaly score, perform cluster analysis on the feature vector of the operation information, and combine it with the preset dynamic threshold to determine whether there is abnormal behavior. S35. Based on the judgment result, all operation information marked as normal or abnormal is encrypted and protected, and a digital signature is generated for each operation information using the producer's private key. S36. The encrypted and signed operation information is submitted to the blockchain network. The blockchain nodes verify the validity of the digital signature through the producer's public key and confirm the legality of the data through the IBFT consensus mechanism.

[0046] It should be explained that the abnormality score of all operation information is calculated and operation information with similar abnormality scores is clustered. For example, if the abnormality scores of some production batches are all very high, they are classified into one category and these batches are considered to have potential abnormal behavior. The preset dynamic threshold is designed to cope with environmental changes such as different time periods and different production cycles. The dynamic threshold will be adjusted according to real-time data, historical data or external changes (such as seasonal changes, market demand fluctuations, etc.).

[0047] Whether it's normal or abnormal operation, all operation information is protected by encryption to ensure the privacy and security of the information; the encrypted data is unreadable, and even if a third party obtains it, they cannot directly access the sensitive information; this usually uses symmetric encryption algorithms (such as AES) to encrypt the data, so that the data can be encrypted before being sent and decrypted when being received, ensuring that the data is not stolen or tampered with throughout the process.

[0048] Digitally signing operational data is used to verify the data's origin and integrity. Digital signatures use the producer's private key to sign the encrypted data, generating a unique signature value. The signing process ensures the following: (1) Data has not been tampered with: If the signature verification fails, it means that the data has been modified; (2) The data source is trustworthy: Only the producer holds the private key, proving that the data does indeed come from the producer; Digital signatures also provide non-repudiation, meaning that the producer cannot deny that they have generated and signed the operational information.

[0049] S4. Submit the encrypted and signed operation information to the blockchain network. The blockchain nodes verify the validity of the digital signature using the producer's public key and verify its legitimacy through the consensus mechanism. Once verified, the transaction is recorded in the blockchain nodes.

[0050] S5. By inputting a unique traceability code, the blockchain node verifies the authenticity of the product, traces back the transaction records of the logistics nodes in chronological order, aggregates the verification results using zero-knowledge proofs, and displays a visual interface showing the product traceability path.

[0051] Preferably, by inputting a unique traceability code, blockchain nodes verify the authenticity of goods, trace back transaction records of logistics nodes in chronological order, aggregate verification results using zero-knowledge proofs, and display a visual interface showing the product traceability path, including the following steps: S51. When the verifier enters the unique traceability code of the cross-border e-commerce product, the blockchain node reads the corresponding data fingerprint. S52. Verify the authenticity of cross-border e-commerce goods through numerical signatures and anti-counterfeiting hash values; S53. Blockchain nodes record the transactions of each logistics node in chronological order, verify the authenticity and continuity of the cross-border e-commerce goods processing process one by one, and finally generate a zero-knowledge proof to efficiently and privately prove the validity of the entire chain. S54. Build a visual display interface that dynamically shows the traceability path of cross-border e-commerce products.

[0052] Preferably, the blockchain nodes trace back the transaction records of each logistics node in chronological order, verifying the processing of cross-border e-commerce goods at each logistics node one by one, and aggregating the verification results through zero-knowledge proofs, including the following steps: S531. Locate the initial data fingerprint of the product on the blockchain based on the traceability code; S532. Starting from the production stage, extract the transaction records of logistics nodes in sequence, including transportation, customs clearance, warehousing and distribution. S533. Extract the verification elements of all logistics transactions and construct a zero-knowledge proof circuit to verify the signature validity and hash chain continuity of each transaction. S534. Map the verification elements to the input of the zero-knowledge proof circuit, perform aggregation encoding, and generate an aggregated zero-knowledge proof. S535. Submit a zero-knowledge proof to a smart contract on the blockchain, which will then verify the proof and provide the result.

[0053] It should be explained that the initial data fingerprint is like a product's ID card, recording the product's production information, anti-counterfeiting hash value, and other core data. Once the product enters the logistics node, all subsequent operation data will be associated with this data fingerprint, ensuring that the operation at each stage can be traced back to the specific product.

[0054] From the moment of production, cross-border e-commerce goods go through multiple logistics stages. Each stage (such as transportation, customs clearance, warehousing, and delivery) generates transaction records; these records include processing information for each stage, such as: (1) Transportation records: information such as transportation company, route, transportation time, and transportation method; (2) Customs clearance records: information such as customs clearance time, customs clearance location, and customs clearance procedures; (3) Warehousing records: time of goods entering the warehouse, storage conditions, outbound records, etc.; (4) Delivery records: delivery company, delivery method, estimated delivery time, etc.

[0055] To verify the validity of a transaction while ensuring privacy, a zero-knowledge proof circuit needs to be constructed. The zero-knowledge proof circuit is used to verify whether transaction data meets specific conditions (such as signature validity, hash chain continuity, etc.) without directly exposing the transaction content. The zero-knowledge proof circuit does not reveal the specific details of the transaction during the verification process, but only confirms whether a certain condition is met.

[0056] Aggregate coding combines the verification results of multiple transactions into a unified proof; this means that instead of generating separate proofs for each logistics node, a single aggregated zero-knowledge proof is generated through aggregate coding to verify the legality of all stages.

[0057] The aggregated zero-knowledge proofs are submitted to a smart contract on the blockchain. As a type of automatically executed code, a smart contract can receive external data and process it according to preset rules. In this scenario, the task of the smart contract is to receive and verify the zero-knowledge proofs to ensure that the operation of each logistics node is legal and meets the predetermined conditions.

[0058] Specific examples are described below: At a certain logistics node (e.g., the transportation process), a total of n=1000 operational information entries (e.g., transportation time, temperature, humidity, etc.) were collected; the complexity of the anomaly detection model is d=5, meaning the model has 5 parameters during data processing; the empirical risk of the standard model in the training data. =0.1; =0.05 indicates that the maximum probability of an accepted error is 5%; Substituting the expression for the generalization risk function, we calculate the generalization risk of the anomaly detection model for the feature vectors of operational information at each logistics node. Assuming e = 2.718 is the natural constant, substitute other values ​​to calculate: =0.1, n=1000, d=5 =0.05; The final for: ≤0.1+0.2519+0.0774=0.4293; Suppose we have 10 feature vectors (W=10) and 5 classifiers (M=5), with confidence weights for each classifier. They are respectively: =0.2, =0.15, =0.25, =0.1, =0.3; Substituting the values ​​into the expression for the abnormal score, we get F = 0.4293; The dynamic threshold is 0.4 (adjusted based on recent transportation congestion). All data were clustered using K-means based on outlier scores (clustered into 3 classes): Category 1: Score < 0.3 → Normal operation; Category 2: Scores between 0.3 and 0.5 → Boundary data (note this); Category 3: Score > 0.5 → Highly abnormal; Data with F=0.4293 falls into the second category; data in the third category is directly marked as anomaly; data in the second category is marked as "to be monitored" (if a dense distribution occurs, it will be included in the anomaly handling); Each piece of data is encrypted using a symmetric encryption algorithm (such as AES) to prevent leakage.

[0059] Example: Encrypt a piece of raw data {time 10:00, device TX-22, temperature 8.5°C} into ciphertext 0x9a…e3; The encrypted data is signed using the producer's private key to generate a digital signature value Sig(data); then the upload and verification processes begin.

[0060] 1. Upload process: The packaged data is submitted to the blockchain node via a transaction; The data includes: encrypted data (ciphertext), digital signature, and status label (normal / abnormal). 2. Verification process: Blockchain nodes use the producer's public key to verify signatures; If the verification passes, it proves the data is valid. If verification fails, the data will be rejected from being written to the chain. All verified data is submitted to the IBFT consensus mechanism to reach a consensus, ensuring data consistency and reliability.

[0061] The second embodiment of this application also discloses a blockchain-based cross-border e-commerce product traceability system, which is implemented based on the aforementioned blockchain-based cross-border e-commerce product traceability method.

[0062] It should be noted that the calculation formulas and all parameters involved in the calculations in this application have been dimensionless beforehand. The process of dimensionless processing is well known in the industry and will not be described here.

[0063] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A blockchain-based method for tracing the origin of goods in cross-border e-commerce, characterized in that, This cross-border e-commerce product traceability method includes the following steps: S1. In the production process of cross-border e-commerce goods, a unique traceability code is generated for each cross-border e-commerce product, the original information fields of the cross-border e-commerce product are extracted, and the anti-counterfeiting hash value is calculated using a cryptographic hash algorithm. S2. The original information fields and anti-counterfeiting hash values ​​are encapsulated in a structured manner according to a preset template. The producer's private key is used for digital signature. After verifying the signature, the blockchain node confirms the transaction through the consensus mechanism and writes it into the blockchain, generating a block hash value. S3. In the cross-border e-commerce commodity circulation process, the operation information of each logistics node is collected in real time, the block hash value is used as the data fingerprint, and anomalies are identified through an anomaly detection algorithm. The blockchain node encrypts and stores the data fingerprint after anomaly identification, and the producer uses the node's private key to generate a digital signature. S4. Submit the encrypted and signed operation information to the blockchain network. The blockchain nodes verify the validity of the digital signature using the producer's public key and verify its legality through the consensus mechanism. After verification, the transaction is recorded in the blockchain nodes. S5. By inputting a unique traceability code, the blockchain node verifies the authenticity of the product, traces back the transaction records of the logistics nodes in chronological order, aggregates the verification results using zero-knowledge proofs, and displays a visual interface showing the product traceability path.

2. The blockchain-based cross-border e-commerce product traceability method according to claim 1, characterized in that, In the production stage of cross-border e-commerce goods, generating a unique traceability code for each cross-border e-commerce product, extracting the original information fields of the cross-border e-commerce product, and calculating the anti-counterfeiting hash value using an encrypted hash algorithm includes the following steps: S11. Generate a unique traceability code for each product during the production stage, including the production batch number, raw material code, and quality inspection report number. S12. Extract the production date, origin coordinates, and equipment number as raw information; S13. Based on the unique traceability code, use the cryptographic hash algorithm to calculate the original information and generate a unique anti-counterfeiting hash value; S14. Store the original information and anti-counterfeiting hash value in the manufacturer's off-chain encrypted database, and mark the anti-counterfeiting hash value as to be uploaded to the chain and store it in the Redis cache queue.

3. The blockchain-based cross-border e-commerce product traceability method according to claim 1, characterized in that, The process of encapsulating the original information fields and anti-counterfeiting hash values ​​according to a preset template, performing digital signatures using the producer's private key, and having blockchain nodes confirm the transaction and write it to the blockchain through a consensus mechanism after verifying the signature, generating a block hash value, includes the following steps: S21. Using a preset standard structure template, the original information fields and anti-counterfeiting hash values ​​are structured and encapsulated to generate a standardized data packet; S22. Digitally sign the standardized data packets using the private key held by the producer; S23. Encapsulate structured data, digital signatures, and timestamps into complete transaction data and broadcast it to blockchain nodes for verification. The producer's public key can be obtained through public records on the blockchain. S24. After receiving the transaction data, the blockchain node uses the producer's public key to verify the digital signature, ensuring that the data has not been tampered with and was initiated by the producer. S25. After verification, the blockchain node verifies the transaction content through the IBFT consensus mechanism and packages the verified transaction content into a new block to generate a block hash value.

4. The blockchain-based cross-border e-commerce product traceability method according to claim 3, characterized in that, After receiving the transaction data, the blockchain node uses the producer's public key to verify the digital signature, ensuring that the data has not been tampered with and was initiated by the producer, including the following steps: S241. Blockchain nodes receive broadcast transaction data and extract the producer's public key from the transaction data. S242. Verify the digital signature using the producer's public key to obtain the hash value of the transaction data; S243. Blockchain nodes recalculate the hash value of transaction data to generate a new hash value; S244. Compare the verified hash value with the hash value calculated by the blockchain node; S245. When the comparison results match, it proves that the digital signature is valid, the transaction data has not been modified, and it was indeed initiated by the producer. After verification, the transaction is marked as valid.

5. The blockchain-based cross-border e-commerce product traceability method according to claim 1, characterized in that, In the cross-border e-commerce commodity circulation process, the operation information of each logistics node is collected in real time, the block hash value is used as the data fingerprint, and anomalies are identified through an anomaly detection algorithm. The blockchain node encrypts and stores the data fingerprint after anomaly identification, and the producer uses the node's private key to generate a digital signature, including the following steps: S31. Collect and store operational information of each logistics node in the cross-border e-commerce commodity circulation process; S32. Each operation message will be assigned a block hash value as a data fingerprint, whereby the data fingerprint is the unique identifier of the operation record; S33. By extracting the feature vector of the operation information, training the anomaly recognition model, continuously updating the weight of the feature vector, and combining it with the generalization risk function to calculate the anomaly score. S34. Based on the anomaly score, perform cluster analysis on the feature vector of the operation information, and combine it with the preset dynamic threshold to determine whether there is abnormal behavior. S35. Based on the judgment result, all operation information marked as normal or abnormal is encrypted and protected, and a digital signature is generated for each operation information using the producer's private key. S36. The encrypted and signed operation information is submitted to the blockchain network. The blockchain nodes verify the validity of the digital signature through the producer's public key and confirm the legality of the data through the IBFT consensus mechanism.

6. The blockchain-based cross-border e-commerce product traceability method according to claim 5, characterized in that, The expression for the generalized risk function is: ; In the formula, This indicates the risk of the anomaly detection model generalizing the feature vectors of operational information across various logistics nodes. This represents the empirical risk of the anomaly detection model on the training data; n represents the number of operational information items collected. Indicates the complexity of the anomaly detection model; Represents any specified low probability value; Represents the natural constant.

7. The blockchain-based cross-border e-commerce product traceability method according to claim 6, characterized in that, The expression for calculating the anomaly score is as follows: ; In the formula, This indicates an abnormal metric value for operational information; This indicates the risk of the anomaly detection model generalizing the feature vectors of operational information across various logistics nodes. This represents the inverse function output of the i-th classifier on the feature vector; The confidence weight assigned to the feature vector by the m-th classifier is M; M represents the total number of weak classifiers; and m represents the m-th weak classifier.

8. The blockchain-based cross-border e-commerce product traceability method according to claim 1, characterized in that, The process of verifying the authenticity of goods by inputting a unique traceability code, tracing back transaction records of logistics nodes in chronological order, aggregating verification results using zero-knowledge proofs, and displaying a visual interface showing the product traceability path includes the following steps: S51. When the verifier enters the unique traceability code of the cross-border e-commerce product, the blockchain node reads the corresponding data fingerprint. S52. Verify the authenticity of cross-border e-commerce goods through numerical signatures and anti-counterfeiting hash values; S53. Blockchain nodes record the transactions of each logistics node in chronological order, verify the authenticity and continuity of the cross-border e-commerce goods processing process one by one, and finally generate a zero-knowledge proof to efficiently and privately prove the validity of the entire chain. S54. Build a visual display interface that dynamically shows the traceability path of cross-border e-commerce products.

9. The blockchain-based cross-border e-commerce product traceability method according to claim 8, characterized in that, The blockchain nodes trace back the transaction records of each logistics node in chronological order, verifying the processing of cross-border e-commerce goods at each logistics node one by one, and aggregating the verification results through zero-knowledge proofs, including the following steps: S531. Locate the initial data fingerprint of the product on the blockchain based on the traceability code; S532. Starting from the production stage, extract the transaction records of logistics nodes in sequence, including transportation, customs clearance, warehousing and distribution. S533. Extract the verification elements of all logistics transactions and construct a zero-knowledge proof circuit to verify the signature validity and hash chain continuity of each transaction. S534. Map the verification elements to the input of the zero-knowledge proof circuit, perform aggregation encoding, and generate an aggregated zero-knowledge proof. S535. Submit a zero-knowledge proof to a smart contract on the blockchain, which will then verify the proof and provide the result.

10. A blockchain-based cross-border e-commerce product traceability system, characterized in that, The system is implemented based on the blockchain-based cross-border e-commerce product traceability method described in any one of claims 1-9.

Citation Information

Patent Citations

  • Commodity anti-counterfeit traceability method and device based on block chain, and node of block chain

    CN109034851A

  • A commodity tracing system and method based on a block chain

    CN109886685A

  • E-commerce commodity traceability information acquisition method based on block chain

    CN110889703A

  • Distributed commodity storage traceability method and system based on block chain

    CN111311288A

  • Commodity anti-counterfeiting traceability method based on block chain technology

    CN112184252A

Cited By

  • Dynamic traceability identifier generation and verification method based on multi-node environment data fusion

    CN121390112A

  • Dynamic traceability identification generation and verification method based on multi-node environment data fusion

    CN121390112B

  • Supply chain management method and system based on block chain and artificial intelligence

    CN121810323A

  • Block chain-based cross-border e-commerce global warehouse logistics intelligent scheduling and supply chain tracking system

    CN121920916A