Intelligent manufacturing system deadlock prediction method based on Petri-Net-GCN
Patent Information
- Application Number
- CN202511110586.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-08-08
AI Technical Summary
Traditional Petri nets have problems of state space explosion and insufficient dynamic adaptability in modeling intelligent manufacturing systems, making it difficult to effectively meet the deadlock prediction needs of complex intelligent manufacturing systems.
The Petri-Net-GCN method is adopted to divide the intelligent manufacturing system into production equipment, production process and production resource modules. The Petri net is formally modeled through graph convolutional neural network, and a bidirectional message passing module from place to transition and from transition to place is constructed. Node features are extracted and represented by graph-level embedding. Deadlock prediction is performed by combining attention layer and classification layer.
It achieves accurate prediction of deadlock risks in intelligent manufacturing systems, alleviates the state space explosion problem, improves the adaptability and scalability of the model in complex manufacturing systems, improves the accuracy of deadlock state identification, and provides prior warning for production scheduling and resource allocation.
Smart Images

Figure CN120805533A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of deadlock detection, and particularly relates to a Petri-Net-GCN-based intelligent manufacturing system deadlock prediction method. BACKGROUND
[0002] In recent years, with the increasing complexity of intelligent manufacturing systems (IMS) and some discrete event systems, the deadlock problem has become a key challenge in system design and operation. There are usually the following main reasons for the intelligent manufacturing system to produce deadlock: limited system resources, uneven distribution of system resources and incorrect resource in the progress process. It is very difficult to accurately describe the running situation of the actual IMS. In order to solve the deadlock problem of the intelligent manufacturing system, the whole system needs to be modeled first to simulate the system running condition. The data information of the Petri net structure in the aspects of static structure and dynamic behavior of the system is analyzed from the perspective of the model. The Petri net is a mathematical modeling tool for describing and analyzing discrete event dynamic systems, which is very suitable for solving the above problems. However, due to the limitations of the traditional Petri net in the modeling of the manufacturing system, such as state space explosion and insufficient dynamic adaptability, it is difficult to effectively cope with the deadlock prediction demand of the complex intelligent manufacturing system (IMS). In view of this problem, the graph convolutional neural network (GCN) is a deep learning model specially designed for graph structure data, which is good at capturing the relationship between nodes and efficiently processing graph data analysis tasks. The Petri net is essentially a graph structure, and the relationship between its library and transition is clear, which is suitable for analysis by GCN. Therefore, starting from the prediction perspective of deadlock detection and recovery, the application proposes a Petri-Net-GCN-based intelligent manufacturing system deadlock prediction method, which aims to overcome the limitations of the traditional method. SUMMARY
[0003] The application aims to provide a Petri-Net-GCN-based intelligent manufacturing system deadlock prediction method, which solves the problems of state space explosion and dynamic adaptability limitation in the modeling of the manufacturing system by the traditional Petri net.
[0004] Technical scheme: The Petri-Net-GCN-based intelligent manufacturing system deadlock prediction method provided by the application comprises the following steps:
[0005] (1) dividing the intelligent manufacturing system into a production equipment module, a production process module and a production resource module;
[0006] (2) The formal modeling of the module based on the Petri net comprises: mapping a production equipment module into a library represented equipment state in the Petri net; mapping a production process module into a transition represented task scheduling or process conversion in the Petri net; mapping a production resource module into a token represented resource distribution in the Petri net; and constructing a Petri net structure through directional arc connection and representing the Petri net structure in an association matrix, wherein a positive value represents a transition output arc to a library, a negative value represents a library input arc to a transition, and a zero value represents no connection;
[0007] (3) The Petri-Net-GCN deadlock prediction model comprises a library-to-transition message passing module and a transition-to-library message passing module; and a graph neural network structure is used to bidirectionally aggregate and update features between nodes in the Petri net graph.
[0008] (4) An initial token distribution, an association matrix and a deadlock label of an intelligent manufacturing system are collected to construct a data set, which is input into the model for training; and the trained model is used to predict a deadlock risk in an unknown system state.
[0009] Further, in step (1), the production equipment module comprises: a processing equipment including a state (idle, processing, fault, maintenance) and a quantity of a machine tool and a mechanical arm; a transportation equipment including a state (idle, transportation, charging, fault) and a quantity of an AGV; a storage equipment including a state (idle, storage, picking, fault) and a quantity of an input / output equipment; the production process module comprises: a loading and unloading module state (waiting to load, loading, waiting to unload, unloading, exception) and a product quantity; a product flow module state (waiting to flow, flowing, reaching, exception) and a product quantity; and the production resource module comprises: a raw material module state (available, allocated, exhausted) and a stock quantity; an intermediate product module state (waiting to process, processing, completed) and a quantity; and a finished product module state (produced, waiting to ship, unqualified) and a stock quantity.
[0010] Further, in step (2), the library is represented as an equipment state node, the transition is represented as a task scheduling operation, and the token is represented as a resource distribution; and the arc connection direction is consistent with the actual resource flow direction.
[0011] Further, in step (3), the Petri-Net-GCN model further comprises: a feature extraction module for extracting node features from the association matrix and the initial label; an attention layer for calculating node attention weights to enhance the key state expression capability; and a classification layer for outputting a deadlock binary classification result based on a graph-level embedding representation.
[0012] Further, the message passing module is specifically as follows: in the library-to-transition module, the library feature is updated after being weighted p_t X t; transition to the library module, through the correlation matrix transpose (A p_t ) T The transition features are back-propagated to the library; each message passing layer is followed by a ReLU activation function to enhance the non-linear expression ability
[0013] Further, the message passing function of the library to the transition module is as follows:
[0014] X t = X p ·A p_t ·W t +B t
[0015] The message passing function of the transition to the library module is as follows:
[0016] X p = X t ·(A p_t ) T ·W p +B p
[0017] Wherein, X p represents the feature information of all libraries in the Petri net, and X t represents the feature information of all transitions in the Petri net, and A p_t represents the correlation matrix of the Petri net, and A p_t ∈Z |P|×|T| , W t and W p are two trainable weight matrices, and W t ∈R |T| , W p ∈R |P| , B t and B p represent the bias matrix, and
[0018] Further, in step (4), the data set includes the initial identification, the deadlock label and the correlation matrix of the Petri net in different states.
[0019] Further, in step (4), the model training adopts accuracy, precision, recall and F1 score as evaluation indexes; when predicting, the initial identification vector and the correlation matrix of the unknown state are input, and the deadlock probability is output.
[0020] The electronic device provided by the application comprises a memory, a processor and a computer program stored in the memory, and the processor executes the program to realize the steps of any one of the methods.
[0021] An electronic device according to the present application comprises a memory storing a computer program and a processor which, when executing the program, implements the steps of any of the methods.
[0022] Advantages: Compared with the prior art, the present application has the following significant advantages: (1) The present application uses Petri nets to formally model intelligent manufacturing systems and designs a structured message passing mechanism combining graph convolutional neural networks (GCN), which realizes accurate prediction of deadlock risks in system states. Compared with traditional deadlock detection methods that rely on reachable graph enumeration or model checking, the present application can effectively alleviate the state space explosion problem and improve adaptability and scalability in complex manufacturing systems. (2) The present application proposes a feature extraction and graph neural network training mechanism for Petri net structure, which strengthens the dynamic relationship modeling capability between Petri net nodes by introducing bidirectional message passing modules of place-to-transition and transition-to-place, and improves the recognition accuracy of the model for deadlock states. (3) The Petri-Net-GCN model constructed by the present application can quickly predict and judge the current state during the running phase of the manufacturing system, providing prior warning information for production scheduling and resource allocation. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 Flow chart of the intelligent manufacturing system deadlock prediction method of the present application;
[0024] Figure 2 Schematic diagram of the intelligent manufacturing system model based on Petri nets of the present application;
[0025] Figure 3 Diagram of the place-to-transition module of the present application;
[0026] Figure 4 Diagram of the transition-to-place module of the present application;
[0027] Figure 5 Diagram of the Petri-Net-GCN structure example of the present application. DETAILED DESCRIPTION
[0028] The technical solutions of the present application will be further described below in conjunction with the drawings.
[0029] As shown in Figure 1 The present application provides an intelligent manufacturing system (IMS) model based on Petri nets, which is used for deadlock prediction of the IMS using the present application, including the following steps:
[0030] S1, the IMS is divided into three modules of production equipment, production process and production resources. The production equipment module includes a machining equipment module, a transportation module and a storage module, the machine tools and mechanical arms in the machining equipment module include states of idle, processing, failure and maintenance, and the number of machining equipment and mechanical arms, the automatic guided vehicles (AGVs) in the transportation module include states of idle, transportation, charging and failure, and the number of AGVs, and the storage module includes states of idle, storage, picking and failure, and the number of input / output devices; the production process module includes a loading and unloading module and a product flow module, the loading and unloading module includes states of to be loaded, loading, to be unloaded, unloading and exception, and the number of products to be loaded / unloaded, and the product flow module includes states of to be transferred, in transfer, arrival and exception, and the number of products to be transferred; the production resource module includes a raw material module, an intermediate product module and a finished product module, the raw material module includes states of available, allocated and exhausted, and the inventory of raw materials, the intermediate product module includes states of to be processed, in processing and completed, and the number of intermediate products at each process stage, and the finished product module includes states of produced, to be shipped and unqualified, and the inventory of finished products
[0031] S2, different devices in the IMS are respectively mapped to corresponding elements (places and transitions) of the Petri net.
[0032] As shown in Figure 2 , the places {p1, p8} represent the input devices and output devices in the IMS respectively, and the black dots in them represent that the devices contain product resources; the places {p2, p4, p5, p7} all represent the AGVs in the IMS; the places {p3, p6} represent the machining equipment in the IMS for processing products, and the black dots in them represent that the equipment is currently in an idle and available state; the places {p9, p 10 , p 11} represent the mechanical arm equipment in the IMS, and the black dots in them represent that the equipment is currently in an idle and available state; the transitions {t1, t2, t3, t4, t5, t6, t7, t8} represent the task scheduling or process conversion operations in the IMS, and the arc connection direction is consistent with the resource flow direction. The condition for triggering each transition is that only when the pre-place of the transition contains resources, the transition can be triggered, and the resources can smoothly enter the next place.
[0033] S3, a place-to-transition message passing module and a transition-to-place message passing module are designed.
[0034] In a Petri net, the relationship between transitions and places is represented by directed arcs that determine the network's evolution. To maximize the topological structure of the Petri net and effectively capture the connections between transitions and their input / output places, these relationships are divided into two categories based on arc type: arcs from places to transitions, and arcs from transitions to places. By representing each type of relationship as a convolution kernel, the topological structure of the Petri net can be inherited by the neural network. Therefore, two modules were designed: place-to-transition (P2T) and transition-to-place (T2P).
[0035] like Figure 3 As shown in the module from place to transition, given a directed arc from place p to transition t, the circles represent place nodes, the rectangles represent transition nodes, and the small circles with shadows represent neurons of Petri-Net-GCN. This is a two-layer fully connected neural network. The neurons in the first layer represent the place features of the Petri net, which are represented by X. p To represent, the second layer of neurons represents the transition characteristics of the Petri net with X t To express it. The message passing function from library place to transition module is as follows:
[0036] X t =X p ·A p_t W t +B t
[0037] Among them, X p Represents the characteristic information of all places in the Petri net, and λ p represents the total number of initial identifiers input to the Petri net, X t Represents the characteristic information of all transitions in the Petri net, and A p_t represents the incidence matrix of the Petri net, and A p_t ∈Z |P|×|T| , W t is a trainable weight matrix, and W t ∈R |T| , B t represents the bias matrix, and
[0038] like Figure 4 As shown in the figure, in the module of transition to place, given a directed arc from transition t to place p, the circles represent place nodes, the rectangles represent transition nodes, and the small circles with shadows represent neurons of Petri-Net-GCN. This is a two-layer fully connected neural network. The neurons in the first layer represent the transition features of the Petri net. tto represent the second layer of neurons represents the place characteristic of the Petri net with X p to represent. The transition-to-place module message passing function is as follows:
[0039] X p = X t · (A p_t ) T · W p + B p
[0040] where X p represents the characteristic information of all places in the Petri net, and X t represents the characteristic information of all transitions in the Petri net, and A p_t represents the incidence matrix of the Petri net, and A p_t ∈ Z |P|×|T| , W p is a trainable weight matrix, and W p ∈ R |P| , B p represents a bias matrix, and
[0041] S4, design a simple Petri-Net-GCN structure model.
[0042] As Figure 5 shown, a Petri-Net-GCN structure model is designed for the simple Petri net according to the above steps. The neural network has five layers, including three place layers and two transition layers, which are composed of two P2T modules and two T2P modules. In order to enhance the nonlinearity of Petri-Net-GCN, a ReLU activation function is used in each module. Through the P2T and T2P modules, Petri-Net-GCN inherits the internal structure of the Petri net. Therefore, Petri-Net-GCN aggregates and transmits state features according to the structure of the Petri net. Since the behavior of the Petri net is determined by its internal structure, Petri-Net-GCN has dynamic behavior knowledge through its topological structure.
[0043] S5, build a complete Petri-Net-GCN deadlock prediction model.
[0044] The Petri-Net-GCN model mainly includes the following parts. 1) Feature extraction module: structural features of each transition are extracted from the incidence matrix and the identification of the place, and a structural vector is constructed for each transition; 2) Dataset construction module: load data with CSV file, place_features.csv is the place feature of the Petri net, representing the token number of each place, adj_matrix.csv is the incidence matrix of the Petri net, representing the P x T connection structure of the Petri net, label.csv is the deadlock label of the Petri net, and a heterogeneous graph structure is automatically constructed, the nodes are divided into place and transition, and the edges are divided into p2t and t2p; 3) Message passing layer: place to transition, realize the message propagation from place to transition, use edge weight to adjust the propagation strength, support normalization and activation, transition to place, realize the message propagation from transition to place; 4) Attention layer: calculate the attention weight for each node in the graph, which is used for graph-level representation aggregation to extract the global graph-level embedding representation; 5) Classification layer: multi-layer full connection is used for binary classification; 6) Training and evaluation module: model training function, including gradient clipping, loss calculation and index collection, divide the dataset into training set, validation set and test set, and use accuracy, precision, recall and F1 score as evaluation indicators.
[0045] S6, prepare the token distribution of the intelligent manufacturing system under different initial states, the corresponding incidence matrix and the deadlock label to construct a dataset, which corresponds to the Petri net intelligent manufacturing system of the embodiment Figure 2 of the embodiment is shown in Table 1.
[0046] Table 1 Petri-Net-GCN deadlock prediction dataset
[0047] Repository characteristics Deadlock label 1,5,1,0,2,2,5,5,0,4,1 1 1,1,3,5,3,4,1,2,0,4,3 0 0,4,4,1,4,4,5,0,0,2,4 1 1,4,3,5,3,4,1,2,0,4,3 0 1,2,0,0,2,3,0,0,5,2,5 0 2,0,1,2,3,0,1,5,3,3,1 1 0,1,3,5,3,4,1,2,0,4,3 0 5,2,0,0,1,5,5,5,2,5,3 0 2,5,0,0,2,3,0,0,5,2,5 0 3,2,1,1,0,4,0,5,1,3,3 1
[0048] The incidence matrix is as follows:
[0049] [-1, 0, 0, 1, 0, 0, 0, 0],
[0050] [1, -1, 0, 0, 0, 0, 0, 0],
[0051] [0, 1, -1, 0, 0, 0, 0, 0],
[0052] [0, 0, 1, -1, 0, 0, 0, 0],
[0053] [0, 0, 0, 0, 1, -1, 0, 0],
[0054] [0, 0, 0, 0, 0, 1, -1, 0],
[0055] [0, 0, 0, 0, 0, 0, 1, -1],
[0056] [0, 0, 0, 0, -1, 0, 0, 1],
[0057] [-1, 1, 0, 0, 0, 0, -1, 1],
[0058] [0, -1, 1, 0, 0, -1, 1, 0],
[0059] [0, 0, -1, 1, -1, 1, 0, 0]
[0060] The features of the library in Table 1 [1, 5, 1, 0, 2, 2, 5, 5, 0, 4, 1] represent that the Petri net has a total of 11 libraries, and the numbers from left to right represent the number of tokens in each library; the deadlock label uses 0 and 1, where 1 indicates the presence of a deadlock, and 0 indicates no deadlock; the incidence matrix is an 11x8 matrix, indicating that the Petri net is composed of 11 libraries and 8 transitions, where 1 indicates the output arc of the transition to the library, -1 indicates the input arc of the library to the transition, and 0 indicates no connection. Since there are a total of 1000 groups of data in the dataset, only 10 groups of data are shown here.
[0061] S7, the above prepared dataset is input as input data to the designed Petri-Net-GCN deadlock prediction model for learning and training, and the training result is shown in Table 2.
[0062] Table 2 Training results of Petri-Net-GCN deadlock prediction model
[0063]
[0064] S8, the trained Petri-Net-GCN deadlock prediction model is used to predict the deadlock of the intelligent manufacturing system in an unknown state. Prepare 50 initial identifiers of intelligent manufacturing systems in unknown states as input data to the trained prediction model for prediction, and the prediction results are shown in Table 3.
[0065] Table 3 Prediction results of Petri-Net-GCN deadlock prediction model
[0066]
[0067]
[0068]
[0069] From Table 3, it can be concluded that the initial identifiers of 50 different states predicted by the Petri-Net-GCN deadlock prediction model are correct for 43, with an accuracy of 86%, which is similar to the test set results of the trained model.
[0070] Comparative Example 1
[0071] The data set used is the same as in Example 1, and the model uses a Petri-Net-MLP deadlock prediction model, which mainly includes the following parts. 1) Feature extraction of the data set: mainly extracting library labeled features, arc structure features, structure connection features, and potential deadlock indicators; 2) Multi-layer perception module: the input layer dimension is the dimension of the extracted features, the multi-layer hidden structure, and the output layer outputs two units representing deadlock and non-deadlock; 3) Model training module: returns the accuracy, precision, recall and F1 score of the model training result.
[0072] The training results obtained according to the Petri-Net-MLP deadlock prediction model are shown in Table 4.
[0073] Table 4 Training results of Petri-Net-MLP deadlock prediction model
[0074]
[0075] According to the comparison in Table 2, it can be concluded that the deadlock prediction method based on Petri-Net-GCN proposed in the present application is better than the prediction effect of the traditional neural network.
Claims
1. A deadlock prediction method for intelligent manufacturing systems based on Petri-Net-GCN, characterized by: The following steps are involved: (1) Divide the intelligent manufacturing system into production equipment module, production process module and production resource module; (2) Formal modeling of the modules based on Petri nets includes: mapping the production equipment module to a place in the Petri net to represent the equipment state; mapping the production process module to a transition in the Petri net to represent task scheduling or process conversion; mapping the production resource module to a token in the Petri net to represent resource distribution; constructing the Petri net structure through directed arc connections and representing it in an association matrix, where a positive value represents an output arc from a transition to a place, a negative value represents an input arc from a place to a transition, and a zero value represents no connection; (3) Construct a Petri-Net-GCN deadlock prediction model including a place-to-transition message passing module and a transition-to-place message passing module; use a graph neural network structure to perform bidirectional aggregation and update of node features in the Petri net graph; (4) Collect the initial token distribution, association matrix and deadlock labels of the intelligent manufacturing system to construct a data set and input it into model training; use the trained model to predict the deadlock risk under unknown system states.
2. The deadlock prediction method for intelligent manufacturing system based on Petri-Net-GCN according to claim 1 is characterized in that: In step (1), the production equipment module includes the processing equipment module including the status and quantity of machine tools and robotic arms; the transportation module includes the status and quantity of AGVs; the storage module includes the status and quantity of input / output equipment; the production process module includes the status and quantity of loading and unloading modules; the status and quantity of products in the product flow module; the production resource module includes: the status and inventory of the raw material module; the status and quantity of the intermediate product module; and the status and inventory of the finished product module.
3. The deadlock prediction method for intelligent manufacturing system based on Petri-Net-GCN according to claim 1 is characterized in that: In step (2), places are represented as device status nodes, transitions are represented as task scheduling operations, and tokens represent resource distribution; the arc connection direction is consistent with the actual flow direction of resources.
4. The deadlock prediction method for intelligent manufacturing system based on Petri-Net-GCN according to claim 1 is characterized in that: In step (3), the Petri-Net-GCN model also includes: a feature extraction module for extracting node features from the association matrix and the initial identification; an attention layer for calculating the node attention weights to enhance the key state expression capability; and a classification layer for outputting the deadlock binary classification results based on the graph-level embedding representation.
5. The deadlock prediction method for intelligent manufacturing system based on Petri-Net-GCN according to claim 1 is characterized in that: The message passing module is as follows: Place to Transition Module (P2T), Place Features The correlation matrix A p_t Update the transition feature X after weighting t ; Transition to the place module (T2P), through the association matrix transposition (A p_t ) T The change features are back-propagated to the library; each message passing layer is followed by a ReLU activation function to enhance the nonlinear expression capability.
6. The deadlock prediction method for intelligent manufacturing system based on Petri-Net-GCN according to claim 5 is characterized in that: The message passing function from the library to the transition module is as follows: X t =X p ·A p_t ·W t +B t The message passing function that transitions to the place module is as follows: X p =X t ·(A p_t ) T ·W p +B p Among them, X p Represents the characteristic information of all places in the Petri net, and X t Represents the characteristic information of all transitions in the Petri net, and A p_t represents the incidence matrix of the Petri net, and A p_t ∈Z |P|×|T| , W t and W p are two trainable weight matrices, and W t ∈R |T| , W p ∈R |P| , B t and B p represents the bias matrix, and 7. The deadlock prediction method for intelligent manufacturing system based on Petri-Net-GCN according to claim 1 is characterized in that: In step (4), the data set includes the initial identification, deadlock labels and incidence matrix of the Petri net in different states.
8. The deadlock prediction method for intelligent manufacturing system based on Petri-Net-GCN according to claim 1, characterized in that: In step (4), the model training uses accuracy, precision, recall, and F1 score as evaluation indicators; when predicting, the initial identification vector and association matrix of the unknown state are input, and the deadlock probability is output.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Deadlock-free scheduling method of flexible manufacturing system based on Petri network and neural network
CN117314078A
Scheduling method of resource consumption type discrete event system based on Petri network
CN117421105A
Intermittent chemical system Petri net model prediction control method
CN117434909A
Resource management method and system of server operating system
CN119621359A
A parallel modular architecture based on distributed architecture and parallel processing method
WO2002015028A1
Cited By
LCD display screen production whole-process collaborative management method and system based on Internet of Things
CN121052795A
Piece counting and work reporting data auditing state automatic circulation processing method and system
CN121723109A
Software development method based on natural language arrangement
CN122086372A