A commodity traceability method and system for cross-border logistics
Through alliance chains and smart contracts, the cross-border logistics blockchain network is built, combined with graph neural networks and reinforcement learning algorithms, data silos and security problems in cross-border logistics are solved, real-time tracking and intelligent management of the supply chain are realized, and the efficiency and transparency of cross-border logistics are improved.
Patent Information
- Application Number
- CN202411385748.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-09-30
AI Technical Summary
The existing cross-border logistics commodity traceability system relies on a centralized database, and has problems such as data islands, opaque information, insufficient security, poor real-time, and insufficient intelligent decision-making support, which affects the efficiency and management level of supply chains.
The blockchain network is designed using the alliance chain architecture, and data sharing is guaranteed securely through smart contracts and trusted hardware, combined with graph neural networks and reinforcement learning algorithms, supply chain relationships are modeled and featured, and layered storage solutions and hybrid architectures are designed to realize real-time data tracking and global optimization.
It improves the transparency and security of the supply chain, enhances the real-time and credibility of data, improves the intelligence level and operational efficiency of the supply chain, and optimizes path planning and decision-making strategies.
Smart Images

Figure CN119359320B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of cross-border logistics, and particularly relates to a method and system for tracing the origin of goods in cross-border logistics. Background Art
[0002] Currently, the tracing of goods in cross-border logistics mainly relies on traditional barcodes, QR codes, and RFID technologies, combined with a centralized database management system. These systems generally include the following parts:
[0003] Barcode / QR code: By scanning the barcode or QR code, the basic information of the goods is recorded, such as production date, manufacturer, batch number, etc.
[0004] RFID technology: Through RFID tags and readers, the location and status of the goods are tracked in real time.
[0005] Centralized database: The collected data is stored in a centralized database for all parties to query and manage.
[0006] Manual recording and reporting: In some links, manual recording and reporting are still relied on to ensure the integrity and accuracy of the data.
[0007] These technologies have improved the transparency and management efficiency of cross-border logistics to a certain extent, but there are still many defects and deficiencies in actual applications.
[0008] At the same time, the existing systems rely on centralized databases, and the data is prone to form data islands, making it difficult for data to be shared and interconnected among different participants. In cross-border logistics, there are multiple participants, such as manufacturers, suppliers, logistics companies, customs, retailers, etc. Each participant has its own data system, and there are obstacles to the sharing and exchange of data, resulting in information opacity and inconsistency. The centralized database is vulnerable to attacks and tampering, and the credibility of the data cannot be fully guaranteed. Once the data is tampered with, it will seriously affect the accuracy and reliability of goods tracing. In traditional systems, the collection and upload of data may be delayed and cannot reflect the status and location of the goods in real time. Especially in cross-border transportation, the goods may go through multiple transfer links, and the real-time update of data is particularly important, but the existing systems often cannot meet this requirement. At the same time, the links relying on manual recording and reporting are prone to errors and omissions, affecting the accuracy and integrity of the data. For example, handwritten documents may have clerical errors or omissions, resulting in data distortion and affecting subsequent management and decision-making.
[0009] Centralized databases store a large amount of sensitive information. Once a data leak occurs, it may cause serious economic losses and reputation damage. Especially in cross-border logistics, which involves the laws and regulations of multiple countries and regions, data protection requirements are higher. The existing system has deficiencies in authority management and cannot effectively control the access and operation of data by different participants, posing security risks. For example, some participants may access or modify data without authorization, resulting in inconsistent and confusing data.
[0010] The existing system lacks intelligent decision-making support functions and cannot provide optimization suggestions based on real-time and historical data, which affects the efficiency and management level of the supply chain. For example, the existing system cannot predict the best transportation route or optimize inventory management based on logistics data, resulting in resource waste and inefficiency. The existing data processing and analysis capabilities are weak and cannot effectively predict and prevent potential risks and problems. For example, the existing system cannot predict the risk of logistics delays or cargo damage based on historical data, resulting in slow response and serious losses to enterprises when facing emergencies. Summary of the invention
[0011] The purpose of this invention is to propose a commodity traceability method and system for cross-border logistics, which uses a consortium chain architecture to build a trusted data network and ensures data security sharing through smart contracts and trusted hardware. In view of performance bottlenecks, a layered storage solution is designed and the consensus mechanism is optimized. The graph neural network is innovatively integrated with the blockchain to model and learn the characteristics of the supply chain relationship. Based on the reinforcement learning algorithm, the supply chain operation is modeled as a Markov decision process, and the graph features are integrated to achieve global strategy optimization.
[0012] In order to achieve the above object, a first aspect of the present invention provides a commodity tracing method for a cross-border e-commerce supply chain, the method comprising:
[0013] S1. Adopt the alliance chain architecture to design a blockchain network for multiple parties to participate in the cross-border e-commerce supply chain, define data sharing and privacy protection rules through smart contracts, and introduce trusted hardware modules to ensure the trusted collection of IoT device data;
[0014] S2. Design a hierarchical data storage solution to store high-frequency trading data in an off-chain database, regularly synchronize and verify it with on-chain data, and optimize the consensus algorithm and smart contract execution mechanism;
[0015] S3. Integrate the graph neural network model in the blockchain network, map the supply chain information into nodes and edges in the graph structure, and use the graph neural network to learn the representation of node features and edge relationships, and mine the implicit associations and dependencies in the supply chain;
[0016] S4. Build a reinforcement learning model, model the supply chain operation process as a Markov decision process, design the indicators of the supply chain as the reward function, and adaptively adjust the strategies of all links of the supply chain through the interaction and learning between the agent and the environment for global optimization. During the training process of the reinforcement learning model, fuse the feature information extracted by the graph neural network;
[0017] S5. For the demand of full-process tracking of the supply chain, design a data management solution based on blockchain and the Internet of Things. By deploying Internet of Things devices at key nodes, collect commodity information in real time, and upload the real-time data to the blockchain for storage. At the same time, use smart contracts to trigger data collection and sharing events for automated data flow;
[0018] S6. Deploy a hybrid architecture in a distributed environment. Through containerization technology and microservice design, ensure the independence and scalability of each component. At the same time, adopt a multi-level caching and load balancing mechanism to improve the concurrent processing ability and fault tolerance. At the same time, establish a sound monitoring and early warning mechanism to respond to and handle abnormal situations in a timely manner;
[0019] S7. For the interpretability requirements of complex architectures, introduce attention mechanisms and causal reasoning technologies to visually explain the decision-making process of the model. Then, through knowledge graph technology, construct a panoramic view of the supply chain to support multi-dimensional data correlation analysis and decision traceability.
[0020] Furthermore, the S1 specifically includes:
[0021] S101. According to the characteristics of multi-party participation in the cross-border e-commerce supply chain, design a blockchain network using a consortium chain architecture, and add each participating party as a node of the consortium chain to the network;
[0022] S102. Deploy smart contracts on the consortium chain, define the data sharing permissions and privacy protection rules of each participating party through smart contracts, and conduct secure sharing of supply chain data;
[0023] S103. For the Internet of Things devices in the supply chain, introduce a trusted hardware module to authenticate the devices and encrypt and sign the collected data to ensure the credibility of the data source;
[0024] S104. The Internet of Things devices upload the encrypted and signed data to the consortium chain, verify the authenticity and integrity of the data through smart contracts, and record the verification results on the blockchain;
[0025] S105. Each participating party in the supply chain accesses the consortium chain and obtains the required supply chain data according to the permissions specified by the smart contract to ensure the security and credibility of data sharing;
[0026] S106. Adopt the federated learning algorithm to achieve shared modeling and analysis of supply chain data while protecting the data privacy of all parties, and improve the intelligence level of supply chain decision-making;
[0027] S107. Record and track all-process data of the blockchain supply chain.
[0028] Further, the S2 specifically includes:
[0029] S201. Classify the data in the blockchain network according to the transaction frequency and business importance, and identify high-frequency transaction data and key business data;
[0030] S202. Design a hierarchical storage architecture and store the high-frequency transaction data in a high-performance database off-chain;
[0031] S203. For the high-frequency transaction data stored off-chain, calculate the digest information of the data through the hash algorithm, and regularly synchronize the digest information to the blockchain network to achieve synchronous verification of on-chain and off-chain data;
[0032] S204. Embed data verification logic in the smart contract. When the off-chain data is synchronized to the on-chain, trigger the smart contract to automatically verify the integrity and consistency of the data to ensure that the off-chain data is synchronized with the on-chain data;
[0033] S205. Optimize the consensus mechanism of the blockchain network using the consensus algorithm;
[0034] S206. Optimize the execution logic of the smart contract and optimize the Gas consumption of the contract to improve the contract execution efficiency;
[0035] S207. Introduce the pre-compiled contract mechanism, encapsulate common business logics as pre-compiled contracts, reduce the deployment and invocation overhead of the contracts, and improve the execution performance of the contracts; among them, the code of the pre-compiled contracts of the pre-compiled contract mechanism is pre-compiled and optimized on the blockchain nodes and can be directly invoked without re-compilation.
[0036] Further, the S3 specifically includes:
[0037] S301. Build a supply chain graph data model according to the information in the supply chain, where the participants, commodities, and orders are mapped to the nodes of the graph, and the relationships between them are mapped to the edges; among them, the information in the supply chain includes participant information, commodity information, and order information;
[0038] S302. Use the graph neural network model to perform representation learning on the constructed supply chain graph data, and learn the low-dimensional vector representation of the nodes by aggregating the feature information of the nodes and the relationship information of the edges;
[0039] S303. Calculate the similarity between nodes based on the node representation vectors learned by the graph neural network, and mine the implicit association and dependence relationships in the supply chain;
[0040] S304. Use the mined association and dependence relationships as constraint conditions, and combine with the supply chain business rules to construct a supply chain path planning and strategy optimization model;
[0041] S305. Solve the path planning and strategy optimization model using a reinforcement learning algorithm to obtain the optimal supply chain path plan and strategy parameters;
[0042] S306. Write the obtained optimal path plan and strategy parameters into the blockchain network, and utilize the immutable and traceable characteristics of the blockchain to ensure the fairness and transparency of supply chain decisions;
[0043] S307. Continuously monitor the supply chain operation data, update the graph data model in real time through the blockchain network, perform online learning and optimization, dynamically adjust the path planning plan and strategy parameters, and achieve the adaptive optimization of the supply chain.
[0044] Further, the said S4 specifically includes:
[0045] S401. Construct a Markov decision process model based on the historical data of supply chain operations. The state space includes the key elements in the production process, and the action space includes the execution decisions;
[0046] S402. For the supply chain network structure, use the graph neural network to extract the feature representations of each node and edge, and fuse the business attributes to form a state feature vector;
[0047] S403. Design a reward function according to the order metrics, quantitatively evaluate the overall performance of the supply chain, and use it as the optimization goal of reinforcement learning;
[0048] S404. Construct an agent model, and use a deep reinforcement learning algorithm to explore through interaction with the environment, learn the optimal decision-making strategy, and adaptively adjust the strategy parameters of each link in the supply chain according to the state features;
[0049] S405. During the training process, utilize the feature information extracted by the graph neural network, and at the same time introduce expert knowledge to optimize the reward function to accelerate strategy learning;
[0050] S406. Deploy the trained agent model, and dynamically adjust the supply chain operation strategy according to the real-time state information to adapt to market changes;
[0051] S407. Monitor the decision-making results, collect new data for model iteration and update, and at the same time establish a digital twin system to perform real-time simulation on the entire supply chain process and evaluate the impact of the decision-making.
[0052] S408. If the predicted performance does not meet the requirements, an early warning is triggered and the intelligent agent is called to re-optimize the strategy to form a closed-loop control.
[0053] Furthermore, the key factors include inventory levels, order quantities and production plans; the execution decisions include ordering, production and transportation; the business attributes include timeliness requirements and cost budgets; and the order indicators include order fill rate, inventory turnover rate and transportation timeliness.
[0054] Furthermore, the S5 specifically includes:
[0055] S501. Collect the location and status information of commodities in real time at key nodes of the supply chain through IoT devices;
[0056] S502. The collected location information and status information are immediately uploaded to the blockchain system via a secure network protocol;
[0057] S503. Using smart contracts on the blockchain to automatically trigger the data storage and sharing mechanism. The smart contract automatically processes the data according to the preset rules and automatically shares the data with authorized participants in the supply chain. Once the data is stored on the blockchain, it provides clear and traceable data records for each commodity in the supply chain.
[0058] S504. By setting thresholds and parameters, the smart contract automatically triggers alarms and notifications when the commodity status changes in a predetermined manner, and promptly notifies the supply chain manager to take corresponding measures;
[0059] S505. Monitor and optimize the execution rules of smart contracts to ensure that the system can adapt to the dynamically changing needs of the supply chain while maintaining efficient and accurate data management and utilization.
[0060] Furthermore, the S6 specifically includes:
[0061] S601. Deploy microservice architecture through containerization technology to achieve component independence and scalability in a distributed environment. Containerization technology provides an isolated environment, while microservice architecture supports independent deployment and expansion of services.
[0062] S602, deploy a multi-level cache system to optimize data access speed and reduce the load of the backend system;
[0063] S603, implement a load balancing mechanism, which dynamically allocates requests to ensure no single point of failure and disperses user requests to multiple servers;
[0064] S604. Establish a comprehensive monitoring system to monitor the operation status of microservices and system resource usage in real time;
[0065] S605. Integrate the early warning system and the monitoring system. When abnormal behavior or performance degradation is detected, the early warning system can automatically trigger an alarm and notify the system administrator;
[0066] S606. Optimize the exception handling mechanism to ensure that when any component fails, it can recover and continue to provide services; among them, the exception handling mechanism includes automatic failover and fault recovery strategies.
[0067] Furthermore, the S7 specifically includes:
[0068] S701. For the interpretability requirements of complex architectures, by introducing an attention mechanism, capture the key features of the model during the decision-making process and determine the importance weights of different features;
[0069] S702. Utilize causal inference technology to construct a causal graph model based on domain knowledge, build the causal dependence relationship between variables, analyze the reasons for the model decision results, and enhance the interpretability of the decision-making process;
[0070] S703. Adopt visualization technology to present the attention weights and causal inference results in an intuitive way;
[0071] S704. Construct a supply chain knowledge graph, semantically model business entities, relationships, and attributes to form a panoramic view of the supply chain. At the same time, map business data to the knowledge graph, and obtain implicit business insights through graph reasoning, and trace the key nodes and paths in the business decision-making process.
[0072] In the second aspect of the present invention, a product traceability system for a cross-border e-commerce supply chain is provided. The system includes:
[0073] A traceability network construction unit for designing a blockchain network for multi-party participation in the cross-border e-commerce supply chain using a consortium chain architecture, defining data sharing and privacy protection rules through smart contracts, and introducing a trusted hardware module to ensure the trusted collection of Internet of Things device data;
[0074] A product storage unit for designing a hierarchical data storage scheme, storing high-frequency transaction data in an off-chain database, regularly synchronizing and verifying it with on-chain data, and at the same time optimizing the consensus algorithm and smart contract execution mechanism;
[0075] A commodity analysis unit, which is used to integrate a graph neural network model in a blockchain network, map the information of the supply chain into nodes and edges in a graph structure, perform representation learning on node features and edge relationships through the graph neural network, mine implicit associations and dependencies in the supply chain, then construct a reinforcement learning model, model the supply chain operation process as a Markov decision process, design the metrics of the supply chain as a reward function, and adaptively adjust the strategies of all links in the supply chain through the interaction learning between the agent and the environment for global optimization. During the training process of the reinforcement learning model, the feature information extracted by the graph neural network is fused;
[0076] A commodity traceability unit, which is used to design a data management solution based on blockchain and the Internet of Things for the need of full-process tracking of the supply chain. By deploying Internet of Things devices at key nodes, commodity information is collected in real time and the real-time data is stored on the chain. At the same time, smart contracts are used to trigger data collection and sharing events for automated data flow;
[0077] A traceability warning unit, which is used to deploy a hybrid architecture in a distributed environment. Through containerization technology and microservice design, the independence and scalability of each component are ensured. At the same time, a multi-level cache and load balancing mechanism are adopted to improve the concurrent processing ability and fault tolerance. At the same time, a sound monitoring and warning mechanism is established to respond to and handle abnormal situations in a timely manner;
[0078] A visualization unit, which is used to introduce an attention mechanism and causal reasoning technology for the interpretability requirement of a complex architecture, visually explain the decision-making process of the model, and then construct a panoramic view of the supply chain through knowledge graph technology to support multi-dimensional data association analysis and decision traceability.
[0079] The beneficial technical effects of the present invention are at least as follows:
[0080] The present invention discloses a cross-border e-commerce supply chain optimization system based on blockchain and artificial intelligence. The present invention constructs a trusted data network using a consortium chain architecture and ensures the secure sharing of data through smart contracts and trusted hardware. Aiming at performance bottlenecks, a hierarchical storage scheme is designed and the consensus mechanism is optimized. Innovatively, a graph neural network is integrated with the blockchain to model and perform feature learning on supply chain relationships. Based on the reinforcement learning algorithm, the supply chain operation is modeled as a Markov decision process, and graph features are fused to achieve global policy optimization. Combining Internet of Things technology to achieve full-process tracking and ensure data traceability. Adopting a hybrid architecture and microservice design to improve system scalability, and introducing an attention mechanism and knowledge graph to enhance interpretability. Through the innovation of multi-technology integration, the present invention effectively solves key problems such as data trust, performance optimization, and global decision-making in the cross-border e-commerce supply chain, and significantly improves the intelligent level and operation efficiency of the supply chain. Description of the Drawings
[0081] The present invention will be further described with reference to the accompanying drawings. However, the embodiments in the drawings do not constitute any limitation to the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the following drawings without creative efforts.
[0082] Figure 1 It is a flowchart of a method for tracing the origin of commodities in a cross-border e-commerce supply chain according to the present invention.
[0083] Figure 2 It is a schematic diagram of a method for tracing the origin of commodities in a cross-border e-commerce supply chain according to the present invention.
[0084] Figure 3 It is another schematic diagram of a method for tracing the origin of commodities in a cross-border e-commerce supply chain according to the present invention.
[0085] Figure 4 It is a schematic diagram of a system for tracing the origin of commodities in a cross-border e-commerce supply chain according to the present invention. Detailed implementation manners
[0086] The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions throughout. The embodiments described by referring to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation to the present invention.
[0087] As Figures 1-3 shown, a method for tracing the origin of commodities in a cross-border e-commerce supply chain provided by an embodiment of the present invention includes the following steps S1 - S6.
[0088] S1. Design a blockchain network for multi-party participation in the cross-border e-commerce supply chain using a consortium blockchain architecture, define data sharing and privacy protection rules through a smart contract, and introduce a trusted hardware module to ensure the trusted collection of data from Internet of Things devices.
[0089] According to the characteristics of multi-party participation in the cross-border e-commerce supply chain, design a blockchain network using a consortium blockchain architecture, and each participating party joins the network as a node of the consortium blockchain. Deploy a smart contract on the consortium blockchain, and define the data sharing permissions and privacy protection rules of each participating party through the smart contract to achieve the secure sharing of supply chain data.
[0090] For the Internet of Things devices in the supply chain, introduce a trusted hardware module to authenticate the devices and encrypt and sign the collected data to ensure the credibility of the data source.
[0091] IoT devices upload the encrypted and signed data to the consortium blockchain, verify the authenticity and integrity of the data through smart contracts, and record the verification results on the blockchain. Each participant in the supply chain accesses the consortium blockchain and obtains the required supply chain data according to the permissions specified in the smart contract, ensuring the security and credibility of data sharing.
[0092] Adopt the federated learning algorithm to achieve shared modeling and analysis of supply chain data on the premise of protecting the data privacy of all parties, and improve the intelligent level of supply chain decision-making. Based on the immutable and traceable characteristics of the blockchain, record and track the data of the entire supply chain process, realize the transparency and credibility of the entire supply chain process, and improve the efficiency of supply chain management.
[0093] Specifically, each participant in the cross-border e-commerce supply chain, such as suppliers, logistics service providers, customs, banks, etc., joins the network through the blockchain consortium chain. Each participant acts as a node and deploys smart contracts to define data sharing permissions and privacy protection rules. For example, suppliers can only access order data related to themselves, logistics service providers can only access data in the transportation link, and customs can only access customs declaration information, etc. At the same time, use the SHA-256 algorithm to hash sensitive data to ensure data security.
[0094] IoT devices in the supply chain, such as RFID tags, sensors, etc., are authenticated through trusted hardware modules such as TPM chips to ensure the legality of the device identity. The data collected by IoT devices, such as temperature, humidity, location information, etc., is encrypted through the AES encryption algorithm and digitally signed using the device private key to ensure the confidentiality and integrity of the data. After these encrypted and signed data are uploaded to the consortium blockchain, the smart contract judges whether the data has been tampered with by verifying the signature and hash value, and the verification result is also recorded on the blockchain to achieve data on-chain storage. Each participant in the supply chain obtains the required supply chain data from the consortium blockchain according to its own business needs and the data access permissions specified in the smart contract. For example, suppliers can obtain sales data for market analysis, logistics service providers can obtain transportation data to optimize delivery routes, and banks can obtain transaction data for risk control assessment, etc.
[0095] Using the federated learning algorithm, each participating party trains a model locally with its own data. For example, the gradient descent algorithm is used to train the sales prediction model, and then the encrypted model parameters are uploaded. Through a secure multi-party computation protocol such as SecureBoost, while protecting the data privacy of all parties, the model parameters of all parties are aggregated to achieve the sharing and optimization of the model, improving the accuracy of supply chain decision-making analysis. The distributed ledger structure of the blockchain can record the key data of each link in the supply chain, such as raw material supply information, production and processing information, warehousing and logistics information, customs declaration information, capital flow, etc. Using hash pointers to link the blocks in chronological order ensures the integrity and immutability of the data. At the same time, the timestamp of each block and the digital signature of the trading party can accurately trace the generation time of each data and the responsible party, realizing the transparency and credibility of the entire supply chain process. For example, by tracing the batch number and supplier information of parts, the source of quality problems can be quickly located, reducing the problem troubleshooting time by 30% and improving the efficiency of supply chain management.
[0096] S2. Design a hierarchical data storage scheme, store high-frequency trading data in an off-chain database, and synchronize and verify it with the on-chain data regularly. At the same time, optimize the consensus algorithm and the intelligent contract execution mechanism.
[0097] Classify the data in the blockchain network according to the trading frequency and business importance, and identify high-frequency trading data and key business data. Design a hierarchical storage architecture, store high-frequency trading data in a high-performance off-chain database, and use technologies such as in-memory databases or distributed caches to provide fast data read and write capabilities. For the high-frequency trading data stored off-chain, calculate the digest information of the data through the hash algorithm, and synchronize the digest information to the blockchain network regularly to achieve the synchronous verification of off-chain and on-chain data. Embed data verification logic in the intelligent contract. When the off-chain data is synchronized to the on-chain, trigger the intelligent contract to automatically verify the integrity and consistency of the data to ensure that the off-chain data is synchronized with the on-chain data.
[0098] Optimize the consensus mechanism of the blockchain network, adopt more efficient consensus algorithms such as DPoS, PBFT, etc., reduce the communication overhead and computational complexity in the consensus process, and improve the throughput and scalability of the network. Optimize the execution logic of the intelligent contract, remove redundant calculation and storage operations, optimize the Gas consumption of the contract, and improve the contract execution efficiency. Introduce a pre-compiled contract mechanism, encapsulate common business logics as pre-compiled contracts, reduce the deployment and invocation overhead of the contract, and improve the execution performance of the contract. Through the combined use of pre-compiled contracts and off-chain storage, further optimize the overall performance of the system.
[0099] Specifically, in the blockchain network of the cross-border e-commerce supply chain, in order to process high-frequency transaction data, Redis memory database technology is used, which can support tens of thousands of read and write operations per second, significantly improving the data processing speed. For example, data with a transaction frequency of up to 5,000 times per second is stored in Redis, and the security of the data is ensured through its built-in persistence mechanism.
[0100] Specifically, for these high-frequency data, the SHA-256 hash algorithm is used to calculate the summary information of the data, and the summary information is synchronized to the blockchain network in batches every 10 minutes to ensure the immutability and consistency verification of the data. In the smart contract, the data verification logic is embedded. When the summary information of the off-chain data is synchronized to the chain, the smart contract is automatically triggered to compare the summary stored externally on the chain with the summary generated off the chain to verify the integrity of the data.
[0101] In addition, the consensus mechanism of the blockchain is optimized, and the Delegated Proof of Stake (DPoS) algorithm is adopted. This algorithm greatly reduces the communication and computing overhead and improves the processing capacity of the network by electing a small number of representatives to quickly verify and generate blocks. The execution logic of the smart contract is streamlined, and unnecessary data storage and calculation steps are removed. For example, the hash verification that is repeatedly calculated in the contract is changed to a single calculation and the result is cached, which reduces Gas consumption and improves execution efficiency. The pre-compiled contract mechanism is introduced, and the commonly used data verification and processing logic is pre-compiled and stored in the blockchain node. When needed, it is directly called, which reduces the compilation time and resource consumption at runtime. For example, the generation and verification of the data summary is encapsulated as a pre-compiled contract, which improves the response speed of the operation and the overall performance of the system.
[0102] S3. Integrate the graph neural network model in the blockchain network, map the supply chain information into nodes and edges in the graph structure, and use the graph neural network to represent and learn the node features and edge relationships to mine the implicit associations and dependencies in the supply chain.
[0103] According to the information of various participants, commodities, orders, etc. in the supply chain, a supply chain graph data model is constructed, where the participants, commodities, and orders are mapped to the nodes of the graph, and the relationships between them are mapped to the edges of the graph. A graph neural network model is used for representation learning of the constructed supply chain graph data. By aggregating the feature information of nodes and the relationship information of edges, a low-dimensional vector representation of the nodes is learned. According to the node representation vectors learned by the graph neural network, the similarity between nodes is calculated to mine the implicit association and dependence relationships in the supply chain. The mined association and dependence relationships are used as constraint conditions, combined with the supply chain business rules, to construct a supply chain path planning and strategy optimization model. A reinforcement learning algorithm is used to solve the path planning and strategy optimization model to obtain the optimal supply chain path plan and strategy parameters. The obtained optimal path plan and strategy parameters are written into the blockchain network. Using the immutable and traceable characteristics of the blockchain, the fairness and transparency of supply chain decisions are ensured. Continuously monitor the supply chain operation data, update the graph data model in real time through the blockchain network, perform online learning and optimization, dynamically adjust the path planning plan and strategy parameters, and realize the adaptive optimization of the supply chain.
[0104] Specifically, in the cross-border e-commerce supply chain scenario, a supply chain graph data model including nodes such as suppliers, manufacturers, logistics service providers, retailers, etc., and nodes such as commodity SKUs, orders, etc. is constructed. The relationships between nodes such as supply, production, transportation, sales, etc. are mapped to directed edges.
[0105] It can be understood that GraphAttentionNetwork is used for representation learning of the graph data. Through the attention mechanism, the features of the first-order neighbor nodes are aggregated, and a 64-dimensional node embedding vector is learned. Based on the cosine similarity, the correlation between nodes is calculated, and it is found that the correlation between supplier A and manufacturer B is as high as 85, revealing the potential cooperation relationship between them. The mined association relationship is used as a constraint, combined with business rules such as inventory management and production capacity planning, to construct a supply chain strategy optimization model based on reinforcement learning. The specific representation is as follows:
[0106] Let X ∈ R N×F be the node feature matrix of the graph, where N is the number of nodes and F is the total number of features; let A ∈ {0, 1} N×N be the adjacency matrix of the graph; define the attention coefficient as e ij , and the calculation is as follows:
[0107] e ij = LeakyReLU(a T [Wx i ||Wx j )
[0108] where W ∈ R F ' ×Fis the weight matrix, a ∈ R 2F ' is the attention vector, || is the concatenation operation;
[0109] The normalized coefficient attention coefficient is a ij , and the calculation is as follows:
[0110]
[0111] where, N i represents the set of neighbor nodes of node i;
[0112] Calculate the embedding vector h of node i i , and the calculation is as follows:
[0113]
[0114] where, σ is the activation function (such as ReLU).
[0115] Solve this model through the Deep Q-Network algorithm to obtain the optimal supply chain path plan. For example, after the supplier A produces goods, it is first transported to the manufacturer B for processing, and then transported to the retailer D for sales through the logistics service provider C. Compared with the original plan, the turnover time is shortened by 2 days and the profit margin is increased by 15%. Store the optimized path plan on the chain and use the consensus mechanism of the blockchain to ensure the recognition of the decision-making results by multiple parties. At the same time, continuously track the real-time data of each link of the supply chain, update the graph model every 1 hour, perform online learning and dynamic optimization of the strategy, so that the supply chain can quickly respond to market changes and achieve agile optimization.
[0116] It can be understood that by solving this model through the Deep Q-Network algorithm, the optimal supply chain path plan is obtained, which is expressed as follows:
[0117] Let s t be the state of the supply chain at time step t, including information such as inventory level, production plan, and transportation status; let a t be the action taken in state s t , such as selecting a supplier, arranging transportation, etc.; let r t be the immediate reward obtained after taking a t in state s t ;
[0118] Define the Q-value function Q(s t , a t ) as the expected cumulative reward obtained after taking action a t in state s t ; Use the neural network Q θ (s t , a t)Approximate Q-value function, where θ is the network parameter;
[0119] The objective function is to minimize the mean squared error of the Q-value function:
[0120]
[0121] where γ is the discount factor and θ - is the network target parameter;
[0122] Use the Experience Replay technique to randomly sample from the experience pool for training to reduce the correlation between samples. Use the Fixed Q-Targets technique to periodically update the parameters of the target network to improve training stability.
[0123] Solve the supply chain strategy optimization model through the DQN algorithm to obtain the optimal supply chain path plan. For example, after supplier A produces goods, they are first transported to manufacturer B for processing, and then shipped to retailer D for sale through logistics service provider C, which shortens the turnover time by 2 days and increases the profit margin by 15% compared to the original plan.
[0124] S4. Build a reinforcement learning model, model the supply chain operation process as a Markov decision process, design the indicators of the supply chain as the reward function, and adaptively adjust the strategies of each link of the supply chain through the interaction and learning between the agent and the environment for global optimization. During the training process of the reinforcement learning model, fuse the feature information extracted by the graph neural network.
[0125] Build a Markov decision process model based on the historical data of supply chain operation. The state space includes key elements such as inventory level, order quantity, and production plan, and the action space includes decisions such as ordering, production, and transportation.
[0126] For the supply chain network structure, use the graph neural network to extract the feature representations of each node and edge, fuse business attributes such as timeliness requirements and cost budgets to form a state feature vector. Design the reward function, comprehensively consider indicators such as order fulfillment rate, inventory turnover rate, and transportation timeliness, and quantitatively evaluate the overall performance of the supply chain as the optimization goal of reinforcement learning.
[0127] Build an agent, adopt deep reinforcement learning algorithms such as DDPG, PPO, etc., explore through interaction with the environment, learn the optimal decision-making strategy, and adaptively adjust the policy parameters of each link in the supply chain according to the state characteristics. During the training process, use the feature information extracted by the graph neural network to accelerate policy convergence and improve sample efficiency. At the same time, introduce expert knowledge to optimize the reward function and accelerate policy learning. Deploy the trained agent model, dynamically adjust the supply chain operation strategy according to the real-time state information to adapt to market changes. Monitor the decision-making results, collect new data for model iteration and update. Establish a digital twin system to conduct real-time simulation of the entire supply chain process and evaluate the impact of decisions. If the predicted performance does not meet the requirements, trigger an early warning and call the agent for policy re-optimization to form a closed-loop control.
[0128] Specifically, when building a Markov decision process model, first define the state space. For example, the inventory level is set from 0 to 1000 units, the order volume is simulated according to the average daily order volume of 300 orders in historical data, and the production plan sets the maximum production line speed at 500 units per day according to the actual production capacity. The action space includes order quantities ranging from 50 to 500 units, production adjustments from reducing 50 units to increasing 100 units, and transportation decisions including choosing different logistics companies and transportation methods. Use a graph neural network, such as a model based on graph convolutional network (GCN), to extract the feature representations of each node (such as suppliers, manufacturers, distributors) and edges (such as logistics connections) in the supply chain network. The feature data of these nodes and edges include historical transaction volumes, delay rates, costs, etc., and through network learning, obtain the low-dimensional vector representations of each node and edge. When designing the reward function, comprehensively consider multiple key performance indicators. For example, the order fulfillment rate target is set at 95%, the inventory turnover rate is expected to reach 2 times per month, and the transportation timeliness requires the average arrival time not to exceed 48 hours. Adopt a deep reinforcement learning algorithm, such as the relatively advanced PPO algorithm, and the agent learns the optimal decision-making strategy through interaction with the environment. During the training process, the state feature vectors quickly extracted by the graph neural network can effectively accelerate the learning process and improve the sample efficiency of the policy. At the same time, introduce industry experts to fine-tune the reward function to ensure that the learning process meets the actual operation requirements of the supply chain. Through a real-time monitoring system, dynamically adjust the supply chain strategy, such as increasing or decreasing inventory or adjusting the production speed according to market demand to adapt to market changes. In addition, establish a digital twin system to conduct real-time simulation of each step of the supply chain decision-making and evaluate the impact of each decision adjustment on the overall supply chain performance to ensure the effectiveness and timeliness of decisions.
[0129] S5. In response to the demand for full-process tracking of the supply chain, a data management solution based on blockchain and the Internet of Things is designed. By deploying IoT devices at key nodes, commodity information is collected in real time and the real-time data is stored on the chain. At the same time, smart contracts are used to trigger data collection and sharing events to automate data flow.
[0130] IoT devices can be used to collect the location and status information of goods in real time at key nodes in the supply chain. This information includes but is not limited to physical parameters such as temperature, humidity, speed, etc., so as to obtain accurate data of goods at any given point in time.
[0131] The collected location and status information is immediately uploaded to the blockchain system through a secure network protocol. The distributed ledger technology of the blockchain ensures the security and integrity of the data during the upload process and prevents the data from being tampered with during transmission.
[0132] The use of smart contracts on the blockchain automatically triggers the data storage and sharing mechanism. Smart contracts automatically process data according to preset rules, such as automatically verifying the integrity and authenticity of the data, and automatically sharing the data with authorized participants in the supply chain.
[0133] Once the data is stored on the blockchain, the tamper-proof nature of the blockchain is utilized to provide a clear and traceable data record for each commodity in the supply chain, enhancing traceability assurance.
[0134] By setting thresholds and parameters, smart contracts can automatically trigger alarms and notifications when predetermined changes occur in the status of goods, such as temperature or humidity exceeding safe ranges, thereby promptly notifying supply chain managers to take appropriate measures.
[0135] The integration of blockchain technology and Internet of Things technology not only improves the level of automation in data processing, but also enhances the transparency and operational efficiency of the entire supply chain through technical means.
[0136] Finally, by continuously monitoring and optimizing the execution rules of smart contracts, we ensure that the system can adapt to the dynamically changing needs of the supply chain while maintaining efficient and accurate data management and utilization.
[0137] Specifically, deploy Internet of Things devices such as temperature and humidity sensors and GPS locators at key nodes of the supply chain, such as warehouses and transport vehicles, to collect data every 5 minutes. Encrypt and transmit the collected data to the blockchain node through the MQTT protocol. The blockchain uses the Fabric architecture and ensures the security and trustworthiness of the data uploading process through mechanisms such as TLS and MSP. The smart contract is written in Go language, with the temperature threshold set at -5°C to 10°C and the humidity threshold at 70% to 90%. When the range is exceeded, an alarm is automatically triggered, and the third-party logistics interface is called to notify the supply chain management personnel. The blockchain ledger generates a block every 10 minutes, packages all the uploaded data, and synchronizes the hash value to the off-chain database to achieve consistency verification of on-chain and off-chain data. Realize visual query of blockchain data through Hyperledger Explorer, conduct data analysis and mining in combination with BI tools, and optimize the operation of the supply chain. Based on cryptographic algorithms such as elliptic curve digital signatures, achieve data authorized sharing, finely control the data access rights of different entities, and ensure privacy and security. Continuously collect feedback from Internet of Things devices, optimize the parameters of smart contracts, improve the degree of automation, and build a transparent and efficient digital supply chain.
[0138] S6. Deploy a hybrid architecture in a distributed environment. Through containerization technology and microservices design, ensure the independence and scalability of each component. At the same time, adopt a multi-level cache and load balancing mechanism to improve the concurrent processing ability and fault tolerance. Also, establish a sound monitoring and early warning mechanism to respond to and handle abnormal situations in a timely manner.
[0139] Deploy a microservices architecture through containerization technology to achieve the independence and scalability of components in a distributed environment. Containerization technology provides an isolated environment, while the microservices architecture supports the independent deployment and expansion of services.
[0140] Deploy a multi-level cache system to optimize data access speed and reduce the load on the backend system. The multi-level cache stores data hierarchically, making frequently accessed data quickly reachable, thereby improving the system's concurrent processing ability.
[0141] Implement a load balancing mechanism to distribute user requests to multiple servers, further enhancing the system's fault tolerance and concurrent processing ability. Load balancing dynamically allocates requests to ensure no single point of failure and improve the overall performance of the system.
[0142] Establish a comprehensive monitoring system to monitor the running status of microservices and the usage of system resources in real time. The monitoring system can timely detect system bottlenecks and potential problems, providing data support for system optimization.
[0143] Integrate the early warning system with the monitoring system. When abnormal behavior or performance degradation is detected, the early warning system can automatically trigger an alarm and notify the system administrator. This automated processing mechanism speeds up the response time to abnormal situations.
[0144] Optimize the exception handling mechanism to ensure that when any component fails, the system can quickly recover and continue to provide services. The exception handling mechanism includes automatic failover and recovery strategies to ensure the high availability of the system.
[0145] Through the above measures, the stability and response speed of the system are guaranteed, and at the same time, the user experience and the overall efficiency of the system are improved.
[0146] Specifically, deploy the microservices architecture through containerization technology. Specifically, use Docker containers and Kubernetes orchestration tools to split the supply chain management system into independent microservice modules, such as order management, inventory management, and logistics tracking. Each microservice runs in an independent container to ensure isolation and independent deployment between services. For example, the order management service runs in container A, and the inventory management service runs in container B. Managed through Kubernetes' Pod and Service resources, it achieves high availability and horizontal scalability of the service, and can automatically scale to 10 replicas during peak traffic periods to ensure the stable operation of the system under high concurrency. Deploy a multi-level caching system, using a combination of Redis and Memcached to build two levels of caches, L1 and L2. The L1 cache stores hot data, such as frequently accessed product information, with a hit rate set at 95%; the L2 cache stores less hot data, with a hit rate set at 80%. Through the Cache-Aside pattern, data is first read from the L1 cache. If not hit, it is then read from the L2 cache, and finally from the database, significantly reducing the number of database accesses and improving the data access speed.
[0147] For example, the loading time of the product details page is reduced from 500 ms to 100 ms, and the system's concurrent processing capacity is increased by 30%. Implement a load balancing mechanism, using a combination of Nginx and HAProxy, and adopt the weighted round-robin algorithm to dynamically allocate user requests. According to the server performance, set the weight ratio to 3:2:1 to ensure that high-performance servers handle more requests. Through the health check mechanism, monitor the server status in real time, automatically remove faulty nodes, avoid single points of failure, and improve the system's fault tolerance and concurrent processing capacity. For example, when the peak traffic reaches 10,000 requests per second, the system can evenly distribute requests, ensure load balancing of each server, and control the response time within 200 ms. Establish a comprehensive monitoring system, using a combination of Prometheus and Grafana, to monitor key metrics such as CPU usage, memory occupancy, and response time of microservices in real time. Set thresholds, such as triggering an alarm when the CPU usage exceeds 80%, and display the monitoring data through the Grafana visualization panel to facilitate timely discovery of system bottlenecks. For example, when the monitoring system discovers that the response time of the order processing service suddenly increases from 50 ms to 200 ms, it immediately triggers an alarm to notify the administrator for optimization, avoiding a decline in system performance. Integrate the early warning system with the monitoring system, and use the ELK Stack (Elasticsearch, Logstash, Kibana) for log analysis and anomaly detection. Through machine learning algorithms, such as the Isolation Forest anomaly detection algorithm, identify abnormal behaviors, set the anomaly score threshold to 8, and when the detected anomaly score is higher than the threshold, automatically trigger an alarm and notify the administrator. For example, when the system detects that the access volume of a certain product suddenly increases by 10 times and the anomaly score reaches 9, it immediately triggers an alarm, and the administrator responds quickly to investigate and resolve potential security risks. Optimize the exception handling mechanism, and use the Hystrix and Resilience4j frameworks to implement service fusing and degradation strategies. Set the fusing threshold, such as automatically fusing when the service request failure rate reaches 50%, to avoid the spread of failures. Through the failover mechanism, such as automatically switching to service B when service A fails, ensure system continuity.
[0148] For example, when the order service fails, the system automatically switches to the standby order service, and the fault recovery time is reduced from 10 minutes to 2 minutes, ensuring the high availability of the system. Through the above measures, the stability of the system has been significantly improved, the response time has been reduced from an average of 800 ms to 200 ms, the user experience has been greatly improved, and the overall efficiency of the system has been increased by 40%, ensuring the stable and efficient operation of the supply chain management system.
[0149] S7. To meet the interpretability requirements for complex architectures, introduce the attention mechanism and causal reasoning technology to visually explain the decision-making process of the model, and then use the knowledge graph technology to construct a panoramic view of the supply chain to support multi-dimensional data correlation analysis and decision traceability.
[0150] For the interpretability requirements of complex architectures, the following technical solutions are adopted: By introducing the attention mechanism, capture the key features in the model's decision-making process, determine the importance weights of different features, and reveal the internal working mechanism of the model. Use causal inference technology to construct a causal graph model based on domain knowledge, depict the causal dependence relationships between variables, analyze the reasons for the model's decision results, and enhance the interpretability of the decision-making process.
[0151] Adopt visualization technology to present the attention weights and causal inference results in an intuitive way, display key features, causal links, etc. through an interactive interface, so that non-professional users can also understand the decision-making logic of the model. Construct a supply chain knowledge graph to semantically model business entities, relationships, and attributes, form a panoramic view of the supply chain, and support correlation analysis from multiple dimensions such as products, orders, logistics, and funds. Map business data to the knowledge graph, and obtain implicit business insights through graph reasoning, trace the key nodes and paths in the business decision-making process, and improve the decision traceability ability. In business optimization scenarios, comprehensively apply the attention mechanism, causal inference, and knowledge graph technology to identify the key factors affecting business goals, simulate the effects of different decision-making schemes, and provide interpretable optimization suggestions for managers. Through the application of the above technical solutions, improve the transparency and credibility of the system, enable business users to deeply understand the working principle of the system, enhance trust in the system's decision results, and promote human-machine collaboration to optimize business processes.
[0152] Specifically, in the supply chain scenario, the attention mechanism is used to analyze order data. By training the Transformer model, use the self-attention mechanism to calculate the correlation between different features, and obtain the attention weight distribution of key features such as product category, quantity, and amount in the order.
[0153] For example, the model analysis found that the attention weight of product category is 6, quantity is 3, and amount is 1, indicating that product category is the most important factor affecting orders. Based on causal reasoning technology, a supply chain causal graph with 50 nodes and 100 edges was constructed, which depicts the dependency relationship between orders, inventory, production, logistics and other links. Through graph reasoning, it was found that the root cause of order delay was the shortage of raw materials from upstream suppliers, and the production plan was forced to adjust, resulting in a 10-day extension of delivery time. A visualization platform was developed to display the attention weight distribution of order features in a tree diagram, present the supply chain causal link in a directed graph, and support user interactive exploration. Business personnel can intuitively understand the decision-making basis of the model and the bottleneck of the business process. At the same time, a supply chain knowledge graph covering more than 100,000 entities and more than 500,000 relationships was constructed, involving multiple dimensions such as products, orders, inventory, logistics, and funds. Through knowledge graph embedding technology, business data is mapped to a high-dimensional semantic space to mine implicit associations between entities. For example, through graph reasoning, it was found that the quality problem of a batch of products was related to the raw material defects of upstream supplier A. Tracing back, it was found that supplier A had 5 similar quality accidents in the past 3 months. Finally, the attention mechanism, causal reasoning and knowledge graph technology were applied to the supply chain optimization scenario. The system analyzes order data, identifies key influencing factors such as delivery time, product quality, and cost, and simulates the effects of different optimization strategies based on the causal graph. For example, by adjusting production plans, changing suppliers and other measures, the order delivery time can be shortened by 2 days, the quality pass rate can be increased by 5%, and the cost can be reduced by 3%. The system generates explainable optimization reports to help managers make data-driven decisions.
[0154] To better implement the above method, Figure 2 As shown, the present invention also proposes a commodity tracing system for a cross-border e-commerce supply chain, the system comprising:
[0155] The traceability network construction unit 101 is used to design a blockchain network for multiple parties to participate in the cross-border e-commerce supply chain using a consortium chain architecture, define data sharing and privacy protection rules through smart contracts, and introduce trusted hardware modules to ensure the trusted collection of IoT device data;
[0156] Commodity storage unit 102, used to design a hierarchical data storage solution, store high-frequency trading data in an off-chain database, regularly synchronize and verify with on-chain data, and optimize the consensus algorithm and smart contract execution mechanism;
[0157] The commodity analysis unit 103 is used to integrate a graph neural network model in a blockchain network, map the information of the supply chain into nodes and edges in a graph structure, perform representation learning on node features and edge relationships through the graph neural network, mine implicit associations and dependencies in the supply chain, then construct a reinforcement learning model, model the supply chain operation process as a Markov decision process, design the metrics of the supply chain as the reward function, and adaptively adjust the strategies of each link of the supply chain through the interaction learning between the agent and the environment for global optimization. During the training process of the reinforcement learning model, the feature information extracted by the graph neural network is fused;
[0158] The commodity traceability unit 104 is used to design a data management solution based on blockchain and the Internet of Things for the need of full-process tracing of the supply chain. By deploying Internet of Things devices at key nodes, commodity information is collected in real time and the real-time data is stored on the blockchain. At the same time, smart contracts are used to trigger data collection and sharing events for automated data flow;
[0159] The traceability warning unit 105 is used to deploy a hybrid architecture in a distributed environment. Through containerization technology and microservice design, the independence and scalability of each component are ensured. At the same time, a multi-level cache and load balancing mechanism are adopted to improve the concurrent processing ability and fault tolerance. At the same time, a sound monitoring and warning mechanism is established to respond to and handle abnormal situations in a timely manner;
[0160] The visualization unit 106 is used to introduce an attention mechanism and causal reasoning technology for the interpretability requirement of a complex architecture, visually explain the decision-making process of the model, and then construct a panoramic view of the supply chain through knowledge graph technology to support multi-dimensional data correlation analysis and decision traceability.
[0161] Unless otherwise specifically stated, the relative steps, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0162] If the described functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or the part of the current technical solution can be embodied in the form of a software product. The current computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccessMemory), magnetic disks, or optical discs that can store program codes.
[0163] In the description of the present application, it should be noted that the orientation or positional relationship indicated by terms such as "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the current invention product is customarily placed during use. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present application.
[0164] In the description of the present application, it should also be noted that unless otherwise clearly specified and defined, the terms "arranged", "installed", "connected", and "coupled" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific circumstances.
[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for tracing the origin of goods in the cross-border e-commerce supply chain, characterized in that, The method comprises: S1. Adopt the alliance chain architecture to design a blockchain network for multiple parties to participate in the cross-border e-commerce supply chain, define data sharing and privacy protection rules through smart contracts, and introduce trusted hardware modules to ensure the trusted collection of IoT device data; S2. Design a hierarchical data storage solution to store high-frequency trading data in an off-chain database, regularly synchronize and verify it with on-chain data, and optimize the consensus algorithm and smart contract execution mechanism; S3. Integrate the graph neural network model in the blockchain network, map the supply chain information into nodes and edges in the graph structure, and use the graph neural network to learn the representation of node features and edge relationships, and mine the implicit associations and dependencies in the supply chain; S4. Build a reinforcement learning model, model the supply chain operation process as a Markov decision process, design the supply chain indicators as reward functions, and adaptively adjust the strategies of each link of the supply chain through interactive learning between the agent and the environment to perform global optimization. In the process of reinforcement learning model training, integrate the feature information extracted by the graph neural network; S5. In response to the demand for full-process supply chain tracking, a data management solution based on blockchain and the Internet of Things is designed. By deploying IoT devices at key nodes, commodity information is collected in real time and real-time data is stored on the chain. At the same time, smart contracts are used to trigger data collection and sharing events, automating data flow; S6. Deploy a hybrid architecture in a distributed environment. Through containerization technology and microservice design, ensure the independence and scalability of each component. At the same time, adopt multi-level caching and load balancing mechanisms to improve concurrent processing capabilities and fault tolerance. At the same time, establish a sound monitoring and early warning mechanism to respond to and deal with abnormal situations in a timely manner. S7. To meet the interpretability requirements of complex architectures, attention mechanisms and causal reasoning techniques are introduced to visualize the decision-making process of the model. Then, through knowledge graph technology, a panoramic view of the supply chain is constructed to support multi-dimensional data association analysis and decision tracing. The S3 specifically includes: S301. Construct a supply chain graph data model based on the information in the supply chain, wherein the participants, commodities and orders are mapped as nodes of the graph, and the relationships between them are mapped as edges of the graph; wherein the information in the supply chain includes the participants, commodity information and order information; S302, using a graph neural network model to perform representation learning on the constructed supply chain graph data, and learning to obtain a low-dimensional vector representation of the node by aggregating the feature information of the node and the relationship information of the edge; S303, calculating the similarity between nodes based on the node representation vectors learned by the graph neural network, and mining the implicit associations and dependencies in the supply chain; S304, using the mined associations and dependencies as constraints and combining them with supply chain business rules to build a supply chain path planning and strategy optimization model; S305, using a reinforcement learning algorithm to solve the path planning and strategy optimization model to obtain the optimal supply chain path plan and strategy parameters; S306. Write the obtained optimal path plan and policy parameters into the blockchain network. Utilize the tamper - proof and traceable characteristics of the blockchain to ensure the fairness and transparency of supply chain decisions; S307. Continuously monitor the supply chain operation data, update the graph data model in real - time through the blockchain network, conduct online learning and optimization, dynamically adjust the path planning plan and policy parameters, and achieve the adaptive optimization of the supply chain; The said S4 specifically includes: S401. According to the historical data of supply chain operation, construct a Markov decision process model. The state space includes the key elements in the production process, and the action space includes the execution of decisions; S402. For the supply chain network structure, adopt a graph neural network to extract the feature representations of each node and edge, and fuse business attributes to form a state feature vector; S403. Design a reward function according to the order metrics, quantitatively evaluate the overall performance of the supply chain, and use it as the optimization goal of reinforcement learning; S404. Construct an agent model, adopt a deep reinforcement learning algorithm to explore through interaction with the environment, learn the optimal decision - making strategy, and adaptively adjust the policy parameters of each link in the supply chain according to the state features; S405. During the training process, utilize the feature information extracted by the graph neural network, and at the same time introduce expert knowledge to optimize the reward function to accelerate policy learning; S406. Deploy the trained agent model, dynamically adjust the supply chain operation strategy according to the real - time state information to adapt to market changes; S407. Monitor the decision - making results, collect new data for model iteration and update, and at the same time establish a digital twin system to conduct real - time simulation of the entire supply chain process and evaluate the impact of decisions; S408. If the predicted performance does not meet the requirements, trigger an early warning and call the agent for policy re - optimization to form a closed - loop control.
2. The commodity traceability method for cross-border e-commerce supply chain according to claim 1, wherein The said S1 specifically includes: S101. According to the characteristics of multi - party participation in the cross - border e - commerce supply chain, design a blockchain network using a consortium chain architecture, and add each participating party as a node of the consortium chain to the network; S102. Deploy smart contracts on the consortium chain. Define the data sharing permissions and privacy protection rules of each participating party through smart contracts to achieve the secure sharing of supply chain data; S103. For the Internet of Things devices in the supply chain, introduce a trusted hardware module to authenticate the devices, and encrypt and sign the collected data to ensure the credibility of the data source; S104. The Internet of Things devices upload the encrypted and signed data to the consortium chain. Verify the authenticity and integrity of the data through smart contracts and record the verification results on the blockchain; S105. Each participating party in the supply chain accesses the consortium chain and obtains the required supply chain data according to the permissions specified by the smart contract, ensuring the security and credibility of data sharing; S106. Adopt a federated learning algorithm to achieve shared modeling and analysis of supply chain data on the premise of protecting the data privacy of all parties, and improve the intelligent level of supply chain decision - making; S107. Record and trace the whole - process data of the blockchain - based supply chain.
3. The method for tracing the origin of goods in a cross-border e-commerce supply chain according to claim 1, wherein, The said S2 specifically includes: S201. Classify the data in the blockchain network according to transaction frequency and business importance, and identify high-frequency transaction data and key business data; S202. Design a hierarchical storage architecture to store high-frequency trading data in a high-performance database off-chain; S203. For high-frequency trading data stored off-chain, the summary information of the data is calculated by a hash algorithm, and the summary information is regularly synchronized to the blockchain network to achieve synchronous verification of on-chain and off-chain data; S204. Embed data verification logic in the smart contract. When the off-chain data is synchronized to the on-chain, the smart contract is triggered to automatically verify the integrity and consistency of the data to ensure that the off-chain data is synchronized with the on-chain data. S205. Use consensus algorithm to optimize the consensus mechanism of blockchain network; S206. Optimize the execution logic of the smart contract and optimize the Gas consumption of the contract to improve the efficiency of contract execution; S207. Introduce a precompiled contract mechanism to encapsulate commonly used business logic into a precompiled contract, reduce the deployment and calling overhead of the contract, and improve the execution performance of the contract; wherein the code of the precompiled contract of the precompiled contract mechanism is precompiled and optimized on the blockchain node, and can be directly called without recompilation.
4. A method for tracing the origin of goods in a cross-border e-commerce supply chain according to claim 1, characterized in that, The key factors include inventory levels, order quantities and production plans; the execution decisions include ordering, production and transportation; the business attributes include timeliness requirements and cost budgets; and the order indicators include order fill rate, inventory turnover rate and transportation timeliness.
5. A method for tracing the origin of goods in a cross-border e-commerce supply chain according to claim 1, characterized in that, The S5 specifically includes: S501. Collect the location and status information of commodities in real time at key nodes of the supply chain through IoT devices; S502. The collected location information and status information are immediately uploaded to the blockchain system via a secure network protocol; S503. Using smart contracts on the blockchain to automatically trigger the data storage and sharing mechanism. The smart contract automatically processes the data according to the preset rules and automatically shares the data with authorized participants in the supply chain. Once the data is stored on the blockchain, it provides clear and traceable data records for each commodity in the supply chain. S504. By setting thresholds and parameters, the smart contract automatically triggers alarms and notifications when the commodity status changes in a predetermined manner, and promptly notifies the supply chain manager to take corresponding measures; S505. Monitor and optimize the execution rules of smart contracts to ensure that the system can adapt to the dynamically changing needs of the supply chain while maintaining efficient and accurate data management and utilization.
6. A method for tracing the origin of goods in a cross-border e-commerce supply chain according to claim 1, characterized in that, The S6 specifically includes: S601. Deploy microservice architecture through containerization technology to achieve component independence and scalability in a distributed environment. Containerization technology provides an isolated environment, while microservice architecture supports independent deployment and expansion of services. S602, deploy a multi-level cache system to optimize data access speed and reduce the load of the backend system; S603, implement a load balancing mechanism, which dynamically allocates requests to ensure no single point of failure and disperses user requests to multiple servers; S604. Establish a comprehensive monitoring system to monitor the operation status of microservices and system resource usage in real time; S605. Integrate the early warning system with the monitoring system. When abnormal behavior or performance degradation is detected, the early warning system can automatically trigger an alarm and notify the system administrator; S606. Optimize the exception handling mechanism to ensure that when any component fails, it can recover and continue to provide services; wherein the exception handling mechanism includes automatic failover and failure recovery strategies.
7. A method for tracing the origin of goods in a cross-border e-commerce supply chain according to claim 1, characterized in that, The S7 specifically includes: S701. To meet the interpretability requirements of complex architectures, the attention mechanism is introduced to capture the key features of the model in the decision-making process and determine the importance weights of different features. S702. Use causal reasoning technology to build a causal graph model based on domain knowledge, construct the causal dependency relationship between variables, analyze the causes of model decision results, and enhance the interpretability of the decision process; S703. Use visualization technology to present attention weights and causal reasoning results in an intuitive way; S704. Build a supply chain knowledge graph, semantically model business entities, relationships, and attributes, and form a panoramic view of the supply chain. At the same time, map business data with the knowledge graph, obtain implicit business insights through graph reasoning, and trace the key nodes and paths in the business decision-making process.
8. A system for implementing the method for tracing the origin of goods in a cross-border e-commerce supply chain according to claim 1, characterized in that, The system comprises: The traceability network construction unit is used to design a blockchain network for multiple parties to participate in the cross-border e-commerce supply chain using a consortium chain architecture, define data sharing and privacy protection rules through smart contracts, and introduce trusted hardware modules to ensure the trusted collection of IoT device data; Commodity storage units are used to design a tiered data storage solution, store high-frequency trading data in an off-chain database, regularly synchronize and verify with on-chain data, and optimize consensus algorithms and smart contract execution mechanisms; The commodity analysis unit is used to integrate the graph neural network model in the blockchain network, map the information of the supply chain into nodes and edges in the graph structure, and use the graph neural network to represent and learn the node features and edge relationships, explore the implicit associations and dependencies in the supply chain, and then build a reinforcement learning model to model the supply chain operation process as a Markov decision process. The supply chain indicators are designed as reward functions. Through interactive learning between the intelligent agent and the environment, the strategies of each link in the supply chain are adaptively adjusted to perform global optimization. In the process of training the reinforcement learning model, the feature information extracted by the graph neural network is integrated; The product traceability unit is used to design a data management solution based on blockchain and the Internet of Things to meet the needs of full-process supply chain tracking. By deploying IoT devices at key nodes, product information is collected in real time and real-time data is stored on the chain. At the same time, smart contracts are used to trigger data collection and sharing events, automating data flow; The traceability and early warning unit is used to deploy a hybrid architecture in a distributed environment. Through containerization technology and microservice design, the independence and scalability of each component are guaranteed. At the same time, multi-level caching and load balancing mechanisms are adopted to improve concurrent processing capabilities and fault tolerance. At the same time, a sound monitoring and early warning mechanism is established to respond to and deal with abnormal situations in a timely manner. A visualization unit, which, for the interpretability requirements of complex architectures, introduces attention mechanisms and causal reasoning techniques to visually explain the decision-making process of the model, and then, through knowledge graph technology, constructs a panoramic view of the supply chain to support multi-dimensional data correlation analysis and decision traceability.
Citation Information
Patent Citations
Supply chain system and framework based on intelligent contract and Internet of Things technology
CN111401730A
Cold chain food tracing system and method based on blockchain and graph neural network
CN113269503A
Block chain traceability platform based on architecture analysis
CN115578112A
Logistics production and service platform design method and system
CN118175177A
Block chain cross-border payment method and system based on micro-service architecture
CN118710407A