Large-scale fuzzy flexible job shop scheduling method and related equipment

By constructing a Markov decision model and a simplified global attention mechanism of graph Transformer, the heterogeneity and information compression problems of graph neural networks in large-scale fuzzy flexible job shop scheduling are solved, achieving high-quality scheduling results and improving processing Capabilities for large-scale fuzzy disjunction graphs.

CN118760100AActive Publication Date: 2024-10-11XI AN JIAOTONG UNIV

Patent Information

Application Number
CN202411138211.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-10-11
Estimated Expiration
2044-08-19

AI Technical Summary

Technical Problem

In the existing technology, graph neural networks have heterogeneity of message passing rules, excessive information compression, long-distance dependencies and incomplete graphs in large-scale fuzzy flexible job shop scheduling, resulting in the inability to solve large-scale fuzzy job shop scheduling problems and High-quality results are difficult to obtain.

Method used

Construct a Markov decision model to represent the large-scale fuzzy flexible workshop scheduling problem as a fuzzy disjunctive graph. Use the simplified global attention mechanism of the graph Transformer and the shallow multi-layer perceptron to combine the process nodes, machine nodes and disjunctive arcs. The initial feature vector is mapped to the latent space, the process-machine pair actions are output through weighted summation, and the parameters are updated through the decision network until the processes of all workpieces are determined by processing machines and processing sequences.

Benefits of technology

It effectively solves the local message passing defects of graph neural networks in large-scale fuzzy disjunctive graphs, captures long-term dependencies, and reduces the complexity of the Transformer, thereby being able to handle fuzzy disjunctive graph models containing thousands or even tens of thousands of nodes. , improving the quality of scheduling results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760100A_ABST
    Figure CN118760100A_ABST
Patent Text Reader

Abstract

The invention discloses a large-scale fuzzy flexible job shop scheduling method and related equipment, and the method comprises the steps: taking an initial feature vector of a process node as the input of a graph neural network of a graph Transform, and obtaining a high-dimensional feature vector of the process node; mapping the initial feature vectors of process nodes, machine nodes and disjunction arcs into node embedding of a fuzzy disjunction graph of a potential space by using a shallow multilayer perceptron, and embedding and mapping the node embedding of the fuzzy disjunction graph of the potential space into a final feature output vector by adopting a simplified global attention mechanism of a graph Transform; performing weighted summation on the high-dimensional feature vectors of the process nodes and the final feature output vectors, inputting the features after weighted summation into a decision network, and outputting process-machine pair actions; calculating decision loss of the decision network; and iterating repeatedly until the processing machines and the processing sequence of all the working procedures of the workpieces are determined, and updating the parameters of the decision network according to the decision loss. The method aims to solve the problems that large-scale fuzzy job shop scheduling cannot be solved and high-quality results are difficult to obtain due to heterogeneity of GNN message passing rules, excessive information compression, long-distance dependency and incomplete graphs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of production workshop scheduling, and specifically to a large-scale fuzzy flexible job shop scheduling method and related equipment. Background Art

[0002] Production scheduling is an important means to achieve optimal resource allocation and reduce production costs in multi-variety and variable batch production scenarios. In the production of complex products such as aerospace equipment and rail transit components, large-scale flexible job shop scheduling problems (FJSP) often arise due to the diversity of required parts, the number of processing machines, and the complexity of operations. In addition, real-world scheduling problems are inherently complex and often involve 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 feature of modern manufacturing and provides an important new avenue for research. Fuzzy FJSP more accurately captures the scheduling challenges inherent in flexible production systems. From the perspective of computational complexity, fuzzy FJSP is a typical NP-hard problem, so the optimization of large-scale fuzzy FJSP algorithms is of great significance both in theory and practice.

[0003] The hottest approach at the moment is to use disjunctive graphs as representations of JSP and FJSP. This graph-based model represents processes as nodes and uses directed edges between nodes to indicate the processing order, thereby showing the characteristics and structural information of each operation. Recent advances have extended the solution to handle additional flexible constraints in FJSP and improved the decision model to improve the effectiveness of processing workpiece processing order and machine allocation. Graph neural networks (GNNs) are then used to extract features from disjunctive graphs. The above work shows that although GNNs effectively learn the priority constraints between processes and machines in disjunctive graphs, more and more evidence challenges the core assumption of GNNs: propagating information along the observed graph structure will inevitably produce better node-level representations on each individual instance node. Conflicts with the premise lead to common defects in GNN message passing rules, such as heterogeneity, excessive information compression, long-distance dependencies, and incomplete graphs. Therefore, it remains challenging to extract long-term dependencies in large-scale disjunctive graphs, making it difficult to obtain high-quality solutions. Summary of the invention

[0004] In view of the problems existing in the prior art, the present invention provides a large-scale fuzzy flexible job shop scheduling method and related equipment, which aims to solve the problem that large-scale fuzzy job shop scheduling problems cannot be solved and high-quality results cannot be obtained due to the heterogeneity of GNN message transmission rules, excessive information compression, long-distance dependencies and incomplete graphs.

[0005] In order to solve the above technical problems, the present invention is implemented by the following technical solutions:

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

[0007] S1. Constructing a Markov decision model for 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 workshop scheduling problem, and the strategies include sampling strategies and greedy strategies;

[0008] S2, representing the large-scale fuzzy flexible shop scheduling problem as a fuzzy disjunctive graph of the constraint relationship between workpieces, processes and processing machines; the fuzzy disjunctive graph includes a number of process nodes, machine nodes and disjunctive arcs, and the disjunctive arcs are the connections between processes and machines;

[0009] S3, defining the state characteristics of the process node, machine node and disjunctive arc, and processing 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 a high-dimensional feature vector of the process node;

[0011] S5, mapping the initial feature vectors of the process nodes, machine nodes, and disjunctive arcs to the node embeddings of the fuzzy disjunctive graph in the latent space using a shallow multilayer perceptron, and using a simplified global attention mechanism of a graph transformer to map the node embeddings of the fuzzy disjunctive graph in the latent space to the final feature output vector;

[0012] S6, performing weighted summation of the high-dimensional feature vector of the process node and the final feature output vector, and inputting the weighted summed features into the decision network, and outputting the process-machine pair action;

[0013] S7, calculating the decision loss of the decision network;

[0014] S8. Repeat S3 to S7 until the processing machines and processing sequences of all workpieces are determined, and the parameters of the decision network are updated according to 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] Where Q is the query vector, K is the key vector, V is the value vector, and f Q ,f K , and f V Represents a simple neural layer, usually a linear feedforward layer, represents the Frobenius norm, are the normalized query vector and key vector, 1 represents an N-dimensional column vector of all 1s, the diagonal operation converts 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, and Z combines global pairwise attention propagation and self-loop propagation. Attention propagation helps the model capture the influence of neighboring nodes, and self-loop propagation retains the information of the central node.

[0019] Furthermore, the high-dimensional feature vector of the process node and the final feature output vector are weighted and summed 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 finally Z o is used in downstream decision-making tasks.

[0022] Furthermore, the initial feature vector of the process node is used as the input of the graph neural network of the graph transformer to obtain a high-dimensional feature vector of the process node, specifically:

[0023] Input the initial feature vector of the process node into the graph neural network of the graph transformer to calculate the attention score of the process node;

[0024] Use the Softmax function to normalize the attention score of the process node after the mask to obtain the normalized attention score of the process node;

[0025] Multi-head attention is used to perform weighted linear combination of the normalized attention scores of the process nodes, and then the weighted linear combination results are processed by a nonlinear activation function to obtain a 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 is the attention score of the process node, Map the concatenated vector to real numbers and activate it through LeakyReLU; To represent the original process node characteristics of the graph, d o is the number of node features; is a learnable matrix, whose dimensions represent the dimensions of input and output respectively; || stands for concatenate, which means the bonding of tensors; i is the number of workpieces, p and j are processes, and |pj|≤1.

[0029] Furthermore, the Softmax function is used to normalize the value of the attention score of the process node after the mask 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 is the normalized attention score of the process node.

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

[0033]

[0034] In the formula, is the high-dimensional feature vector of the process node at time t, is the number of attention heads, σ is the activation function, W m is the learnable parameter after the mth update.

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

[0036] A construction module is used to construct a Markov decision model for 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 workshop scheduling problem, and the strategies include sampling strategies and greedy strategies;

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

[0038] An initial feature vector processing module, used to define the state features of the process nodes, machine nodes and disjunctive arcs, and process them into the form of initial feature vectors respectively;

[0039] The high-dimensional feature vector output module is used to 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;

[0040] A mapping module, for mapping the initial feature vectors of the process nodes, machine nodes and disjunctive arcs to the node embeddings of the fuzzy disjunctive graph in the latent space using a shallow multilayer perceptron, and mapping the node embeddings of the fuzzy disjunctive graph in the latent space to the final feature output vector using a simplified global attention mechanism of a graph transformer;

[0041] A decision module is used to weight the high-dimensional feature vector of the process node and the final feature output vector, input the weighted summed features into the decision network, and output the process-machine pair action;

[0042] A calculation module, used to calculate the decision loss of the decision network;

[0043] The updating module is used to determine the processing machines and processing sequences of all workpieces and update the parameters of the decision network according to the decision loss.

[0044] A device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the large-scale fuzzy flexible job shop scheduling method are implemented.

[0045] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a 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] The present invention provides a large-scale fuzzy flexible job shop scheduling method. By mapping the initial feature vectors of process nodes, machine nodes and disjunctive arcs to the node embedding of the fuzzy disjunctive graph in the latent space using a shallow multilayer perceptron, this preprocessing is more suitable for subsequent feature extraction. Subsequently, the simplified global attention mechanism of the graph Transformer is adopted to map the node embedding of the fuzzy disjunctive graph in the latent space to the final feature output vector. Through the global attention mechanism of the Transformer, the long-term dependency of the large-scale fuzzy disjunctive graph can be captured, and the defects of the local message transmission of the graph neural network can be compensated. At the same time, the present invention reduces the Transformer complexity that restricts the computational efficiency from quadratic complexity to linear complexity, so that the model can process fuzzy disjunctive graph models containing thousands or even tens of thousands of nodes. Finally, the high-dimensional feature vector of the process node is weighted and summed with the final feature output vector, and the weighted summed features are input into the decision network to output the action of the process-machine pair. Here, the present invention adopts a weighted method to determine the proportion of the graph neural network and the global attention mechanism, so that it can be more flexibly adjusted for disjunctive graphs of different sizes. In summary, the present invention effectively solves the problems of being unable to solve large-scale fuzzy job shop scheduling problems and difficulty in obtaining high-quality results due to the heterogeneity of GNN message passing rules, excessive information compression, long-distance dependencies and incomplete graphs.

[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the specific implementation modes of the present invention, the drawings required for use in the description of the specific implementation modes will be briefly introduced below. Obviously, the drawings described below are some implementation modes of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

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

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

[0052] Figure 3 Description of the model SGFormer and its data flow proposed in the embodiment of the present invention;

[0053] Figure 4The figure is a diagram showing the training curve of the embodiment of the present invention on 15×10 instances. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] First of all, it should be noted 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. The number of tasks and resources involved in the production tasks here is very large, such as thousands of process nodes or machines and equipment. This type of problem usually requires processing massive amounts of data and has high computational complexity.

[0056] like Figure 1 As shown, the embodiment of the present application provides a large-scale fuzzy flexible job shop scheduling method, which specifically includes the following S:

[0057] 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 flexible workshop 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 of the large-scale fuzzy flexible workshop 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 state has a set of optional actions, so that the agent can adjust its decision according to environmental feedback to maximize a predefined reward function. This embodiment regards the scheduling decision made by the agent as the behavior of changing the disjunctive arc, and designs the following corresponding states, actions, state transitions, rewards, and strategies according to the characteristics of fuzzy FJSP.

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

[0063] S103, Action: The integrated method used to solve the fuzzy FJSP combines the decision of process selection and machine allocation. Specifically, the action at time step t is represented as a feasible process-machine pair (O ij ,M k ), defined as O ij Satisfy the conditions (O ij Its immediate predecessor has completed) and is in an idle state. ij Immediately in M k Start, where S ij =T(t). Action set A t is step-specific and aggregates all feasible pairs. Given that each job prepares at most one operation at a time, |M ij |≤m, so |A t |≤n×m.

[0064] S104, state transfer: at time step t, determine the action a to be scheduled t After that, the fuzzy start time of executing this action on the required machine is first determined. Subsequently, through fuzzy calculation, the disjunctive arc direction on the machine is updated and the completion time of the action is calculated, thereby forming a new disjunctive graph as the state s of the next time step t+1 Here, the method of adding arcs is used to reduce the initial calculation complexity.

[0065] S105, Reward: Reward is defined as state S t and S t+1 The difference in the completion time (makespan) of the partial scheduling in . Mathematically, it can be expressed 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 ) indicates state s i The completion time of the partial schedule in the solution process is calculated as the sum of the rewards in all decision steps when the discount factor γ is set to 1. The cumulative reward in the solution process, denoted as G, is calculated as the sum of the rewards in all decision steps. The formula is as follows:

[0068]

[0069] S106, Strategy: Use random strategy π(a t |s t ), whose distribution is generated by the DRL algorithm with trainable parameters. The optimization goal is to maximize the cumulative reward. Given a state s t , which returns the distribution that selects each action a t ∈|A t |The probability of.

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

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

[0072] In one embodiment, an arc-adding strategy is adopted to construct an FJSP fuzzy disjunctive graph model. Specifically, the node information of the disjunctive graph is n specially designed features set in this embodiment. This embodiment selects the processing time of the process. When the processing sequence and processing machine of the node corresponding process have not yet been determined, a machine is randomly selected from its processable machines, and 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 characteristics of the process nodes, machine nodes and disjunctive arcs, and process them into the form of initial feature vectors respectively.

[0074] S4. The initial feature vector of the process node is used as the input of the graph neural network of the graph transformer to obtain the high-dimensional feature vector of the process node. In other words, in order to extract the global state at each time step t The disjunctive graph features are combined with the graph neural network method to transform the complex scheduling problem into a learning problem of graph structured data.

[0075] Specifically, in S4, the initial feature vector of the process node is used as the input of the graph neural network of the graph transformer to obtain the high-dimensional feature vector of the process node, which is:

[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 is the attention score of the process node, Map the concatenated vector to real numbers and activate it through LeakyReLU; To represent the original process node characteristics of the graph, d o is the number of node features; is a learnable matrix, whose dimensions represent the dimensions of input and output respectively; || stands for concatenate, which means the bonding of tensors; i is the number of workpieces, p and j are processes, and |pj|≤1.

[0079] S402, using the Softmax function to normalize the value of the attention score of the process node after the mask, to obtain the normalized attention score of the process node, the specific formula is as follows:

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

[0081] In the formula, α ijp is the normalized attention score of the process node.

[0082] S403, using multi-head attention to perform weighted linear combination on the normalized attention scores of the process nodes, and then subjecting the weighted linear combination results to nonlinear activation function processing to obtain a high-dimensional feature vector of the process node, as follows:

[0083]

[0084] In the formula, is the high-dimensional feature vector of the process node at time t, is the number of attention heads, σ is the activation function, W m is the learnable parameter after the mth update.

[0085] In other words, S4 can describe the following embodiments in detail:

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

[0087] Combined with the graph neural network method, this embodiment can transform the complex scheduling problem into a learning problem of graph structured data, thereby achieving the purpose of optimizing scheduling. In this process, the representation of graph structured data can be learned, and the feature embedding of each node can be extracted in an iterative and nonlinear manner.

[0088] At each discrete time step t, the global state is represented as a node, expressed as G(t)=(O,C∪D u (t),D(t)). Specifically, for each with input features Process O ij ∈O u , this embodiment uses the graph attention network to calculate O ij This enables the present embodiment to simulate O ij Its predecessor process O ij-1 and subsequent processes O ij+1 The relationship between them (if any) is as follows:

[0089]

[0090] Where: Map the concatenated vector to real numbers and activate it through LeakyReLU;

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

[0092] is a learnable matrix (weight matrix), whose dimensions represent the dimensions of input and output respectively;

[0093] || stands for concatenate, which means the gluing of tensors.

[0094] And |pj|≤1.

[0095] b. This embodiment uses the Softmax function to mask the e ijk The value of is normalized to select, and the normalized attention coefficient is obtained, which is expressed as α ijp .

[0096] It is worth noting that the calculation here is similar to that in GAT, but this embodiment limits its scope. Since some processes may have no predecessor (or successor) or be deleted in some steps, this embodiment applies dynamic masks to these predecessor and successor attention coefficients.

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

[0098] c. Finally, by transforming the input features and By performing a weighted linear combination and then passing through a nonlinear activation function δ, this embodiment obtains an 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 approach has been shown to be effective in guiding the agent to make accurate decisions and understand the complexity of scheduling. represents the number of attention heads in the attention layer, each using different parameters and unique attention mechanisms. Initially, the output of each attention head is integrated through the aggregation process. Subsequently, the activation function is applied to obtain the output of the layer, as follows:

[0102]

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

[0104]

[0105] S5. Use a shallow multi-layer perceptron (MLP) to map the initial feature vectors of the process nodes, machine nodes, and disjunctive arcs to the node embeddings of the fuzzy disjunctive graph in the latent space, and then use the simplified global attention mechanism of the graph transformer to map the node embeddings of the fuzzy disjunctive graph in the latent space to the final feature output vector. The specific explanation is as follows:

[0106] S501, first use a neural layer to input features The node embedding of the fuzzy disjunctive graph mapped to the latent space is denoted as Z (0) = f1(X), where f1 can be a shallow multilayer perceptron (MLP) with nodes embedded in Will be used for subsequent attention calculation and propagation.

[0107] S502. Use a simplified global attention mechanism to model global node interactions. While typical Transformers rely on multiple layers of attention to meet their expression needs, a single layer of global attention is sufficient. This effectiveness is attributed to the dense connections of the attention graph, which allows information from each node to be flexibly transmitted to other nodes in the same batch. Therefore, although the model of the present invention is simple, it can effectively capture the hidden dependencies between node pairs and reduce computational requirements. The present invention uses a linear attention mechanism to achieve this, as follows:

[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 Represent simple neural layers, usually linear feedforward layers, ||.|| represents the Frobenius norm, and 1 represents an N-dimensional column vector of all 1s. The diagonal operation converts an N-dimensional column vector into an N×N diagonal matrix. β is a hyperparameter of the residual connection. Z combines global pairwise attention propagation and self-loop propagation. The former helps the model capture the influence of neighboring nodes, while the latter retains important information of the central node.

[0111] S6: weighted sum the high-dimensional feature vector of the process node obtained in S4 and the final feature output vector of S5, and then send the weighted summed features to the decision network to output the process-machine pair action:

[0112] The details are as follows:

[0113] S601, further integrating the prior information from the disjunctive graph, adopts a simple but effective method: combined with the propagation embedding of the GNN in the output layer:

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

[0115] In the formula, α is a weight hyperparameter, the GNN module uses GAT, which is well-known for its scalability on large-scale graphs; A represents the adjacency matrix. Finally, Z o is used in downstream decision-making tasks.

[0116] S602. As the last component of the proposed neural architecture, a policy network is introduced, where each action a t are defined as a feasible OM pair. The present invention uses the decoder layer to process the information Z collected from the graph Transformer o The decoder layer is responsible for generating a probability distribution over the action space, so that actions can be sampled according to these probabilities to enhance exploration during reinforcement learning training. The decoder is built using a multi-layer perceptron as follows:

[0117]

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

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

[0120] S7, using Soft Actor-Critic (SAC) to calculate decision loss;

[0121] The details are as follows:

[0122] S701, predict the state value at the next moment through the policy network, and calculate the state value at the next moment by combining the minimum Q value output by the target value network. At the same time, taking into account the logarithmic probability and entropy of the action, the target Q value is calculated using the temporal difference formula to consider the influence of the reward, discount factor, the state value at the next moment, and whether the environment is terminated. Finally, the generated Used to update the value network. This process helps the reinforcement learning model learn appropriate action value estimates in time series data.

[0123] S702: Calculate the target action value based on the above calculation. With two value networks The mean squared error loss between the predicted action values ​​is used to update the parameters of the two value networks using gradient descent optimization.

[0124] This process aims to train the value network through reinforcement learning to more accurately estimate the long-term cumulative rewards 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 represents the parameters of the Q function, φ′ i represents the parameters of the target Q network, and γ is the discount factor.

[0127] S703: Predict the current state value through the encoding and decoding network, and take the logarithm of the predicted probability. Then, the entropy of the policy network is calculated, which measures the uncertainty of the probability distribution. At the same time, the value network Predict the state value at the current moment and take the minimum value to get the minimum state value.

[0128] Next, the loss J of the policy network is calculated π (θ), which includes the negative value of the policy network entropy and the weighted sum of the minimum state value; finally, the parameters of the policy network are updated by 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 by the gradient descent method so that the entropy value can gradually approach the target entropy value.

[0131]

[0132] S8, repeat S3 to S7, the agent continues to make decisions until the processing machines and processing sequences of all workpieces are determined, that is, it is determined whether N samples have been learned. If all N samples have been learned, then execute step S8.

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

[0134] The details are as follows:

[0135] Through soft update, two target value networks are updated Soft update is a smooth update method that improves stability by adjusting the target network parameters by a small amount in the direction of the current network parameters.

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

[0137] The update of the α parameter and the soft update of the target value network are aimed at improving the decision-making performance of the agent in the environment.

[0138] This paper introduces for the first time an efficient and innovative fuzzy flexible job shop scheduling framework SGFormer-SAC. The framework adopts Graph Transformer to process the original features in the fuzzy disjunctive graph. Through the global attention mechanism, the Graph Transformer is able to capture the complex relationships and long-distance dependencies between nodes in the disjunctive graph. In addition, by integrating the Graph Neural Network (GNN), the method can learn the topological structure between the disjunctive graphs. This novel approach can effectively model and optimize the fuzzy flexible job shop scheduling problem, showing excellent performance in capturing complex dependencies and achieving efficient scheduling.

[0139] This paper critically demonstrates that even with a single-layer, single-head attention mechanism, it is possible to achieve excellent competitive performance in large-scale disjunctive graph models. This encourages people to rethink the design principles behind Transformers. This paper reduces the quadratic complexity of Transformer to linear complexity, significantly shortening the training and inference time of large-scale fuzzy FJSP instances.

[0140] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments.

[0141] Example 1

[0142] S1. Construct a Markov decision model for large-scale fuzzy FJSP, design the state, action, reward, state transition and strategy related to large-scale fuzzy FJSP, which is defined by a five-tuple, namely (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 according to 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 characterize the objectives of this embodiment. It is worth emphasizing that, unlike the existing ones, the state space of this embodiment becomes smaller as production progresses (until it becomes empty, meaning that all processes have been scheduled and processing is completed), making the representation computationally attractive for real-time and large-scale applications.

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

[0145] Characteristics of the job:

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

[0147] 2) Scheduling label: This binary value (0 or 1) marks whether the process is scheduled (1) or not scheduled (0);

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

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

[0150] Features of the machine:

[0151] 1) The total number of machines (m);

[0152] 2) Work label: If M k If idle, the value is 0, otherwise it is 1;

[0153] 3) Remaining processing time: from T s Time to free time. (M k Idle 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 the remaining workload to

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

[0159] Action: At time step t=1, action a t ∈|A t | is composed of process-machine pairs. t =(6, 4) Here, it means that at time step t=1, the set of workpieces selectable by the agent is 6, and the number of machines selectable for processing the corresponding processes is 4.

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

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

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

[0163] Reward: The reward is defined as the state S t and S t+1 The difference in the completion time (makespan) of the partial scheduling in . Mathematically, it can be expressed as:

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

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

[0166]

[0167] For the specific problem instance of this embodiment, the initial completion time H max (s0) remains unchanged, which means minimizing the completion time C max and maximizing the G objective function) are equivalent objectives. 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 goal of minimizing the maximum completion time, this embodiment designs the following strategy:

[0169] Strategy: This study adopts the random strategy π(a t |s t ), whose distribution is generated by the DRL algorithm with trainable parameters. The optimization goal is to maximize the cumulative reward. Given a state s t , which returns the distribution that selects each action a t ∈|A t |The probability of.

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

[0171] Generally speaking, the solution to the fuzzy FJSP problem can be represented by a disjunctive graph of nodes, connecting arcs and disjunctive arcs, which is a classic way of expressing the solution to the scheduling problem. The disjunctive graph model of FJSP in this embodiment is represented by G = (N, C, D), where N includes nodes representing all job processes, including virtual start and end nodes; C represents a directed arc connecting adjacent processes 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 mixed graph consisting of undirected and directed arcs.

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

[0173] S3-1, input the disjunctive graph in S2 into the graph neural network to calculate the state feature Feature;

[0174] Step 1, the node representation is calculated by inputting the graph attention network into the node information and arc relationship;

[0175] The node characterization calculation formula is as follows:

[0176]

[0177] Step 2: This embodiment uses the Softmax function to mask the e ijk The value of is normalized to obtain the normalized attention coefficient, expressed 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 through a nonlinear activation function δ, this embodiment obtains an output feature vector:

[0180]

[0181] Step 4: This embodiment uses multi-head attention 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 inverse 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 get the final mean;

[0185]

[0186] S3-2, the initial feature vectors of process nodes, machine nodes and disjunctive arcs are mapped to node embeddings in the latent space using a shallow multi-layer perceptron (MLP), and 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 transform the input features Mapped into a node embedding in the latent space, denoted as Z (0) = f1(X), where f1 can be a shallow multilayer perceptron (MLP). These nodes are embedded Will be used for subsequent attention calculation and propagation.

[0188] Step 2, use a simplified global attention mechanism to model global node interactions. While typical Transformers rely on multiple layers of attention to meet their expression needs, the present invention finds that a single layer of global attention is sufficient. This effectiveness is attributed to the dense connections of the attention graph, which allows information from each node to be flexibly transmitted to other nodes in the same batch. Therefore, although the model of the present invention is simple, it can effectively capture the hidden dependencies between node pairs and reduce computational requirements. The present invention uses a linear attention mechanism to achieve this, as follows:

[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 Represent simple neural layers, usually linear feedforward layers, ||.|| represents the Frobenius norm, and 1 represents an N-dimensional column vector of all 1s. The diagonal operation converts an N-dimensional column vector into an N×N diagonal matrix. β is a hyperparameter of the residual connection. Z combines global pairwise attention propagation and self-loop propagation. The former helps the model capture the influence of neighboring nodes, while the latter retains important information of the central node.

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

[0193] Step 1: Integrate the prior information from the disjunctive graph. This paper adopts a simple but effective method: combined 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, and the GNN module uses GAT, which is well-known for its scalability on large-scale graphs.

[0196] A represents the adjacency matrix. Finally, Z O Used for downstream decision-making tasks

[0197] Step 2, as the last component of the proposed neural architecture, the present invention introduces a policy network, where each action a t are defined as a feasible OM pair. The present invention uses the decoder layer to process the information Z collected from the graph Transformer O The decoder layer is responsible for generating a probability distribution over the action space, so that actions can be sampled according to these probabilities to enhance exploration during reinforcement learning training. The decoder is built using a multi-layer perceptron as follows:

[0198]

[0199] Step 3, after scoring each action, the present invention implements a masking mechanism to exclude infeasible action-machine pairs. Specifically, the present invention sets the probability of infeasible pairs to negative infinity. Subsequently, the Softmax function is applied to generate a probability distribution, which is defined as follows.

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

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

[0202] S5. Determine whether [(s, a, r), ...] of 100 FJSP examples have been collected. If so, use the SAC algorithm to update the workpiece agent. Otherwise, jump to step S3:

[0203] Step 1, calculate the cumulative discounted return of 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 get R = [R[0], R[1], …, R[t], R[T]], where T is the last time step, considering the terminal state, and normalizing the cumulative return.

[0204] Step 2: Use the policy network to predict the state value at the next moment, and combine it with the minimum Q value output by the target value network to calculate the state value at the next moment. At the same time, taking into account the logarithmic probability and entropy of the action, the target Q value is calculated 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 ​​is used to update the parameters of the two value networks using gradient descent optimization.

[0206]

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

[0208] At the same time, through the value network Predict the current state value and take the minimum value to get the minimum state value. Next, calculate the loss J of the policy network π (θ), which includes the negative value of the policy network entropy and the weighted sum of the minimum state value. Finally, the parameters of the policy network are updated by the gradient descent method.

[0209]

[0210] Step 6, 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 by the gradient descent method so that the entropy value can gradually approach the target entropy value.

[0211]

[0212] Step 7. Finally, the two target value networks are updated through soft update. Parameters.

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

[0214] This embodiment uses a random search strategy to fine-tune the hyperparameters of the SGFormer-SAC model, iterates the hyperparameter tuning experiment on "Case 1", and systematically evaluates the impact of various configurations on performance optimization. Table 1 shows the results of the first five evaluations. According to the evaluation criteria of the present invention, the present invention selects hyperparameters with excellent performance from the initial group for subsequent experiments.

[0215] Table 1 Top 5 hyperparameters

[0216]

[0217]

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

[0219] Example 2

[0220] On the basis of Example 1, in order to verify the robustness of the model trained in this example on the benchmark instance, this example deeply evaluates the performance of the model trained on synthetic data on three different categories of public benchmarks. The distributions displayed by these benchmarks are completely different from the training instances. Each benchmark test set contains instances of different problem sizes. This example chooses to use a single trained SGFormer-SAC model for testing.

[0221] The following takes the solution process as an example. After the model training is completed, the proposed flexible job shop scheduling method based on attention mechanism and disjunctive graph embedding is described through the process of solving FMK09. The method includes the following specific steps:

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

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

[0224] Step 3: Input the disjunctive graph of the initial state into the simplified graph transformer and perform forward propagation calculation to obtain the features representing the current state. This step usually involves aggregating and transforming the information of 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: Execute state transition to obtain a new state, t=t+1;

[0227] Step 6: Determine whether the decision is complete. If the number of cycles = the sum of the number of processes for all workpieces, the termination state is reached and the solution is output. Otherwise, loop the above steps 2-6.

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

[0229] Table 2 shows the results of the method of the present invention on Case 1-5 instances. The method of the present invention is superior to the proposed GAT-SAC, GAT-PPO and DRL methods and the optimal scheduling rule. In order to further verify the effectiveness and feasibility of the algorithm of the present invention on large-scale instances, the present invention tested the largest instances in the MK12, MK15 and Hurink data sets. The results show that as the problem scale increases, the method of the present invention significantly improves the performance, surpassing the reinforcement learning framework and the optimal scheduling rule. This improvement stems from the fact that the method of the present invention can effectively model long-term dependencies in large-scale instances. In addition, although the method of the present invention is slightly inferior to the SATO metaheuristic algorithm in solution quality, the larger optimization space of the larger problem scale causes the metaheuristic algorithm to lag behind the method proposed in the present invention in both solution quality and speed. This further verifies the superiority of the SGFormer-SAC algorithm of the present invention in solving large-scale problems.

[0230] Table 2 Comparison results of various algorithms on 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 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 workshop scheduling problem, and the strategies include sampling strategies and greedy strategies;

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

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

[0236] The high-dimensional feature vector output module is used to 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;

[0237] A mapping module, for mapping the initial feature vectors of the process nodes, machine nodes and disjunctive arcs to the node embeddings of the fuzzy disjunctive graph in the latent space using a shallow multilayer perceptron, and mapping the node embeddings of the fuzzy disjunctive graph in the latent space to the final feature output vector using a simplified global attention mechanism of a graph transformer;

[0238] A decision module is used to weight the high-dimensional feature vector of the process node and the final feature output vector, input the weighted summed features into the decision network, and output the process-machine pair action;

[0239] A calculation module, used to calculate the decision loss of the decision network;

[0240] The updating module is used to determine the processing machines and processing sequences of all workpieces and update the parameters of the decision network according to the decision loss.

[0241] All relevant contents of each step involved in the aforementioned embodiment of a large-scale fuzzy flexible job shop scheduling method can be referred to the functional description of the functional module corresponding to a large-scale fuzzy flexible job shop scheduling device in the embodiment of the present invention, and will not be repeated here. The division of modules in the embodiment of the present invention is schematic, which is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present invention can be integrated into a processor, or it can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules.

[0242] In one embodiment of the present invention, a computer device is provided, the computer device comprising a processor and a memory, the memory being used to store a computer program, the computer program comprising program instructions, and the processor being used to execute 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 (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding functions; the processor described in the 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 can be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as an independent product. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media include 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 can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0245] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0246] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0247] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0248] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0249] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection 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 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 scheduling problem, and the strategies include sampling strategies and greedy strategies; S2, representing the large-scale fuzzy flexible shop scheduling problem as a fuzzy disjunctive graph of the constraint relationship between workpieces, processes and processing machines; the fuzzy disjunctive graph includes a number of process nodes, machine nodes and disjunctive arcs, and the disjunctive arcs are the connections between processes and machines; S3, defining the state characteristics of the process node, machine node and disjunctive arc, and processing 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 a high-dimensional feature vector of the process node; S5, mapping the initial feature vectors of the process nodes, machine nodes, and disjunctive arcs to the node embeddings of the fuzzy disjunctive graph in the latent space using a shallow multilayer perceptron, and using a simplified global attention mechanism of a graph transformer to map the node embeddings of the fuzzy disjunctive graph in the latent space to the final feature output vector; S6, performing weighted summation of the high-dimensional feature vector of the process node and the final feature output vector, and inputting the weighted summed features into the decision network, and outputting the process-machine pair action; S7, calculating the decision loss of the decision network; S8. Repeat S3 to S7 until the processing machines and processing sequences of all workpieces are determined, and the parameters of the decision network are updated according to the decision loss.

2. A large-scale fuzzy flexible job shop scheduling method according to claim 1, characterized in that: The simplified global attention mechanism of the Transformer in the figure is as follows: Where Q is the query vector, K is the key vector, V is the value vector, and f Q ,f K , and f V Represents a simple neural layer, usually a linear feedforward layer, represents the Frobenius norm, are the normalized query vector and key vector, 1 represents an N-dimensional column vector of all 1s, the diagonal operation converts 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, and Z combines global pairwise attention propagation and self-loop propagation. Attention propagation helps the model capture the influence of neighboring nodes, and self-loop propagation retains the information of the central node.

3. A large-scale fuzzy flexible job shop scheduling method according to claim 1, characterized in that: The weighted sum of the high-dimensional feature vector of the process node and the final feature output vector is as follows: WITH O =(1-α)Z+αGAT(X,A) 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 finally Z O is used in downstream decision-making tasks.

4. The large-scale fuzzy flexible job shop scheduling method according to claim 1, characterized in that: The initial feature vector of the process node is used as the input of the graph neural network of the graph transformer to obtain a high-dimensional feature vector of the process node, specifically: Input the initial feature vector of the process node into the graph neural network of the graph transformer to calculate the attention score of the process node; Use the Softmax function to normalize the attention score of the process node after the mask to obtain the normalized attention score of the process node; Multi-head attention is used to perform weighted linear combination of the normalized attention scores of the process nodes, and then the weighted linear combination results are processed by a nonlinear activation function to obtain a high-dimensional feature vector of the process node.

5. A large-scale fuzzy flexible job shop scheduling method according to claim 4, 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, e i,j,p is the attention score of the process node, Map the concatenated vector to real numbers and activate it through LeakyReLU; To represent the original process node characteristics of the graph, d o is the number of node features; is a learnable matrix, whose dimensions represent the dimensions of input and output respectively; || stands for concatenate, which means the bonding of tensors; i is the number of workpieces, p and j are processes, and |pj|≤1.

6. A large-scale fuzzy flexible job shop scheduling method according to claim 5, characterized in that: The Softmax function is used to normalize the attention score of the process node after the mask to obtain the normalized attention score of the process node. The specific formula is as follows: α ijp =Softmax(mask(e i,j,p )) In the formula, α ijp is the normalized attention score of the process node.

7. A large-scale fuzzy flexible job shop scheduling method according to claim 6, characterized in that: The weighted linear combination result is processed by a nonlinear activation function to obtain a high-dimensional feature vector of the process node, which is as follows: In the formula, is the high-dimensional feature vector of the process node at time t, is the number of attention heads, σ is the activation function, W m is the learnable parameter after the mth update.

8. A large-scale fuzzy flexible job shop scheduling device, characterized in that: include: Building module for constructing Markov decision model for large-scale fuzzy flexible shop scheduling problem; The Markov decision model includes states, actions, rewards, state transitions and strategies related to the large-scale fuzzy flexible shop scheduling problem, and the strategies include sampling strategies and greedy strategies; A representation module is used to represent the large-scale fuzzy flexible shop scheduling problem as a fuzzy disjunctive graph of constraint relationships between workpieces, processes and processing machines; the fuzzy disjunctive graph includes a number of process nodes, machine nodes and disjunctive arcs, and the disjunctive arcs are connections between processes and machines; An initial feature vector processing module, used to define the state features of the process nodes, machine nodes and disjunctive arcs, and process them into the form of initial feature vectors respectively; The high-dimensional feature vector output module is used to 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; A mapping module, for mapping the initial feature vectors of the process nodes, machine nodes and disjunctive arcs to the node embeddings of the fuzzy disjunctive graph in the latent space using a shallow multilayer perceptron, and mapping the node embeddings of the fuzzy disjunctive graph in the latent space to the final feature output vector using a simplified global attention mechanism of a graph transformer; A decision module is used to weight the sum of the high-dimensional feature vector of the process node and the final feature output vector, input the weighted summed features into the decision network, and output the process-machine pair action; A calculation module, used to calculate the decision loss of the decision network; The updating module is used to determine the processing machines and processing sequences of all workpieces and update the parameters of the decision network according to the decision loss.

9. A device 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, the steps of a large-scale fuzzy flexible job shop scheduling method as described in any one of claims 1 to 7 are implemented.

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

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

  • Stock price collapse risk prediction method based on multi-relation reconstruction and fusion graph neural network

    CN117808586A

  • Flexible job shop scheduling method and device and readable storage medium

    CN118195263A

  • Deep learning method for multiple object tracking from video

    US20240144489A1

Cited By

  • Configurable flexible job shop scheduling method based on multi-agent game model

    CN119623954A

  • Multi-target flexible job shop scheduling method based on graph network and reinforcement learning

    CN119918840A

  • Deep reinforcement learning flexible manufacturing workshop job scheduling method based on double-path graph attention

    CN119960401A

  • Deep reinforcement learning method for flexible manufacturing cell job scheduling based on dual-path graph attention

    CN119960401B

  • CNN-Transform-based dynamic flexible job shop scheduler and scheduling method

    CN120215438A