Industrial automatic intelligent manufacturing management system based on block chain technology
Through blockchain technology and smart contracts, combined with RFID/NFC and machine learning, the problem of low efficiency of industrial raw material deployment is solved, the secure sharing and automatic deployment of raw material information is realized, and the flexibility of the supply chain and data credibility are improved. .
Patent Information
- Application Number
- CN202410927470.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing technology, the efficiency of allocating industrial raw materials is low, resulting in inventory backlog or shortage, unable to support flexible manufacturing and rapid response, and the data is opaque and difficult to trace.
Blockchain technology is used combined with RFID/NFC, smart contracts and machine learning to achieve secure collection, encrypted storage and sharing of raw material information, real-time monitoring of inventory status, automatic allocation of raw materials, and demand forecasting.
It improves the efficiency of raw material allocation, realizes resource sharing among manufacturers, reduces inventory costs, enhances the credibility and transparency of data, and optimizes the collaborative efficiency of the supply chain.
Smart Images

Figure CN118627841A
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain, and in particular to an industrial automation intelligent manufacturing management system based on blockchain technology. Background Art
[0002] With the introduction of concepts such as Industry 4.0 and smart manufacturing, the industrial production model is undergoing a transformation towards intelligence, informatization and networking. In this context, how to use the new generation of information technology to transform and upgrade the traditional manufacturing industry and achieve comprehensive interconnection, flexible sharing and collaborative optimization of manufacturing resources has become a hot topic of concern in the industry. Industrial manufacturing involves multiple links such as raw material procurement, production and processing, warehousing and logistics, among which raw material management is the foundation of the supply chain and directly affects production planning, cost control and delivery capabilities.
[0003] At present, industrial raw material management still faces many challenges. Under the traditional centralized management model, there is a lack of effective communication and coordination mechanisms between manufacturers, and the supply and demand information of raw materials is not transparent, resulting in frequent inventory backlogs or shortages. At the same time, the raw material allocation cycle is long and the procedures are complicated, making it difficult to support new production methods such as flexible manufacturing and rapid response. In addition, raw material data is scattered in various business systems, lacking full-process traceability and supervision. Once quality problems occur, the impact is wide and the processing cost is high.
[0004] In the related art, for example, Chinese patent document CN112380289B provides an industrial automation intelligent manufacturing management system based on blockchain technology. The management system includes a feature information binding module, a raw material usage information query module and a raw material redistribution module. The feature information binding module scans the unique feature information on each raw material each time the supplier node supplies raw materials to the manufacturer node, and binds the unique feature information of each raw material to the corresponding manufacturer node. The raw material usage information query module scans and uploads the unique feature information on the raw material when the manufacturer starts to use a new raw material. The remaining number of copies of the raw material of the manufacturer is reduced by one. At the same time, the supplier node marks the unique feature information as used feature information. The raw material redistribution module monitors the remaining number of raw materials of each manufacturer and determines whether to redistribute the raw materials of each manufacturer accordingly. However, the raw material redistribution module of this scheme will only start the redistribution process when it detects that the remaining number of raw materials of the manufacturer is insufficient. This passive trigger mechanism may cause a delay in the allocation of raw materials, and it is impossible to predict and respond to changes in the raw material demand of manufacturers in advance. When multiple manufacturers are short of raw materials at the same time, the redistribution module may not be able to respond in time, resulting in delays or interruptions in production plans. Therefore, the raw material allocation efficiency of this solution needs to be further improved.
[0005] In response to the problem of low efficiency in raw material allocation in the prior art, the present application provides an industrial automation intelligent manufacturing management system based on blockchain technology, which performs inventory detection and allocation based on blockchain, thereby improving the efficiency of raw material allocation.
[0006] Technical solution, the purpose of this application is achieved through the following technical solution.
[0007] This specification provides an industrial automation intelligent manufacturing management system based on blockchain technology. Through the collaborative work of the acquisition module, recording module, allocation module and prediction module, the intelligent management of the entire life cycle of industrial raw materials is realized. The technical solutions of each module are described below in combination with the system architecture diagram and data flow diagram. Acquisition module: deployed on the supplier node, responsible for collecting and uploading raw material information. Specifically, when the supplier supplies raw materials to the manufacturer, the supplier collects the unique identification ID, specifications, quantity and other information of the raw materials through Internet of Things technologies such as RFID or NFC. The collected raw material information is encrypted by the identity key system of the node, and the ciphertext is sent to the consensus unit through a secure channel after forming the ciphertext. The consensus unit uses consensus algorithms such as PBFT or Raft to reach an agreement with other nodes on the ciphertext of the raw material information, write the ciphertext into the block and append it to the chain. The data on the chain is synchronized with the local ledger of each node, ensuring the security, reliability and non-tamperability of the raw material information. Recording module: deployed on the manufacturer node, responsible for registering the use of raw materials. When the manufacturer takes the raw materials for production use, it scans the unique identification ID of the batch of raw materials and encrypts the use information (such as the operator, quantity, time, etc.) and uploads it to the blockchain. The supplier node subscribes to the raw material usage events of the blockchain. After receiving the usage information from the manufacturer, the raw material status of the corresponding ID in the local ledger is marked as "used", completing the information synchronization between the supplier and the manufacturer. Allocation module: includes inventory detection smart contracts and allocation rule units. Smart contracts are deployed on the blockchain to monitor the raw material inventory of each manufacturer in real time. When it is found that the raw material inventory of a manufacturer node is lower than the preset threshold, the smart contract passes the address, raw material category, remaining quantity and other parameters of the node to the allocation rule unit. The allocation rule unit comprehensively considers the production tasks, raw material remaining quantity and historical allocation mode of each node, selects the most suitable allocation node through the optimization algorithm, and transfers the preset share of raw materials from the allocation node to the requesting node. The allocation strategy is submitted to the blockchain through a transaction, and the transfer transaction is triggered by the smart contract. The raw material inventory of the relevant nodes is updated on the chain. The allocation module realizes the sharing of raw materials among manufacturers and improves the efficiency of resource utilization. Forecast module: includes three sub-units: data extraction, demand forecasting and forecast publishing. The data extraction unit extracts the historical raw material consumption data of each manufacturer node, such as the use record and inventory changes, through the blockchain data analysis component. The demand forecasting unit uses time series forecasting algorithms such as LSTM to make rolling forecasts of raw material demand for each manufacturer within a certain time range. The forecast results are published to the blockchain through the event notification mechanism. After receiving the notification, the supplier node can call the smart contract to query the detailed forecast data. The forecasting module takes advantage of the integrity of blockchain data and machine learning algorithms to help supplier nodes gain insight into market demand in advance and optimize stocking and allocation plans.
[0008] Furthermore, the acquisition module is the data source of this system, which is responsible for mapping the raw materials in the physical world into digital assets on the blockchain. The acquisition module includes the acquisition unit, the encryption unit and the consensus unit, which work together to complete the acquisition, encryption and chaining of raw material information. The technical implementation of each unit is described in detail below. The acquisition unit collects various parameter information of raw materials through IoT technologies such as NFC (near field communication) or QR code. Specifically, an NFC tag or QR code is pasted on the raw material packaging, and the content includes the unique identification ID, product name, specification, quantity, batch, etc. of the raw materials. When the raw materials are put into storage or collected, the acquisition unit uses an NFC reader or QR code scanner to read the label information and convert the collected data into a unified Key Value format. The acquisition unit can also collect environmental parameters of raw materials such as temperature and humidity through sensors and other devices for quality traceability. Raw material information is commercially sensitive data. In order to prevent leakage and tampering, it needs to be encrypted before being chained. The encryption unit uses an asymmetric encryption algorithm (such as RSA, ECC) to encrypt raw material information. First, the encryption unit generates a pair of public and private keys, the private key is stored locally, and the public key is published to the blockchain for verification by other nodes. Then, the encryption unit signs the raw material information sent by the collection unit with a private key and encrypts it with the public key of the recipient, ensuring the confidentiality, integrity and non-repudiation of the data. The encrypted raw material information is transmitted to the consensus unit through the data interface of the smart contract. The smart contract verifies the format and signature of the transmitted data to ensure the compliance and credibility of the data. The consensus unit is responsible for packaging the encrypted raw material information into blocks, reaching a consensus with other nodes on the validity of the blocks, and finally linking the blocks to the chain. The consensus unit uses consensus algorithms such as Raft or PoW to achieve consistency and tamper-proofing of the blockchain network. Taking Raft as an example, the consensus unit first transmits the encrypted raw material information to the Leader node, and the Leader packages the received information into blocks and sends the blocks to all Follower nodes. After verifying the validity of the block, the Follower feeds back the vote to the Leader. When the Leader receives more than half of the votes in favor, it appends the block to the local blockchain and broadcasts it to other nodes for synchronization. The entire consensus process ensures that all nodes in the blockchain network maintain the same ledger state.
[0009] The three units of the acquisition module work together to map the raw materials in the real world into digital identities on the blockchain. The acquisition unit collects the attribute information of the raw materials through technologies such as NFC and QR codes to realize the digitization of raw materials. The encryption unit uses asymmetric encryption algorithms to ensure the privacy and security of data and prevent the raw material information from being stolen and tampered with during the chain-up process. The consensus unit uses consensus mechanisms such as Raft and PoW to reliably store the encrypted raw material information in the decentralized blockchain ledger and realize data synchronization between network nodes.
[0010] Preferably, the acquisition module also includes a blockchain docking unit, which is used for data transmission and protocol conversion between the consensus chain unit and the blockchain node, converts the encrypted raw material information into a transaction format supported by the blockchain network, and stores the raw material information in the blockchain through a smart contract; the blockchain docking unit monitors blockchain events, obtains block confirmation information of the raw material information on the chain, and synchronizes the block confirmation information to the upstream unit.
[0011] Furthermore, the encryption unit is the core component of the acquisition module, responsible for the privacy protection and secure transmission of raw material information. The encryption unit is implemented based on the Identity-Based Cryptography (IBC) system and includes three subunits: identity registration, public key generation, and signature encryption. The identity registration subunit is responsible for registering the identity of the supplier node with the third-party private key generator (PKG) and obtaining the private key bound to it. Specifically, the supplier node first selects a unique identity (such as node ID, company name, etc.) and sends it to the PKG. The PKG uses its own master private key and the registrant's identity to calculate the private key of the supplier node through a one-way mapping function (such as Weil Pairing). The calculated private key is transmitted to the identity registration subunit through a secure channel and securely stored locally for subsequent data signing. The binding relationship between the identity and the private key will also be synchronized to the blockchain to facilitate verification by other nodes. The public key generation subunit is responsible for generating the public key of the supplier node based on the master public key of the PKG, system parameters, and the identity of the supplier node. Specifically, PKG first generates a pair of master public and private keys, and publicly publishes the master public key and system parameters (such as elliptic curve equations, generators, etc.). The public key generation subunit obtains the master public key and system parameters from PKG, and reads the identity of the supplier node from the blockchain. The three are combined according to the preset cryptographic algorithm (such as the identity-based Diffie Hellman key exchange algorithm) to generate the public key of the supplier node. The generated public key can be publicly published to the blockchain for other nodes to use for data encryption and signature verification. The signature encryption subunit uses private key signature and public key encryption under the IBC system to protect and verify the raw material information. Specifically, the signature encryption subunit first performs a hash operation on the raw material information transmitted by the collection unit to obtain an information summary. Then, the supplier node private key obtained by the identity registration subunit is used to sign the information summary to ensure the integrity and non-repudiation of the raw material information. Next, the signature encryption subunit reads the identity of the target receiving node (such as manufacturers, logistics providers, etc.) from the blockchain, and calls the public key generation subunit to generate its public key. Finally, the signed raw material information is encrypted using the generated public key to ensure the confidentiality of the data. The signed and encrypted raw material information is transmitted to the consensus unit through the smart contract interface for consensus. After receiving the signed and encrypted raw material information, the consensus unit first verifies the data signature using the identity of the sending node and the master public key of PKG. Only raw material information that passes the signature verification can enter the consensus process. Then, the consensus unit executes consensus algorithms such as Raft or PBFT to reach an agreement with other nodes on the encrypted raw material information.The consensus results (such as block hash, transaction ID, etc.) are returned to the signature encryption subunit through the smart contract event mechanism. The signature encryption subunit updates the local state according to the consensus result and completes the information on-chain process. The encryption unit uses the IBC system to cleverly combine cryptography technology with blockchain to build a safe and efficient privacy protection solution. IBC implements the binding and distribution of public and private keys through identity identification, simplifies certificate management under the PKI system, and improves the availability of keys. The elliptic curve cryptography algorithm ensures the security strength of data encryption and signature verification, and the hash function guarantees the integrity of raw material information. As a trusted third party, the consensus unit verifies the authenticity of the source of the data and ensures the consistency of the blockchain network through the consensus algorithm.
[0012] Furthermore, the allocation module is the core business unit of this system, responsible for the sharing and allocation optimization of raw materials between the nodes of each manufacturer. The allocation module is implemented based on blockchain smart contracts and includes four units: inventory detection, allocation rules, transfer transactions, and contract execution. The inventory detection unit realizes real-time monitoring of the raw material inventory of each manufacturer node by deploying the inventory detection smart contract on the blockchain. The smart contract regularly obtains the inventory parameters of each node, such as raw material type, quantity, and balance, by calling the read-only interface of the blockchain ledger. The obtained inventory parameters are compared with the preset inventory thresholds (such as safety stock, reorder point, etc.). When the inventory parameters of any node are lower than the threshold, the smart contract automatically generates an allocation request. The allocation request is published to the blockchain in the form of an event, including information such as the node ID, raw material type and quantity requested for allocation. The inventory detection unit decouples the logic of inventory monitoring and allocation decision-making, and realizes the automation of allocation triggering. The allocation rule unit subscribes to the allocation request event published by the inventory detection unit and generates a raw material allocation task order according to the request parameters. The allocation rules adopt reinforcement learning algorithms (such as Q-Learning, PPO, etc.), and through the design of intelligent agents, autonomously learn allocation strategies and dynamically optimize allocation performance. Specifically, the agent takes the parameters of the allocation request (such as demand node ID, raw material type, etc.) and the current production tasks and inventory status of each node as input, combines historical allocation data, generates allocation actions (such as the selection of allocation nodes, the determination of allocation quantities, etc.) through the value network and strategy network, and obtains rewards based on allocation performance (such as response time, logistics cost, etc.), and optimizes the allocation strategy through gradual iteration. The allocation rule unit supports custom constraints (such as geographical distance, priority, etc.) to ensure the feasibility and compliance of the allocation plan. The generated allocation task order is sent to the transfer transaction unit through the smart contract interface. The transfer transaction unit is responsible for converting the allocation task order into a raw material ownership transfer transaction on the blockchain. The transfer transaction unit extracts transaction parameters from the allocation task order, such as the outgoing node ID, incoming node ID, raw material ID, transfer quantity, transaction timestamp, etc. Then, the transfer transaction unit calls the blockchain ledger smart contract to create a raw material transfer transaction. The smart contract first verifies the validity of the transaction parameters, such as authenticating the identity of the outgoing node and verifying whether the raw material balance is sufficient. After the verification, the smart contract transfers the ownership information of the raw materials from the outgoing node to the incoming node and triggers the transfer event of the blockchain ledger. At the same time, the raw material holding status maintained in the contract is updated to complete the logistics transfer and ownership transfer of the raw materials. The design of the transfer transaction unit ensures the atomicity and consistency of the allocation behavior. The contract execution unit is responsible for executing the raw material transfer transaction in the blockchain network and finally writing the transaction results into the blockchain ledger. The contract execution unit adopts the Paxos consensus algorithm to ensure the consistency and fault tolerance of transaction execution. Specifically, the contract execution unit broadcasts the transfer transaction to all nodes of the blockchain.The node first verifies the signature and format of the transaction, and then conducts multiple rounds of voting based on the Paxos algorithm to reach a consensus on the execution order of the transaction. The consensus transactions are packaged into blocks and become the latest state of the blockchain ledger. The process of packaging blocks is implemented through mechanisms such as proof of work (PoW) or proof of stake (PoS) to prevent the ledger from being maliciously tampered with. When the raw material transfer transaction is successfully executed, the contract execution unit returns the execution results such as transaction hash and block height to the transfer transaction unit and the allocation rule unit. The inventory detection smart contract captures the transaction on-chain event, triggers the update of the raw material inventory parameters of the manufacturer node, and completes the allocation closed loop. The allocation module makes full use of the characteristics of blockchain smart contracts to realize the automation, intelligence and coordination of raw material allocation. The inventory detection unit realizes real-time monitoring of inventory and automatic release of allocation requirements based on smart contracts, reducing the cost of manual inventory counting. The allocation rule unit uses reinforcement learning algorithms to continuously optimize the allocation strategy, improving the efficiency and accuracy of allocation. The transfer transaction unit maps the allocation behavior to blockchain transactions through smart contracts, ensuring the transparency, traceability and tamper-proof of the allocation process. The contract execution unit uses Paxos consensus to ensure the atomicity and consistency of transaction execution and maintain the unified state of the blockchain ledger. The entire allocation process runs through smart contracts, realizing the automatic execution of allocation rules and real-time collaboration among multiple parties, greatly improving the agility and resilience of the supply chain.
[0013] Furthermore, the allocation rule unit is the core component of the allocation module, responsible for generating the optimal raw material allocation strategy. The allocation rule unit is implemented based on deep reinforcement learning (DRL) and includes two subunits: state evaluation and strategy generation. The state evaluation subunit is responsible for extracting the feature data of each manufacturer node from the blockchain ledger and business database, and generating a state vector representing the current allocation environment. The feature data mainly includes three categories: raw material inventory status, production task status, and historical allocation data. The raw material inventory status reflects the inventory parameters of each node, such as the raw material balance, type, and price. The production task status describes the task attributes of each node, such as the production plan, work order progress, and estimated delivery date. The historical allocation data records the statistical information such as the time, quantity, and cost of the raw material allocation between nodes in the past. The state evaluation subunit regularly obtains these feature data through blockchain event monitoring and data analysis services. The original feature data is usually high-dimensional, sparse, and heterogeneous, which is not conducive to the learning and optimization of the allocation strategy. Therefore, the state evaluation subunit uses a convolutional neural network (CNN) to characterize and learn the original features. Through local connections and weight sharing, CNN can automatically extract key patterns in feature data, such as the time trend of inventory and the collaborative relationship of production tasks. At the same time, CNN's pooling operation can reduce the dimension of features and alleviate the problem of data sparsity. Multi-scale convolution kernels can capture multi-level interactions between features and achieve deep fusion of features. The state evaluation subunit inputs the original features into the pre-trained CNN model to obtain a low-dimensional, high-semantic embedding vector as the state representation of the current deployment environment, which is input to the strategy generation subunit.
[0014] The strategy generation subunit generates the optimal raw material allocation strategy through the DRL algorithm based on the state vector of the current allocation environment. DRL combines the advantages of deep learning (DL) and reinforcement learning (RL), and can learn near-optimal strategies in complex decision-making environments. Specifically, the strategy generation subunit adopts an Actor-Critic architecture, which includes a policy network (Actor) and a value network (Critic). The policy network outputs a probability distribution based on the state vector, indicating the probability of taking various allocation actions in the current environment. The value network evaluates the pros and cons of the current strategy based on the state vector and the allocation action, and outputs a scalar value to represent the expected future benefits. Both the policy network and the value network are deep neural networks, which can automatically learn the allocation strategy with the help of the state features extracted by CNN. During the training phase, the strategy generation subunit interacts with the blockchain network, and continuously updates the parameters of the two networks based on the feedback of the allocation simulation environment (such as allocation performance, logistics costs, etc.) to optimize the allocation strategy. Commonly used DRL algorithms include DQN, A3C, PPO, etc., which can balance exploration and utilization and avoid premature convergence of strategies to local optimality. In the reasoning stage, the strategy generation subunit generates the allocation strategy based on the latest state vector using the trained strategy network, and encapsulates the decision result into an allocation task order, which is sent to the transfer transaction unit for execution. The allocation strategy mainly includes the manufacturer node combination, allocation quantity, allocation priority and optional constraints. The allocation rule unit uses DRL technology to realize the adaptive optimization of the raw material allocation strategy. The state evaluation subunit uses CNN to realize the feature learning and semantic fusion of multi-source heterogeneous data such as inventory status, production tasks, and historical allocation, meeting the requirements of the DRL algorithm for state representation. The strategy generation subunit adopts the Actor-Critic architecture, which balances the exploration and convergence of the strategy, and can quickly learn a robust and interpretable allocation strategy. Blockchain provides a reliable data foundation and simulation environment for the optimization of allocation strategies. On the one hand, the blockchain ledger records the logistics and transaction information of the end-to-end supply chain, providing high-quality feature data for DRL. On the other hand, the blockchain smart contract can simulate complex allocation constraints and business rules, so that the DRL algorithm can learn strategies in a realistic environment, improving the feasibility and profitability of allocation decisions.
[0015] Furthermore, the strategy generation subunit uses the deep reinforcement learning algorithm of the Actor-Critic architecture to automatically learn the raw material allocation strategy based on the state vector generated by the state evaluation subunit. Specifically, the strategy generation subunit contains three core components: the state encoding neural network, the policy neural network (Actor), and the value evaluation neural network (Critic). The state encoding neural network is responsible for converting the original state vector generated by the state evaluation subunit into a low-dimensional, high-semantic feature representation as the input of the subsequent Actor and Critic networks. The original state vector is usually high-dimensional and contains information on inventory status, production tasks, historical allocation, and other aspects. Directly using the original state vector for strategy learning may face problems such as dimensionality disaster and feature sparsity, which will affect learning efficiency and strategy quality. Therefore, the state encoding neural network uses the Long Short-Term Memory (LSTM) network to extract and compress the original state vector. LSTM is a recurrent neural network (RNN) that is good at processing long-distance dependencies in sequence data. In the raw material allocation scenario, the state of the allocation environment often has a strong time correlation with the historical state. For example, if a node has insufficient allocation for multiple consecutive times, it may mean that its demand forecast is biased. The LSTM network can automatically learn this time series feature and selectively capture and memorize key state changes. The state encoding neural network inputs the state vector sequence over a period of time into the memory unit of the LSTM, automatically updates the hidden state through the gating mechanism, and finally uses the output vector of the LSTM as the compressed state feature vector. The state encoding neural network can be regarded as an automatic feature engineering process, which greatly simplifies the state representation of the raw material allocation problem.
[0016] The policy neural network takes the state feature vector output by the state encoding neural network as input to generate the probability distribution of the raw material allocation action. The raw material allocation action is a discrete combinatorial optimization problem, which requires the simultaneous determination of multiple sub-actions such as the node combination, allocation quantity, and allocation priority of the allocation. In order to cope with the combinatorial explosion of the action space, the policy neural network adopts the idea of automatic mechanism to decompose the overall allocation action into sub-actions of multiple stages, gradually generate local optimal solutions, and then assemble them into a global allocation strategy. Specifically, the policy neural network contains multiple fully connected layers, takes the state feature vector as input, and generates the probability distribution of the allocation sub-action through layer-by-layer feature transformation and nonlinear mapping. For each sub-action, such as node combination selection, the output layer of the policy neural network uses the Softmax activation function to normalize the output of the neuron into a probability distribution, which represents the possibility of selecting each node combination. According to the probability distribution of the Softmax output, the policy neural network uses random sampling to generate specific node combinations, introducing a certain degree of exploration. Similarly, the policy neural network generates other sub-actions such as allocation quantity and priority according to the state characteristics, and splices each sub-action into a complete raw material allocation strategy. Through this hierarchical decision-making process, the policy neural network can efficiently search in an exponential action space, balancing the optimization and real-time nature of the strategy.
[0017] The value evaluation neural network takes the state feature vector output by the state encoding neural network as input and estimates the long-term benefits that can be obtained by adopting a certain strategy under the current deployment environment. Unlike the policy neural network that outputs a probability distribution, the value evaluation neural network predicts a scalar value, which represents the state value function. The state value function describes the expectation of the cumulative reward that the agent can obtain by following a certain strategy under a certain state. The structure of the value evaluation neural network is similar to that of the policy neural network. It also consists of multiple fully connected layers, but the last layer uses a linear activation function to directly output the estimated value of the state value. The prediction results of the value evaluation neural network can guide the optimization direction of the policy neural network. Intuitively, if the state value predicted by the value evaluation neural network is high in a certain state, it means that the deployment strategy output by the current policy neural network is favorable, and its probability of being sampled should be increased. Conversely, if the state value is low, it means that the current deployment strategy is unfavorable, and its probability of being sampled should be reduced. The Actor-Critic architecture continuously updates the parameters of the policy neural network through optimization algorithms such as gradient ascent to maximize the average state value, thereby achieving the optimal strategy. At the same time, the parameters of the value evaluation neural network are also continuously updated to fit the real state value function. The policy neural network and the value evaluation neural network promote each other and eventually converge to the saddle point to obtain the optimal allocation strategy. The policy generation subunit combines deep learning and reinforcement learning techniques, providing new ideas for intelligent decision-making in raw material allocation. The state encoding neural network makes full use of the memory capacity of LSTM to automatically extract key features in the allocation environment. The policy neural network adopts a hierarchical action generation mechanism that can flexibly adapt to combinatorial optimization problems. The value evaluation neural network introduces long-term value considerations, making the allocation strategy more robust and globally optimal. The coordinated optimization of the three neural network modules enables the policy generation subunit to quickly learn a near-optimal allocation strategy and continuously adapt to dynamically changing market demands and production conditions.
[0018] Furthermore, the strategy generation subunit models the raw material allocation problem as a Markov Decision Process (MDP), and uses the advantage function and gradient ascent algorithm to train the Actor-Critic network, so that the generated allocation strategy is constantly approaching the optimal. Markov decision process modeling: MDP is a classic framework for representing sequential decision problems. It consists of four elements: state space, action space, state transition probability function, and reward function. In the raw material allocation scenario, these four elements can be specifically defined as follows: State space: contains all possible states of the raw material allocation environment. Each state is a combination of multi-dimensional information such as inventory status, production tasks, and historical allocation. For example, a state can be expressed as "Node A has 10 pieces in stock, Node B has 20 pieces in stock; Node A's task duration is delayed by 3 days, and Node B's task is completed on schedule; Node A allocated 5 pieces to Node B last week". The dimension of the state space depends on the scale and granularity of the allocation network. Action space: contains all possible raw material allocation strategies. Each action consists of sub-actions such as the combination of deployment nodes, the deployment quantity, and the deployment priority. For example, an action can be expressed as "deploy 10 pieces from node A to node B with high priority". The dimension of the action space depends on the complexity and constraints of the supply chain network. State transition probability function: represents the probability that the environment will transfer to another state after taking a certain deployment action in a certain state. For example, if the current state is "10 pieces in stock at node A", after taking the action of "deploying 5 pieces from node A to node B", the probability that the next state will be "5 pieces in stock at node A" may be 100%. The state transition probability function describes the impact of deployment behavior on inventory status, which needs to be estimated based on factors such as logistics laws and market demand. Reward function: defines the immediate return of each deployment decision. The reward function is used to guide the optimization direction of the deployment strategy to maximize the cumulative reward. For example, if a deployment action shortens the overall out-of-stock time, a positive reward is given; if a deployment action brings additional storage costs, a negative reward is given. The design of the reward function needs to balance multiple allocation performance indicators, such as response time, service level, transportation cost, etc. Through the above four elements, the raw material allocation problem is abstracted into a standard MDP. The goal of the strategy generation subunit is to find an optimal strategy that maximizes the cumulative reward obtained under this MDP. This process can be achieved through reinforcement learning algorithms.
[0019] Advantage function calculation: In the Actor-Critic algorithm, the value evaluation neural network predicts the state value function, that is, the expected cumulative reward that can be obtained by following a certain strategy in a certain state. However, the state value function does not directly reflect the pros and cons of a specific action. Therefore, the strategy generation subunit also needs to calculate the advantage function of each deployment action. The advantage function is defined as the difference between the Q value (state-action value function) of an action and the state value function, indicating the superiority of the action relative to the average performance. Specifically, assume that action a is taken in state s, the environment gives an immediate reward r, and moves to the next state s'. The value evaluation neural network predicts that the value of state s is V(s), and the value of state s' is V(s'). Then, the Q value of action a can be expressed as: Q(s, a) = r + γV(s'), where γ is a discount factor used to measure the importance of future rewards. The advantage value A(s, a) of action a is defined as: A(s, a) = Q(s, a) - V(s) = r + γV(s') - V(s). Intuitively, if the advantage value of action a is positive, it means that taking action a can obtain immediate rewards and future state values that exceed the average level of the state, and it is a good action; if the advantage value is negative, it means that action a is not as good as the average level, and the probability of its being sampled should be reduced. The strategy generation subunit establishes a quantitative relationship between the immediate reward, future state value and the quality of an action through the advantage function, providing a clear direction for the optimization of the policy neural network.
[0020] Gradient ascent optimization: According to the calculated advantage value, the policy generation subunit uses the gradient ascent algorithm to update the parameters of the policy neural network Actor to increase the probability of sampling actions with high advantage values. Assume that the probability of the policy neural network taking action a in state s is π(a|s), and its logarithmic probability is logπ(a|s). Let the parameters of the policy neural network be θ, and the optimization goal is to maximize the expected advantage value of each action taken by the policy neural network in each state: J(θ)=E[Σ_s Σ_a π(a|s)A(s,a)]. According to the policy gradient theorem, the Monte Carlo method can be used to calculate the gradient of J(θ): ∇J(θ)=E[Σ_s Σ_a A(s,a)∇logπ(a|s)], and then the stochastic gradient ascent algorithm is used to update the parameter θ: θ←θ+α∇J(θ), where α is the learning rate hyperparameter. Intuitively, if the advantage value A(s, a) of action a is positive, gradient ascent will increase its logarithmic probability logπ(a|s), increasing the probability that action a is sampled in state s; conversely, if A(s, a) is negative, gradient ascent will reduce logπ(a|s), decreasing the probability that action a is sampled. By repeatedly sampling actions in various states, calculating advantage values, and updating policy neural network parameters, the policy generation subunit can eventually learn an optimal deployment strategy to maximize the expected cumulative reward obtained under MDP. This optimization process can be performed through interaction with the environment or based on historical deployment data through Experience Replay. At the same time, the policy generation subunit can also use technologies such as Importance Sampling and parallel sampling to improve training efficiency and sampling quality. In summary, the policy generation subunit uses MDP as the theoretical basis, and uses advantage function and gradient ascent algorithm to perform end-to-end training on the Actor-Critic network, thus realizing the adaptive optimization of the raw material deployment strategy.
[0021] Furthermore, in the Actor-Critic algorithm, in addition to optimizing the policy neural network Actor, the value evaluation neural network Critic needs to be trained so that it can accurately estimate the value function of each state. The policy generation subunit adopts the Temporal Difference (TD) algorithm and uses the state transition probability function of the MDP to update the parameters of the value evaluation neural network in a bootstrap manner. According to the definition of MDP, the state value function V(s) represents the expected cumulative reward that can be obtained by following a certain strategy π starting from state s: V(s)=E[Σ_{t=0}^{∞}γ^tr_t|s_0=s,π], where r_t represents the immediate reward obtained after taking action a_t at time t, and γ is the discount factor. Ideally, the value evaluation neural network should be able to accurately fit the true state value function. But in practice, the true value of the value function is unknown because it depends on all future immediate rewards. The TD algorithm takes advantage of the recursive nature of the state value function and uses the current reward and the estimated value of the next state to update the estimated value of the current state, forming a bootstrapped estimation process. Specifically, assume that action a is taken in state s, the environment gives an immediate reward r, and transfers to the next state s'. According to the state transition probability function P (s'|s, a), the probability of state s' occurring can be obtained. The estimated values of the value evaluation neural network in states s and s' are V (s) and V (s'), respectively. According to the Bellman Equation, the true value V*(s) of state s satisfies: V*(s)=Σ_aπ(a|s)[r+γΣ_{s'}P(s'|s,a)V*(s')], and the TD algorithm uses V(s') to approximate V*(s'), thereby obtaining the estimated target value of state s: y=r+γV(s'), and the difference between the estimated value V(s) of state s and the target value y is called the TD error: δ=yV(s)=r+γV(s')-V(s), and the TD error reflects the estimation quality of the value evaluation neural network in state s, which can be used to guide the update of network parameters. Let the parameter of the value evaluation neural network be w, and the optimization goal is to minimize the sum of squares of TD errors of all states: J(w)=1 / 2E[Σ_s(y_s-V(s))^2]=1 / 2E[Σ_sδ_s^2].
[0022] According to the gradient descent algorithm, the update formula of parameter w is: w←w-α∇J(w)=w+αE[Σ_s δ_s∇V(s)], where α is the learning rate hyperparameter. Intuitively, if the TD error δ is positive, it means that the estimated value V(s) of state s is lower than the target value y, and V(s) needs to be increased; conversely, if δ is negative, V(s) needs to be reduced. Through this parameter update based on TD error, the value evaluation neural network can gradually narrow the gap between its output value and the true value, and finally approach the true state value function. At the same time, since the target value y uses the estimated value V(s') of the next state, the estimate of the value function can be updated online without waiting for the complete reward sequence. This bootstrap mechanism makes the TD algorithm more sample efficient than the Monte Carlo method. In addition, the TD algorithm can also be combined with techniques such as Eligibility Trace and Experience Replay to further improve training efficiency and stability. In summary, the strategy generation subunit uses the TD algorithm and the state transition probability function of MDP to update the parameters of the value assessment neural network Critic in a bootstrap manner to make it close to the true state value function. This technical solution inherits the advantages of temporal difference learning and can efficiently evaluate and improve value estimation online. Accurate value assessment provides a reliable foundation for the optimization of the policy neural network Actor, allowing the entire Actor-Critic algorithm to quickly converge to the optimal allocation strategy. At the same time, the value function learned by the value assessment neural network Critic can also be used for other supply chain optimization tasks such as risk assessment and budget allocation, and has strong versatility and practical value.
[0023] Furthermore, the prediction module uses blockchain technology and machine learning algorithms to make multi-step predictions on the raw material demand of the manufacturer node, and publishes the prediction results to the supplier node in a secure and reliable manner. This module mainly includes three components: data extraction unit, demand prediction unit and prediction publishing unit. The data extraction unit is responsible for extracting the raw material consumption data of each manufacturer node from the blockchain ledger to provide input for demand forecasting. Raw material consumption data usually includes multiple dimensions such as historical inventory data, collection records and allocation records. These data are stored in the blockchain ledger in encrypted form to protect trade secrets. The data extraction unit obtains the encrypted raw material consumption data of each manufacturer node by calling the blockchain ledger smart contract. Specifically, when the manufacturer node submits the raw material consumption data to the blockchain ledger smart contract, it uses an asymmetric encryption algorithm (such as RSA) to encrypt the data. After verifying the integrity and source credibility of the data, the smart contract writes the encrypted data into the blockchain ledger. When the data extraction unit needs to obtain data, it initiates a call request to the smart contract. After verifying the identity and authority of the data extraction unit, the smart contract returns the encrypted data to the data extraction unit. The data extraction unit uses the private key that matches the encryption end to decrypt the data and restore the raw material consumption data in plain text. The asymmetric encryption algorithm ensures the confidentiality of the data and prevents unauthorized access. Through smart contracts and asymmetric encryption technology, the data extraction unit obtains the raw material consumption data of the manufacturer's node in a safe and controllable manner, laying a data foundation for subsequent demand forecasting. At the same time, storing data in the blockchain ledger also has the advantages of being tamper-proof, traceable, and disaster-tolerant, which improves the efficiency and reliability of data management.
[0024] The demand forecasting unit receives the raw material consumption data provided by the data extraction unit, and uses machine learning algorithms to make multi-step forecasts on the raw material demand of each manufacturer node. Raw material demand forecasting is a typical time series forecasting problem, which requires estimating the raw material demand in the future based on historical consumption patterns, production plans, market trends and other factors. The demand forecasting unit uses advanced sequence forecasting models, such as long short-term memory network (LSTM), Gate Recurrent Unit (GRU), etc., which can effectively capture the long-term dependence and trend changes in raw material consumption data. Specifically, the demand forecasting unit divides the raw material consumption data into training sets and test sets, and performs necessary data preprocessing, such as outlier processing and data normalization. Then, according to the characteristics of the raw material consumption data and the forecast demand, a suitable sequence forecasting model structure is designed, such as the number of LSTM layers, the number of hidden units, and the embedding layer. In the model training stage, the demand forecasting unit optimizes the model parameters by minimizing the prediction error function (such as mean square error, mean absolute percentage error, etc.). Commonly used optimization algorithms include stochastic gradient descent (SGD), Adam, etc. Through repeated iterations, the prediction model gradually converges and learns the inherent patterns and laws of the raw material consumption data. During the model testing phase, the demand forecasting unit uses the trained forecasting model to perform multi-step forecasting on the test set data. Multi-step forecasting refers to predicting the demand in multiple time steps in the future, such as predicting the demand for raw materials in the next week or month. The generalization performance of the forecasting model is evaluated by comparing the error between the predicted value and the true value. The demand forecasting unit can also use cross-validation, rolling forecast and other technologies to further improve the reliability and robustness of the forecast. Finally, the demand forecasting unit outputs the forecast results of the raw material demand of each manufacturer node, including the predicted demand and the corresponding forecast time range. The demand forecasting unit combines machine learning and time series analysis technology, makes full use of the historical consumption data accumulated in the blockchain ledger, and realizes the accurate forecasting of the raw material demand of the manufacturer node. The forecast results provide decision support for the collaborative optimization of upstream and downstream enterprises in the supply chain, help improve the timeliness and accuracy of raw material allocation, and reduce inventory costs and out-of-stock risks.
[0025] The forecast publishing unit is responsible for securely publishing the raw material demand forecast results generated by the demand forecast unit to the relevant supplier nodes. Since the forecast results usually involve commercial secrets, they cannot be directly published publicly. The forecast publishing unit adopts the blockchain event notification mechanism to ensure that the forecast results are written into the blockchain ledger in encrypted form, and trigger the forecast publishing event to notify the relevant supplier nodes. Specifically, the forecast publishing unit calls the blockchain event smart contract to encrypt the demand forecast results and write them into the blockchain ledger. Encryption can use an asymmetric encryption algorithm similar to the data extraction unit to ensure the confidentiality of the forecast results. At the same time, the forecast publishing unit triggers a forecast publishing event and broadcasts the event to all nodes in the blockchain network. The forecast publishing event contains key information such as the manufacturer node ID, raw material type, demand forecast amount and forecast time range, but does not contain the plain text of the forecast results. The supplier nodes in the blockchain network listen to the forecast publishing event. Once the event is received, the supplier node calls the blockchain event smart contract to obtain the encrypted forecast results based on the information provided in the event. The supplier node uses its own private key to decrypt the forecast results and obtains the manufacturer node raw material demand forecast amount in plain text. Supplier nodes can adjust raw material stocking plans and allocation strategies in a timely manner according to forecasted demand, thereby improving the collaborative efficiency of the supply chain. Through the blockchain event notification mechanism, the forecast release unit realizes the secure sharing of forecast results among supply chain nodes. The encryption mechanism protects the privacy of forecast results and prevents the leakage of sensitive information. The event broadcast mechanism ensures that the forecast results can reach relevant nodes in real time and reliably. The participation of smart contracts improves the automation of data sharing and reduces errors and delays in manual operations. The tamper-proof and traceable characteristics of the underlying blockchain further enhance the credibility of forecast release.
[0026] Furthermore, the demand forecasting unit uses a deep learning model that combines convolutional neural networks (CNN) and long short-term memory networks (LSTM) to make multi-step forecasts of the raw material demand of manufacturer nodes. CNN is responsible for extracting key features from raw material consumption data, and LSTM is responsible for modeling the long-term dependencies of time series data. The model parameters are optimized through back propagation and gradient descent algorithms to minimize multi-step prediction errors, thereby obtaining accurate demand forecast results. Data partitioning: According to the general principles of machine learning, the demand forecasting unit first divides the extracted raw material consumption data into training sets and test sets. Usually, random sampling is used to divide the data into training sets and test sets according to a preset ratio (such as 8:2). The training set is used for model training and parameter optimization, and the test set is used to evaluate the generalization performance of the trained model to test whether the model is overfitting. Data partitioning needs to meet two requirements: first, the distribution of the training set and the test set should be as consistent as possible to avoid the degradation of model performance due to inconsistent data distribution; second, the continuity of the time series data should be retained and the time dependency of the raw material consumption data should not be destroyed. To this end, the demand forecasting unit uses techniques such as stratified sampling and sliding windows to maintain the integrity of the time series while ensuring the consistency of data distribution.
[0027] Feature Engineering: Raw material consumption data usually contains multiple dimensions, such as material type, supplier, timestamp, etc. These original features may not be directly applicable to model training and need to be processed by feature engineering. The demand forecasting unit uses the convolutional neural network (CNN) algorithm to automatically extract high-level features that reflect the raw material consumption pattern. CNN can effectively process gridded data and extract spatial hierarchical features through local connections and weight sharing. For raw material consumption data, the demand forecasting unit maps features of different dimensions (such as material type, supplier, etc.) onto a two-dimensional grid to form a multi-channel feature map. Then, the convolutional layer and pooling layer of CNN are used to extract key patterns in the feature map layer by layer, such as the periodicity and correlation of material consumption. The convolutional layer convolves the input features with a sliding convolution kernel to extract local features; the pooling layer reduces the size of the feature map and improves the robustness of the features through downsampling operations. After being processed by multiple layers of CNN, the raw material consumption data is converted into a highly abstract feature vector that characterizes the inherent laws of raw material consumption.
[0028] Time series modeling: After extracting the high-level features of the raw material consumption data, the demand forecasting unit uses the long short-term memory network (LSTM) to model the time series data. LSTM is a special recurrent neural network (RNN) that can effectively capture long-term dependencies in time series data by introducing a gating mechanism and memory units. Specifically, the demand forecasting unit uses the feature vector extracted by CNN as the input of LSTM and inputs it into the LSTM network in chronological order. The LSTM network contains multiple time steps, each of which corresponds to a raw material consumption data point. At each time step, the input gate, forget gate, and output gate of LSTM control the flow of information in the memory unit through the sigmoid activation function. The input gate determines which information in the current input feature vector needs to be updated to the memory unit; the forget gate determines which information in the memory unit of the previous time step needs to be forgotten; and the output gate determines the output result of the current time step. Through the adjustment of the gating mechanism, LSTM can adaptively learn and memorize the long-term patterns in the raw material consumption data and generate accurate prediction results based on the state of the memory unit.
[0029] Model training: The demand forecasting unit constructs a loss function with the sum of squared prediction errors as the target, uses the back-propagation algorithm and the gradient descent algorithm to train the LSTM model, and optimizes the model parameters by minimizing the multi-step prediction error. During the forward propagation process, the LSTM model gradually calculates the output of each time step based on the input raw material consumption characteristics, and generates a multi-step prediction result at the last time step. Multi-step prediction refers to predicting the demand for multiple time steps in the future, such as predicting the demand for raw materials in the next week or month. The error between the model's prediction result and the actual demand is measured by evaluation indicators such as mean square error (MSE) to form a loss function. During the back-propagation process, the loss function takes partial derivatives of the parameters of the LSTM model (including the weight matrix and the bias vector) and calculates the gradient information. Then, the gradient descent algorithm is used to update the model parameters along the negative gradient direction at a certain learning rate to continuously reduce the loss function. Common optimization algorithms include stochastic gradient descent (SGD), Adam, etc. Through multiple iterations, the LSTM model gradually converges, learns the long-term dependency of the raw material consumption data, and can generate accurate multi-step prediction results. Model testing: The demand forecasting unit uses the trained LSTM model to make multi-step forecasts on the test set data. The generalization performance of the model is evaluated by comparing the forecast results with the actual demand in the test set. Common evaluation indicators include mean absolute error (MAE), root mean square error (RMSE), etc. If the performance of the model on the test set is close to that on the training set, it means that the model is not overfitting and has good generalization ability. The demand forecasting unit can also use a sliding window method to make a rolling forecast of the entire raw material consumption time series. The sliding window slides forward a fixed time step each time to generate new training samples and test samples, and fine-tune and evaluate the model. This rolling forecasting method can continuously update the model, adapt to the dynamic changes in the raw material consumption pattern, and improve the adaptability and robustness of the forecast.
[0030] Among them, a loss function with the sum of squared prediction errors as the target is constructed, and the constructed LSTM neural network model is trained using the back propagation algorithm and the gradient descent algorithm. The weight matrix and bias vector of the LSTM are adjusted by minimizing the multi-step prediction error. The loss function is defined as: L(theta)=frac{1}{N}sum_{i=1}^{N}sum_{t=1}^{T}(y_{t}^{i}-hat{y}_{t}^{i})^2, where L(theta) represents the loss function, theta represents the parameters of the LSTM model, including the weight matrix and the bias vector; N represents the number of training samples; T represents the number of predicted time steps; y_{t}^{i} represents the actual raw material demand of the i-th training sample at the t-th time step; hat{y}_{t}^{i} represents the predicted value of the raw material demand of the i-th training sample by the LSTM model at the t-th time step; using training The LSTM model after training is used to predict the raw material demand of each manufacturer node; for the j-th manufacturer node, its predicted raw material demand value hat{y}_{t}^{j} in the future t-th time step is calculated by the following formula: hat{y}{t}^{j}=f{theta}(X_{t-1}^{j}, h_{t-1}^{j}), where f_{theta} represents the LSTM model after training and optimization, X_{t-1}^{j} represents the raw material consumption feature vector of the j-th manufacturer node in the t-1 time step, and h_{t-1}^{j} represents the hidden state vector of the LSTM model in the t-1 time step.
[0031] Beneficial effects: Compared with the prior art, the advantages of this application are: The use of blockchain technology to securely collect, encrypt, store and share raw material information solves the problems of opaque, tamper-proof and difficult to trace data in the traditional supply chain. Through asymmetric encryption algorithms and consensus mechanisms, the privacy protection and tamper-proofing of raw material data are achieved, which improves the credibility of the data.
[0032] By using smart contracts and inventory detection mechanisms, the raw material inventory status of each manufacturer node is monitored in real time, and a raw material allocation request is automatically initiated when there is a shortage of inventory. The optimal allocation strategy is dynamically generated by combining reinforcement learning algorithms, and raw material transfer transactions are executed through the blockchain network. This solution realizes mutual resource sharing among manufacturer nodes, improves the turnover efficiency and utilization rate of raw materials, and reduces inventory costs.
[0033] The historical raw material consumption data of the manufacturer node is extracted from the blockchain ledger, and machine learning models such as convolutional neural networks and long short-term memory networks are used to make multi-step time series forecasts of the future demand for raw materials. The forecast results are notified to the supplier node using the blockchain event mechanism, and the supplier optimizes the stocking plan and deployment arrangement accordingly. This solution improves the accuracy of raw material demand forecasts, reduces the "bullwhip effect" of the supply chain caused by asymmetric demand information, and realizes the collaborative optimization of suppliers and manufacturers.
[0034] The decentralized architecture based on blockchain has opened up all links in the supply chain and realized data interoperability and sharing throughout the life cycle of raw materials. Each node can interact point-to-point based on the blockchain platform, reducing the middle layer and improving the efficiency of supply chain operations. The consensus mechanism ensures data consistency, and the smart contract makes business rules transparent and reliable, laying the foundation for supply chain collaboration. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is an exemplary module diagram of an industrial automation intelligent manufacturing management system based on blockchain technology according to some embodiments of this specification; Figure 2 is a schematic diagram of a collection module according to some embodiments of this specification; Figure 3 is a schematic diagram of a deployment module according to some embodiments of this specification; Figure 4 It is a schematic diagram of a prediction module according to some embodiments of this specification. DETAILED DESCRIPTION
[0036] The method and system provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0037] Figure 1This is an exemplary module diagram of an industrial automation intelligent manufacturing management system based on blockchain technology shown in some embodiments of this specification. This embodiment provides an industrial automation intelligent manufacturing management system based on blockchain technology, including a collection module, a recording module, a deployment module and a prediction module. Collection module: When the supplier node supplies raw materials to the manufacturer node, the collection module is responsible for collecting relevant information about the raw materials and uploading the information to the blockchain. Specifically, each raw material has a unique identification ID, such as a QR code, an RFID tag, etc. The collection module obtains the attribute information of the raw materials, such as material type, specification, quantity, production batch, etc. by scanning or reading these identifications. In order to protect the confidentiality of the raw material information, the collection module encrypts the raw material information using an asymmetric encryption algorithm (such as RSA) before uploading. The encrypted information is packaged into a transaction and submitted to the blockchain network. The consensus node in the blockchain network verifies the legitimacy of the transaction, packages the transaction into a block, and appends the block to the end of the blockchain. In this way, the supply information of the raw materials is securely, transparently, and tamper-proof recorded on the blockchain, providing a reliable data basis for subsequent use and traceability. Recording module: When the manufacturer node receives and starts to use raw materials, the recording module is responsible for collecting the usage information of the raw materials and synchronizing the information to the blockchain. Specifically, the manufacturer node triggers the workflow of the recording module by scanning the unique identification ID of the raw materials. The recording module packages the raw material ID, usage time, usage department, purpose and other information into a transaction and submits it to the blockchain network. The blockchain network verifies and records the transaction to ensure that the usage information of the raw materials is accurately and timely updated to the blockchain ledger. As a node in the blockchain network, the supplier node can also receive the usage information of the raw materials in real time. When the supplier node receives the usage information of a raw material ID, it marks the ID as "used". This blockchain-based usage information synchronization mechanism improves the information sharing efficiency between nodes in the supply chain and reduces the decision-making bias caused by information asymmetry. Allocation module: The allocation module realizes the dynamic allocation of raw materials between manufacturer nodes through smart contracts to ensure the continuity and stability of production tasks. Specifically, the allocation module deploys a special raw material allocation smart contract on the blockchain. The contract defines the rules and logic of raw material allocation and continuously monitors the remaining amount of raw materials of each manufacturer node. When the remaining amount of raw materials at any manufacturer node is lower than the preset threshold, the allocation smart contract will automatically trigger the allocation process. The smart contract first evaluates the raw material gap and production tasks of the node, and then selects a suitable allocation node from other manufacturer nodes according to the preset allocation rules. Allocation rules can take into account multiple factors, such as distance, transportation costs, material compatibility, etc. After selecting the allocation node, the smart contract calculates the share of raw materials that need to be allocated and generates a raw material transfer transaction.The transaction transfers a specified share of raw materials from the allocation node to the node with material shortage, and updates the raw material balance information in the blockchain ledger accordingly. Through the allocation smart contract, raw materials are allocated automatically and in real time between manufacturer nodes, greatly improving the flexibility and responsiveness of the supply chain. At the same time, the allocation rules and processes are encapsulated in the smart contract to ensure the fairness, transparency and immutability of the allocation process, and prevent interference from human factors. Forecasting module: The forecasting module uses machine learning algorithms to predict the raw material demand of each manufacturer node and provide decision support for the stocking of supplier nodes.
[0038] Specifically, the prediction module extracts the historical raw material consumption data of each manufacturer node from the blockchain, including dimensions such as material type, quantity, and time. These data are preprocessed through cleaning, integration, and transformation to form a structured time series data set. Then, the prediction module divides the time series data into training sets and test sets, and selects appropriate machine learning models (such as ARIMA, LSTM, etc.) for training and tuning. By minimizing the prediction error function, the model learns the inherent laws and trends of raw material consumption. After training, the prediction module uses the optimized model to make rolling forecasts of the future raw material demand of each manufacturer node and generate demand forecasts within a certain time range. In order to allow supplier nodes to obtain forecast results in a timely manner, the prediction module uses the blockchain event notification mechanism to write the encrypted forecast results into the blockchain and publish forecast events. Supplier nodes listen to forecast events, decrypt forecast results, and obtain the forecast demand for raw materials of each manufacturer node. Supplier nodes can optimize raw material stocking plans and inventory management strategies based on this, prepare appropriate types and quantities of raw materials in advance, and shorten the response time of the supply chain. The collection module and the recording module use the immutability of blockchain to achieve traceability and synchronization of raw material supply and usage information; the allocation module uses smart contracts to achieve automated allocation of raw materials, improving the flexibility of the supply chain; the prediction module uses machine learning algorithms to predict raw material demand and optimize suppliers' stocking strategies. The blockchain event mechanism runs through each module, ensuring real-time sharing of key information between supply chain nodes.
[0039] Figure 2It is a schematic diagram of the collection module shown in some embodiments of this specification. The collection module is deployed at the supplier node and is responsible for collecting raw material information and uploading it to the chain. Collection unit: The collection unit uses NFC (near field communication) or QR code technology to collect key information of raw materials. When the supplier delivers the raw materials to the manufacturer, the collection unit quickly obtains the unique ID, specifications, quantity and other attribute information of the raw materials by scanning the NFC tag or QR code attached to the raw materials. The NFC tag has an embedded RFID chip, which can store more structured data; the QR code uses graphic coding to encode the raw material information into a scannable image. The collection unit is equipped with a corresponding NFC reader or QR code scanner, which can automatically identify and extract the raw material information in the tag or code map. The collection process is fast and accurate, reducing the error rate of manual entry. Encryption unit: In order to protect the confidentiality and integrity of the raw material information, the encryption unit uses an identity-based cryptography system (IBC) to encrypt the raw material information. IBC is a public key cryptography system whose public key is generated by the user's identity information (such as email address, phone number, etc.), which simplifies the certificate management in the traditional PKI system. The encryption unit consists of three subunits: identity registration subunit, public key generation subunit and signature encryption subunit, which are responsible for key management and data encryption respectively.
[0040] Identity registration subunit: The identity registration subunit is responsible for registering the identity of the supplier node with the third-party private key generation center (PKG) and obtaining the private key bound to the identity. PKG is the core component of the IBC system. It manages the system's master key pair and is responsible for generating private keys for legitimate users. Specifically, the identity registration subunit first submits the identity (ID) of the supplier node to PKG, such as node name, IP address, company registration number, etc. PKG verifies the authenticity and uniqueness of the identity to ensure that each node has an independent identity. After verification, PKG uses the master private key (denoted as s) and the node's identity (denoted as ID) under its control to calculate the node's private key (denoted as skID) through an identity-based key derivation function (KDF). KDF can be a mapping function based on bilinear pairings that satisfies the following properties: skID = KDF (s, ID) = sH (ID), where H is a cryptographic hash function, such as SHA-256, that maps the identity to a point in an elliptic curve group. The master private key s is a private parameter of KDF, which ensures the security of the private key. The calculated private key skID is transmitted to the identity registration subunit through a secure channel as the identity credential of the supplier node. The secure channel can be an SSL / TLS encrypted channel, VPN tunnel, etc., to ensure that the private key will not be eavesdropped or tampered with during transmission. After receiving the private key, the identity registration subunit will store it securely in a local encryption chip or hardware security module (HSM) to prevent private key leakage. The identity registration subunit is also responsible for the life cycle management of the private key, such as update, cancellation, backup, etc.
[0041] Public key generation subunit: The public key generation subunit is responsible for obtaining the public parameters of the IBC system from PKG, and using these parameters and the node's identity to generate the node's public key. In the IBC system, the node's public key is not randomly generated, but is deterministically calculated from the identity and system parameters, which simplifies the distribution and verification of the public key. Specifically, the public key generation subunit first obtains two public parameters from PKG: the master public key (denoted as Ppub) and the system parameters (denoted as params). The master public key is the corresponding point of the PKG master private key s on the elliptic curve group, satisfying Ppub=sP, where P is the base point of the elliptic curve. The system parameters include cryptographic parameters such as the order, generator, and bilinear pairing of the elliptic curve, which are used for encryption and signing operations. Then, the public key generation subunit combines the master public key Ppub, the system parameter params, and the identity ID of the supplier node according to the preset cryptographic rules to generate the public key of the supplier node (denoted as pkID). The preset rule is usually a one-way hash function, as shown below: pkID=H(Ppub||params||ID), where || represents a string concatenation operation, and H is the same as the hash function used for identity registration. This rule ensures the mathematical relationship between the public key and the private key, that is, pkID=skID*P, but the private key skID cannot be inferred from the public key pkID, which ensures the security of the private key. The public key generation subunit stores the generated public key pkID securely locally and publishes it to other nodes in the blockchain network through smart contracts or other means. Other nodes can verify the correctness of the public key pkID based on the supplier node's identity ID and public parameters Ppub and params, without the need for additional certification authority verification. This identity-based public key generation and verification mechanism greatly simplifies the key management process of the IBC system.
[0042] The signature encryption subunit is responsible for digitally signing and encrypting the raw material information collected by the collection unit to ensure the authenticity, integrity and confidentiality of the information. This process can be divided into two steps: signing and encryption. In the signing stage, the signature encryption subunit first obtains the private key skID of the supplier node from the identity registration subunit. Then, the raw material information m transmitted by the collection unit is digitally signed. The signing process is divided into two steps: calculating the hash summary h=H(m) of the raw material information m, where H is a secure hash function, such as SHA-256. The hash summary is a unique fingerprint of the original information and is used to verify the integrity of the information. The hash summary h is encrypted with the private key skID to generate a digital signature σ=Sign(skID, h). The signature algorithm Sign can be an identity-based signature scheme, such as the HessIBS scheme, which is implemented using bilinear pairings and elliptic curve cryptography. The digital signature σ ensures the authenticity and non-repudiation of the source of the raw material information m. Only the supplier node with the private key skID can generate a valid signature, preventing others from forging information. At the same time, the signature also provides non-repudiation, and the supplier node cannot deny the information it has signed. In the encryption phase, after signing, the signature encryption subunit uses the supplier node public key pkID generated by the public key generation subunit to encrypt the raw material information m. The encryption process can select an identity-based encryption algorithm, such as the Boneh Franklin IBE scheme. Generate a random number r and calculate the ciphertext C1=rP, where P is the base point of the elliptic curve. Calculate the shared key K=e(pkID, rPpub), where e is a bilinear pairing map and Ppub is the master public key of PKG. Symmetrically encrypt the raw material information m to obtain the ciphertext C2=Enc(K, m), where Enc is a semantically secure symmetric encryption algorithm, such as AES-GCM. Output ciphertext C=(C1, C2). The encrypted ciphertext C ensures the confidentiality of the raw material information m, and only the node with the corresponding private key skID can decrypt and obtain the original information. The ciphertext C and the signature σ together constitute the security payload (m, σ, C) of the raw material information m. The signature encryption subunit transmits the security payload to the consensus unit through the smart contract. Smart contracts provide a standardized data transmission interface, such as submit Transaction (m, σ, C), which ensures the format and legitimacy of the data. Smart contracts can perform preliminary verification of security payloads, such as verifying whether the signature matches and whether the data is complete.
[0043] After receiving the security payload from the smart contract, the consensus unit first verifies the validity of the digital signature σ using the public key pkID of the supplier node. The verification process is divided into two steps: decrypting the signature σ and obtaining the hash summary h'=Verify(pkID,σ). The signature verification algorithm Verify is the reverse operation of the signature algorithm Sign. The hash summary h=H(m) is calculated for the raw material information m and compared with h'. If h=h', the signature is valid; otherwise, the signature is invalid. Only the security payload that has passed the signature verification can enter the consensus process and be packaged into the block. This verification mechanism can filter out forged and tampered information, ensuring the credibility of the data on the chain. After reaching a consensus on the security payload, the consensus unit returns the packaged block hash to the smart contract. The smart contract then passes the block hash to the signature encryption subunit to prove that the data has been successfully uploaded to the chain. The signature encryption subunit can store the block hash together with the raw material information m as evidence of the data being uploaded to the chain. Raft consensus algorithm: Raft is a consensus algorithm based on leader election, suitable for permissioned chain scenarios. In Raft, each consensus node has a role: Leader, Follower, or Candidate. Leader is responsible for receiving requests from clients (such as the signature encryption subunit) and broadcasting the requests to all followers. Leader is also responsible for synchronizing logs with followers to ensure that the status of each node is consistent. Follower passively responds to Leader's request, processes the request after receiving it, and returns the result to Leader. Follower regularly reports its status to Leader through the heartbeat mechanism. Candidate is a temporary role in the Leader election process. When Follower does not receive the heartbeat of Leader for a long time, it will think that Leader has failed and change its role to Candidate. Candidate will initiate voting requests to other nodes to try to become the new Leader. The consensus unit obtains the raw material information after encryption and broadcasts it to the blockchain network. Each consensus node votes or competes for the right to record the raw material information according to the selected consensus algorithm. When a block is recognized by the majority of nodes, it is officially linked to the blockchain and becomes part of the ledger. The consensus unit returns the packaged block hash to the encryption unit to prove that the raw material information has been successfully uploaded to the chain.
[0044] The recording module is deployed on the manufacturer node and is responsible for registering the use of raw materials. When the manufacturer takes and uses raw materials, the use information (such as the person who takes, the time of taking, the purpose, etc.) is uploaded to the blockchain by scanning the unique ID of the raw materials. The blockchain synchronizes the use information to the supplier node, and the supplier marks the corresponding raw materials as used accordingly. The recording module includes: a taking record unit, which is used by the manufacturer node to scan the unique identification ID of the corresponding raw materials when the manufacturer node takes and starts to use the raw materials, and collect the taking information of the raw materials; the taking information includes the ID of the person who takes, the time of taking, the quantity of taking, the production batch, the production line, etc.; the taking record unit scans and identifies the raw material identification ID through at least one technical means of RFID technology, NFC technology, QR code technology or barcode technology; the use record unit is used by the manufacturer node to collect the use information of the raw materials after the raw materials are put into use; the use information includes the user ID, the time of use, the quantity of use, the use process, the use equipment, etc.; the use record unit automatically collects the use parameters of the raw materials through IoT sensors, PLC controllers, MES systems, etc., and associates the collected parameter information with the raw material identification ID and stores it in a database. storage; a status update unit, which is used to receive the receipt information collected by the receipt record unit and the usage information collected by the usage record unit, and mark the status of the raw materials as "received" or "in use"; the status update unit automatically determines and updates the current status of the raw materials through preset state transition rules and threshold conditions, and synchronizes the status change information to the blockchain; an information chain unit, which is used to receive the raw material information generated by the receipt record unit, the usage record unit, and the status update unit, upload the raw material information to the blockchain through a smart contract, and generate a traceable raw material usage record; the information chain unit performs hash calculation on key information, writes the information hash value into the transaction data of the blockchain, and realizes tamper-proof storage of information; a message notification unit, which is used to push the receipt information, usage information, status change information, etc. of the raw materials to the supplier node in real time through communication mechanisms such as message queues and Web Sockets; after receiving the message notification, the supplier node marks the corresponding raw material identification ID as "used" and updates the inventory status and quantity of the raw materials.
[0045] Figure 3It is a schematic diagram of a deployment module shown in some embodiments of this specification. The core of the deployment module is an inventory detection smart contract and a deployment rule unit, which are respectively deployed on the blockchain platform and the manufacturer node. The inventory detection smart contract monitors the raw material inventory levels of each manufacturer in real time. When it is found that the inventory of a certain manufacturer is below the threshold, a deployment request and related parameters are sent to its deployment rule unit. The deployment rule unit obtains data such as historical inventory, production tasks, and deployment records of each node from the blockchain, generates an optimal deployment strategy through a reinforcement learning algorithm, and writes the strategy into the raw material deployment task order. The task order is uploaded to the blockchain through the transfer transaction unit, and the smart contract triggers the actual raw material transfer transaction to complete the raw material deployment between manufacturers. The transaction execution result will be synchronized to the relevant manufacturer nodes for updating the local inventory status.
[0046] The inventory detection smart contract regularly obtains the inventory parameters of each manufacturer node from the blockchain ledger, including information such as the type, quantity, and quality of raw materials. These parameters are usually stored in the ledger in the form of key-value pairs, such as {"manufacturer ID ": "M001", "material Type": "A", "quantity": 1000, "quality": 0.95}. The smart contract compares the obtained inventory parameters with the preset inventory threshold. The inventory threshold is a safety inventory level set according to factors such as production plans and historical data, such as 500 pieces. The comparison process is implemented through if-else statements, such as if (quantity < threshold) then trigger Allocation(x). When the inventory parameters of any manufacturer node are below the threshold, the smart contract will automatically send a deployment request to the deployment rule unit. The deployment request contains parameters such as the manufacturer node ID, raw material type, and quantity, and is transmitted in JSON format, such as {"manufacturer ID": "M001", "materialType": "A", "quantity": 800}. The inventory detection unit monitors the raw material inventory levels of each manufacturer node in real time through the inventory detection smart contract deployed on the blockchain.
[0047] The allocation rule unit receives the allocation request sent by the inventory detection smart contract and uses the reinforcement learning algorithm to match the optimal raw material supply plan for the requesting manufacturer node. The state evaluation subunit first obtains the feature data of each node from the blockchain, including the raw material inventory status, production task status, and statistical characteristics of historical allocation data. The feature data is represented in the form of vectors or matrices, such as the inventory status [1000, 500, 800]. The state evaluation subunit uses a convolutional neural network (CNN) to extract and fuse the feature data. CNN automatically learns the local patterns and global relationships in the feature data through the stacking of convolutional layers and pooling layers to obtain a feature representation with a higher level of abstraction. The output of CNN is a state vector of fixed length, such as [0.1, 0.5, 0.2]. The strategy generation subunit generates the raw material allocation strategy based on the state vector through the Actor-Critic algorithm. The Actor-Critic algorithm combines the advantages of policy gradient and value function approximation, and can learn the policy function and value function at the same time: the state encoding network (LSTM) compresses the state vector into high-level features and encodes the temporal dependencies of the raw material allocation environment. The output of LSTM is a state feature vector. The policy network (Actor) generates the probability distribution of the allocation action based on the state feature vector. Actor uses a fully connected layer + softmax activation function to output the selection probability of each action (i.e., allocation plan), such as [0.4, 0.3, 0.3]. The value network (Critic) estimates the value function of the current state based on the state feature vector. Critic uses a fully connected layer + linear activation function to output the state value in scalar form, such as 0.85. The advantage function calculates the advantage value of each allocation action, indicating the superiority of the action relative to the average level. The advantage value is used to guide the parameter update of the Actor so that actions with high scores are given greater weight. The Actor updates the parameters through the gradient ascent algorithm to maximize the expected advantage value. The Critic updates the parameters through the temporal difference algorithm to minimize the error between the estimated value and the true value. The policy generation subunit samples and generates the raw material allocation strategy based on the output of the Actor network, including the manufacturer node combination, allocation quantity, allocation priority, etc. The allocation strategy is encapsulated in JSON format as a raw material allocation task order, such as {"supplyID":"M003","demand ID":"M001","material Type":"A","quantity":500,"priority":1}.
[0048] The raw material allocation task order is uploaded to the blockchain through the transfer transaction unit. After the inventory detection smart contract monitors the new task order, it automatically triggers the raw material transfer transaction and transfers the corresponding raw material quantity from the supplier node to the demander node. The transaction execution result will be synchronized to the relevant manufacturer node to update the local inventory status. Through the collaboration of the inventory detection unit and the allocation rule unit, the allocation module realizes the intelligent raw material allocation between manufacturers. When a manufacturer is short of raw materials, the system can automatically match the best supplier and initiate raw material transfer in time to ensure the continuity of production tasks. The reinforcement learning algorithm enables the allocation strategy to be optimized according to long-term benefits and continuously adapt to the dynamic changes in the supply chain environment.
[0049] The transfer transaction unit creates a raw material transfer transaction according to the raw material allocation task order; obtains transaction parameters, which include the node ID of the outgoing manufacturer, the node ID of the incoming manufacturer, the raw material ID, the quantity of raw materials and the transaction timestamp; the transfer transaction unit calls the blockchain ledger smart contract to transfer the raw material ownership information from the outgoing manufacturer node to the incoming manufacturer node, and updates the raw material holding status in the ledger smart contract; specifically, the transfer transaction unit extracts transaction parameters from the task order, including: outgoing manufacturer node ID: the supplier ID of the raw material, such as "M003", incoming manufacturer node ID: the demander ID of the raw material, such as "M001", raw material ID: the type of raw material transferred, such as "A", raw material quantity: the quantity of raw materials transferred, such as 500, transaction timestamp: the time when the transaction occurs, such as "2023-03-20T10:30:00Z".
[0050] Contract execution unit, the contract execution unit executes the raw material transfer transaction in the distributed node network of the blockchain to ensure the consistency and immutability of the transaction. After receiving the raw material transfer transaction submitted by the transfer transaction unit, the contract execution unit broadcasts the transaction to all nodes in the blockchain network. Each node executes the transaction independently and packages the execution results into blocks. Due to network delays and task scheduling differences between nodes, blocks may contain inconsistent transaction results. The contract execution unit uses the Paxos consensus algorithm to reach a consensus on the transaction results between blockchain nodes: select a proposal node from the blocks of all nodes and use its block as the proposal value. The proposal node sends the proposal value to other nodes and requires them to respond to accept or reject. If more than half of the nodes accept the proposal value, the proposal value is approved and called the approval value. The proposal node sends the approval value to other nodes again and requires them to finally accept it. If more than half of the nodes finally accept the approval value, consensus is reached and the approval value is written into the blockchain ledger. If the condition of more than half is not met at any stage, the consensus fails, and the proposal node is reselected to initiate the next round of consensus. When the raw material transfer transaction is completed, the contract execution unit returns the transaction execution result (success or failure) to the transfer transaction unit and the allocation rule unit. This will trigger the inventory monitoring smart contract to update the raw material inventory parameters of the manufacturer node: for the incoming manufacturer node, the inventory of the corresponding raw materials will be increased, and for the outgoing manufacturer node, the inventory of the corresponding raw materials will be reduced. The updated inventory parameters will be used as the input for the next allocation decision, forming a closed-loop feedback. Through the cooperation of the transfer transaction unit and the contract execution unit, the allocation module realizes the safe transfer of raw materials between manufacturer nodes. The ownership change and inventory update of raw materials are automatically executed through smart contracts, avoiding errors and cheating in manual operations. The Paxos consensus algorithm ensures the consistency of transaction execution results in the blockchain network, preventing double spending and data tampering. The contract execution results are promptly fed back to the allocation decision process through the event mechanism, realizing the closed-loop linkage of allocation-transaction-inventory.
[0051] Figure 4It is a schematic diagram of the prediction module shown in some embodiments of this specification. The prediction module includes three sub-units: data extraction, demand prediction and prediction release, which correspond to the data layer, business layer and interface layer respectively. The data extraction unit extracts the historical raw material consumption data of each manufacturer node through the blockchain account book smart contract, including inventory changes, collection records and allocation records. The demand prediction unit uses CNN and LSTM networks to perform feature learning and modeling on the extracted time series data, and multi-step predicts the raw material demand of each manufacturer. The prediction release unit publishes the demand prediction results to the supplier node through the blockchain event notification mechanism. After receiving the notification, the supplier can query and decrypt the prediction data from the blockchain and use it to formulate stocking plans and procurement strategies. The data extraction unit is responsible for extracting the historical raw material consumption data of the manufacturer node from the blockchain account book to provide a data basis for demand prediction. Demand prediction unit: The demand prediction unit uses a machine learning algorithm to perform multi-step predictions on the raw material demand of the manufacturer. The demand prediction unit obtains the raw material consumption data from the data extraction unit and sorts it according to the timestamp. Then it is divided into a training set and a test set in a ratio of 8:2. The feature engineering of the training set is completed by a convolutional neural network (CNN). The input of CNN is the raw material consumption time series data, and the convolution kernel slides on the time dimension to extract local features. The pooling layer compresses the feature map to improve the robustness of the features. The output of CNN is the extracted feature vector. Based on the features extracted by CNN, the demand forecasting unit builds a long short-term memory network (LSTM) model. LSTM can learn the long-term dependencies in raw material consumption data through gating mechanisms (input gate, forget gate, output gate) and memory units. The loss function uses the mean square error (MSE) between the predicted value and the true value, that is, the sum of the squares of the prediction errors. During the training phase, the model parameters (LSTM weight matrix and bias vector) are continuously optimized through the back propagation algorithm and the gradient descent algorithm to minimize the loss function. After the training is completed, the demand forecasting unit uses the trained LSTM model to perform multi-step forecasts on the test set. The forecast results include the demand for various raw materials by each manufacturer node in the future. The forecast release unit publishes the demand forecast results to the supplier node to help it optimize its stocking plan and procurement strategy. The forecast release unit writes the demand forecast results into the blockchain through the event notification mechanism of the smart contract. When the forecast is completed, the forecast publishing unit calls the event publishing function of the contract and passes in the manufacturer ID, raw material ID and forecast demand array. After the event is written to the blockchain, the supplier node can listen to the event through Web3.js to obtain the demand forecast results. After the supplier node queries the forecast data from the blockchain, it needs to use the manufacturer's public key to decrypt it to obtain the demand forecast in plain text. The decrypted data can be used to formulate stocking plans and procurement strategies to improve the collaborative efficiency of the supply chain.
[0052] The forecast publishing unit is connected to the blockchain network through the Web3.js library, calls the forecast publishing function of the event smart contract, and writes the encrypted forecast results to the blockchain ledger. The event smart contract is written in Solidity language, which defines the forecast publishing event and related functions; before calling the publish Demand Forecast function, the forecast publishing unit first encrypts the forecast results using the public key of the supplier node. The encryption process uses an asymmetric encryption algorithm (such as RSA) to ensure that only the supplier node with the corresponding private key can decrypt the forecast results; the forecast publishing unit calls the publish Demand Forecast function and passes in the following parameters: manufacturer ID: the ID of the manufacturer node, used to identify the source of the forecast results, material ID: the type or ID of the raw material, used to identify the object of the forecast results, encrypted Demand: the encrypted forecast demand, passed in as a string, start Time: the starting timestamp of the forecast time range, end Time: the end timestamp of the forecast time range. After the Publish Demand Forecast function is executed, the forecast publishing event Demand Forecast Published will be written to the blockchain ledger and broadcast to all nodes that subscribe to the event. The event contains information such as the manufacturer node ID, raw material type, encrypted forecast demand, and forecast time range. The supplier node listens to the Demand Forecast Published event through the Web3.js library to obtain detailed information about the forecast release. After extracting the encrypted forecast demand from the event, the supplier node uses its own private key to decrypt it and obtain the forecast result in plain text. The decrypted forecast result contains the manufacturer's estimated demand for specific raw materials in the future. The supplier node can use this information to optimize the raw material stocking plan and allocation strategy, such as: preparing or applying for more raw material inventory in advance to meet the manufacturer's potential demand growth, coordinating the allocation of raw materials from different manufacturers, balancing the contradiction between supply and demand, and improving resource utilization efficiency. According to the demand forecast, dynamically adjust the raw material procurement plan and logistics distribution plan, and use the demand forecast data to negotiate more favorable procurement terms and delivery time with upstream suppliers. Through the forecast publishing unit, the manufacturer node and the supplier node realize the secure sharing of raw material demand forecasts. The blockchain event mechanism ensures the real-time broadcast and non-tamperability of the forecast results, which facilitates the supplier node to obtain and respond in time. The asymmetric encryption algorithm protects the confidentiality of the forecast data and prevents the leakage of sensitive information. Smart contracts automate the forecast release process, reducing the cost and delay of manual communication. Supplier nodes obtain the manufacturer's demand forecast on the blockchain, which can better coordinate upstream and downstream businesses and optimize supply chain operations.
Claims
1. An industrial automation intelligent manufacturing management system based on blockchain technology, including: The collection module collects raw material information of the raw materials when the supplier node supplies raw materials to the manufacturer node. The raw material information includes the unique identification ID of the raw materials. Encrypt the collected raw material information and upload it to the blockchain; Recording module: When the manufacturer node receives and starts using raw materials, it scans the unique identification ID of the corresponding raw materials and uploads the usage information to the blockchain; after receiving the usage information, the supplier node marks the corresponding unique identification ID as used; The allocation module monitors the remaining amount of raw materials of each manufacturer node through the smart contract deployed on the blockchain. When the remaining amount of raw materials of any manufacturer node is lower than the threshold, the allocation manufacturer node is selected according to the remaining amount of raw materials and the generation task through the preset rules, and the preset share of raw materials is transferred from the selected allocation manufacturer node to the corresponding manufacturer node, and the blockchain ledger data is updated; The prediction module extracts the raw material consumption data of each manufacturer node from the blockchain, and uses machine learning algorithms to predict the raw material demand of each manufacturer node. The prediction results are fed back to the supplier node through blockchain event notifications. The prediction results are used to guide the inventory allocation of the supplier node.
2. The industrial automation intelligent manufacturing management system based on blockchain technology according to claim 1 is characterized by: Acquisition module, including: A collection unit collects raw material information through NFC or QR code; The encryption unit encrypts the collected raw material information through an asymmetric encryption algorithm, and transmits the encrypted raw material information to the consensus unit through a smart contract; The consensus unit uses the raft or pow consensus algorithm to conduct consensus voting with other nodes in the blockchain network. After obtaining the accounting rights, the encrypted raw material information is packaged into blocks and linked to the blockchain.
3. The industrial automation intelligent manufacturing management system based on blockchain technology according to claim 2 is characterized by: Encryption unit, including: The identity registration subunit registers the identity with the third-party private key generation center PKG and obtains the private key bound to the identity; PKG calculates the private key using the master private key and the registrant's identity, and transmits the calculated private key to the identity registration subunit; The public key generation subunit obtains the master public key and system parameters from the PKG, combines the master public key, system parameters and the identity of the supplier node according to preset rules, and generates the public key of the supplier node; The signature encryption subunit uses the private key of the supplier node obtained by the identity registration subunit to hash the raw material information; and uses the public key of the supplier node generated by the public key generation subunit to encrypt the signed raw material information; The signature encryption subunit transmits the encrypted and signed raw material information to the consensus unit for consensus. The consensus unit verifies the signature of the raw material information, and only the verified raw material information can be uploaded to the chain. After the consensus unit reaches a consensus on the encrypted raw material information, it returns the consensus result to the signature encryption subunit.
4. The industrial automation intelligent manufacturing management system based on blockchain technology according to claim 3 is characterized by: Provisioning modules, including: The inventory detection unit monitors the raw material inventory parameters of each manufacturer node through the inventory detection smart contract deployed on the blockchain; the inventory detection smart contract obtains the inventory parameters of each manufacturer node in the blockchain account book, and the inventory parameters include the raw material balance; the obtained inventory parameters are compared with the preset inventory threshold, and when the inventory parameters of any manufacturer node are less than the inventory threshold, the allocation request that needs to be allocated is sent to the allocation rule unit; the allocation request includes the manufacturer node ID, raw material type and quantity; The allocation rule unit receives allocation requests and uses reinforcement learning algorithms to generate raw material allocation task orders; The transfer transaction unit creates a raw material transfer transaction based on the raw material allocation task order; obtains transaction parameters, which include the node ID of the outgoing manufacturer, the node ID of the incoming manufacturer, the raw material ID, the raw material quantity, and the transaction timestamp; the transfer transaction unit calls the blockchain ledger smart contract to transfer the raw material ownership information from the outgoing manufacturer node to the incoming manufacturer node, and updates the raw material holding status in the ledger smart contract; The contract execution unit executes the created raw material transfer transaction in the blockchain distributed node network; the contract execution unit reaches a transaction consensus between blockchain nodes through the Paxos consensus algorithm, and writes the transaction execution results into the blockchain ledger; when the raw material transfer transaction is completed, the contract execution unit returns the transaction execution results to the transfer transaction unit and the allocation rule unit, triggering the inventory monitoring smart contract to update the raw material inventory parameters of the manufacturer node.
5. The industrial automation intelligent manufacturing management system based on blockchain technology according to claim 4 is characterized by: The deployment rule unit includes: The state evaluation subunit obtains the feature data of each manufacturer node, which includes the features of raw material inventory status, generation task status and historical allocation data; the extracted feature data is extracted and fused through a convolutional neural network to generate a state vector representing the current raw material allocation environment; The strategy generation subunit generates a raw material allocation strategy based on the generated state vector through a reinforcement learning algorithm; the allocation strategy includes the manufacturer node combination, allocation quantity and allocation priority.
6. The industrial automation intelligent manufacturing management system based on blockchain technology according to claim 5 is characterized by: Based on the generated state vector, the raw material allocation strategy is generated through the reinforcement learning algorithm, including: Construct a state coding neural network, take the state vector generated by the state evaluation subunit as input, extract the high-level feature representation of the state vector through the state coding neural network, and generate a compressed state feature vector; the state coding neural network adopts the LSTM network structure to obtain the temporal dependency in the raw material allocation environment; The generated state feature vector is input into the policy neural network Actor, and the probability distribution of the raw material allocation action is generated through the policy neural network Actor; the policy neural network Actor uses a fully connected layer and a softmax activation function to output the selection probability of each allocation action; based on the output selection probability, the raw material allocation action is sampled and generated, and the raw material allocation strategy including the manufacturer node combination, allocation quantity and allocation priority is output; The generated state feature vector is input into the value assessment neural network Critic, and the state value function under the current state is estimated by the value assessment neural network Critic. The value assessment neural network Critic uses a fully connected layer and a linear activation function to output the state value in scalar form.
7. The industrial automation intelligent manufacturing management system based on blockchain technology according to claim 6 is characterized by: Based on the generated state vector, the raw material allocation strategy is generated through the reinforcement learning algorithm, which also includes: The raw material allocation problem is constructed as a Markov decision process, which consists of a state space, an action space, a state transition probability function, and a reward function. The state space contains all state combinations of the raw material allocation environment, the action space contains all raw material allocation strategies, the state transition probability function represents the probability of taking an action in the current state and transferring to the next state, and the reward function is used to define the immediate return of each decision. According to the obtained state value and the reward function in the Markov decision process, the advantage value of each raw material allocation action is calculated through the advantage function; the advantage value indicates the superiority of the current action relative to the average level and is used to guide the parameter update of the policy neural network actor; The gradient ascent algorithm is used to update the parameters of the policy neural network Actor according to the calculated advantage value. The parameters of the policy neural network Actor are updated by maximizing the expected advantage value so that actions with high advantage values are given a greater probability of selection.
8. The industrial automation intelligent manufacturing management system based on blockchain technology according to claim 7 is characterized by: Based on the generated state vector, the raw material allocation strategy is generated through the reinforcement learning algorithm, which also includes: Using the temporal difference algorithm, the parameters of the value evaluation neural network Critic are updated according to the calculated advantage value and the state transition probability function in the Markov decision process; the parameters of the value evaluation neural network Critic are updated by minimizing the temporal difference error so that the estimated value of the value function is close to the true cumulative return.
9. The industrial automation intelligent manufacturing management system based on blockchain technology according to any one of claims 2 to 8, characterized in that: Prediction module, including: The data extraction unit extracts the raw material consumption data of each manufacturer node from the blockchain ledger; the raw material consumption book contains historical inventory data, collection records and allocation records; the data extraction unit obtains the encrypted raw material consumption data of each manufacturer node by calling the blockchain ledger smart contract, and decrypts the extracted data using an asymmetric encryption algorithm; The demand forecasting unit uses machine learning algorithms to perform multi-step forecasts on the raw material demand of each manufacturer node based on the extracted raw material consumption data, and obtains the raw material demand forecast results of each manufacturer node by minimizing the forecast error function; The forecast release unit releases the generated raw material demand forecast results to the supplier node through blockchain event notification; the forecast release unit calls the blockchain event smart contract, writes the encrypted forecast results into the blockchain ledger, and broadcasts the forecast release event to the relevant supplier nodes; the forecast release event contains the manufacturer node ID, raw material type, demand forecast amount and forecast time range; after receiving the forecast release event, the supplier node calls the blockchain event smart contract to obtain the encrypted forecast results, and uses the private key to decrypt the forecast results to obtain the manufacturer's raw material demand forecast amount in plain text, which is used to adjust the raw material inventory and allocation.
10. The industrial automation intelligent manufacturing management system based on blockchain technology according to claim 9 is characterized by: Based on the extracted raw material consumption data, the machine learning algorithm is used to make multi-step forecasts of the raw material demand of each manufacturer node. By minimizing the prediction error function, the raw material demand forecast results of each manufacturer node are obtained, including: According to the extracted raw material consumption data, it is divided into training set and test set according to the preset ratio; the training set is used to train the machine learning model, and the test set is used to evaluate the generalization ability of the trained model; The convolutional neural network (CNN) algorithm is used to perform feature engineering on the training set to extract features that reflect the consumption of raw materials; Establish an LSTM neural network model and use the LSTM gating mechanism and memory unit to obtain the long-term dependency of raw material consumption time series data; Construct a loss function with the sum of squared prediction errors as the target, use the back propagation algorithm and gradient descent algorithm to train the constructed LSTM neural network model, and adjust the weight matrix and bias vector of LSTM by minimizing the multi-step prediction error; The trained LSTM model is used to predict the raw material demand of each manufacturer node.
Citation Information
Patent Citations
Industrial automation intelligent manufacturing management system based on block chain technology
CN112380289A
Military supply chain information consensus method based on block chain
CN112561444A
Blockchain-supporting Internet-of-Things system optimized by using policy gradient technology
CN113645702A
Block chain data privacy protection and sharing method based on zero knowledge proof
CN114143080A
Supply chain management method and supply chain management system based on block chain
CN114881365A
Cited By
Intelligent manufacturing enterprise department collaborative management method based on block chain technology
CN118886869A
Asynchronous block chain dynamic monitor
CN118921162A
Block chain data multi-dimensional space full life cycle supervision method, system and device and storage medium
CN119090453A
Blockchain data multidimensional space full life cycle supervision method, system, equipment and storage medium
CN119090453B
Substation operation risk analysis method
CN119151307A
