Workshop scheduling experience learning method based on heterogeneous graph neural network
By constructing heterogeneous graph model and HGNNR model, the problems of high training costs and insufficient experience utilization in flexible operation workshop scheduling problems are solved, and efficient and accurate scheduling decisions are achieved, which are suitable for a variety of production modes.
Patent Information
- Application Number
- CN202510479296.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-07-11
AI Technical Summary
The existing technology has problems such as high training costs, insufficient experience utilization and limited complex relationship modeling capabilities in the scheduling problems of flexible operation workshops, making it difficult to efficiently utilize historical scheduling experience and precise modeling of complex relationships.
By constructing a heterogeneous graph model, using historical scheduling data to build an experience library, and designing an HGNNR model based on graph neural networks to extract deep features to achieve intelligent scheduling with low training costs and high decision-making accuracy.
Significantly reduces training costs, improves decision-making accuracy, is suitable for small, medium and large-scale instances, has strong generalization capabilities and robustness, supports non-initial state scheduling, and is suitable for flexible production environments.
Smart Images

Figure CN120297683A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent manufacturing and industrial intelligent scheduling, and specifically relates to an empirical learning method for the flexible job-shop scheduling problem (FJSP). By constructing a heterogeneous graph model and integrating historical scheduling experience, and combining with a graph neural network (GNN), it realizes efficient production resource allocation and task scheduling decision-making, and is applicable to intelligent manufacturing scenarios with multiple varieties and small batches. Background Art
[0002] Under the background of Industry 4.0 and intelligent manufacturing transformation, FJSP needs to simultaneously optimize the operation sequencing and machine allocation to minimize the makespan. Although traditional deep reinforcement learning (DRL) methods can handle dynamic decision-making problems, they have the following defects: 1. High training cost: A large amount of trial-and-error learning is required to explore the solution space, resulting in high computational resource consumption and slow convergence speed; 2. Insufficient experience utilization: It ignores the high-quality decision-making experience contained in historical scheduling schemes and relies on real-time environment interaction; 3. Limited ability to model complex relationships: Traditional graph models are difficult to efficiently capture the multi-dimensional interaction features of the dependencies between operations and the operation-machine compatibility.
[0003] In the prior art, rule-based heuristic algorithms do not require training, but their performance is limited by fixed strategies. Exact algorithms are only applicable to small-scale problems and are difficult to handle large-scale complex scheduling scenarios in actual production. Therefore, there is an urgent need for an intelligent scheduling method that can efficiently utilize historical experience and accurately model complex relationships to balance algorithm performance, solution efficiency, and generalization ability. Summary of the Invention
[0004] The present invention aims to provide a workshop scheduling experience learning method based on a graph neural network. By modeling the structural features of FJSP with a heterogeneous graph, constructing an experience library using historical scheduling data, and designing a dedicated graph neural network to extract deep features, it realizes intelligent scheduling with low training cost and high decision accuracy, and solves the problems of insufficient experience utilization and inefficient complex relationship modeling in the prior art.
[0005] A workshop scheduling experience learning method based on a heterogeneous graph neural network includes the following core steps:
[0006] Step 1: Heterogeneous graph modeling and feature engineering
[0007] Construct a heterogeneous graph containing operation nodes, machine nodes, and dynamic relationships :
[0008] 1. Node Definition: Set of process nodes : Includes operation processes and virtual nodes (starting node Start, ending node End). Each process node feature vector integrates static features (such as processing time , number of preceding and succeeding processes) and dynamic features (such as scheduling ready state, estimated start time, operation completion time); Set of machine nodes : Each machine node feature vector includes available time, number of processable operations, and utilization rate.
[0009] 2. Edge Definition: Set of directed edges : Represents the sequential dependence between processes (such as ); Set of undirected edges : Represents process - machine compatibility (edge attribute is processing time ).
[0010] Step 2: Construction of Historical Scheduling Experience Library Data Extraction: Extract the state at each time step from the historical scheduling plan (heterogeneous graph features) and actions (process - machine pairs ), where is the ready process (preceding process completed or the first process), is the available machine; Data Annotation: Each sample is annotated with a workpiece selection label (operation index) and a machine selection label (machine index) to form a training set .
[0011] Step 3: Feature Extraction of Heterogeneous Graph Neural Network Based on Relationships (HGNNR)
[0012] Propose a four - stage network architecture to achieve hierarchical extraction and fusion of multi - relationship features:
[0013] 1. Relationship - Oriented Sub - graph Decomposition: Decompose the heterogeneous graph into process - process ( ) sub - graphs (capturing sequential dependence) and process - machine ( ) sub - graphs (capturing resource allocation relationships) to simplify the complex graph structure.
[0014] 2. Node Feature Preprocessing: After normalizing the original features, they are mapped to a high-dimensional space through a multi-layer perceptron (MLP) to enhance non-linear feature representation: .
[0015] 3. Specific Relationship Graph Convolution: Apply graph convolution (GCN) to each subgraph to aggregate neighbor node features: , where is the adjacency matrix with self-loops, is the degree matrix, is the learnable weight.
[0016] 4. Cross-Relationship Multi-Head Attention Fusion: Integrate subgraph features through the multi-head attention mechanism to generate comprehensive node representations: , where is the linear transformation of each subgraph feature, is the number of attention heads, realizing complementary learning of multi-dimensional relationships.
[0017] Step 4: Scheduling Decision and Optimization
[0018] Output Layer Processing: Perform mean pooling on the features of process nodes and machine nodes respectively to generate workpiece embeddings and machine embeddings , and calculate the selection probability through Softmax: .
[0019] Masking Mechanism: Dynamically generate process selection masks (filtering completed jobs) and machine selection masks (only allowing available machines for processes), constraining the decision space: .
[0020] Loss Function: Adopt weighted cross-entropy loss to jointly optimize workpiece and machine selection: , where , is the one-hot true label, is the model prediction probability. Beneficial Effects
[0021] Efficient Reuse of Historical Experience: The present invention directly learns from historical scheduling schemes without the trial-and-error exploration of DRL, significantly reducing the model training cost.
[0022] Accurate Modeling of Complex Relationships: The heterogeneous graph completely preserves the static constraints (such as process sequence) and dynamic states (such as machine available time) of FJSP. Through subgraph decomposition and multi-head attention, HGNNR effectively captures the non-linear interactions of process-machine compatibility and dependencies between processes, improving the decision-making accuracy.
[0023] Strong generalization and robustness: Through implementation, it is found that the present invention is applicable to small, medium, and large-scale instances, and is superior to most DRL methods and genetic algorithms.
[0024] Advantages in industrial implementation: It supports scheduling in non-initial states (such as order insertion and equipment failure), dynamically filters invalid decisions through a masking mechanism, and adapts to flexible production environments; the model has strong interpretability, and the visualization of historical experience is achieved through graph structure features, facilitating the verification of manual strategies. Brief Description of the Drawings
[0025] Figure 1 It is a schematic diagram of the heterogeneous graph modeling of FJSP, showing operation nodes (O11, O21, etc.), machine nodes (M1, M2, etc.), and compatibility edges (dashed lines represent optional machines, and solid lines represent actual allocations).
[0026] Figure 2 It is a flowchart of the scheduling experience learning framework, including historical data preprocessing, HGNNR feature extraction, and scheduling decisions.
[0027] Figure 3 It is a diagram of the HGNNR network architecture, showing in detail the information flow process of subgraph decomposition, feature preprocessing, feature extraction in graph convolutional layers, and feature fusion. Detailed Implementation Manner
[0028] In a specific example of applying the present invention, the following combines the real historical scheduling data of an aerospace parts manufacturing enterprise to detail the specific implementation steps of the method of the present invention:
[0029] I. Preprocessing of Historical Scheduling Data
[0030] 1. Data source: Collect the scheduling data of the enterprise's production management system in the past 3 years, covering 10 / 15 / 30 / 60 jobs (denoted as data-10 / data-15 / data-30 / data-60), 9 fixed machines, each job contains 5 - 7 operations, and the number of available machines for each operation is 1 - 3. The historical scheduling plan is generated by manual experience combined with a traditional scheduling system, including key information such as the actual allocated machine, start time, and completion time for each operation.
[0031] 2. Data processing steps:
[0032] (1) Construction of heterogeneous graph:
[0033] For each operation Extract 8-dimensional features: scheduling ready state ( , 1 if the previous operation is completed ; number of available machines (i.e., , taking values from 1 to 3); actual processing time (Extracted from historical data); Historical start time (Estimated by the completion time of the previous process and the available time of the machine if not scheduled); Number of previous processes, number of subsequent processes (determined according to the operation process route); Proportion of the last unscheduled process (number of unscheduled processes / total number of operation processes); Operation completion time (actual completion time or estimated completion time, filled based on historical data).
[0034] For each machine Extract 3D features: Available time (the time when the machine completed the previous process in the historical schedule); Number of processes that can be processed (the number of current unscheduled processes compatible with the machine); Machine utilization rate (the proportion of busy time within time step t, calculated based on historical load).
[0035] Edge construction: Sequential dependency edges between processes (directed edges): According to the operation process route, such as ; Process - machine compatibility edges (undirected edges): If , then add an edge between and , and the edge attribute is .
[0036] (2) Training dataset generation: Extract the state at time step (heterogeneous graph feature matrix) and action (the actually assigned process - machine pair . The annotation rules are as follows:
[0037] Workpiece selection label: Job index (For example, data - 10 contains 10 jobs, and the labels are 1 - 10).
[0038] Machine selection label: Machine index (9 machines, and the labels are 1 - 9).
[0039] Finally, 2115 training samples are formed and divided into a training set (1692 samples) and a validation set (423 samples) according to .
[0040] II. Model training based on HGNNR
[0041] 1. Hardware environment: 64 - bit Windows 11 server, CPU: Intel i9 - 12900K (24 cores), GPU: NVIDIA RTX 3090 Ti (24GB), Memory: 128GB.
[0042] 2. The hyperparameters are configured as shown in Table 1:
[0043] Table 1 Model Hyperparameter Configuration Parameter Value Description MLP Hidden Layer Dimension 64 Nonlinear Transformation Dimension for Feature Enhancement Number of Multi-Head Attention Heads 8 Parallel Processing of 8 Groups of Relational Features Graph Convolution Output Dimension 32 Vector Dimension after Subgraph Feature Aggregation Learning Rate 0.0001 Learning Rate of Adam Optimizer Batch Size 64 Number of Samples Input for Each Training Number of Training Iterations 100 Number of Times to Traverse the Training Set
[0044] 3. Model Training:
[0045] (1) Feature Preprocessing: Normalize the process node features and machine node features using Z-score normalization to eliminate the influence of dimensionality. Map the node features to a high-dimensional space through a 2-layer MLP (with input layer dimensions of 8 and 3 respectively, and output layer dimensions of 64 for both): .
[0046] (2) Subgraph Decomposition and Graph Convolution: Decompose the heterogeneous graph into O-O subgraphs (containing only process nodes and sequential dependency edges) and O-M subgraphs (containing processes, machine nodes, and compatibility edges). Apply GCN to each subgraph to calculate the node feature update: where (adding self-loops to retain the node's own features), is the learnable weight matrix.
[0047] (3) Cross-Relation Feature Fusion: Fuse the features of the O-O subgraph and the O-M subgraph through an 8-head attention mechanism to generate a comprehensive node representation .
[0048] (4) Loss Function Optimization: Input the training samples , calculate the workpiece selection loss and the machine selection loss , the total loss , and use the Adam optimizer to update the network parameters until the validation set loss converges.
[0049] III. Real-Time Scheduling Decision
[0050] 1. Input: The heterogeneous graph \(H_t=(O, M, C, E_t)\) of the current scheduling state, where \(E_t\) is the currently available process-machine compatibility edges (available machines for unscheduled processes).
[0051] 2. Model Decision:
[0052] (1) Feature Extraction and Pooling: Obtain the deep features of the process nodes and the deep features of the machine nodes through HGNNR. Perform mean pooling on the process features of the same job to generate the workpiece embedding ; directly perform mean pooling on the machine features to generate the machine embedding .
[0053] (2)Dynamic mask generation: Process selection mask : If all processes of a job have been scheduled, then , otherwise it is 1 (for example, if there are 5 unfinished jobs remaining at a certain moment in data-15, then is ). Machine selection mask : Only retain the available machines for the current process (such as the available machines are M2 and M3, then is ).
[0054] (3) Decision generation: Calculate the process selection probability and machine selection probability through Softmax, and multiply them element-wise with the mask to filter out invalid options: . Select the job with the highest probability in , and the machine corresponding to its ready process with the highest probability in to form a decision pair .
[0055] (4) State update: Update the available time of the machine to , mark the process as scheduled, remove its unselected compatibility edges, and generate the heterogeneous graph for the next moment until all processes are scheduled.
[0056] IV. Implementation effect.
[0057] In the actual application of the enterprise, four new scheduling tasks of different scales (with the same distribution as historical data) are selected for testing, and the results are compared with the traditional genetic algorithm in Table 2.
[0058] Table 2 Comparison of makespan Method data-10 data-15 data-30 data-60 Genetic Algorithm 10410 seconds 25260 seconds 25260 seconds 46080 seconds Method of the Present Invention 11250 seconds 23910 seconds 25350 seconds 45510 seconds
[0059] To quantify the training efficiency advantage of the method of the present invention, the training time of the traditional deep reinforcement learning (DRL) method (represented by PPO and A3C) is compared in the same hardware environment, and the results are shown in Table 3.
[0060] Table 3 Comparison of training costs Data Scale Training Time of the Method of the Present Invention PPO Training Time A3C Training Time Training Time Saving Rate data-10 0.12 hours 0.9 hours 1.1 hours 86.7%-89.1% data-15 0.18 hours 2.8 hours 3.2 hours 93.6%-94.4% data-30 0.29 hours 7.8 hours 9.1 hours 96.3%-96.8% data-60 0.52 hours 19.5 hours 22.8 hours 97.3%-97.7%
[0061] The present invention can be extended to all scenarios in discrete manufacturing (such as automotive parts processing, electronic component manufacturing, machining workshops), dynamic scheduling in process manufacturing (such as chemical production, food processing), logistics and warehousing operation scheduling (such as intelligent warehousing, port container scheduling), cloud computing and edge computing resource allocation, as well as supply chain order allocation management, etc. It is applicable to various production modes such as multi-variety small-batch production, large-scale assembly line and distributed manufacturing, and has broad industrial application prospects.
Claims
1. An experience learning method for workshop scheduling based on heterogeneous graph neural network, characterized in that It includes the following steps: Step 1: Construct a heterogeneous graph including process nodes, machine nodes, sequential dependency edges, and compatibility edges, and define node attributes that integrate static and dynamic features; Step 2: Extract state-action pairs from historical scheduling plans and construct a training dataset including process ready states, machine available times, and actual allocation decisions; Step 3: Design a relationship-based heterogeneous graph neural network. Through subgraph decomposition, multi-layer perceptron feature enhancement, graph convolutional neighbor aggregation, and multi-head attention mechanism, generate deep feature representations of processes and machines; Step 4: Use mean pooling to compress node features, combine a dynamic masking mechanism to filter invalid decisions, generate process-machine selection probabilities through Softmax, and optimize model parameters using weighted cross-entropy loss.
2. The method according to claim 1, characterized in that The process node features include scheduling ready state, number of available machines, processing time, start time, number of pre- and post-processes, proportion of unscheduled processes, and job completion time. The machine node features include available time, number of processable processes, and utilization rate. The process-machine edge features correspond to the processing time of the process on the machine.
3. The method according to claim 1, characterized in that, The subgraph decomposition step divides the heterogeneous graph into process-process subgraphs and process-machine subgraphs to capture sequential dependency relationships and resource allocation relationships respectively. The graph convolutional process uses a normalized adjacency matrix with self-loops to achieve node feature aggregation.
4. The method according to claim 1, wherein The multi-head attention mechanism realizes parallel fusion of features of different relationship subgraphs through multiple groups of independent query-key-value (Q-K-V) transformations and outputs a comprehensive node embedding representation.
5. The method according to claim 1, characterized in that, The masking mechanism includes a process selection mask and a machine selection mask, which filter processes of completed jobs and machines unavailable for the current process respectively, and constrain the decision space to improve the solution efficiency.
Citation Information
Cited By
GNN and PPO-based intelligent scheduling method for whole vehicle stamping production
CN121638814A