A large-scale fuzzy flexible job shop scheduling method and related equipment

By using Markov decision models and a simplified global attention mechanism based on graph Transformers, the problems of information compression and long-distance dependencies in large-scale fuzzy flexible job shop scheduling are solved, achieving efficient scheduling optimization.

CN118760100BActive Publication Date: 2026-03-24XI AN JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, graph neural networks suffer from heterogeneity, excessive information compression, long-distance dependencies, and graph incompleteness in large-scale fuzzy flexible job shop scheduling problems, which makes it impossible to effectively solve high-quality scheduling results.

Method used

By employing a Markov decision model and a simplified global attention mechanism based on graph Transformer, a fuzzy disjunctive graph is constructed, and a shallow multilayer perceptron is used to map the initial feature vector. Combined with a decision network, the action decisions of the process-machine pair are optimized.

Benefits of technology

It effectively solves the scheduling problem of large-scale fuzzy flexible job workshops, captures long-term dependencies, reduces computational complexity, and improves the quality and efficiency of scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760100B_ABST
    Figure CN118760100B_ABST
Patent Text Reader

Abstract

The application discloses a large-scale fuzzy flexible job shop scheduling method and related equipment, takes an initial feature vector of a process node as an input of a graph neural network of a graph Transformer, and obtains a high-dimensional feature vector of the process node; maps the initial feature vectors of the process node, a machine node and a disjunctive arc to node embeddings of a fuzzy disjunctive graph in a latent space by using a shallow multilayer perceptron, and maps the node embeddings of the fuzzy disjunctive graph in the latent space to a final feature output vector by using a simplified global attention mechanism of the graph Transformer; performs weighted summation on the high-dimensional feature vector of the process node and the final feature output vector, inputs the feature after the weighted summation into a decision network, and outputs a process-machine pair action; calculates a decision loss of the decision network; iterates repeatedly until the process of all workpieces is determined to be processed by a machine and a processing sequence, and updates parameters of the decision network according to the decision loss. The purpose is to solve the problem that a large-scale fuzzy job shop scheduling problem cannot be solved and a high-quality result cannot be obtained due to the heterogeneity of a GNN message passing rule, information overcompression, a long-distance dependency relationship and an incomplete graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of production workshop scheduling technology, specifically to a large-scale fuzzy flexible work workshop scheduling method and related equipment. Background Technology

[0002] Production scheduling is a crucial means of optimizing resource allocation and reducing production costs in multi-variety, variable-batch production scenarios. In the production of complex products such as aerospace equipment and rail transportation components, the diversity of required parts, the number of processing machines, and the complexity of operations frequently lead to large-scale flexible job shop scheduling (FJSP) problems. Furthermore, real-world scheduling problems are inherently complex, often involving unforeseen events in the production process. These challenges make it difficult to represent factors such as operator proficiency, machine performance degradation, and resource allocation with precise numerical values. Therefore, fuzzy processing time has become a key characteristic of modern manufacturing, providing an important new avenue for research. Fuzzy FJSP more accurately captures the inherent scheduling challenges in flexible production systems. From a computational complexity perspective, fuzzy FJSP is a typical NP-hard problem; therefore, the optimization of large-scale fuzzy FJSP algorithms is of significant theoretical and practical importance.

[0003] The most popular approach currently is to use disjunctive graphs as representations for JSPs and FJSPs. This graph-based model represents operations as nodes, using directed edges between nodes to indicate the processing order, thus revealing the characteristics and structural information of each operation. Recent advances have extended the solution to handle additional flexible constraints in FJSPs and improved the decision model to enhance the effectiveness of job processing ordering and machine allocation. Graph Neural Networks (GNNs) are then used for feature extraction from the disjunctive graph. The above work shows that while GNNs effectively learn the priority constraints between operations and machines in the disjunctive graph, increasing evidence challenges the core assumption of GNNs: that propagating information along the observed graph structure necessarily yields better node-level representations at each individual instance node. This conflict with the premise leads to common defects in GNN message passing rules, such as heterogeneity, information over-compression, long-range dependencies, and graph incompleteness. Therefore, extracting long-range dependencies in large-scale disjunctive graphs remains challenging, making it difficult to obtain high-quality solutions. Summary of the Invention

[0004] To address the problems existing in the prior art, this invention provides a large-scale fuzzy flexible job shop scheduling method and related equipment. Its purpose is to solve the problems of being unable to solve large-scale fuzzy job shop scheduling problems and obtaining high-quality results due to the heterogeneity of GNN message passing rules, excessive information compression, long-distance dependencies, and incomplete graphs.

[0005] To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution:

[0006] A large-scale fuzzy flexible job shop scheduling method includes:

[0007] S1. Construct a Markov decision model for the large-scale fuzzy flexible shop floor scheduling problem; the Markov decision model includes states, actions, rewards, state transitions and strategies related to the large-scale fuzzy flexible shop floor scheduling problem, and the strategies include sampling strategies and greedy strategies;

[0008] S2. The large-scale fuzzy flexible shop floor scheduling problem is represented as a fuzzy disjunctive graph of the constraint relationships between workpieces, processes, and processing machines; the fuzzy disjunctive graph contains several process nodes, machine nodes, and disjunctive arcs, where the disjunctive arcs are the connections between processes and machines.

[0009] S3. Define the state features of the process node, machine node, and disjunction arc, and process them into the form of initial feature vectors respectively;

[0010] S4. Use the initial feature vector of the process node as the input of the graph neural network of the graph Transformer to obtain the high-dimensional feature vector of the process node.

[0011] S5. The initial feature vectors of process nodes, machine nodes and disjunction arcs are mapped to the node embeddings of the fuzzy disjunction graph in the latent space using a shallow multilayer perceptron, and the node embeddings of the fuzzy disjunction graph in the latent space are mapped to the final feature output vector using a simplified global attention mechanism of graph Transformer.

[0012] S6. Weighted summation of the high-dimensional feature vectors of the process nodes and the final feature output vector, and input the weighted summation features into the decision network to output the process-machine pair action;

[0013] S7. Calculate the decision loss of the decision network;

[0014] S8. Repeat S3 to S7 until the processing machines and processing sequences for all workpieces are determined, and update the parameters of the decision network based on the decision loss.

[0015] Furthermore, the simplified global attention mechanism of the graph Transformer is as follows:

[0016] Q = f Q (Z (0) ), K = f K (Z (0) ), V = f V (Z (0) )

[0017]

[0018] In the formula, Q is the query vector, K is the key vector, V is the value vector, and f Q ,f K , and f V These represent simple neural layers, typically linear feedforward layers. Represents the Frobenius norm. The query vector and key vector are normalized. 1 represents an N-dimensional column vector of all 1s. The diagonal operation transforms an N-dimensional column vector into an N×N diagonal matrix. D is an N×N diagonal matrix. β is a hyperparameter of the residual connection. Z integrates global pairwise attention propagation and self-loop propagation. Attention propagation helps the model capture the influence of neighboring nodes, while self-loop propagation preserves the information of the central node.

[0019] Furthermore, the weighted summation of the high-dimensional feature vectors of the process nodes and the final feature output vector is as follows:

[0020] Z O = (1-α)Z+αGAT(X,A)

[0021] In the formula, α is the weight hyperparameter, GAT is the graph attention network, A represents the adjacency matrix, X represents the original process node features, and Z represents the final value. o It was used for downstream decision-making tasks.

[0022] Furthermore, the step of using the initial feature vector of the process node as input to the graph neural network of the graph Transformer to obtain the high-dimensional feature vector of the process node specifically involves:

[0023] The initial feature vector of the process node is input into the graph neural network of the graph Transformer to calculate the attention score of the process node.

[0024] The attention score of the process node after masking is normalized using the Softmax function to obtain the normalized attention score of the process node.

[0025] Multi-head attention is used to perform a weighted linear combination of the attention scores of the normalized process nodes. The weighted linear combination result is then processed by a nonlinear activation function to obtain the high-dimensional feature vector of the process node.

[0026] Furthermore, the initial feature vector of the process node is input into the graph neural network of the graph Transformer to calculate the attention score of the process node. The specific calculation formula is as follows:

[0027]

[0028] In the formula, e i,j,p The attention score for each process node. Map the concatenated vector to real numbers and activate it using LeakyReLU; To represent the original process node characteristics of the diagram, d o The number of node features; The learnable matrix has dimensions representing the input and output dimensions, respectively; || represents concatenation, indicating the gluing of tensors; i is the number of workpieces, p and j are the operations, and |pj|≤1.

[0029] Furthermore, the attention score of the process node after masking is normalized using the Softmax function to obtain the normalized attention score of the process node. The specific formula is as follows:

[0030] α ijp =Softmax(mask(e i,j,p ))

[0031] In the formula, α ijp The attention score for the normalized process node.

[0032] Furthermore, the weighted linear combination result is processed by a nonlinear activation function to obtain the high-dimensional feature vector of the process node, as follows:

[0033]

[0034] In the formula, This represents the high-dimensional feature vector of the process node at time t. Let σ be the number of heads receiving attention, and W be the activation function. m These are the learnable parameters after the m-th update.

[0035] A large-scale fuzzy flexible job shop scheduling device includes:

[0036] A construction module is used to construct a Markov decision model for the large-scale fuzzy flexible shop floor scheduling problem; the Markov decision model includes states, actions, rewards, state transitions and strategies related to the large-scale fuzzy flexible shop floor scheduling problem, and the strategies include sampling strategies and greedy strategies;

[0037] The representation module is used to represent the large-scale fuzzy flexible shop floor scheduling problem as a fuzzy disjunctive graph of the constraint relationships between workpieces, processes, and processing machines; the fuzzy disjunctive graph contains several process nodes, machine nodes, and disjunctive arcs, where the disjunctive arcs are the connections between processes and machines;

[0038] The initial feature vector processing module is used to define the state features of the process node, machine node, and disjunction arc, and process them into the form of initial feature vectors respectively;

[0039] The high-dimensional feature vector output module is used to take the initial feature vector of the process node as the input of the graph neural network of the graph Transformer to obtain the high-dimensional feature vector of the process node.

[0040] The mapping module is used to map the initial feature vectors of process nodes, machine nodes and disjunction arcs to the node embeddings of the fuzzy disjunction graph in the latent space using a shallow multilayer perceptron, and to use a simplified global attention mechanism of graph Transformer to map the node embeddings of the fuzzy disjunction graph in the latent space into the final feature output vector.

[0041] The decision module is used to perform a weighted summation of the high-dimensional feature vectors of the process nodes and the final feature output vector, and input the weighted summation features into the decision network to output the process-machine pair action.

[0042] The calculation module is used to calculate the decision loss of the decision network;

[0043] The update module is used to update the parameters of the decision network until the processing machines and processing sequences for all workpieces are determined, based on the decision loss.

[0044] An apparatus includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the large-scale fuzzy flexible job shop scheduling method.

[0045] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the large-scale fuzzy flexible job shop scheduling method.

[0046] Compared with the prior art, the present invention has at least the following beneficial effects:

[0047] This invention provides a large-scale fuzzy flexible job shop scheduling method. It maps the initial feature vectors of process nodes, machine nodes, and disjunctive arcs to node embeddings in the fuzzy disjunctive graph of the latent space using a shallow multilayer perceptron. This preprocessing is more suitable for subsequent feature extraction. Subsequently, a simplified global attention mechanism of the graph Transformer is employed to map the node embeddings of the fuzzy disjunctive graph in the latent space into the final feature output vector. Through the global attention mechanism of the Transformer, long-term dependencies in large-scale fuzzy disjunctive graphs can be captured, compensating for the shortcomings of local message passing in graph neural networks. Simultaneously, this invention reduces the computationally inefficient Transformer complexity from quadratic to linear, enabling the model to handle fuzzy disjunctive graph models containing thousands or even tens of thousands of nodes. Finally, the high-dimensional feature vectors of the process nodes are weighted and summed with the final feature output vector, and the weighted summed features are input into a decision network to output the action of the process-machine pair. Here, this invention uses a weighted method to determine the proportion of the graph neural network and the global attention mechanism, allowing for more flexible adjustments for disjunctive graphs of different sizes. In summary, this invention effectively solves the problems of being unable to solve large-scale fuzzy job shop scheduling problems and obtaining high-quality results due to the heterogeneity of GNN message passing rules, excessive information compression, long-distance dependencies, and incomplete graphs.

[0048] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the specific embodiments of the present invention, the drawings used in the description of the specific embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0050] Figure 1 This is a flowchart of a large-scale fuzzy flexible job shop scheduling method according to an embodiment of the present invention;

[0051] Figure 2 This is a fuzzy disjunctive graph model diagram of a large-scale FJSP in an embodiment of the present invention, wherein (a) represents the disjunctive graph of a 3x3 large-scale fuzzy FJSP, and (b) represents a fully connected graph;

[0052] Figure 3 This document describes the SGFormer model and its data flow as proposed in the embodiments of the present invention.

[0053] Figure 4This is a schematic diagram of the training curve on a 15×10 instance according to an embodiment of the present invention. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0055] First, it's important to clarify that large-scale fuzzy flexible job shop scheduling refers to optimizing the arrangement of production tasks in a complex and dynamic production environment by combining fuzzy logic and flexible strategies. These production tasks involve a massive number of tasks and resources, such as thousands of process nodes or machines. Such problems typically require processing massive amounts of data and have high computational complexity.

[0056] like Figure 1 As shown, this application provides a method for scheduling large-scale fuzzy flexible job shops, specifically including the following S:

[0057] S1. Construct a Markov decision model for the large-scale fuzzy flexible shop floor scheduling problem; the Markov decision model includes states, actions, rewards, state transitions and strategies related to the large-scale flexible shop floor scheduling problem, and the strategies include sampling strategies and greedy strategies.

[0058] In one embodiment, the Markov decision model is defined by a quintuple, namely (S, A, P, r, γ).

[0059] For example, in S1, the Markov decision model construction process for the large-scale fuzzy flexible shop scheduling problem is as follows:

[0060] S101, Markov Decision Process (MDP).

[0061] In MDP, this embodiment considers an agent making decisions in a series of states, each with a set of possible actions. The agent can adjust its decisions based on environmental feedback to maximize a predefined reward function. This embodiment views the agent's scheduling decisions as actions that alter the disjunction arc, and designs the following corresponding states, actions, state transitions, rewards, and policies based on the characteristics of fuzzy FJSP.

[0062] S102, State: Based on the characteristics of fuzzy FJSP, according to the current state s of the workpiece. tThe processes are divided into three categories: completed processes, ongoing processes, and pending processes. Since the decision on time t depends only on the current system time T... s The state of state s is determined by the production state of the machine at step t. Therefore, the state of completed operations is irrelevant to subsequent scheduling. Thus, completed scheduling information is not recorded in future states, allowing the state space to shrink (eventually become empty) as scheduling progresses, which is beneficial for computing large-scale instances. Let O(t) and M(t) represent the operations and machine set at step t, respectively. t Includes a set of feature vectors, including each process O ij ∈O(t) Each machine M k ∈M(t) Process-machine pairing These states contain the entity’s dynamic and static attributes, enabling the agent to effectively capture relevant characteristics.

[0063] S103, Actions: An integrated approach is used to solve fuzzy FJSP, combining process selection and machine allocation decisions. Specifically, the action at time step t is represented as a feasible process-machine pair (O... ij M k ), defined as O ij Satisfy condition (O) ij Its direct preceding operation has been completed and it is in an idle state. ij Immediately in M k Startup, where S ij =T(t). Action set A t It is step-specific, summarizing all feasible pairs. Given that each job prepares at most one operation |M at a time. ij |≤m, therefore|A t |≤n×m.

[0064] S104. State Transition: At time step t, determine the action a to be scheduled. t Next, the fuzzy start time for performing this action on the required machine is first determined. Then, through fuzzy computation, the disjunction arc direction on the machine is updated and the completion time of the action is calculated, thereby forming a new disjunction graph as the state s for the next time step. t+1 Here, we use the method of adding arcs to reduce the initial computational complexity.

[0065] S105, Reward: The reward is defined as state S t and S t+1 The difference in makespan between the middle-schedule tasks. Mathematically, this can be represented as:

[0066] R(a t ,s t ,st+1 )=H max (s t )-H max (s t+1 )

[0067] Among them, H max (s i ) represents state s i The completion time of the middle part of the schedule. When the discount factor γ is set to 1, the cumulative reward in the solution process, denoted as G, is calculated as the sum of rewards in all decision steps. The formula is as follows:

[0068]

[0069] S106, Strategy: Adopt a randomized strategy π(a) t |s t The distribution is generated by a DRL algorithm with trainable parameters. The optimization objective is to maximize the cumulative reward. Given a state s t The distribution returns the selection of each action a. t ∈|A t The probability of |.

[0070] S2. The large-scale fuzzy flexible shop floor scheduling problem is represented as a disjunctive graph (FJSP fuzzy disjunctive graph) of the constraint relationships between workpieces, processes, and processing machines; the fuzzy disjunctive graph contains several process nodes, machine nodes, and disjunctive arcs, where the disjunctive arcs are the connections between processes and machines.

[0071] It should be understood that the solution process for the fuzzy flexible job shop scheduling problem is the solution process for the fuzzy disjunctive graph.

[0072] In one embodiment, an arc-adding strategy is used to construct the FJSP fuzzy disjunctive graph model. Specifically, the node information of the disjunctive graph consists of n specially designed features set in this embodiment. In this embodiment, the processing time of the process is selected. When the processing sequence and processing machine of the process corresponding to the node have not yet been determined, a machine is randomly selected from the machines that can process it. The processing end time of the process on the selected machine is used as its estimated processing time. After the processing sequence and processing machine are determined for the process, the actual processing time is used as its node information. This embodiment adopts an arc-adding strategy.

[0073] S3. Define the state features of the process node, machine node, and disjunction arc, and process them into the form of initial feature vectors respectively.

[0074] S4. Use the initial feature vectors of the process nodes as input to the graph neural network of the graph Transformer to obtain the high-dimensional feature vectors of the process nodes. That is, in order to extract the global state at each time step t... By extracting graph features and combining them with graph neural network methods, the complex scheduling problem is transformed into a learning problem of graph structure data.

[0075] Specifically, in S4, the initial feature vectors of the process nodes are used as input to the graph neural network of the graph Transformer to obtain the high-dimensional feature vectors of the process nodes, as follows:

[0076] S401. Input the initial feature vector of the process node into the graph attention network, and calculate the attention score of the process node. The specific calculation formula is as follows:

[0077]

[0078] In the formula, e i,j,p The attention score for each process node. Map the concatenated vector to real numbers and activate it using LeakyReLU; To represent the original process node characteristics of the diagram, d o The number of node features; The learnable matrix has dimensions representing the input and output dimensions, respectively; || represents concatenation, indicating the gluing of tensors; i is the number of workpieces, p and j are the operations, and |pj|≤1.

[0079] S402. Use the Softmax function to normalize the attention scores of the process nodes after masking, and obtain the normalized attention scores of the process nodes. The specific formula is as follows:

[0080] α ijp =Softmax(mask(e i,j,p ))

[0081] In the formula, α ijp The attention score for the normalized process node.

[0082] S403. Multi-head attention is used to perform a weighted linear combination of the attention scores of the normalized process nodes. Then, the weighted linear combination result is processed by a non-linear activation function to obtain the high-dimensional feature vector of the process node, as follows:

[0083]

[0084] In the formula, This represents the high-dimensional feature vector of the process node at time t. Let σ be the number of heads receiving attention, and W be the activation function. m These are the learnable parameters after the m-th update.

[0085] In other words, S4 can be described in detail in the following embodiment:

[0086] a. Use graph attention network to extract fuzzy parsed graph information;

[0087] By combining with graph neural network methods, this embodiment can transform the complex scheduling problem into a learning problem of graph-structured data, thereby achieving the goal of optimizing scheduling. In this process, the representation of graph-structured data can be learned, extracting feature embeddings for each node in an iterative and non-linear manner.

[0088] At each discrete time step t, the global state Represented as nodes, denoted as G(t)=(O,C∪D) u (t), D(t)). Specifically, for each input feature process O ij ∈O u This embodiment uses a graph attention network to calculate O. ij The attention coefficient. This enables this embodiment to simulate O. ij Its preceding process O ij-1 and subsequent processes O ij+1 The relationship (if it exists) is as follows:

[0089]

[0090] In the formula: Map the concatenated vector to real numbers and activate it using LeakyReLU;

[0091] To represent the characteristics of the original node (process) in the graph, d o =n;

[0092] This is a learnable matrix (weight matrix), where the dimensions represent the dimensions of the input and output, respectively.

[0093] || stands for concatenate, which means tensor gluing.

[0094] And |pj|≤1.

[0095] b. In this embodiment, the Softmax function is used to apply the masked e. ijk The value is normalized for selection, resulting in a normalized attention coefficient, denoted as α. ijp .

[0096] It is worth noting that the calculations here are similar to those in GAT, but this embodiment limits their scope. Since some processes may have no preceding (or subsequent) steps or be deleted in some steps, this embodiment applies dynamic masks to the attention coefficients of these preceding and subsequent steps.

[0097] α ijp =Softmax(mask(e i,j,p ))

[0098] c. Finally, by analyzing the transformed input features and By performing a weighted linear combination and then passing it through a nonlinear activation function δ, this embodiment obtains the output feature vector:

[0099]

[0100] d. In order to capture the diverse relationships between processes, this embodiment uses multiple attention heads in the encoder.

[0101] This method has proven effective in guiding agents to make accurate decisions and understand the complexity of scheduling. Let... This indicates the number of attention heads in the attention layer, each using different parameters and a unique attention mechanism. Initially, the outputs of each attention head are aggregated through an aggregation process. Then, an activation function is applied to obtain the output of the layer, as follows:

[0102]

[0103] e. After m update iterations, this embodiment obtains the global vector representation of the entire graph, given by the following formula:

[0104]

[0105] S5. The initial feature vectors of the process nodes, machine nodes, and disjunctive arcs are mapped to the node embeddings of the fuzzy disjunctive graph in the latent space using a shallow multilayer perceptron (MLP). Then, a simplified global attention mechanism of the graph Transformer is used to map the node embeddings of the fuzzy disjunctive graph in the latent space into the final feature output vector. The details are as follows:

[0106] S501, First, a neural layer is used to process the input features. The node embeddings mapped to the fuzzy disjunctive graph in the latent space are denoted as Z. (0) = f1(X), where f1 can be a shallow multilayer perceptron (MLP), and these nodes are embedded This will be used for subsequent attention calculations and propagation.

[0107] S502. A simplified global attention mechanism is used to model global node interactions. While typical Transformers rely on multiple layers of attention to meet their representational needs, a single layer of global attention is sufficient. This effectiveness is attributed to the dense connections in the attention graph, which allows information from each node to be flexibly transferred to other nodes in the same batch. Therefore, the model of this invention, while simple, effectively captures the hidden dependencies between node pairs and reduces computational requirements. This invention achieves this using a linear attention mechanism, as detailed below:

[0108] Q = f Q (Z (0) ), K = f K (Z (0) ), V = f V (Z (0) )

[0109]

[0110] In the formula, f Q ,f K , and f V Let represent simple neural layers, typically linear feedforward layers. ||.|| represents the Frobenius norm, and 1 represents an N-dimensional column vector of all 1s. The diagonal operation transforms an N-dimensional column vector into an N×N diagonal matrix. β serves as a hyperparameter for the residual connections. Z integrates global pairwise attention propagation and self-loop propagation; the former helps the model capture the influence of neighboring nodes, while the latter preserves important information from the central node.

[0111] S6. Take the high-dimensional feature vectors of the process nodes obtained in S4 and the final feature output vector in S5, and then sum them by weight. Feed the weighted summed features into the decision network to output the process-machine pair action.

[0112] The details are as follows:

[0113] S601. Further integrating prior information from the disjunctive graph, a simple yet effective method is employed: combining it with the propagation embedding of the output layer's GNN.

[0114] Z O = (1-α)Z+αGAT(X,A)

[0115] In the formula, α is the weight hyperparameter, and the GNN module uses GAT, which is known for its scalability on large-scale graphs; A represents the adjacency matrix. The final representation is Z. o It was used for downstream decision-making tasks.

[0116] S602, as the final component of the proposed neural architecture, introduces a policy network, where each action a t Both are defined as a feasible OM pair. This invention utilizes a decoder layer to process the information Z collected from the graph Transformer. o The decoder layer is responsible for generating probability distributions in the action space, enabling action sampling based on these probabilities to enhance exploration during reinforcement learning training. The decoder is constructed using a multilayer perceptron, as follows:

[0117]

[0118] S603. After scoring each action, a masking mechanism is implemented to exclude infeasible operation-machine pairs. Specifically, the probability of an unusable pair is set to negative infinity; subsequently, the Softmax function is applied to generate a probability distribution, defined as follows:

[0119] P(a t =Softmax(mask(scr(a)) t )))

[0120] S7. Calculate the decision loss using Soft Actor-Critic (SAC);

[0121] The details are as follows:

[0122] S701. Predict the state value at the next time step using the policy network, and calculate the state value at the next time step by combining the minimum Q-value output by the target value network. Simultaneously, considering the logarithmic probability and entropy of the action, calculate the target Q-value using a temporal difference formula to account for the effects of reward, discount factor, the state value at the next time step, and whether the environment terminates. Finally, the generated... This is used to update the value network. This process helps reinforcement learning models learn appropriate action value estimates from time-series data.

[0123] S702, Target action value calculated above With two value networks The mean squared error loss between the predicted action values ​​was optimized using gradient descent to update the parameters of the two value networks.

[0124] This process aims to train the value network through reinforcement learning to more accurately estimate the long-term cumulative reward of state-action pairs, which helps improve the agent's ability to make decisions in the environment.

[0125]

[0126] In this description, the symbol (s,a,r,s′) represents a tuple containing a state, an action, a reward, and a next state. φ i The parameter φ′ represents the Q function. i γ represents the parameters of the target Q-network, and γ is the discount factor.

[0127] S703. The current state value is predicted using an encoder-decoder network, and the logarithm of the predicted probability is taken. Next, the entropy of the policy network is calculated, which measures the uncertainty of the probability distribution. Simultaneously, the value network... Predict the state value at the current moment, and take the minimum value to obtain the minimum state value.

[0128] Next, the loss J of the policy network was calculated. π The loss (θ) includes the negative of the policy network entropy and the weighted sum of the minimum state value; finally, the parameters of the policy network are updated using the gradient descent method.

[0129]

[0130] S704. Calculate the loss J(α) to update the trainable parameter α, which is a parameter used to adjust the entropy of the policy network. Specifically, J(α) contains the difference between the current entropy value and the target entropy value, and the parameter of α is updated by backpropagating the difference. Next, the parameter of α is updated using the gradient descent method so that the entropy value gradually approaches the target entropy value.

[0131]

[0132] S8. Repeat S3 to S7, the agent continuously makes decisions until the processing machines and processing order for all workpieces are determined, i.e., determine whether N samples have been learned. If all N samples have been learned, then execute step S8.

[0133] Otherwise, proceed to step S3 to update the relevant parameters.

[0134] The details are as follows:

[0135] The two target value networks were updated using a soft update method. The parameters. Soft update is a smooth update method that improves stability by making small adjustments to the target network parameters in the direction of the current network parameters.

[0136] This entire process is part of an actor-critic algorithm in reinforcement learning, which includes updating the policy network,

[0137] The updating of the α parameter and the soft updating of the target value network are intended to improve the agent's decision-making performance in the environment.

[0138] This invention introduces for the first time an efficient and innovative fuzzy flexible job shop scheduling framework, SGFormer-SAC. This framework employs a graph Transformer to process the raw features in the fuzzy disjunctive graph. Through a global attention mechanism, the graph Transformer can capture the complex relationships and long-distance dependencies between nodes in the disjunctive graph. Furthermore, by integrating a graph neural network (GNN), this method can learn the topological structure between disjunctive graphs. This novel approach can effectively model and optimize the fuzzy flexible job shop scheduling problem, demonstrating superior performance in capturing complex dependencies and achieving efficient scheduling.

[0139] This invention critically demonstrates that superior competitive performance can be achieved in large-scale disjunctive graph models even using a single-layer, single-head attention mechanism. This encourages a rethinking of the design principles behind Transformers. This invention reduces the quadratic complexity of Transformers to linear complexity, significantly shortening the training and inference time for large-scale fuzzy FJSP instances.

[0140] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0141] Example 1

[0142] S1. Construct a Markov decision model for large-scale fuzzy FJSP, and design the states, actions, rewards, state transitions, and policies related to large-scale fuzzy FJSP, defined by a quintuple, i.e., (S, A, P, r, γ); the specific implementation steps are as follows:

[0143] Step 1: Generate a 50×20 flexible job shop scheduling problem instance with 1000 process nodes based on the set scale, and initialize it. This embodiment designs 4 process node features, 4 machine features, and 2 process-machine pair features. These features have both static and dynamic attributes, which can well represent the goal of this embodiment. It is worth emphasizing that, unlike the existing ones, the state space of this embodiment decreases as production progresses (until it becomes empty, meaning that all processes have been scheduled and processed), making this representation computationally attractive for real-time and large-scale applications.

[0144] The detailed list of features is as follows:

[0145] Characteristics of the assignment:

[0146] 1) The total number of assignments (n);

[0147] 2) Scheduling tag: This binary value (0 or 1) indicates whether the process has been scheduled (1) or not scheduled (0);

[0148] 3) Lower bound of completion time estimation C(o ij ): Estimated process O ij The earliest possible completion time;

[0149] 4) Shortest processing time: indicates the time required for process O ih Shortest processing time across all machines;

[0150] Machine features:

[0151] 1) Total number of machines (m);

[0152] 2) Job tag: If M k The value is 0 if the space is empty, and 1 otherwise.

[0153] 3) Remaining processing time: from T s The time until free time. (M) k (Idle capacity is 0);

[0154] 4) Completion time T t (M k ): Machine M before time step t k Completion time;

[0155] Characteristics of compatible process-machine pairs:

[0156] 1) Processing time t i,j,k ;

[0157] 2)t i,j,k With J i The ratio of remaining workload;

[0158] Step 2: Based on the objective of minimizing the maximum completion time, this embodiment designs the following actions;

[0159] Action: At time step t=1, action a t ∈|A t It consists of a process-machine pair. At this point, a t = (6, 4) Here, it means that at time step t=1, the agent can select a set of 6 workpieces and 4 machines for processing the corresponding process.

[0160] Step 3: Based on the objective of minimizing the maximum completion time, this embodiment designs the following state transition;

[0161] State transition: At time step t, based on the current action set a t = [6,4], updated the disjunction arc, resulting in a new disjunction arc as the next state s. t+1.

[0162] Step 4: Based on the objective of minimizing the maximum completion time, this embodiment designs the following rewards;

[0163] Reward: The reward is defined as state S t and S t+1 The difference in makespan between the middle-schedule tasks. Mathematically, this can be represented as:

[0164] R(a t ,s t ,s t+1 )=H max (s t )-H max (s t+1 )

[0165] Where H max (s i ) represents state s i The completion time of the middle part of the schedule. When the discount factor γ is set to 1, the cumulative reward in the solution process, denoted as G, is calculated as the sum of rewards in all decision steps. The formula is as follows:

[0166]

[0167] For a specific problem instance in this embodiment, the initial completion time H max (s0) remains constant, which means minimizing the completion time C. max Maximizing the objective function G is an equivalent objective. Therefore, the agent's goal is to minimize the scheduled completion time at each step to achieve the maximum cumulative reward.

[0168] Step 5: Based on the objective of minimizing the maximum completion time, this embodiment designs the following strategy;

[0169] Strategy: This study employs a randomized strategy π(a) t |s t The distribution is generated by a DRL algorithm with trainable parameters. The optimization objective is to maximize the cumulative reward. Given a state s t The distribution returns the selection of each action a. t ∈|A t The probability of |.

[0170] S2. After modeling the MDP, construct the disjunctive graph of the fuzzy FJSP, as follows:

[0171] Generally speaking, the solution to the fuzzy FJSP problem can be represented by a disjunctive graph consisting of nodes, connecting arcs, and disjunctive arcs. This is a classic way of expressing the solution to the scheduling problem. In this embodiment, the disjunctive graph model of FJSP is represented as G = (N, C, D), where N includes nodes representing all job operations, including virtual start and end nodes; C represents directed arcs connecting adjacent operations in the same job. k∈M consists of undirected arcs connecting adjacent processes processed on the same machine, with each machine forming a subset of the disjunctive arcs. Therefore, the disjunctive graph G is a hybrid graph composed of undirected and directed arcs.

[0172] Here's a 3×3 (number of jobs × number of machines) FJSP example, where... Figure 2 Figure (a) shows the disjunctive graph representation of this example. The solid black arrows represent connecting arcs C, while the dashed lines of different colors represent disjunctive arcs D connecting adjacent operations on different machines. In solving the scheduling problem, the undirected arcs are transformed into two directed arcs in opposite directions, as shown below. Figure 2 In (b), after removing the connecting arcs C and virtual nodes from the disjunctive graph G, m disjoint subgraphs represent the task ordering on different machines. The goal of solving the scheduling problem is to select directions for directed arcs of opposite directions to efficiently order tasks on machines and ensure a feasible solution.

[0173] S3-1. Input the disjunctive graph from S2 into the graph neural network to calculate the state feature;

[0174] Step 1: Input the node information and arc relationships into the graph attention network to calculate the node representation;

[0175] The formula for calculating node representation is as follows:

[0176]

[0177] Step 2, in this embodiment, the Softmax function is used to adjust the masked e. ijk The value is normalized to obtain the normalized attention coefficient, denoted as α. ijp .

[0178] α ijp =Softmax(mask(e ijk ))

[0179] Step 3, by transforming the input features and By performing a weighted linear combination and then passing it through a nonlinear activation function δ, this embodiment obtains the output feature vector:

[0180]

[0181] Step 4: In this embodiment, multi-head attention is used to extract node features from various dimensions.

[0182]

[0183] Step 5: Repeat the above steps 3 times.

[0184] Step 6: Sum the feature vectors of the final nodes and count the number of non-zero elements in each node. Then, calculate the reciprocal of the average number of non-zero nodes in each batch, use this value as a weight, and multiply it by the summation result to obtain the final mean.

[0185]

[0186] S3-2. The initial feature vectors of process nodes, machine nodes and disjunction arcs are mapped to the node embeddings in the latent space using a shallow multilayer perceptron (MLP). Then, a simplified global attention mechanism is used to map the latent node embeddings to the final feature output vector.

[0187] Step 1: First, use a neural layer to process the input features. The node embedding mapped to the latent space is denoted as Z. (0) = f1(X), where f1 can be a shallow multilayer perceptron (MLP). These nodes are embedded... This will be used for subsequent attention calculations and propagation.

[0188] Step 2 uses a simplified global attention mechanism to model global node interactions. While typical Transformers rely on multiple layers of attention to meet their representational needs, this invention finds that a single layer of global attention is sufficient. This effectiveness is attributed to the dense connections in the attention graph, which allows information from each node to be flexibly transferred to other nodes in the same batch. Therefore, the model of this invention, while simple, effectively captures the hidden dependencies between node pairs and reduces computational requirements. This invention uses a linear attention mechanism to achieve this, as detailed below:

[0189] Q = f Q (Z (0) ), K = f K (Z (0) ), V = f V (Z (0) )

[0190]

[0191] In the formula, f Q ,fK , and f V Let represent simple neural layers, typically linear feedforward layers. ||.|| represents the Frobenius norm, and 1 represents an N-dimensional column vector of all 1s. The diagonal operation transforms an N-dimensional column vector into an N×N diagonal matrix. β serves as a hyperparameter for the residual connections. Z integrates global pairwise attention propagation and self-loop propagation; the former helps the model capture the influence of neighboring nodes, while the latter preserves important information from the central node.

[0192] S4. Take the high-dimensional feature vector of the process node obtained in S3-1 and the final feature output vector in S3-2, and then perform a weighted sum. Finally, send the merged features to the decision network to output the process-machine pair action. Figure 3 The proposed model SGFormer and its data flow are illustrated below:

[0193] Step 1: Integrating prior information from the disjunctive graph, this invention employs a simple yet effective method: combining it with the propagation embedding of the GNN in the output layer.

[0194] Z O = (1-α)Z+αGAT(X,A)

[0195] In the formula, α is used as a weight hyperparameter. The GNN module uses GAT, which is known for its scalability on large-scale graphs.

[0196] A represents the adjacency matrix. The final representation is Z. O Used for downstream decision-making tasks

[0197] Step 2, as the final component of the proposed neural architecture, introduces a policy network, where each action a t Both are defined as a feasible OM pair. This invention utilizes a decoder layer to process the information Z collected from the graph Transformer. O The decoder layer is responsible for generating probability distributions in the action space, enabling action sampling based on these probabilities to enhance exploration during reinforcement learning training. The decoder is constructed using a multilayer perceptron, as follows:

[0198]

[0199] Step 3: After scoring each action, this invention implements a filtering mechanism to exclude infeasible operation-machine pairs. Specifically, this invention sets the probability of an unusable pair to negative infinity. Subsequently, the Softmax function is applied to generate a probability distribution, defined as follows.

[0200] P(a t =Softmax(mask(scr(a))t )))

[0201] Step 4: Repeat steps S3-S4 until a certain amount of [(s,a,r),...] is stored.

[0202] S5. Determine whether [(s,a,r),...] of 100 FJSP cases have been collected. If so, update the workpiece agent using the SAC algorithm; otherwise, go to step S3.

[0203] Step 1, calculate the cumulative discounted reward for each training sample FJSP sample: R[t] = r[t] + γ1 × r[t+1] + γ2 × r[t+1] + ... γ T-t+1 ×r[T-1]+γ T-t ×v _ We obtain R = [R[0], R[1], ..., R[t], R[T]], where T is the last time step, considering the termination state, and standardizing the cumulative reward.

[0204] Step 2: Predict the state value at the next time step using the policy network, and calculate the state value at the next time step by combining the minimum Q-value output by the target value network. Simultaneously, considering the logarithmic probability and entropy of the action, calculate the target Q-value using the temporal difference formula. Finally, the generated... Used to update the value network.

[0205] Step 3, based on the target action value calculated above. With two value networks The mean squared error loss between the predicted action values ​​was optimized using gradient descent to update the parameters of the two value networks.

[0206]

[0207] Step 4: Predict the current state value using the encoder-decoder network, and take the logarithm of the predicted probability. Next, calculate the entropy of the policy network, which measures the uncertainty of the probability distribution.

[0208] At the same time, through value networks The minimum state value is obtained by predicting the current state value and taking the minimum value. Next, the loss J of the policy network is calculated. π The loss (θ) includes the negative of the policy network entropy and the weighted sum of the minimum state values. Finally, the parameters of the policy network are updated using gradient descent.

[0209]

[0210] Step 6: Calculate the loss J(α) to update the trainable parameter α, which is used to adjust the policy network entropy. Specifically, J(α) contains the difference between the current entropy value and the target entropy value, and the parameter of α is updated by backpropagating the difference. Next, the parameter of α is updated using gradient descent so that the entropy value gradually approaches the target entropy value.

[0211]

[0212] Step 7: Finally, the two target value networks were updated using a soft update method. The parameters.

[0213] S7. Determine whether the maximum number of iterations of 1000 has been reached in the entire training iteration process. If the maximum number of iterations has been reached, execute step S7; otherwise, jump to step S2.

[0214] This embodiment employs a random search strategy to fine-tune the hyperparameters of the SGFormer-SAC model. Hyperparameter tuning experiments are iteratively conducted on "Case 1" to systematically evaluate the impact of various configurations on performance optimization. Table 1 shows the results of the first five evaluations. Based on the evaluation criteria of this invention, high-performing hyperparameters are selected from the initial group for subsequent experiments.

[0215] Table 1. Top 5 hyperparameters

[0216]

[0217]

[0218] To accelerate model training and enhance gradient direction optimization, this embodiment employs two key techniques: batch training and learning rate decay. This embodiment groups samples of the same size and trains these groups systematically in a specific order. This embodiment uses various datasets with different dimensions, including 10×5, 10×10, 15×5, 15×10, and 20×5, to ensure that the model maintains consistent convergence across various independent datasets. Figure 4 A training example with a problem size of 15×10 is shown. These curves depict the average completion time on 100 validation samples, providing a concise overview of the performance of the method in this embodiment.

[0219] Example 2

[0220] Building upon Example 1, to verify the robustness of the model trained in this example on benchmark instances, this example further evaluates the performance of the model trained on synthetic data on three different categories of common benchmarks. These benchmarks exhibit distributions completely different from the training instances. Each benchmark set contains instances of different problem sizes. This example chooses to use a single-trained SGFormer-SAC model for testing.

[0221] The following example illustrates a flexible job shop scheduling method based on attention mechanism and disjunctive graph embedding, proposed by solving FMK09 after the model training is complete. The method includes the following specific steps:

[0222] Step 1: First, load the pre-trained model parameters for subsequent graph neural network computation.

[0223] Step 2: Convert MK09 into a disjunctive diagram representation to obtain the initial state of the system, at which time t = 0.

[0224] Step 3: Input the disjunctive graph of the initial state into the simplified graph transformer and perform forward propagation to obtain the features representing the current state. This step typically involves aggregating and transforming information from the nodes in the graph to capture the representation of the state.

[0225] Step 4: Output the process-machine pair (8, 2) through the decision network.

[0226] Step 5: Perform a state transition to obtain a new state, t = t + 1;

[0227] Step 6: Determine if the decision has ended. If the number of iterations equals the sum of the number of operations for all workpieces, the process has reached termination, and the solution is output. Otherwise, repeat steps 2-6 above.

[0228] The verification steps for the remaining examples are the same as those described above.

[0229] Table 2 shows the results of the proposed method on Case 1-5 instances. The proposed method outperforms the proposed GAT-SAC, GAT-PPO, and DRL methods, as well as the optimal scheduling rule. To further verify the effectiveness and feasibility of the algorithm on large-scale instances, the proposed method was tested on the largest instances in the MK12, MK15, and Hurink datasets. The results show that as the problem size increases, the proposed method significantly improves performance, surpassing reinforcement learning frameworks and the optimal scheduling rule. This improvement stems from the proposed method's ability to effectively model long-term dependencies in large-scale instances. Furthermore, although the proposed method is slightly inferior to the SATO metaheuristic algorithm in terms of solution quality, the larger optimization space at larger problem sizes causes the metaheuristic algorithm to lag behind the proposed method in both solution quality and speed. This further verifies the superiority of the proposed SGFormer-SAC algorithm in solving large-scale problems.

[0230] Table 2 shows the comparison results of various algorithms on the large-scale fuzzy FJSP dataset.

[0231]

[0232] In one embodiment of the present invention, a large-scale fuzzy flexible job shop scheduling device is provided, comprising:

[0233] A construction module is used to construct a Markov decision model for the large-scale fuzzy flexible shop floor scheduling problem; the Markov decision model includes states, actions, rewards, state transitions and strategies related to the large-scale fuzzy flexible shop floor scheduling problem, and the strategies include sampling strategies and greedy strategies;

[0234] The representation module is used to represent the large-scale fuzzy flexible shop floor scheduling problem as a fuzzy disjunctive graph of the constraint relationships between workpieces, processes, and processing machines; the fuzzy disjunctive graph contains several process nodes, machine nodes, and disjunctive arcs, where the disjunctive arcs are the connections between processes and machines;

[0235] The initial feature vector processing module is used to define the state features of the process node, machine node, and disjunction arc, and process them into the form of initial feature vectors respectively;

[0236] The high-dimensional feature vector output module is used to take the initial feature vector of the process node as the input of the graph neural network of the graph Transformer to obtain the high-dimensional feature vector of the process node.

[0237] The mapping module is used to map the initial feature vectors of process nodes, machine nodes and disjunction arcs to the node embeddings of the fuzzy disjunction graph in the latent space using a shallow multilayer perceptron, and to use a simplified global attention mechanism of graph Transformer to map the node embeddings of the fuzzy disjunction graph in the latent space into the final feature output vector.

[0238] The decision module is used to perform a weighted summation of the high-dimensional feature vectors of the process nodes and the final feature output vector, and input the weighted summation features into the decision network to output the process-machine pair action.

[0239] The calculation module is used to calculate the decision loss of the decision network;

[0240] The update module is used to update the parameters of the decision network until the processing machines and processing sequences for all workpieces are determined, based on the decision loss.

[0241] All relevant content regarding the steps involved in the aforementioned embodiments of a large-scale fuzzy flexible job shop scheduling method can be referenced from the functional descriptions of the corresponding functional modules of a large-scale fuzzy flexible job shop scheduling device in this invention, and will not be repeated here. The module division in this invention embodiment is illustrative and merely a logical functional division; in actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of this invention can be integrated into a single processor, exist as separate physical entities, or have two or more modules integrated into one module. The integrated modules can be implemented in hardware or as software functional modules.

[0242] In one embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used to implement the operation of a large-scale fuzzy flexible job shop scheduling method.

[0243] In one embodiment of the present invention, a large-scale fuzzy flexible job shop scheduling method, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data.

[0244] The computer storage medium can be any available medium or data storage device that a computer can access, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs)), optical storage (e.g., CDs, DVDs, BDs, HVDs), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).

[0245] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0246] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0247] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0248] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0249] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A large-scale fuzzy flexible job shop scheduling method, characterized in that, include: S1. Construct a Markov decision model for the large-scale fuzzy flexible workshop scheduling problem; The Markov decision model includes states, actions, rewards, state transitions, and strategies related to the large-scale fuzzy flexible shop floor scheduling problem, and the strategies include sampling strategies and greedy strategies. S2. The large-scale fuzzy flexible shop floor scheduling problem is represented as a fuzzy disjunctive graph of the constraint relationships between workpieces, processes, and processing machines; the fuzzy disjunctive graph contains several process nodes, machine nodes, and disjunctive arcs, where the disjunctive arcs are the connections between processes and machines. S3. Define the state features of the process node, machine node, and disjunction arc, and process them into the form of initial feature vectors respectively; S4. Use the initial feature vector of the process node as the input of the graph neural network of the graph Transformer to obtain the high-dimensional feature vector of the process node. S5. The initial feature vectors of process nodes, machine nodes and disjunction arcs are mapped to the node embeddings of the fuzzy disjunction graph in the latent space using a shallow multilayer perceptron, and the node embeddings of the fuzzy disjunction graph in the latent space are mapped to the final feature output vector using a simplified global attention mechanism of graph Transformer. S6. Weighted summation of the high-dimensional feature vectors of the process nodes and the final feature output vector, and input the weighted summation features into the decision network to output the process-machine pair action; S7. Calculate the decision loss of the decision network; S8. Repeat S3 to S7 until the processing machines and processing sequence of all workpieces are determined, and update the parameters of the decision network according to the decision loss. The simplified global attention mechanism of the graph Transformer is as follows: In the formula, For query vector, For key vectors, For value vectors, , , and These represent linear feedforward layers, Represents the Frobenius norm. , These are the normalized query vector and key vector. express A column vector of dimension all 1s, the diagonal operation will transform a... Transform a dimensional column vector into a diagonal matrix, It is diagonal matrix, As a hyperparameter of residual connectivity It combines global pairwise attention propagation and self-loop propagation. Attention propagation helps the model capture the influence of neighboring nodes, while self-loop propagation preserves the information of the central node. The weighted summation of the high-dimensional feature vectors of the process nodes and the final feature output vector is as follows: In the formula, As a weight hyperparameter, GAT is used in graph attention networks. Represents the adjacency matrix. Represents the original process node characteristics, and the final representation It was used for downstream decision-making tasks.

2. The large-scale fuzzy flexible job shop scheduling method according to claim 1, characterized in that, The process of using the initial feature vector of the process node as input to the graph neural network of the graph Transformer to obtain the high-dimensional feature vector of the process node is as follows: The initial feature vector of the process node is input into the graph neural network of the graph Transformer to calculate the attention score of the process node. use The function normalizes the attention scores of the process nodes after the mask, and obtains the normalized attention scores of the process nodes. Multi-head attention is used to perform a weighted linear combination of the attention scores of the normalized process nodes. The weighted linear combination result is then processed by a nonlinear activation function to obtain the high-dimensional feature vector of the process node.

3. The large-scale fuzzy flexible job shop scheduling method according to claim 2, characterized in that, The initial feature vector of the process node is input into the graph neural network of the graph Transformer to calculate the attention score of the process node. The specific calculation formula is as follows: In the formula, The attention score for each process node. Map the concatenated vector to real numbers and activate it using LeakyReLU; To represent the original process node characteristics of the diagram. The number of node features; This is a learnable matrix, where the dimensions represent the input and output dimensions, respectively; || stands for concatenate, indicating the gluing of tensors; i For the number of workpieces, and For the process, .

4. The large-scale fuzzy flexible job shop scheduling method according to claim 3, characterized in that, The use The function normalizes the attention scores of the process nodes after the mask, obtaining the normalized attention scores of the process nodes. The specific formula is as follows: In the formula, The attention score for the normalized process node.

5. A large-scale fuzzy flexible job shop scheduling method according to claim 4, characterized in that, The weighted linear combination result is processed by a nonlinear activation function to obtain the high-dimensional feature vector of the process node, as detailed below: In the formula, For process nodes at The high-dimensional feature vector at time step 1 For the number of heads of attention, For activation function, For the first m Learnable parameters after the latest update.

6. A large-scale fuzzy flexible workshop scheduling device, characterized in that, The apparatus for implementing the large-scale fuzzy flexible job shop scheduling method according to any one of claims 1 to 5 includes: A construction module is used to construct a Markov decision model for the large-scale fuzzy flexible shop floor scheduling problem; the Markov decision model includes states, actions, rewards, state transitions and strategies related to the large-scale fuzzy flexible shop floor scheduling problem, and the strategies include sampling strategies and greedy strategies; The representation module is used to represent the large-scale fuzzy flexible shop floor scheduling problem as a fuzzy disjunctive graph of the constraint relationships between workpieces, processes, and processing machines; the fuzzy disjunctive graph contains several process nodes, machine nodes, and disjunctive arcs, where the disjunctive arcs are the connections between processes and machines; The initial feature vector processing module is used to define the state features of the process node, machine node, and disjunction arc, and process them into the form of initial feature vectors respectively; The high-dimensional feature vector output module is used to take the initial feature vector of the process node as the input of the graph neural network of the graph Transformer to obtain the high-dimensional feature vector of the process node. The mapping module is used to map the initial feature vectors of process nodes, machine nodes and disjunction arcs to the node embeddings of the fuzzy disjunction graph in the latent space using a shallow multilayer perceptron, and to use a simplified global attention mechanism of graph Transformer to map the node embeddings of the fuzzy disjunction graph in the latent space into the final feature output vector. The decision module is used to perform a weighted summation of the high-dimensional feature vectors of the process nodes and the final feature output vector, and input the weighted summation features into the decision network to output the process-machine pair action. The calculation module is used to calculate the decision loss of the decision network; The update module is used to update the parameters of the decision network until the processing machines and processing sequences for all workpieces are determined, based on the decision loss.

7. An apparatus comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of a large-scale fuzzy flexible job shop scheduling method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of a large-scale fuzzy flexible job shop scheduling method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Internet of Things service clustering method based on time sequence diagram neural network

    CN116166977A

  • Node relation space contrast learning community discovery method based on graph neural network

    CN116629309A