Commodity tracing method and system for cross-border logistics
Through the use of alliance chains, smart contracts, neural networks, and enhanced learning in the commodity traceability system of cross -border logistics to solve the problem of data islands, information opaque and decision -making support capabilities in existing systems, the security of data is realized, and the security of data has been realized. Real -time tracking and intelligent decision -making of sharing and supply chain.
Patent Information
- Application Number
- CN202411385748.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-09-30
AI Technical Summary
The existing cross-border logistics commodity traceability system relies on a centralized database, resulting in data silos, information opaqueness, security risks, difficulty in real-time tracking, and insufficient decision-making support capabilities.
Use the alliance chain architecture to build a trusted data network, and ensure the safe sharing of data through smart contracts and trusted hardware. Design a hierarchical storage solution and optimize the consensus mechanism, integrate graph neural networks with blockchain, and model supply chain relationships and learn features. Based on the reinforcement learning algorithm, the supply chain operation is modeled as a Markov decision-making process, and graph features are integrated to achieve global strategy optimization. Combined with Internet of Things technology to achieve full-process tracking, and improve system scalability through hybrid architecture and microservice design.
Realize the security, transparency and credible sharing of data, improve the real -time tracking capacity and decision support level of the supply chain, and significantly improve the intelligent level and operating efficiency of the supply chain.
Smart Images

Figure CN119359320A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of cross-border logistics, and in particular relates to a commodity tracing method and system for cross-border logistics. Background Art
[0002] Currently, the traceability of goods in cross-border logistics mainly relies on traditional barcode, QR code and RFID technology, combined with centralized database management systems. These systems usually include the following parts:
[0003] Barcode / QR code: By scanning the barcode or QR code, basic information of the product can be recorded, such as production date, manufacturer, batch number, etc.
[0004] RFID technology: Use RFID tags and readers to track the location and status of goods in real time.
[0005] Centralized database: The collected data is stored in a centralized database for query and management by all parties.
[0006] Manual recording and reporting: In some links, manual recording and reporting are still relied upon 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 shortcomings in practical applications.
[0008] At the same time, the existing system relies on centralized databases, which easily form isolated data islands, and it is difficult for different participants to share and communicate data. In cross-border logistics, multiple participants are involved, such as manufacturers, suppliers, logistics companies, customs, retailers, etc. Each participant has its own data system, and there are obstacles to data sharing and exchange, resulting in opaque and inconsistent information. Centralized databases are vulnerable to attacks and tampering, and the credibility of data cannot be fully guaranteed. Once the data is tampered with, it will seriously affect the accuracy and reliability of commodity traceability. In traditional systems, there may be delays in data collection and uploading, and the status and location of the goods cannot be reflected in real time. Especially in cross-border transportation, goods may go through multiple transit links, and real-time data updates are particularly important, but existing systems often cannot meet this demand. At the same time, links that rely on manual records and reports are prone to errors and omissions, affecting the accuracy and completeness of the data. For example, manually filled documents may have typos or omissions, resulting in data distortion, 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 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;
[0017] 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;
[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 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.
[0019] S7. In response to the need for explainability of complex architectures, the attention mechanism and causal reasoning technology are introduced to provide a visual explanation of the model's decision-making process. Then, through the knowledge graph technology, a panoramic view of the supply chain is constructed to support multi-dimensional data correlation analysis and decision traceability.
[0020] Furthermore, the S1 specifically includes:
[0021] S101. Based on the characteristics of multi-party participation in the cross-border e-commerce supply chain, the blockchain network is designed using the alliance chain architecture, and each participant is added to the network as a node of the alliance chain;
[0022] S102. Deploy smart contracts on the alliance chain, define the data sharing rights and privacy protection rules of each participant through smart contracts, and share supply chain data securely;
[0023] S103. For IoT devices in the supply chain, a trusted hardware module is introduced to authenticate the devices and encrypt and sign the collected data to ensure that the data source is credible;
[0024] S104. The IoT device uploads the encrypted and signed data to the consortium chain, verifies the authenticity and integrity of the data through the smart contract, and records the verification results on the blockchain;
[0025] S105. Each supply chain participant accesses the alliance chain and obtains the required supply chain data according to the permissions specified in the smart contract to ensure the security and credibility of data sharing;
[0026] S106. Use federated learning algorithms to achieve shared modeling and analysis of supply chain data while protecting the data privacy of all parties, thereby improving the intelligence level of supply chain decision-making;
[0027] S107. Record and track the entire supply chain process data based on blockchain.
[0028] Furthermore, the S2 specifically includes:
[0029] 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;
[0030] S202. Design a hierarchical storage architecture to store high-frequency trading data in a high-performance database off-chain;
[0031] 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;
[0032] 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.
[0033] S205. Use consensus algorithm to optimize the consensus mechanism of blockchain network;
[0034] S206. Optimize the execution logic of the smart contract and optimize the Gas consumption of the contract to improve the efficiency of contract execution;
[0035] 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.
[0036] Furthermore, the S3 specifically includes:
[0037] 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;
[0038] 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;
[0039] 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;
[0040] 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;
[0041] 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;
[0042] S306. Write the optimal path solution and strategy parameters obtained by the solution into the blockchain network, and use the tamper-proof and traceable characteristics of the blockchain to ensure the fairness and transparency of supply chain decision-making;
[0043] S307. Continuously monitor supply chain operation data, update graph data models in real time through the blockchain network, conduct online learning and optimization, dynamically adjust path planning solutions and strategy parameters, and achieve adaptive optimization of the supply chain.
[0044] Furthermore, the S4 specifically includes:
[0045] S401. Based on the historical data of supply chain operations, a Markov decision process model is constructed, where the state space includes the key elements of the production process and the action space includes the execution decision;
[0046] S402. Based on the supply chain network structure, a graph neural network is used to extract the feature representation of each node and edge, and business attributes are integrated to form a state feature vector;
[0047] S403. Design a reward function based on order indicators to quantitatively evaluate the overall performance of the supply chain as the optimization goal of reinforcement learning;
[0048] S404. Construct an energy-agent model, use a deep reinforcement learning algorithm to learn the optimal decision-making strategy through interactive exploration with the environment, and adaptively adjust the strategy parameters of each link in the supply chain according to state characteristics;
[0049] S405. During the training process, the feature information extracted by the graph neural network is used, and expert knowledge is introduced to optimize the reward function to accelerate strategy learning;
[0050] S406. Deploy the trained agent model to dynamically adjust the supply chain operation strategy based on real-time status information to adapt to market changes;
[0051] S407. Monitor the decision results, collect new data for model iteration and update, and establish a digital twin system to simulate the entire supply chain process in real time to evaluate the impact of the decision;
[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 undergoes a predetermined change, 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 distributes 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 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;
[0066] 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.
[0067] Furthermore, the S7 specifically includes:
[0068] 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.
[0069] 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;
[0070] S703. Use visualization technology to present attention weights and causal reasoning results in an intuitive way;
[0071] 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.
[0072] In a second aspect of the present invention, a commodity tracing system for a cross-border e-commerce supply chain is provided, the system comprising:
[0073] 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;
[0074] 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;
[0075] 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;
[0076] 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;
[0077] 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.
[0078] The visualization unit is used to meet the explainability requirements of complex architectures. It introduces attention mechanisms and causal reasoning techniques to provide a visual explanation of the model's decision-making process. It then uses knowledge graph technology to build a panoramic view of the supply chain, supporting multi-dimensional data association analysis and decision tracing.
[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 adopts 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 hierarchical 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. The Internet of Things technology is combined to achieve full process tracking and ensure data traceability. The hybrid architecture and microservice design are used to improve the scalability of the system, and the attention mechanism and knowledge graph are introduced to enhance the interpretability. Through the fusion of multiple technologies, the present invention effectively solves the key problems of data credibility, performance optimization, global decision-making, etc. in the cross-border e-commerce supply chain, and significantly improves the intelligence level and operational efficiency of the supply chain. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.
[0082] Figure 1 The present invention is a flowchart of a commodity tracing method for a cross-border e-commerce supply chain.
[0083] Figure 2 A schematic diagram of a commodity tracing method for a cross-border e-commerce supply chain according to the present invention.
[0084] Figure 3 It is another schematic diagram of a commodity tracing method for a cross-border e-commerce supply chain according to the present invention.
[0085] Figure 4 A schematic diagram of a commodity traceability system for a cross-border e-commerce supply chain according to the present invention. DETAILED DESCRIPTION
[0086] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0087] like Figure 1-3 As shown, an embodiment of the present invention provides a commodity tracing method for a cross-border e-commerce supply chain, and the method includes the following steps S1-S6.
[0088] 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.
[0089] According to the characteristics of multi-party participation in the cross-border e-commerce supply chain, the blockchain network is designed using the alliance chain architecture, and each participant joins the network as a node of the alliance chain. Smart contracts are deployed on the alliance chain, and the data sharing rights and privacy protection rules of each participant are defined through smart contracts to achieve secure sharing of supply chain data.
[0090] For IoT devices in the supply chain, a trusted hardware module is introduced to authenticate the devices and encrypt and sign the collected data to ensure that the data source is credible.
[0091] IoT devices upload 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. All supply chain participants access the consortium chain and obtain the required supply chain data according to the permissions specified in the smart contract, ensuring the security and credibility of data sharing.
[0092] Federated learning algorithms are used to achieve shared modeling and analysis of supply chain data while protecting the privacy of all parties’ data, thereby improving the intelligence level of supply chain decision-making. Based on the characteristics of blockchain that cannot be tampered with and can be traced, data from the entire supply chain process is recorded and tracked, making the entire supply chain process transparent and trustworthy, and improving supply chain management efficiency.
[0093] Specifically, all participants in the cross-border e-commerce supply chain, such as suppliers, logistics service providers, customs, banks, etc., join the network through the blockchain alliance 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. At the same time, the SHA-256 algorithm is used to hash sensitive data to ensure data security.
[0094] IoT devices in the supply chain, such as RFID tags and sensors, are authenticated through trusted hardware modules such as TPM chips to ensure the legitimacy of the device identity. Data collected by IoT devices, such as temperature, humidity, and location information, are encrypted using 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 chain, the smart contract verifies the signature and hash value to determine whether the data has been tampered with. The verification results are also recorded on the blockchain to achieve data on-chain storage. All supply chain participants obtain the required supply chain data from the consortium chain according to their own business needs and the data access rights 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 assessments.
[0095] Using the federated learning algorithm, each participant uses its own data to train the model locally, such as using the gradient descent algorithm to train the sales forecast model, and then uploads the encrypted model parameters. Through secure multi-party computing protocols such as SecureBoost, the model parameters of all parties are aggregated under the premise of protecting the data privacy of all parties, so as to achieve shared optimization of the model and improve the accuracy of supply chain decision analysis. The distributed ledger structure of the blockchain can record 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., and use hash pointers to link blocks in chronological order to ensure the integrity and immutability of the data. At the same time, the timestamp of each block and the digital signature of the transaction party can accurately trace the generation time and responsible party of each data, so as to achieve 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 time for troubleshooting by 30% and improving the efficiency of supply chain management.
[0096] S2. Design a layered 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.
[0097] According to transaction frequency and business importance, the data in the blockchain network is classified to identify high-frequency transaction data and key business data. A layered storage architecture is designed to store high-frequency transaction data in a high-performance database off-chain, and technologies such as in-memory database or distributed cache are used to provide fast data reading and writing capabilities. For high-frequency transaction data stored off-chain, the summary information of the data is calculated through a hash algorithm, and the summary information is regularly synchronized to the blockchain network to achieve synchronization verification of on-chain and off-chain data. Data verification logic is embedded in the smart contract. When the off-chain data is synchronized to the 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.
[0098] Optimize the consensus mechanism of the blockchain network and adopt more efficient consensus algorithms, such as DPoS, PBFT, etc., to 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 smart contracts, remove redundant calculations and storage operations, optimize the Gas consumption of contracts, and improve the efficiency of contract execution. Introduce a precompiled contract mechanism to encapsulate commonly used business logic into precompiled contracts, reduce the deployment and call overhead of contracts, and improve the execution performance of contracts. Through the coordinated use of precompiled contracts and off-chain storage, the overall performance of the system can be further optimized.
[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 each participant, commodity and order in the supply chain, a supply chain graph data model is constructed, in which the participants, commodities and orders are mapped as nodes of the graph, and the relationship between them is mapped as the edge of the graph. The graph neural network model is used to represent the constructed supply chain graph data. By aggregating the feature information of the node and the relationship information of the edge, the low-dimensional vector representation of the node is learned. According to the node representation vector learned by the graph neural network, the similarity between the nodes is calculated, and the implicit association and dependency relationships in the supply chain are mined. The mined association and dependency relationships are used as constraints, combined with the supply chain business rules, to build a supply chain path planning and strategy optimization model. The 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 optimal path plan and strategy parameters are written into the blockchain network, and the fairness and transparency of supply chain decisions are ensured by using the tamper-proof and traceable characteristics of the blockchain. The supply chain operation data is continuously monitored, the graph data model is updated in real time through the blockchain network, online learning and optimization are performed, and the path planning plan and strategy parameters are dynamically adjusted to achieve adaptive optimization of the supply chain.
[0104] Specifically, in the cross-border e-commerce supply chain scenario, a supply chain graph data model is constructed that includes nodes such as suppliers, manufacturers, logistics service providers, retailers, and product SKUs, orders, etc. The relationships between nodes such as supply, production, transportation, and sales are mapped as directed edges.
[0105] As can be understood, GraphAttentionNetwork is used to learn the representation of graph data. The features of first-order neighbor nodes are aggregated through the attention mechanism to learn a 64-dimensional node embedding vector. Based on the cosine similarity to calculate the correlation between nodes, 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 capacity planning, to build a supply chain strategy optimization model based on reinforcement learning. The specific expression is as follows:
[0106] Let X∈R N×F is 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 is the adjacency matrix of the graph; the attention coefficient is defined as e ij , calculated 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 , calculated as follows:
[0110]
[0111] Among them, N i Represents the set of neighbor nodes of node i;
[0112] Calculate the embedding vector h of node i i , calculated as follows:
[0113]
[0114] Here, σ is the activation function (such as ReLU).
[0115] The model is solved by the Deep Q-Network algorithm to obtain the optimal supply chain path solution. 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. Compared with the original solution, the turnaround time is shortened by 2 days and the profit margin is increased by 15%. The optimized path solution is stored on the chain, and the consensus mechanism of the blockchain is used to ensure that multiple parties recognize the decision results. At the same time, the real-time data of each link of the supply chain is continuously tracked, the graph model is updated every 1 hour, and the strategy is learned and dynamically tuned online, so that the supply chain can respond quickly to market changes and achieve agile optimization.
[0116] It can be understood that the model is solved by the Deep Q-Network algorithm to obtain the optimal supply chain path solution, which is expressed as follows:
[0117] Assume t is the state of the supply chain at time step t, including information such as inventory level, production plan, and transportation status; let a t For state s t The actions taken under the above conditions, such as selecting suppliers, arranging transportation, etc. t For state s t Take a t The immediate rewards obtained afterwards;
[0118] Define the Q value function Q(s t , a t ) is in state s t Take action a t The expected cumulative reward obtained after using the neural network Q θ (s t , a t) approximates the Q-value function, where θ is a network parameter;
[0119] The objective function is to minimize the mean square error of the Q value function:
[0120]
[0121] Where γ is the discount factor, θ - is the network target parameter;
[0122] Using the experience replay technology, randomly extract samples from the experience pool for training to reduce the correlation between samples. Using the fixed target network (Fixed Q-Targets) technology, regularly update the parameters of the target network to improve training stability.
[0123] The DQN algorithm is used to solve the supply chain strategy optimization model and obtain the optimal supply chain path solution. For example, after supplier A produces goods, they are first transported to manufacturer B for processing, and then transported to retailer D for sale through logistics service provider C. Compared with the original solution, the turnaround time is shortened by 2 days and the profit margin is increased by 15%.
[0124] 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 in the supply chain through interactive learning between the intelligent 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.
[0125] Based on the historical data of supply chain operations, a Markov decision process model is constructed. The state space includes key factors such as inventory level, order quantity, production plan, etc., and the action space includes decisions such as ordering, production, and transportation.
[0126] In view of the supply chain network structure, a graph neural network is used to extract the feature representation of each node and edge, and integrate business attributes such as timeliness requirements and cost budget to form a state feature vector. The reward function is designed to 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 intelligent agent and use deep reinforcement learning algorithms such as DDPG and PPO to learn the optimal decision-making strategy through interactive exploration with the environment, and adaptively adjust the policy parameters of each link of the supply chain according to the state characteristics. During the training process, the feature information extracted by the graph neural network is used to accelerate the convergence of the strategy and improve the sample efficiency. At the same time, expert knowledge is introduced to optimize the reward function and accelerate strategy learning. Deploy the trained intelligent agent model and dynamically adjust the supply chain operation strategy according to the real-time state information to adapt to market changes. Monitor the decision results and collect new data for model iteration and update. Establish a digital twin system to simulate the entire supply chain process in real time and evaluate the impact of the decision. 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.
[0128] Specifically, when constructing the Markov decision process model, the state space is first defined. For example, the inventory level is set to 0 to 1000 units, the order volume is simulated according to the average daily order volume of 300 orders based on historical data, and the production plan sets the maximum production line speed to 500 units per day based on 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 include selecting different logistics companies and transportation methods. Using graph neural networks, such as models based on graph convolutional networks (GCNs), feature representations of nodes (such as suppliers, manufacturers, distributors) and edges (such as logistics connections) in the supply chain network are extracted. The feature data of these nodes and edges include historical transaction volume, delay rate, cost, etc., and low-dimensional vector representations of each node and edge are obtained through network learning. When designing the reward function, multiple key performance indicators are comprehensively considered, such as the order fulfillment rate target is set to 95%, the inventory turnover rate is expected to reach 2 times per month, and the transportation timeliness requires the average arrival time to be no more than 48 hours. Using deep reinforcement learning algorithms, such as the more advanced PPO algorithm, 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 strategy. At the same time, industry experts are introduced to fine-tune the reward function to ensure that the learning process meets the needs of the actual operation of the supply chain. Through the real-time monitoring system, the supply chain strategy is dynamically adjusted, such as increasing or decreasing inventory or adjusting production speed according to market demand to adapt to market changes. In addition, a digital twin system is established to simulate each step of the supply chain decision in real time, evaluate the impact of each decision adjustment on the overall supply chain performance, and ensure the effectiveness and timeliness of the decision.
[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, IoT devices such as temperature and humidity sensors and GPS locators are deployed at key nodes of the supply chain, such as warehouses and transport vehicles, to collect data every 5 minutes. The collected data is encrypted and transmitted to the blockchain node through the MQTT protocol. The blockchain uses the Fabric architecture and ensures the security and reliability of the data chain process through mechanisms such as TLS and MSP. The smart contract is written in Go language, and the temperature threshold is set to -5℃ to 10℃, and the humidity threshold is set to 70% to 90%. When it exceeds the range, it automatically triggers an alarm and calls the third-party logistics interface to notify the supply chain management personnel. The blockchain ledger is generated once every 10 minutes, all the chain data is packaged, and the hash value is synchronized to the off-chain database to realize the consistency verification of the chain and off-chain data. Through Hyperledger Explorer, the blockchain data is visualized and queried, and BI tools are combined for data analysis and mining to optimize the supply chain operation. Based on cryptographic algorithms such as elliptic curve digital signatures, data authorization sharing is realized, and the data access rights of different subjects are controlled in a fine-grained manner to ensure privacy and security. Continuously collect feedback from IoT devices, optimize smart contract parameters, improve the degree of automation, and create a transparent and efficient digital supply chain.
[0138] S6. Deploy a hybrid architecture in a distributed environment. Through containerization technology and microservice design, ensure the independence and scalability of each component. Use 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.
[0139] 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.
[0140] Deploy a multi-level cache system to optimize data access speed and reduce the load on the back-end system. Multi-level cache stores data in a hierarchical manner, making frequently accessed data quickly accessible, thereby improving the system's concurrent processing capabilities.
[0141] Implement a load balancing mechanism to distribute user requests to multiple servers, further enhancing the system's fault tolerance and concurrent processing capabilities. Load balancing dynamically distributes 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 operating status of microservices and system resource usage in real time. The monitoring system can promptly detect system bottlenecks and potential problems and provide 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] The exception handling mechanism is optimized to ensure that the system can quickly recover and continue to provide services when any component fails. The exception handling mechanism includes automatic failover and failure recovery strategies to ensure high availability of the system.
[0145] Through the above measures, the stability and response speed of the system are guaranteed, while also improving the user experience and the overall efficiency of the system.
[0146] Specifically, the microservice architecture is deployed through containerization technology. Specifically, Docker containers and Kubernetes orchestration tools are used 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. They are managed through Kubernetes' Pod and Service resources, achieving high availability and horizontal expansion of services. They can automatically expand to 10 copies during peak traffic periods to ensure stable operation of the system under high concurrency. Deploy a multi-level cache system, using a combination of Redis and Memcached to build L1 and L2 caches. The L1 cache stores hot data, such as frequently accessed product information, with a hit rate set to 95%; the L2 cache stores secondary hot data, with a hit rate set to 80%. Through the Cache-Aside mode, data is first read from the L1 cache, and then from the L2 cache when it misses, and finally obtained from the database, which significantly reduces the number of database accesses and improves data access speed.
[0147] For example, the loading time of the product details page was reduced from 500ms to 100ms, and the system's concurrent processing capacity increased by 30%. Implement a load balancing mechanism, use a combination of Nginx and HAProxy, and use a weighted polling 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, the server status is monitored in real time, and the faulty nodes are automatically eliminated, avoiding single point failures and improving the system's fault tolerance and concurrent processing capabilities. For example, when the peak traffic reaches 10,000 requests / second, the system can evenly distribute requests to ensure that the load of each server is balanced and the response time is controlled within 200ms. Establish a comprehensive monitoring system, using a combination of Prometheus and Grafana, to monitor key indicators such as CPU usage, memory usage, and response time of microservices in real time. Set thresholds, such as triggering an alarm when the CPU usage exceeds 80%, and display monitoring data through the Grafana visualization panel to facilitate timely discovery of system bottlenecks. For example, the monitoring system found that the response time of the order processing service suddenly increased from 50ms to 200ms, and immediately triggered an alarm to notify the administrator to optimize, thus avoiding the degradation of system performance. Integrate the early warning system with the monitoring system, and use ELK Stack (Elasticsearch, Logstash, Kibana) for log analysis and anomaly detection. Through machine learning algorithms, such as the anomaly detection algorithm Isolation Forest, identify abnormal behaviors, set the anomaly score threshold of 8, and automatically trigger an alarm and notify the administrator when the anomaly score is higher than the threshold. For example, the system detected that the number of visits to a certain product suddenly increased by 10 times, and the anomaly score reached 9, and immediately triggered an alarm. The administrator responded quickly, troubleshooting and resolving potential security risks. Optimize the exception handling mechanism, and use the Hystrix and Resilience4j frameworks to implement service circuit breaking and degradation strategies. Set a circuit breaking threshold, such as automatically breaking when the service request failure rate reaches 50%, to avoid the spread of faults. Through the failover mechanism, such as automatically switching to service B when service A fails, ensure system continuity.
[0148] For example, when an order service fails, the system automatically switches to the backup order service, and the fault recovery time is shortened 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 800ms to 200ms, 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. In response to the need for explainability of complex architectures, the attention mechanism and causal reasoning technology are introduced to provide a visual explanation of the model's decision-making process. Then, through the knowledge graph technology, a panoramic view of the supply chain is constructed to support multi-dimensional data correlation analysis and decision traceability.
[0150] In response to the interpretability requirements of complex architectures, the following technical solutions are adopted: By introducing the attention mechanism, the key features of the model in the decision-making process are captured, the importance weights of different features are determined, and the internal working mechanism of the model is revealed. Using causal reasoning technology, a causal graph model is constructed based on domain knowledge to characterize the causal dependency relationship between variables, analyze the reasons for the model's decision results, and enhance the interpretability of the decision-making process.
[0151] By using visualization technology, the attention weights and causal reasoning results are presented in an intuitive way, and key features, causal links, etc. are displayed through an interactive interface, so that non-professional users can also understand the decision logic of the model. A supply chain knowledge graph is constructed to semantically model business entities, relationships, and attributes to form a panoramic view of the supply chain, supporting association analysis from multiple dimensions such as products, orders, logistics, and funds. Business data is mapped to the knowledge graph, implicit business insights are obtained through graph reasoning, key nodes and paths in the business decision-making process are traced, and the decision-making traceability capability is improved. In the business optimization scenario, the attention mechanism, causal reasoning, and knowledge graph technology are used in combination to identify the key factors affecting business goals, simulate the effects of different decision-making plans, and provide managers with explainable optimization suggestions. Through the application of the above technical solutions, the transparency and credibility of the system are improved, so that business users can deeply understand the working principle of the system, enhance their trust in the system decision results, and promote human-machine collaborative optimization of business processes.
[0152] Specifically, in the supply chain scenario, the attention mechanism is used to analyze order data. By training the Transformer model and using the self-attention mechanism to calculate the correlation between different features, the attention weight distribution of key features such as product category, quantity, and amount in the order is obtained.
[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 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 perform representation learning on the node features and edge relationships through the graph neural network, explore the implicit associations and dependencies in the supply chain, and then construct a reinforcement learning model to 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 intelligent agent and the environment to perform global optimization. In the process of training the reinforcement learning model, the feature information extracted by the graph neural network is integrated;
[0158] The product traceability unit 104 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 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;
[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 guaranteed. At the same time, a multi-level cache and load balancing mechanism are adopted to improve the concurrent processing capability and fault tolerance. At the same time, a sound monitoring and warning mechanism is established to respond to and deal with abnormal situations in a timely manner.
[0160] The visualization unit 106 is used to introduce the attention mechanism and causal reasoning technology to visually explain the decision-making process of the model in response to the explainability requirements of the complex architecture. It then uses the knowledge graph technology to build a panoramic view of the supply chain and support multi-dimensional data association analysis and decision tracing.
[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 functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the current technical solution. The current computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0163] In the description of the present application, it should be noted that the terms "upper", "lower", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the current invention products are usually placed when used. They are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0164] In the description of this application, it should also be noted that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" 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 a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this 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 it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A commodity tracing method for a 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. In response to the need for explainability of complex architectures, the attention mechanism and causal reasoning technology are introduced to provide a visual explanation of the model's decision-making process. Then, through the knowledge graph technology, a panoramic view of the supply chain is constructed to support multi-dimensional data correlation analysis and decision traceability.
2. A commodity tracing method for a cross-border e-commerce supply chain according to claim 1, characterized in that: The S1 specifically includes: S101. Based on the characteristics of multi-party participation in the cross-border e-commerce supply chain, the blockchain network is designed using the alliance chain architecture, and each participant is added to the network as a node of the alliance chain; S102. Deploy smart contracts on the alliance chain, define the data sharing rights and privacy protection rules of each participant through smart contracts, and share supply chain data securely; S103. For IoT devices in the supply chain, a trusted hardware module is introduced to authenticate the devices and encrypt and sign the collected data to ensure that the data source is credible; S104. The IoT device uploads the encrypted and signed data to the consortium chain, verifies the authenticity and integrity of the data through the smart contract, and records the verification results on the blockchain; S105. Each supply chain participant accesses the alliance chain and obtains the required supply chain data according to the permissions specified in the smart contract to ensure the security and credibility of data sharing; S106. Use federated learning algorithms to achieve shared modeling and analysis of supply chain data while protecting the data privacy of all parties, thereby improving the intelligence level of supply chain decision-making; S107. Record and track the entire supply chain process data based on blockchain.
3. A commodity tracing method for a cross-border e-commerce supply chain according to claim 1, characterized in that: The 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 commodity tracing method for a cross-border e-commerce supply chain according to claim 1, characterized in that: 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 optimal path solution and strategy parameters obtained by the solution into the blockchain network, and use the tamper-proof and traceable characteristics of the blockchain to ensure the fairness and transparency of supply chain decision-making; S307. Continuously monitor supply chain operation data, update graph data models in real time through the blockchain network, conduct online learning and optimization, dynamically adjust path planning solutions and strategy parameters, and achieve adaptive optimization of the supply chain.
5. The commodity tracing method for a cross-border e-commerce supply chain according to claim 1, characterized in that: The S4 specifically includes: S401. Based on the historical data of supply chain operations, a Markov decision process model is constructed, where the state space includes the key elements of the production process and the action space includes the execution decision; S402. Based on the supply chain network structure, a graph neural network is used to extract the feature representation of each node and edge, and business attributes are integrated to form a state feature vector; S403. Design a reward function based on order indicators to quantitatively evaluate the overall performance of the supply chain as the optimization goal of reinforcement learning; S404. Construct an energy-agent model, use a deep reinforcement learning algorithm to learn the optimal decision-making strategy through interactive exploration with the environment, and adaptively adjust the strategy parameters of each link in the supply chain according to state characteristics; S405. During the training process, the feature information extracted by the graph neural network is used, and expert knowledge is introduced to optimize the reward function to accelerate strategy learning; S406. Deploy the trained agent model to dynamically adjust the supply chain operation strategy based on real-time status information to adapt to market changes; S407. Monitor the decision results, collect new data for model iteration and update, and establish a digital twin system to simulate the entire supply chain process in real time to evaluate the impact of the decision; 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.
6. A commodity tracing method for a cross-border e-commerce supply chain according to claim 5, 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.
7. A commodity tracing method for 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.
8. The commodity tracing method for 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.
9. A commodity tracing method for 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.
10. A commodity tracing system for a cross-border e-commerce supply chain, 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. The visualization unit is used to meet the explainability requirements of complex architectures. It introduces attention mechanisms and causal reasoning techniques to provide a visual explanation of the model's decision-making process. It then uses knowledge graph technology to build a panoramic view of the supply chain, supporting multi-dimensional data association analysis and decision tracing.
Citation Information
Patent Citations
Supply chain system and framework based on intelligent contract and Internet of Things technology
CN111401730A
Commodity traceability system based on block chain and big data technology
CN111539750A
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
Cited By
Agricultural product supply chain management method and system based on order data
CN119693100A
Two-way information flow integration method and system for ERP (Enterprise Resource Planning) and e-commerce platform
CN119990678A
Cargo logistics information tracking method and system based on cloud platform
CN120031474A
Plant-based fermentation material production information tracing method and system
CN120031580A
Intelligent contract driven workflow engine automatic execution method and system based on block chain
CN120179419A