Blockchain-based supply chain traceability and intelligent inventory management methods and systems

CN122573345APending Publication Date: 2026-08-14LIAONING UNIV OF FINANCE & TRADE
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-20
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0005]1.库存预测大多仅依赖历史消耗数据,未充分考虑市场趋势、季节性变化、促销活动、宏观经济等外部因素的影响,预测准确率低;智能合约规则固定,无法根据供应链环境的变化自适应优化,随着运行时间的推移,决策效果会逐渐下降;异常检测主要依赖简单的阈值比对,难以识别复杂的隐性异常和早期预警信号

Benefits of technology

[0057] (1) This application introduces an adaptive time series prediction model and combines multi-dimensional heterogeneous data to effectively improve the accuracy of inventory prediction; the self-evolving smart contract based on deep reinforcement learning makes supplier selection and replenishment decision more scientific and reasonable, shortens the replenishment response time and reduces the loss rate; and adopts an advanced unsupervised anomaly detection model that can identify more than 92% of complex hidden anomalies, effectively increasing the early warning time of anomalies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122573345A_ABST
    Figure CN122573345A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of supply chain management and discloses a blockchain-based supply chain traceability and intelligent inventory management method and system, including the following steps: When goods enter the warehouse, verify the identity information of the goods and encrypt and store it on the consortium blockchain to generate an entry data block containing a unique identifier for the goods; construct a digital mapping body for the goods and associate it with the entry data block on the blockchain; predict the demand for goods based on multi-dimensional data through an adaptive time-series prediction model, calculate dynamic security thresholds and generate inventory early warning indicators; select the optimal supplier and generate an electronic replenishment order based on a self-evolving smart contract using deep reinforcement learning; construct a full-chain collaborative monitoring system and identify abnormal events through an unsupervised anomaly detection model; aggregate full lifecycle data across chains based on a privacy-preserving data aggregation protocol to generate a full-chain traceability data package; return de-identified traceability information based on a context-aware dynamic permission management mechanism, display the visualized trajectory through the digital mapping body and predict future states.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of supply chain management technology, and in particular relates to a blockchain-based supply chain traceability and intelligent inventory management method and system. Background Technology

[0002] With the rapid development of economic integration and the digital economy, supply chain networks are becoming increasingly complex and vast. Traditional supply chain management models mainly rely on centralized databases and manual operations, resulting in numerous problems such as severe data silos, lack of information transparency, difficulty in traceability, extensive inventory management, and delayed response to anomalies, which seriously restrict the operational efficiency and reliability of the supply chain.

[0003] In recent years, blockchain technology, with its characteristics of distributed storage, immutability, traceability, and multi-node consensus, has provided a new technological path for solving pain points in traditional supply chain management. Domestic and international scholars and enterprises have conducted extensive research and application practices in blockchain-based supply chain management. For example, Chinese invention patent application CN121707465A discloses a logistics supply chain management method and system based on blockchain technology, which realizes basic inventory management, logistics route optimization, and full-chain information traceability functions through blockchain.

[0004] However, existing technologies still have the following core shortcomings:

[0005] 1. Inventory forecasting mostly relies solely on historical consumption data, failing to adequately consider the impact of external factors such as market trends, seasonal changes, promotional activities, and the macroeconomy, resulting in low forecast accuracy; smart contract rules are fixed and cannot adaptively optimize according to changes in the supply chain environment, and the decision-making effectiveness gradually declines over time; anomaly detection mainly relies on simple threshold comparisons, making it difficult to identify complex hidden anomalies and early warning signals.

[0006] 2. Inventory management and logistics optimization are independent of each other and have not achieved global collaborative optimization; monitoring of each link in the supply chain is incomplete, and there is a lack of effective monitoring of upstream links such as supplier production and transit warehouse throughput; there is a lack of closed-loop feedback mechanism for handling anomalies, making it impossible to learn from and optimize from historical handling experience.

[0007] 3. Cross-chain data sharing mostly relies on the direct transmission of raw data, which poses a serious risk of commercial privacy leakage; the permission management mechanism is rigid and cannot dynamically adjust access permissions based on contextual information such as the identity, time, and location of the requester.

[0008] Therefore, there is an urgent need for a highly intelligent, collaborative, and secure blockchain-based supply chain traceability and inventory management method and system to solve the aforementioned problems in existing technologies. Summary of the Invention

[0009] This application addresses the problems existing in the prior art by proposing a blockchain-based supply chain traceability and intelligent inventory management method and system. By introducing technologies such as digital mapping, adaptive time series prediction, deep reinforcement learning, unsupervised anomaly detection, and privacy-preserving data aggregation, it achieves intelligent management, collaborative operation, secure sharing, and visualized traceability of the entire supply chain.

[0010] To achieve the above objectives, this application provides the following technical solution:

[0011] Firstly, a blockchain-based supply chain traceability and intelligent inventory management method includes the following steps: S1, when goods enter the warehouse, verify the goods' identity information and encrypt and store it on the consortium blockchain, generating an entry data block containing a unique identifier for the goods; construct a digital mapping body for the goods and associate it with the entry data block on the blockchain; S2, based on on-chain historical data and external multi-dimensional heterogeneous data, predict the future demand for goods using an adaptive time-series prediction model; calculate a dynamic safety threshold based on the predicted demand and a preset service level, establish a dynamic inventory database, and generate multi-dimensional inventory early warning indicators; S3, in response to replenishment events triggered by inventory early warning indicators, select the optimal supplier and generate an electronic replenishment order through a self-evolving smart contract; the self-evolving smart contract is based on deep reinforcement learning. The model dynamically adjusts the supplier evaluation system and replenishment decision-making strategy; S4, during the replenishment execution process, a full-process collaborative monitoring system is built, collecting operational data from each node and encrypting it on the blockchain; an unsupervised anomaly detection model identifies supply chain anomalies, triggers multi-level early warnings, and generates emergency response plans for inventory-logistics collaborative optimization; S5, based on a privacy-protected data aggregation protocol, without disclosing the original data of each participant, cross-chain full lifecycle data is aggregated and consistency is verified to generate an immutable full-chain traceability data package; S6, in response to traceability requests, a context-aware dynamic permission management mechanism returns de-identified traceability information corresponding to the permissions; a digital mapping volume displays the visualized trajectory of the entire lifecycle of goods and predicts the future status and potential risks of goods.

[0012] Optionally, in step S2, predicting future demand for goods using an adaptive time-series forecasting model includes:

[0013] S2.1 Collect on-chain historical transaction data, inventory data, and external market data to construct a multi-dimensional time-series dataset;

[0014] S2.2. Perform standardization preprocessing on the time series dataset to eliminate data noise and dimensional differences;

[0015] S2.3 Training an adaptive time series prediction model to learn the time dependencies and trend characteristics in the data;

[0016] S2.4 Input real-time data into the trained model and output the predicted value and confidence interval of the demand for goods within the preset period.

[0017] Optionally, in step S2, calculating the dynamic security threshold based on the predicted demand and preset service level includes:

[0018] S2.5 Calculate the demand fluctuation coefficient based on historical forecast errors;

[0019] S2.6 Calculate safety stock by combining the preset service level and average replenishment lead time;

[0020] S2.7. Generate a dynamic safety threshold based on the predicted average demand and safety stock.

[0021] S2.8. Associate the dynamic security threshold with the goods category and bind it to the triggering conditions of the self-evolving smart contract.

[0022] Optionally, in step S3, dynamically adjusting the supplier evaluation system based on the deep reinforcement learning model includes:

[0023] S3.1 Construct a state space containing multi-dimensional attributes of suppliers and an action space containing evaluation index weights;

[0024] S3.2 Design a reward function with the goal of maximizing the overall benefits of the supply chain;

[0025] S3.3. Use historical replenishment data to train a deep reinforcement learning model and learn the optimal evaluation index weight allocation strategy;

[0026] S3.4. During each replenishment decision, the trained model outputs the weight of the current optimal evaluation index, calculates the comprehensive score of suppliers, and ranks them.

[0027] Optionally, in step S4, constructing a collaborative monitoring system covering all stages includes:

[0028] S4.1 Deploy multimodal sensing devices at each node of the supply chain to collect operational data from each stage of production, warehousing, logistics, and quality inspection;

[0029] S4.2. Preprocess the collected data through edge computing nodes to generate standardized data blocks;

[0030] S4.3. Encrypt standardized data blocks and store them on the blockchain to ensure that the data is tamper-proof and traceable.

[0031] Optionally, in step S4, identifying supply chain anomaly events using an unsupervised anomaly detection model includes:

[0032] S4.4 Training an unsupervised anomaly detection model to learn the characteristic patterns of normal supply chain operation data;

[0033] S4.5 Input the real-time collected operation data into the anomaly detection model to identify abnormal events that deviate from the normal mode;

[0034] S4.6. Based on the scope and severity of the impact of abnormal events, classify the abnormality level and trigger the corresponding level of warning.

[0035] Optionally, step S4 may also include:

[0036] S4.7 When a supply chain anomaly is detected, initiate the inventory-logistics collaborative optimization process and adjust the logistics route and inventory allocation strategy.

[0037] S4.8 Collect data on the implementation effect of the emergency response plan, feed it back to the deep reinforcement learning model, and update the model parameters to optimize subsequent decisions.

[0038] Optionally, in step S5, cross-chain full lifecycle data is aggregated based on a privacy-preserving data aggregation protocol, including:

[0039] S5.1 Each participant trains a data feature extraction model locally and extracts feature vectors from their respective on-chain data;

[0040] S5.2 Each participating party sends the encrypted feature vector to the collaborative computing node;

[0041] S5.3, The collaborative computing nodes aggregate the encrypted feature vectors to generate a global feature vector;

[0042] S5.4 Verify the consistency of data in each chain based on global feature vectors, and remove invalid or tampered data;

[0043] S5.5 Integrate the verified data fragments to generate a full-chain traceability data package and store it on the blockchain.

[0044] Optionally, in step S6, the context-aware dynamic permission management mechanism returns the de-identified and traceable information for the corresponding permission, including:

[0045] S6.1 Verify the identity information and context attributes of the tracing requester;

[0046] S6.2 Dynamically assign data access permissions based on identity information and context attributes;

[0047] S6.3. Selectively desensitize traceability data based on attribute-based encryption and zero-knowledge proof technology;

[0048] S6.4 Return the de-identified traceability information to the requester and record the query log in the blockchain.

[0049] Secondly, the present invention provides a blockchain-based supply chain traceability and intelligent inventory management system for implementing the blockchain-based supply chain traceability and intelligent inventory management method as described in the first aspect, comprising:

[0050] The warehousing and on-chain digital mapping module is used to verify the identity information of goods and encrypt and store it on the consortium blockchain, generate warehousing data blocks containing the unique identifier of goods, construct the digital mapping body of goods and associate it with the warehousing data blocks on the blockchain;

[0051] The demand forecasting and inventory management module is used to predict the future demand distribution of goods through an adaptive time-series forecasting model, calculate dynamic safety thresholds, establish a dynamic inventory database, and generate multi-dimensional inventory early warning indicators.

[0052] The self-evolving intelligent replenishment module is used to respond to replenishment events triggered by inventory warning indicators, and to select the best supplier and generate an electronic replenishment order through self-evolving smart contracts.

[0053] The end-to-end collaborative monitoring module is used to build a collaborative monitoring system covering all aspects, collect operational data from each node and encrypt and upload it to the blockchain; it identifies abnormal events in the supply chain through an unsupervised anomaly detection model, triggers multi-level early warnings and generates emergency response plans;

[0054] The cross-chain privacy traceability module is used to aggregate and verify the consistency of goods' full lifecycle data across chains based on a privacy-preserving data aggregation protocol, and generate a full-chain traceability data package.

[0055] The digital mapping visualization module is used to respond to traceability requests and return anonymized traceability information corresponding to the permissions based on a context-aware dynamic permission management mechanism; it displays the visualized trajectory of the entire life cycle of goods and predicts future states through digital mapping volumes.

[0056] The beneficial effects of this application are as follows:

[0057] (1) This application introduces an adaptive time series prediction model and combines multi-dimensional heterogeneous data to effectively improve the accuracy of inventory prediction; the self-evolving smart contract based on deep reinforcement learning makes supplier selection and replenishment decision more scientific and reasonable, shortens the replenishment response time and reduces the loss rate; and adopts an advanced unsupervised anomaly detection model that can identify more than 92% of complex hidden anomalies, effectively increasing the early warning time of anomalies.

[0058] (2) This application breaks down information barriers in each link through the inventory-logistics collaborative optimization mechanism, realizes the optimal allocation of global resources in the supply chain, and reduces overall operating costs; it constructs a closed-loop monitoring and feedback system for the entire chain, so that the system has the ability to continuously optimize itself and the decision accuracy continues to improve with the running time.

[0059] (3) Based on privacy-preserving data aggregation technology, this application realizes trusted aggregation and verification of cross-chain data without disclosing the original data of each participant. This ensures the integrity and authenticity of the traceability data and effectively protects commercial privacy. The context-aware dynamic permission management mechanism can flexibly adjust access permissions according to the identity, time, location and other information of the requester, further enhancing data security.

[0060] (4) This application uses digital mapping technology to display the full life cycle information of goods in a three-dimensional visualization form, which is intuitive, vivid and highly interactive; the newly added future status prediction function can provide early warning of potential delays, cargo damage and other risks, and provide users with more comprehensive decision support; the local caching mechanism ensures the continuity and stability of the traceability service. Attached Figure Description

[0061] Figure 1 This is a schematic diagram of a blockchain-based supply chain traceability and intelligent inventory management method according to Embodiment 1 of this application;

[0062] Figure 2 This is a schematic diagram of a blockchain-based intelligent supply chain traceability and inventory management system according to Embodiment 2 of this application. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description of this application is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely one preferred embodiment of this application and are only used to explain this application. They do not limit the scope of protection of this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0064] Example 1:

[0065] like Figure 1 As shown, a blockchain-based supply chain traceability and intelligent inventory management method includes the following steps:

[0066] S1. When goods enter the warehouse, verify the identity information of the goods and encrypt and store it on the consortium blockchain, and generate an entry data block containing the unique identifier of the goods; construct a digital mapping body of the goods and associate it with the entry data block on the blockchain;

[0067] S2. Based on on-chain historical data and external multi-dimensional heterogeneous data, predict future demand for goods through an adaptive time-series prediction model; calculate dynamic safety thresholds based on predicted demand and preset service levels, establish a dynamic inventory database, and generate multi-dimensional inventory early warning indicators.

[0068] S3. In response to replenishment events triggered by inventory warning indicators, the system selects the best supplier and generates an electronic replenishment order through a self-evolving smart contract. The self-evolving smart contract dynamically adjusts the supplier evaluation system and replenishment decision-making strategy based on a deep reinforcement learning model to achieve continuous self-optimization of decision-making rules.

[0069] S4. During the replenishment process, a full-process collaborative monitoring system is built to collect operational data from each node and encrypt and upload it to the blockchain; an unsupervised anomaly detection model is used to identify supply chain anomalies, trigger multi-level early warnings, and generate emergency response plans for inventory-logistics collaborative optimization.

[0070] S5. Based on a privacy-preserving data aggregation protocol, aggregate cross-chain full lifecycle data and verify consistency without disclosing the original data of each participant, generating an immutable full-chain traceability data package.

[0071] S6. In response to the traceability request, the context-aware dynamic permission management mechanism returns the de-identified traceability information corresponding to the permissions; the entire life cycle of the goods is visualized through a digital mapping body, and the future status and potential risks of the goods are predicted.

[0072] In step S1, after the goods arrive at the warehousing center, staff use a barcode scanner to scan the traceability code on the goods to verify their identity information, including the product category, batch number, production date, manufacturer, and quality inspection report number. After successful verification, the SM4 symmetric encryption algorithm is used to encrypt the incoming data, generating an incoming data block containing the goods' unique identifier, arrival time, storage location information, operator information, and goods status. After verification using the Practical Byzantine Fault Tolerance (PBFT) consensus mechanism of the consortium blockchain, the incoming data block is stored in a distributed ledger to ensure data immutability and traceability. Simultaneously, based on the goods' attribute information, such as three-dimensional dimensions, weight, material, storage requirements, shelf life, and fragility, a digital mapping entity is constructed, mapping one-to-one with the physical goods. This digital mapping entity is a precise virtual mirror of the physical goods in the digital world, containing not only all static attributes but also reflecting real-time dynamic status changes. The initial parameter information of the digital mapping entity is encrypted and stored on the blockchain, bound one-to-one with the goods' unique identifier. Throughout the entire lifecycle of the goods, whenever the physical goods change status, the system automatically updates the corresponding digital mapping and uploads the update information to the blockchain, ensuring real-time synchronization between the digital mapping and the physical goods.

[0073] In this embodiment, step S2, predicting future demand for goods using an adaptive time-series forecasting model, includes:

[0074] S2.1 Collect on-chain historical transaction data, inventory data, and external market data to construct a multi-dimensional time-series dataset;

[0075] S2.2. Perform standardization preprocessing on the time series dataset to eliminate data noise and dimensional differences;

[0076] S2.3 Training an adaptive time series prediction model to learn the time dependencies and trend characteristics in the data;

[0077] S2.4 Input real-time data into the trained model and output the predicted value and confidence interval of the demand for goods within the preset period.

[0078] The adaptive time series prediction model includes Long Short-Term Memory (LSTM) networks, Gate Frame Recurrent Units (GRU), Transformer, Temporal Convolutional Networks (TCN), and their combinations. This application uses Transformer as the basic architecture, and its attention mechanism can effectively capture long-term dependencies and complex trend features in time series data. Compared with traditional LSTM and GRU models, the prediction accuracy is improved by more than 15%. The attention mechanism formula is shown below:

[0079] (1)

[0080] Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively; Let be the dimension of the key matrix; It is a normalized exponential function.

[0081] The loss function of the model uses the mean squared error (MSE):

[0082] (2)

[0083] in, The mean squared error loss value; N is the total number of training samples; This represents the actual demand for goods in the i-th sample. The model predicts the demand for goods for the i-th sample.

[0084] In this embodiment, step S2, calculating the dynamic security threshold based on the predicted demand and the preset service level, includes:

[0085] S2.5 Calculate the demand fluctuation coefficient based on historical forecast errors;

[0086] S2.6 Calculate safety stock by combining the preset service level and average replenishment lead time;

[0087] S2.7. Generate a dynamic safety threshold based on the predicted average demand and safety stock.

[0088] S2.8. Associate the dynamic security threshold with the goods category and bind it to the triggering conditions of the self-evolving smart contract.

[0089] The formula for calculating safety stock is as follows:

[0090] (3)

[0091] Where SS is the safety stock; Z is the normal distribution quantile corresponding to the preset service level; is the standard deviation of daily demand; L is the average replenishment lead time.

[0092] The formula for calculating the dynamic security threshold is as follows:

[0093] (4)

[0094] in, Dynamic security threshold; To predict average daily demand.

[0095] The multi-dimensional inventory early warning indicators include four core dimensions: inventory level early warning, consumption rate early warning, replenishment cycle early warning, and warehouse space utilization rate early warning.

[0096] This application constructs a multi-dimensional time-series dataset by extracting historical transaction data, inventory data, replenishment data, logistics data, and quality inspection data from the blockchain, and simultaneously acquiring multi-dimensional heterogeneous external data from third-party data platforms, including market trend indices, seasonal factors, promotional activity plans, macroeconomic indicators, weather data, and holiday information. The time-series dataset undergoes standardization preprocessing, including filling missing values ​​using linear interpolation and using 3D modeling. The principle is to remove outliers and use Z-score standardization to transform the data into a standard normal distribution with a mean of 0 and a standard deviation of 1, eliminating data noise and dimensional differences, and improving the stability and accuracy of model training. This allows the dynamic safety threshold to be associated with the product category and bound to the triggering conditions of a self-evolving smart contract. When the real-time inventory level falls below the dynamic safety threshold, a replenishment process is automatically triggered.

[0097] In this embodiment, step S3, dynamically adjusting the supplier evaluation system based on the deep reinforcement learning model, includes:

[0098] S3.1 Construct a state space containing multi-dimensional attributes of suppliers and an action space containing evaluation index weights;

[0099] S3.2 Design a reward function with the goal of maximizing the overall benefits of the supply chain;

[0100] S3.3. Use historical replenishment data to train a deep reinforcement learning model and learn the optimal evaluation index weight allocation strategy;

[0101] S3.4. During each replenishment decision, the trained model outputs the weight of the current optimal evaluation index, calculates the comprehensive score of suppliers, and ranks them.

[0102] Specifically, deep reinforcement learning models include, but are not limited to, Deep Q-Network (DQN), Proximal Policy Optimization (PPO), Soft Actor-Critic (SAC), and their improved models. This application adopts the Proximal Policy Optimization (PPO) model, which has advantages such as stable training, high sample efficiency, and good hyperparameter robustness, making it very suitable for dynamic optimization of supplier evaluation systems. The objective function is:

[0103] (5)

[0104] in, Tailor the objective function for PPO; These are the parameters of the policy network; The expectation of the time step; The probability ratio represents the difference between the new policy and the old policy in state 1. Select action The probability ratio; The current parameter is The strategy network; The old policy network before the update; The dominance function measures the action. The degree of superiority or inferiority relative to the average level; This is the clipping function; These are the trimming parameters.

[0105] The reward function is:

[0106] (6)

[0107] Where R is the reward value; For response timeliness deviation; For cargo damage rate; Price deviation; Rate the after-sales service; , , , These are the weighting coefficients.

[0108] When the real-time inventory level in the dynamic inventory database falls below the dynamic safety threshold calculated in step S2, an inventory warning event is triggered, and the self-evolving smart contract automatically initiates the replenishment process. The smart contract first accesses the supplier qualification database stored in the blockchain, filtering for active supplier nodes with valid qualifications and supply permissions for the current product category. Then, it uses a pre-trained proximal strategy optimization PPO deep reinforcement learning model to calculate the optimal weights for each evaluation indicator and outputs the current optimal indicator weights. Based on the optimal weights, a comprehensive score for each supplier is calculated and sorted in descending order of score. The supplier with the highest score is selected, and a baseline replenishment quantity is calculated based on the difference between the dynamic safety threshold and the real-time inventory level. This is combined with the supplier's minimum economic batch size rule, warehouse capacity limit, and product shelf-life requirements to generate a corrected replenishment quantity. The self-evolving smart contract automatically generates a structured electronic replenishment order, containing product information, replenishment quantity, delivery time, delivery location, and quality requirements. The electronic replenishment order is asymmetrically encrypted using the target supplier's public key, and then appended with a blockchain timestamp and the supply chain manager's digital signature. It is then pushed to the supplier node via a private channel on a permissioned blockchain, ensuring the security and non-repudiation of the replenishment order transmission.

[0109] In this embodiment, step S4, constructing a collaborative monitoring system covering all stages includes:

[0110] S4.1 Deploy multimodal sensing devices at each node of the supply chain to collect operational data from each stage of production, warehousing, logistics, and quality inspection;

[0111] S4.2. Preprocess the collected data through edge computing nodes to generate standardized data blocks;

[0112] S4.3. Encrypt standardized data blocks and store them on the blockchain to ensure that the data is tamper-proof and traceable.

[0113] Furthermore, in step S4, identifying supply chain anomaly events using an unsupervised anomaly detection model includes:

[0114] S4.4 Training an unsupervised anomaly detection model to learn the characteristic patterns of normal supply chain operation data;

[0115] S4.5 Input the real-time collected operation data into the anomaly detection model to identify abnormal events that deviate from the normal mode;

[0116] S4.6. Based on the scope and severity of the impact of abnormal events, classify the abnormality level and trigger the corresponding level of warning.

[0117] Unsupervised anomaly detection models include, but are not limited to, isolated forests, autoencoders, variational autoencoders (VAEs), long short-term memory networks-autoencoders (LSTM-AEs), and their combined models. This application uses the LSTM-AE model, and its reconstruction error calculation formula is as follows:

[0118] (7)

[0119] Where RE is the reconstruction error, used to measure the difference between the input data and the reconstructed data; This represents the original input data at time step t. Reconstruct the model data for the t-th time step; T is the time step size; This is the square of the L2 norm, which is the sum of the squares of all elements in the vector. When the reconstruction error exceeds a preset threshold, it is considered an abnormal event.

[0120] Specifically, step S4 also includes:

[0121] S4.7 When a supply chain anomaly is detected, initiate the inventory-logistics collaborative optimization process and adjust the logistics route and inventory allocation strategy.

[0122] S4.8 Collect data on the implementation effect of the emergency response plan, feed it back to the deep reinforcement learning model, and update the model parameters to optimize subsequent decisions.

[0123] During the replenishment order execution process, a collaborative monitoring system covering all aspects of production, warehousing, logistics, and quality inspection is established. Specifically, temperature sensors, vibration sensors, output counters, equipment status monitors, and energy consumption monitors are deployed in the supplier's production workshops to collect real-time production data such as equipment operating status, output, pass rate, capacity utilization, and energy consumption. In transit warehouses, RFID readers, video surveillance cameras, temperature and humidity sensors, smoke alarms, and infrared intrusion detectors are deployed to collect real-time warehousing data such as goods entry and exit times, warehouse location information, throughput, warehousing environment, and security status. In transport vehicles, multi-modal sensor groups such as GPS locators, temperature and humidity sensors, vibration sensors, acceleration sensors, cameras, and door status sensors are deployed to collect real-time logistics data such as the geographical location of goods, transportation environment, driving status, cargo box status, and vehicle status. In the quality inspection process, automated testing equipment, barcode scanners, and data entry terminals are deployed to collect real-time quality inspection data such as inspection results, inspectors, inspection time, and testing equipment serial numbers.

[0124] Data collected from each monitoring point is first preprocessed using locally deployed edge computing nodes. This preprocessing includes data cleaning, format conversion, anomaly marking, and data compression to remove noise and invalid data, improving data quality and transmission efficiency. Then, every minute, the preprocessed data is encapsulated into standardized data blocks, each with a unique identifier, timestamp, and digital signature before being written to the blockchain. Smart contracts input these standardized data blocks into a pre-trained Long Short-Term Memory (LSTM) autoencoder-AE unsupervised anomaly detection model in real time. The LSTM-AE model consists of an encoder and a decoder. The encoder, composed of two LSTM layers, encodes the input time-series data into low-dimensional feature vectors. The decoder, composed of two LSTM layers and a fully connected layer, reconstructs the low-dimensional feature vectors back into the original input data. By learning the characteristic patterns of normal supply chain operation data, the model can identify various complex anomalies, such as sudden drops in supplier capacity, congestion in transit warehouses, abnormal vehicle stops, abnormal temperature and humidity fluctuations, and cargo damage. When the reconstruction error calculated by the model exceeds a preset threshold, it is considered an anomaly.

[0125] When an anomaly is detected, it is classified into three levels—Level 1 (Minor), Level 2 (Moderate), and Level 3 (Severe)—based on its impact, severity, and urgency, triggering corresponding alerts. Level 1 (Minor) Anomaly: A single indicator deviates from the threshold by ≤20%, not affecting overall delivery. For Level 1 anomalies, the system sends SMS and email alerts to relevant management personnel. Level 2 (Moderate) Anomaly: A single indicator deviates from the threshold by 20%-50%, or multiple indicators deviate simultaneously, potentially affecting delivery timeliness. For Level 2 anomalies, the system automatically sends alert information to relevant personnel and initiates preliminary emergency response procedures. Level 3 (Severe) Anomaly: A single indicator deviates from the threshold by >50% or a safety incident occurs, leading to delivery interruption or significant cargo damage. For Level 3 anomalies, the system immediately sends an emergency alert to all relevant personnel and initiates comprehensive emergency response procedures.

[0126] When a Level 2 or higher alert is triggered, the system automatically accesses the emergency response knowledge base stored in the blockchain, retrieving a matching preliminary response plan based on the anomaly type and severity. The emergency response knowledge base stores contingency plans for various common anomalies, including alternative supplier lists for insufficient supplier capacity, alternative routes for logistics delays, and cross-warehouse allocation plans for insufficient inventory. Then, an inventory-logistics collaborative optimization process is initiated to minimize emergency response costs and maximize on-time delivery rates. This involves adjusting logistics routes and cross-regional inventory allocation strategies, using an improved genetic algorithm to optimize both simultaneously, minimizing emergency response costs while meeting timeliness requirements.

[0127] The improved genetic algorithm employs real-number encoding to encode logistics routes and inventory allocation schemes as chromosomes. The fitness function is designed as a multi-objective function that comprehensively considers transportation time, transportation costs, inventory costs, and damage rates. Through iterative optimization via selection, crossover, and mutation operations, the optimal emergency response plan is generated. After generating the final emergency response plan, it is encrypted and distributed to relevant participating nodes, and the entire response process is recorded in the blockchain to ensure traceability.

[0128] After the emergency response plan is implemented, the system collects data on the response effect, including response time, response cost, cargo damage rate, customer satisfaction, etc., and feeds this data back to the PPO deep reinforcement learning model and LSTM-AE anomaly detection model to update the model parameters, enabling the model to continuously learn and optimize, and improve the accuracy and effectiveness of subsequent decisions.

[0129] In this embodiment, step S5 involves aggregating cross-chain full lifecycle data based on a privacy-preserving data aggregation protocol, including:

[0130] S5.1 Each participant trains a data feature extraction model locally and extracts feature vectors from their respective on-chain data;

[0131] S5.2 Each participating party sends the encrypted feature vector to the collaborative computing node;

[0132] S5.3, The collaborative computing nodes aggregate the encrypted feature vectors to generate a global feature vector;

[0133] S5.4. Verify the consistency of data across chains based on global feature vectors and eliminate invalid or tampered data; calculate the cosine similarity between the local feature vectors of each participant and the global feature vectors, and determine that the data is inconsistent when the similarity is less than 0.95, triggering the smart contract to automatically initiate the data verification process;

[0134] S5.5 Integrate the verified data fragments to generate a full-chain traceability data package and store it on the blockchain.

[0135] Among these, privacy-preserving data aggregation protocols include, but are not limited to, federated learning, homomorphic encryption, secure multi-party computation (MPC), differential privacy, and combinations thereof. This application employs a horizontal federated learning framework combined with Paillier homomorphic encryption technology to achieve trusted aggregation and verification of cross-chain data without disclosing the original data of each participant. Its feature aggregation formula is as follows:

[0136] (8)

[0137] in, This is the global feature vector; Let K be the feature vector of the data obtained from the local training of the k-th participant; K is the number of participants.

[0138] To address privacy concerns in cross-chain data sharing, this application employs a cross-chain data trusted aggregation protocol based on horizontal federated learning. Each participant, including manufacturers, suppliers, logistics providers, and quality inspection agencies, deploys a data feature extraction model locally. This embodiment uses a convolutional neural network (CNN) as the feature extraction model. Each participant trains its feature extraction model using local on-chain data, extracting key feature vectors that do not contain any original sensitive information. Each participant encrypts the extracted feature vectors using the Paillier homomorphic encryption algorithm and sends them to the federated learning server. The federated learning server securely aggregates the encrypted feature vectors from each participant to generate a global feature vector. A data consistency verification model is trained based on this global feature vector to verify the consistency of data across different chains. If inconsistencies are detected, the smart contract automatically triggers a data verification process, requiring relevant participants to provide supporting documentation to ensure the authenticity and accuracy of the traceability data. The verified data segments are then integrated to generate a full-chain traceability data package encompassing all stages of production, processing, warehousing, logistics, and quality inspection. The traceability data package contains key information from each stage, data hash values, and digital signatures. After verification through the consensus mechanism of the consortium blockchain, it is stored in the distributed ledger to ensure that the traceability data is tamper-proof and traceable.

[0139] In this embodiment, in step S6, the context-aware dynamic permission management mechanism returns the de-identified and traceable information of the corresponding permission, including:

[0140] S6.1 Verify the identity information and context attributes of the tracing requester;

[0141] S6.2 Dynamically assign data access permissions based on identity information and context attributes;

[0142] S6.3. Selectively desensitize traceability data based on attribute-based encryption and zero-knowledge proof technology;

[0143] S6.4 Return the de-identified traceability information to the requester and record the query log in the blockchain.

[0144] Step S6 also includes:

[0145] S6.5 Based on the digital mapping of goods and full-chain traceability data, the future status and expected arrival time of goods are predicted through simulation models, and potential risks are warned in advance;

[0146] S6.6. Cache core traceability information locally on the terminal device to ensure normal display even in network interruption scenarios.

[0147] When a distributor or consumer initiates a traceability request, the system first verifies the requester's identity information and contextual attributes, including the request time, location, device type, network environment, and historical access records. Based on Attribute-Based Encryption (ABE) technology, data access permissions are dynamically assigned according to the requester's identity information and contextual attributes. For example, distributors can view detailed logistics information and quality inspection reports during working hours and at their workplace, while only being able to view basic information outside of working hours or locations; consumers can only view publicly available information such as production date, place of origin, and quality inspection results.

[0148] Zero-knowledge proof technology is used to anonymize sensitive business information, proving its authenticity without disclosing sensitive information. For example, a consumer can verify that goods have indeed been inspected by a third-party quality inspection agency and that the inspection results are qualified, but cannot view the detailed contents of the quality inspection report or the internal information of the inspection agency. Zero-knowledge proof technology allows the prover to prove that a statement is true without revealing any additional information to the verifier, effectively protecting the business privacy of all parties involved.

[0149] For authorized users, the system uses digital mapping technology to display a 3D visualized trajectory of the entire lifecycle of goods. Based on the digital mapping volume of goods and the full-chain traceability data package, a realistic 3D digital twin scene is constructed. In the scene, users can intuitively see the entire process of goods from production, processing, warehousing, transportation to sales. By sliding along the timeline, users can view the status and location information of goods at any point in time. Clicking on goods or nodes in the 3D scene displays corresponding detailed traceability information, such as production equipment number, operators, warehousing temperature and humidity change curves, transportation vehicle trajectories, and quality inspection report summaries.

[0150] Furthermore, based on the digital mapping of goods and full-chain traceability data, the system predicts the future status and estimated arrival time of goods through discrete event simulation models, providing early warnings of potential delays, damage, and other risks. Simultaneously, the system caches core traceability information locally on mobile devices, ensuring users can still view basic goods information even in scenarios with network interruptions or poor signal. All traceability query operations are recorded in the blockchain, including access timestamps, device fingerprints, requester identity hashes, and data disclosure range hashes. Query logs are monitored in real-time via smart contracts to detect abnormal access behavior, such as frequent queries within a short period, queries from unusual IP addresses, and batch queries. Upon detection of anomalies, anti-scraping mechanisms are immediately triggered, and access permissions for suspicious terminals are frozen, ensuring data security.

[0151] Example 2:

[0152] like Figure 2As shown, this embodiment provides a blockchain-based supply chain traceability and intelligent inventory management system to implement the blockchain-based supply chain traceability and intelligent inventory management method as described in Embodiment 1, including:

[0153] The warehousing and on-chain digital mapping module is used to verify the identity information of goods and encrypt and store it on the consortium blockchain, generate warehousing data blocks containing the unique identifier of goods, construct the digital mapping body of goods and associate it with the warehousing data blocks on the blockchain;

[0154] The demand forecasting and inventory management module is used to predict the future demand distribution of goods through an adaptive time-series forecasting model, calculate dynamic safety thresholds, establish a dynamic inventory database, and generate multi-dimensional inventory early warning indicators.

[0155] The self-evolving intelligent replenishment module is used to respond to replenishment events triggered by inventory warning indicators, and to select the best supplier and generate an electronic replenishment order through self-evolving smart contracts.

[0156] The end-to-end collaborative monitoring module is used to build a collaborative monitoring system covering all aspects, collect operational data from each node and encrypt and upload it to the blockchain; it identifies abnormal events in the supply chain through an unsupervised anomaly detection model, triggers multi-level early warnings and generates emergency response plans;

[0157] The cross-chain privacy traceability module is used to aggregate and verify the consistency of goods' full lifecycle data across chains based on a privacy-preserving data aggregation protocol, and generate a full-chain traceability data package.

[0158] The digital mapping visualization module is used to respond to traceability requests and return anonymized traceability information corresponding to the permissions based on a context-aware dynamic permission management mechanism; it displays the visualized trajectory of the entire life cycle of goods and predicts future states through digital mapping volumes.

[0159] All or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0160] The above-described specific embodiments are preferred embodiments of a blockchain-based supply chain traceability and intelligent inventory management method and system of this application, and are not intended to limit the specific implementation scope of this application. The scope of this application includes but is not limited to the specific embodiments described herein. All equivalent changes made in accordance with the shape and structure of this application are within the protection scope of this application.

Claims

1. A blockchain-based supply chain traceability and intelligent inventory management method, characterized in that, Includes the following steps: S1. When goods enter the warehouse, verify the identity information of the goods and encrypt and store it on the consortium blockchain, and generate an entry data block containing the unique identifier of the goods; construct a digital mapping body of the goods and associate it with the entry data block on the blockchain; S2. Based on on-chain historical data and external multi-dimensional heterogeneous data, predict future demand for goods through an adaptive time-series prediction model; calculate dynamic safety thresholds based on predicted demand and preset service levels, establish a dynamic inventory database, and generate multi-dimensional inventory early warning indicators. S3. In response to replenishment events triggered by inventory warning indicators, the system selects the optimal supplier and generates an electronic replenishment order through a self-evolving smart contract; the self-evolving smart contract dynamically adjusts the supplier evaluation system and replenishment decision-making strategy based on a deep reinforcement learning model. S4. During the replenishment process, a collaborative monitoring system is built to monitor all aspects of the process, collect operational data from each node and encrypt and upload it to the blockchain. An unsupervised anomaly detection model is used to identify supply chain anomalies, trigger multi-level early warnings, and generate emergency response plans for inventory-logistics collaborative optimization. S5. Based on a privacy-preserving data aggregation protocol, aggregate cross-chain full lifecycle data and verify consistency without disclosing the original data of each participant, generating an immutable full-chain traceability data package. S6. In response to the source tracing request, the context-aware dynamic permission management mechanism returns the de-identified source tracing information of the corresponding permission. The digital mapping system displays the visual trajectory of the entire lifecycle of goods and predicts the future status and potential risks of goods.

2. The blockchain-based supply chain traceability and intelligent inventory management method according to claim 1, characterized in that, In step S2, predicting future demand for goods using an adaptive time-series forecasting model includes: S2.1 Collect on-chain historical transaction data, inventory data, and external market data to construct a multi-dimensional time-series dataset; S2.

2. Perform standardization preprocessing on the time series dataset to eliminate data noise and dimensional differences; S2.3 Training an adaptive time series prediction model to learn the time dependencies and trend characteristics in the data; S2.4 Input real-time data into the trained model and output the predicted value and confidence interval of the demand for goods within the preset period.

3. The blockchain-based supply chain traceability and intelligent inventory management method according to claim 2, characterized in that, In step S2, calculating the dynamic security threshold based on the predicted demand and the preset service level includes: S2.5 Calculate the demand fluctuation coefficient based on historical forecast errors; S2.6 Calculate safety stock by combining the preset service level and average replenishment lead time; S2.

7. Generate a dynamic safety threshold based on the predicted average demand and safety stock. S2.

8. Associate the dynamic security threshold with the goods category and bind it to the triggering conditions of the self-evolving smart contract.

4. The blockchain-based supply chain traceability and intelligent inventory management method according to claim 3, characterized in that, In step S3, dynamically adjusting the supplier evaluation system based on the deep reinforcement learning model includes: S3.1 Construct a state space containing multi-dimensional attributes of suppliers and an action space containing evaluation index weights; S3.2 Design a reward function with the goal of maximizing the overall benefits of the supply chain; S3.

3. Use historical replenishment data to train a deep reinforcement learning model and learn the optimal evaluation index weight allocation strategy; S3.

4. During each replenishment decision, the trained model outputs the weight of the current optimal evaluation index, calculates the comprehensive score of suppliers, and ranks them.

5. The blockchain-based supply chain traceability and intelligent inventory management method according to claim 1, characterized in that, In step S4, constructing a collaborative monitoring system covering all stages includes: S4.1 Deploy multimodal sensing devices at each node of the supply chain to collect operational data from each stage of production, warehousing, logistics, and quality inspection; S4.

2. Preprocess the collected data through edge computing nodes to generate standardized data blocks; S4.

3. Encrypt standardized data blocks and store them on the blockchain to ensure that the data is tamper-proof and traceable.

6. The blockchain-based supply chain traceability and intelligent inventory management method according to claim 5, characterized in that, In step S4, identifying supply chain anomaly events using an unsupervised anomaly detection model includes: S4.4 Training an unsupervised anomaly detection model to learn the characteristic patterns of normal supply chain operation data; S4.5 Input the real-time collected operation data into the anomaly detection model to identify abnormal events that deviate from the normal mode; S4.

6. Based on the scope and severity of the impact of abnormal events, classify the abnormality level and trigger the corresponding level of warning.

7. The blockchain-based supply chain traceability and intelligent inventory management method according to claim 6, characterized in that, Step S4 further includes: S4.7 When a supply chain anomaly is detected, initiate the inventory-logistics collaborative optimization process and adjust the logistics route and inventory allocation strategy. S4.8 Collect data on the implementation effect of the emergency response plan, feed it back to the deep reinforcement learning model, and update the model parameters to optimize subsequent decisions.

8. The blockchain-based supply chain traceability and intelligent inventory management method according to claim 1, characterized in that, In step S5, cross-chain full lifecycle data is aggregated based on a privacy-preserving data aggregation protocol, including: S5.1 Each participant trains a data feature extraction model locally and extracts feature vectors from their respective on-chain data; S5.2 Each participating party sends the encrypted feature vector to the collaborative computing node; S5.3, The collaborative computing nodes aggregate the encrypted feature vectors to generate a global feature vector; S5.4 Verify the consistency of data in each chain based on global feature vectors, and remove invalid or tampered data; S5.5 Integrate the verified data fragments to generate a full-chain traceability data package and store it on the blockchain.

9. The blockchain-based supply chain traceability and intelligent inventory management method according to claim 1, characterized in that, In step S6, the context-aware dynamic permission management mechanism returns the de-identified and traceable information for the corresponding permission, including: S6.1 Verify the identity information and context attributes of the tracing requester; S6.

2. Dynamically allocate data access permissions based on identity information and context attributes; S6.

3. Selectively desensitize traceability data based on attribute-based encryption and zero-knowledge proof technology; S6.4 Return the de-identified traceability information to the requester and record the query log in the blockchain.

10. A blockchain-based intelligent management system for supply chain traceability and inventory, characterized in that, The method for implementing blockchain-based supply chain traceability and intelligent inventory management as described in any one of claims 1-9 includes: The warehousing and on-chain digital mapping module is used to verify the identity information of goods and encrypt and store it on the consortium blockchain, generate warehousing data blocks containing the unique identifier of goods, construct the digital mapping body of goods and associate it with the warehousing data blocks on the blockchain; The demand forecasting and inventory management module is used to predict the future demand distribution of goods through an adaptive time-series forecasting model, calculate dynamic safety thresholds, establish a dynamic inventory database, and generate multi-dimensional inventory early warning indicators. The self-evolving intelligent replenishment module is used to respond to replenishment events triggered by inventory warning indicators, and to select the best supplier and generate an electronic replenishment order through self-evolving smart contracts. The end-to-end collaborative monitoring module is used to build a collaborative monitoring system covering all aspects, collect operational data from each node and encrypt and upload it to the blockchain; it identifies abnormal events in the supply chain through an unsupervised anomaly detection model, triggers multi-level early warnings and generates emergency response plans; The cross-chain privacy traceability module is used to aggregate and verify the consistency of goods' full lifecycle data across chains based on a privacy-preserving data aggregation protocol, and generate a full-chain traceability data package. The digital mapping visualization module is used to respond to traceability requests and return anonymized traceability information corresponding to the permissions based on a context-aware dynamic permission management mechanism; it displays the visualized trajectory of the entire life cycle of goods and predicts future states through digital mapping volumes.

Citation Information

Patent Citations

  • Logistics supply chain management method and system based on block chain technology

    CN121707465A