Flexible job shop scheduling method and device based on graph enhanced dual-branch and dual attention network

CN122694149BActive Publication Date: 2026-10-30JIANGNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611191288.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-10-30
Estimated Expiration
2046-08-07

AI Technical Summary

Technical Problem

[0005]为此,本发明所要解决的技术问题在于克服现有技术中的作业车间动态调度方法存在生成的调度决策精度低、缺乏全局统筹优化能力导致车间的整体生产效率低、无法在随机性环境下生成稳定可行的调度决策的问题

Benefits of technology

通过构建以加工工序为节点,以加工工序的执行顺序和加工机器对加工工序的资源竞争关系为边的有向图结构,从而可以充分捕捉工序和机器之间复杂的依赖关系和拓扑信息;基于有向图结构中各个节点和边的特征信息获取有向图结构特征张量组,为了能够在随机性环境下生成稳定可行的调度决策,通过随机对加工时长叠加噪声以模仿随机扰动,进而生成多个随机生产场景特征张量组,并利用可学习的场景注意力机制基于多个随机生产场景特征张量组生成两组FiLM参数,利用两组FiLM参数参与后续的特征提取流程,对加工工序节点和加工机器的特征进行自适应缩放与偏移调制,最终生成用于强化学习的状态向量,使得状态向量不仅适配单一确定性工况,解决传统静态调度模型在随机场景下决策失效的问题;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122694149B_ABST
    Figure CN122694149B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of intelligent manufacturing and artificial intelligence technology, and relates to a flexible workshop scheduling method and device based on graph enhanced double branch and double attention network. Based on the pairing feature vectors of each processing procedure node, each processing machine and the processing procedure node and processing machine, a directed graph structure feature tensor group is obtained. The processing time of each processing procedure node is disturbed to obtain multiple random production scene feature tensor groups. A learnable scene attention mechanism is used to generate two groups of FiLM parameters based on the multiple random production scene feature tensor groups. The features of the processing procedure nodes are adaptively scaled and offset modulated using the two groups of FiLM parameters, and the target features are output. The features of the unprocessed procedure nodes and the target features are used as the state space, and the scheduling decision is used as the action space. Reinforcement learning trial and error iteration optimization is performed, and a job workshop dynamic scheduling scheme is output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of intelligent manufacturing and artificial intelligence technology, and in particular to a flexible workshop scheduling method and apparatus using graph-enhanced bi-branch and dual-attention networks. Background Technology

[0002] With the deepening development of Industry 4.0 and intelligent manufacturing, production scheduling systems face increasing complexity and dynamism. The flexible job shop scheduling problem, a core issue in production scheduling, aims to allocate appropriate machines and start times to each process operation while satisfying process and machine constraints, thereby optimizing key performance indicators such as production cycle time and equipment utilization. Traditional scheduling methods, such as mathematical programming, heuristic rules, and genetic algorithms, often face bottlenecks in handling large-scale, multi-constraint dynamic scheduling problems, including high computational complexity, slow response speed, and difficulty in adapting to environmental changes.

[0003] In recent years, deep reinforcement learning technology has provided a new approach to solving complex scheduling problems. It learns optimal strategies through interaction with the environment, thereby generating corresponding scheduling strategies for dynamic events in the production process (such as equipment failures and emergency order insertions). Specifically, it transforms the shop floor scheduling scenario into a reinforcement learning environment, uses vectors or matrices to represent the scheduling state, and continuously interacts with the environment to iterate and generate scheduling strategies under the given state. However, existing reinforcement learning-based scheduling methods still have the following problems: 1. Using flattened vectors or matrices to describe the scheduling state makes it difficult to effectively capture the complex dependencies and topological structures between jobs and machines, resulting in low accuracy of the generated scheduling decisions; 2. It ignores the correlation between static features (such as process constraints and machine capabilities) and dynamic features (machine load and task waiting time) in the shop floor scheduling environment, making it impossible to simultaneously consider the interaction between fixed process constraints and real-time production load during the reinforcement learning process. It can only generate decisions based on instantaneous local dynamic information, resulting in a lack of global optimization capabilities in the generated scheduling decisions and failing to improve the overall production efficiency of the shop floor; 3. It cannot generate stable and feasible scheduling decisions in stochastic environments (such as fluctuations in the processing time of processes).

[0004] In summary, existing dynamic scheduling methods for job shops suffer from problems such as low accuracy of generated scheduling decisions, lack of global overall optimization capabilities leading to low overall production efficiency of the job shop, and inability to generate stable and feasible scheduling decisions in random environments. Summary of the Invention

[0005] Therefore, the technical problem to be solved by the present invention is to overcome the problems of low accuracy of the scheduling decisions generated by the existing workshop dynamic scheduling methods, lack of global overall planning and optimization capabilities leading to low overall production efficiency of the workshop, and inability to generate stable and feasible scheduling decisions in random environments.

[0006] To address the aforementioned technical problems, this invention provides a flexible shop floor scheduling method using graph-enhanced dual-branch and dual-attention networks, comprising: Using processing steps as graph nodes and the execution order of processing steps and the resource competition relationship between processing machines and processing steps as edges, a directed graph structure for dynamic scheduling of the workshop is constructed. Feature extraction is performed on the directed graph structure to obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine, thereby obtaining the feature tensor group of the directed graph structure. The processing time of each processing node in the directed graph structure is randomly perturbed multiple times. Features are extracted from the directed graph structure after each perturbation to obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine. Thus, a set of random production scene feature tensors after each perturbation is obtained. Two sets of FiLM parameters are generated by using a learnable scene attention mechanism based on multiple randomly generated scene feature tensors generated through multiple perturbations. The directed graph structure feature tensor set and the first set of FiLM parameters are input into a graph-enhanced dual-branch attention network for feature extraction and FiLM modulation, outputting perturbation-containing node embedding features for each processing node; the directed graph structure feature tensor set, the node embedding features for each processing node and the second set of FiLM parameters are input into a dual attention network for feature aggregation and FiLM modulation, outputting perturbation-containing target features. Using the features of unprocessed process nodes and target features as the state space and scheduling decisions as the action space, reinforcement learning trial and error iterative optimization is performed to output a dynamic scheduling scheme for the job shop.

[0007] Preferably, the feature vector of the processing process node includes a process completion flag, a schedulable flag, the position code of the process within the operation, the global process position code, the ratio of the shortest processing time to the global maximum processing time, the ratio of the average processing time to the global maximum processing time, the normalized waiting time, the normalized remaining workload, the percentage of remaining processes, and the percentage of available processing machines. The feature vector of a processing machine includes the proportion of candidate jobs, the number of candidate processing steps, the shortest processing time, the average processing time, the current waiting time, the working status, the queue length, the average waiting time, the time until the processing machine is idle, the processing machine idle rate, the processing machine available time, and the processing machine number. The pairing feature vector between a processing step node and a processing machine includes at least the ratio of the processing time of the processing step to the global maximum processing time, and the ratio of the processing step duration to the maximum processing time of that processing step.

[0008] Preferably, the processing time of each processing step node in the directed graph structure is randomly perturbed multiple times. Feature extraction is performed on the directed graph structure after each perturbation to obtain the feature vectors of each processing step node, the feature vectors of each processing machine, and the paired feature vectors of the processing step node and the processing machine. This yields a set of random production scene feature tensors after each perturbation, including: S11: Based on the processing time of each processing operation node in the directed graph structure, construct a processing time matrix; where each row of the processing time matrix represents a processing operation, each column represents a processing machine, and the matrix elements represent the processing time of the corresponding processing operation on the corresponding processing machine. S12: Generate a random perturbation factor matrix with the same dimension as the processing time matrix based on a preset probability distribution. Multiply the random perturbation factors in the random perturbation factor matrix with the matrix elements at the corresponding positions in the processing time matrix to obtain the perturbation processing time matrix. S13: Update the processing time matrix based on the perturbation processing time matrix, thereby updating the processing time of each processing operation node in the directed graph structure, and obtaining a perturbed directed graph structure; S14: Extract features from the perturbed directed graph structure to obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine, thereby obtaining a set of random production scene feature tensors. S15: Return to step S12 until the number of random production scene feature tensor groups reaches the preset number.

[0009] Preferably, two sets of FiLM parameters are generated based on multiple randomly generated scene feature tensors generated through multiple perturbations using a learnable scene attention mechanism, including: The feature vectors of each processing node in each random production scenario feature tensor group are input into the linear mapping layer to obtain the mapped feature vectors of each processing node, thereby obtaining the process feature sequence of each random production scenario feature tensor group. Using the learnable induced matrix as the query and the process feature sequence of each random production scenario feature tensor group as the key and value, perform the first multi-head attention operation to obtain the induced feature representation of each random production scenario feature tensor group; using the process feature sequence of each random production scenario feature tensor group as the query and the induced feature representation as the key and value, perform the second multi-head attention operation to obtain the aggregated process features of each random production scenario feature tensor group. Global average pooling is performed on the aggregated process features of each random production scenario feature tensor group along the processing process dimension, and the pooling results are layer normalized to obtain the process context features of each random production scenario feature tensor group. The process context features of each random production scenario feature tensor group are input into multiple parallel fully connected output layers to generate the first set of initial FiLM parameters and the second set of initial FiLM parameters for each random production scenario; each set of initial FiLM parameters includes scaling parameters and offset parameters. Global average pooling is performed on the feature vectors of each processing node in the feature tensor group of each random production scenario along the processing process dimension, and global average pooling is performed on the feature vectors of each processing machine along the machine dimension. The two pooling results are then concatenated along the feature dimension to obtain the scenario-level representation vector of each random production scenario. The scene-level representation vector of each random production scene is input into a scene attention network consisting of two fully connected layers and a ReLU activation function, and the attention logit of each random production scene is output. The attention logit of all random production scenes is normalized by Softmax to obtain the attention weight of each random production scene. Using attention weights as weighting coefficients, the first set of initial FiLM parameters for all random production scenarios are weighted and summed along the scene dimension to obtain the first set of fused FiLM parameters. Using attention weights as weighting coefficients, the second set of initial FiLM parameters for all random production scenarios are weighted and summed along the scene dimension to obtain the fused second set of FiLM parameters. The first and second sets of FiLM parameters after fusion are used for feature modulation of the graph-enhanced dual-branch attention network and the dual attention network, respectively.

[0010] Preferably, the directed graph structure feature tensor set and the first set of FiLM parameters are input into a graph-enhanced dual-branch attention network for feature extraction and FiLM modulation, outputting the perturbation-containing node embedding features of each processing step node, including: Based on the feature vectors of each processing node in the directed graph structure feature tensor group, the node feature matrix is ​​obtained; according to the two preset feature channel group indices, the corresponding feature channels are selected from the node feature matrix to obtain the first channel feature sequence group and the second channel feature sequence group. The first channel feature sequence group and the second channel feature sequence group are respectively input into the independent first GRU coding branch and the second GRU coding branch for temporal feature extraction. The outputs of the two GRU coding branches are linearly mapped and then connected along the feature dimension to obtain the fused temporal features of each processing node. The first set of FiLM parameters is used to perform an element-wise affine transformation on the fusion timing features of each processing node to obtain the first modulation features of each processing node. The first modulation features of each processing node are used as queries, keys, and values ​​to input into a multi-head self-attention layer. Attention aggregation is performed on the first modulation features of each processing node to obtain the node embedding features of each processing node containing random perturbation information.

[0011] Preferably, after obtaining the node embedding features containing random perturbation information for each processing step node, the process further includes: The node embedding features of every two connected processing steps in the directed graph structure are concatenated along the feature dimension to obtain the edge features of the connecting edges. The edge features are input into an edge association weight generation network that includes a first fully connected layer, a ReLU activation function, a second fully connected layer, and a Sigmoid activation function to obtain the edge association weights of the connecting edges between every two processing nodes that have a connection relationship.

[0012] Preferably, the directed graph structure feature tensor set, the node embedding features of each processing step node, and the second set of FiLM parameters are input into a dual attention network for feature aggregation and FiLM modulation, outputting target features containing perturbations, including: Perform a linear mapping on the feature vectors of each processing node so that the feature vectors of each processing node after the linear mapping have the same feature dimension as the node embedding features of each processing node. For each processing node, its linearly mapped feature vector is concatenated with its node embedding feature along the feature dimension, and the concatenation result is input into a gating network including fully connected layers and a Sigmoid activation function to obtain the element-wise gating coefficients of each processing node. The feature vectors of each processing step node after linear mapping are obtained by using the element-wise gating coefficients of each processing step node and the node embedding features of each processing step node. The weighted fusion result is then normalized to obtain the fused process features of each processing step node. Linear mapping is performed on the fused process features of each processing node and the feature vector of each processing machine to obtain the process mapping features of each processing node and the machine mapping features of each processing machine. The process mapping features of each processing node are transformed element-wise using the second set of FiLM parameters to obtain the second modulation features of each processing node. The second modulation features of each processing node are linearly mapped to generate queries, keys, and values, thereby calculating the scaling dot product basic attention score between each processing node based on the queries and keys of each processing node; The scaling dot product base attention score between corresponding processing process nodes is adjusted by using the edge association weight of the connection edge between every two processing process nodes with a connection relationship, thereby obtaining the graph-enhanced process attention weight between each processing process node and other processing process nodes. By using graph-enhanced process attention weights, the values ​​of each processing process node are weighted and aggregated to obtain the process self-attention features of each processing process node; Using the process self-attention features of each processing node as the query and the machine mapping features of each processing machine as the key and value, the first cross-attention operation of the process-attention machine is executed. The output of the first cross-attention operation is then residually connected and layer normalized with the process self-attention features of each processing node to obtain the machine-enhanced process features of each processing node. Using the machine mapping features of each processing machine as the query and the machine-enhanced process features of each processing process node as the key and value, the second cross-attention operation of the machine-focused process is performed. The output of the second cross-attention operation is then residually connected and layer normalized with the machine mapping features of each processing machine to obtain the process-enhanced machine features of each processing machine. Linear mapping and ELU activation are performed on the machine augmentation process features of each processing process node and the process augmentation machine features of each processing machine to obtain the target process features of each processing process node and the target machine features of each processing machine. Non-zero average pooling is performed on the target process features of all processing process nodes to obtain global processing process features, and non-zero average pooling is performed on the target machine features of all processing machines to obtain global processing machine features. By concatenating the global processing procedure features and the global processing machine features along the feature dimension, the target features containing perturbations are obtained.

[0013] Preferably, the features of the unprocessed process nodes and the target features are used as the state space, and the scheduling decision is used as the action space. Reinforcement learning trial-and-error iterative optimization is performed to output a dynamic scheduling scheme for the job shop, including: S21: Select unfinished processing nodes that meet the process pre-sequence constraints as candidate processing nodes. Concatenate the feature vectors of the candidate processing nodes, the feature vectors of the corresponding processing machines, the paired feature vectors of the corresponding processing machines, and the element-wise cross features of the feature vectors of the candidate processing nodes and the feature vectors of the corresponding processing machines along the feature dimension as the state vector of the t-th scheduling decision step. S22: Input the state vector of the t-th scheduling decision step into the Actor network, output the logit of each candidate processing operation-machine action pair of the t-th scheduling decision step, and use the action mask to block invalid candidate processing operation-machine action pairs. After scaling the logit of the remaining valid candidate processing operation-machine action pairs according to the preset scaling factor, perform Softmax normalization to obtain the action probability distribution of the valid candidate processing operation-machine action pairs, and then select a valid candidate processing operation-machine action pair as the scheduling action of the t-th scheduling decision step. S23: Update the target features based on the scheduling action of the (t-1)th scheduling decision step, input the updated target features into the Critic network, and output the state value estimate of the tth scheduling decision step; S24: Execute the scheduling action pair of the t-th scheduling decision step and calculate the reward function value, and obtain the state vector of the (t+1)-th scheduling decision step; store the updated target features, the state vector of the t-th scheduling decision step, the scheduling action and its probability, the state value estimate and the reward function value as an empirical tuple in the temporary trajectory cache; S25: Update t = t + 1, and return to execute step S21 until all unfinished processing operations that satisfy the process preconditions are scheduled, and obtain the trajectory dataset based on all temporary trajectory caches; S26: Based on the reward function value in the trajectory dataset and the state value estimate output by the Critic network, calculate the advantage estimate for each scheduling decision step using the generalized advantage estimation method; calculate the reward value for each scheduling decision step based on the advantage estimate and the state value estimate output by the Critic network; randomly arrange the empirical tuple indexes in the trajectory dataset and divide the trajectory dataset into multiple mini-batches according to the preset mini-batch size; input each mini-batch into the Actor network and the Critic network respectively, recalculate the target action probability of each scheduling decision step under the current network parameters using the Actor network, and recalculate the target state value estimate under the current network parameters using the Critic network; calculate the value of the total loss function based on the target action probability, target state value estimate, action probability, advantage estimate, and reward value of each scheduling decision step, and update the parameters of the Actor network, Critic network, learnable scene attention mechanism, graph-augmented bi-branch attention network, and dual attention network based on the value of the total loss function; S27: Return to step S21 to iteratively optimize the Actor network, Critic network, learnable scene attention mechanism, graph-augmented bi-branch attention network, and dual attention network until the number of iterations reaches the preset number; select scheduling actions based on the action probability distribution output by the trained Actor network at each scheduling decision step until all processing steps are completed.

[0014] Preferably, the total loss function The calculation formula is: , , , , , = , , , , in, Represents the mathematical expectation; This represents the PPO pruning strategy loss of the Actor network; This represents the pruning value loss of the Critic network; The policy entropy represents the action probability distribution output by the Actor network; Indicates the value loss coefficient; This represents the entropy reward coefficient; Represents the parameters of the Actor network; These represent the parameters of the Critic network; This represents the advantage estimate for the t-th scheduling decision step, used to measure the candidate processing operation-machine action pair. A parameter indicating the degree of superiority or inferiority compared to the average level; This represents the advantage estimate for the (t+1)th scheduling decision step; Cutting operation; , This represents the clipping hyperparameter; This indicates the state of the Actor network after parameter updates. Output candidate processing steps - machine motion pairs The probability of the target action; This indicates the state of the Actor network before the parameter update. Output candidate processing steps - machine motion pairs The probability of the action; Represents the time-series differential residual; Let represent the reward function value at the t-th scheduling decision step; This represents the target state value estimate of the t-th scheduling decision step output by the Critic network after parameter updates. This represents the state value estimate of the t-th scheduling decision step output by the Critic network before parameter updates; This represents the state value estimate of the (t+1)th scheduling decision step output by the Critic network before parameter updates; Indicates Based on this, the change in the current value forecast relative to the old value forecast is limited to [- , The estimated value of the cut-off state obtained after [further details needed]. Indicates the discount factor; Indicates the end of the trajectory; This represents the set of all valid candidate processing steps-machine action pairs output by the t-th scheduling decision step; This parameter represents the degree to which the advantage estimate takes into account subsequent time-series difference residuals. This represents the target value used to train the current Critic network.

[0015] The present invention also provides a flexible shop floor scheduling device with graph-enhanced bi-branch and dual-attention networks, comprising: The topology graph construction module is used to construct a directed graph structure for dynamic scheduling of the job shop, with processing operations as graph nodes and the execution order of processing operations and the resource competition relationship between processing machines and processing operations as edges. The directed graph structure feature tensor group acquisition module is used to extract features from the directed graph structure, obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine, thereby obtaining the directed graph structure feature tensor group. The random scene feature tensor group generation module is used to randomly perturb the processing time of each processing process node in the directed graph structure multiple times, extract features from the directed graph structure after each perturbation, and obtain the feature vectors of each processing process node, the feature vectors of each processing machine, and the paired feature vectors of the processing process node and the processing machine, thereby obtaining the random production scene feature tensor group after each perturbation. The FiLM parameter generation module is used to generate two sets of FiLM parameters based on multiple randomly generated scene feature tensors generated through multiple perturbations using a learnable scene attention mechanism. The perturbation feature extraction module is used to input the directed graph structure feature tensor set and the first set of FiLM parameters into a graph-enhanced dual-branch attention network for feature extraction and FiLM modulation, and output the node embedding features containing perturbations for each processing node; the directed graph structure feature tensor set, the node embedding features for each processing node and the second set of FiLM parameters are input into a dual attention network for feature aggregation and FiLM modulation, and output the target features containing perturbations. The scheduling scheme acquisition module is used to take the features of the unprocessed process nodes and the target features as the state space and the scheduling decision as the action space, perform reinforcement learning trial and error iterative optimization, and output the dynamic scheduling scheme of the job shop.

[0016] The graph-enhanced bi-branch and dual-attention network flexible shop floor scheduling method provided in this application has the following beneficial effects: By constructing a directed graph structure with processing steps as nodes and the execution order of processing steps and the resource competition relationship between processing machines and processing steps as edges, the complex dependencies and topological information between processes and machines can be fully captured. Based on the feature information of each node and edge in the directed graph structure, a set of directed graph structure feature tensors is obtained. In order to generate stable and feasible scheduling decisions in random environments, noise is randomly superimposed on the processing time to simulate random disturbances, thereby generating multiple sets of random production scenario feature tensors. A learnable scene attention mechanism is used to generate two sets of FiLM parameters based on multiple sets of random production scenario feature tensors. The two sets of FiLM parameters are used in the subsequent feature extraction process to adaptively scale and offset the features of processing step nodes and processing machines, and finally generate a state vector for reinforcement learning. This makes the state vector not only adaptable to single deterministic working conditions, but also solves the problem of decision failure of traditional static scheduling models in random scenarios. During feature extraction, the first set of FiLM parameters is used to directly perform element-wise affine modulation on the fused temporal features of the processing steps. The representation amplitude of the temporal features of different processing steps is adaptively adjusted according to different working conditions, so that the generated first modulated feature carries the prior knowledge of random fluctuations in workshop hours. Finally, it is input into a multi-head self-attention layer for fusion, generating node embedding features of the processing steps that include random time perturbations and global information. The second set of FiLM parameters is applied to the already fused embedding features, thereby balancing the representation intensity of the perturbation features of each processing step at the global level and generating the second modulated feature of each processing step node. Then, the correlation weight between every two processing step nodes is calculated to perform feature extraction. Weighted aggregation is used to compensate for and smooth out the extreme fluctuations in working hours of some processing steps due to random disturbances by using the features of other stable processing steps, thereby suppressing feature distortion caused by noise in a single scene. Then, cross-attention operation is performed on the process self-attention features of each processing step node and the mapping features of each processing machine to obtain machine-enhanced process features and process-enhanced machine features. After average pooling of the two to obtain global processing step features and global processing machine features, they are concatenated to obtain the target features containing random disturbances in working hours, processing step features, processing machine features and global information. This solves the problem of poor global coordination ability caused by relying only on local dynamic information to generate scheduling schemes. Attached Figure Description

[0017] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 The flowchart of the graph-enhanced bi-branch and dual-attention network flexible shop scheduling method provided in this application is shown. Figure 2A schematic diagram of the flexible shop floor scheduling framework with graph-enhanced bi-branch and dual attention networks provided in this application; Figure 3 A schematic diagram of the structure of the graph-enhanced bi-branch and dual-attention network flexible workshop scheduling device provided in this application. Detailed Implementation

[0018] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0019] Please refer to the following: Figure 1 and Figure 2 , Figure 1 The diagram shown is a flowchart of the graph-enhanced bi-branch and dual-attention network flexible shop floor scheduling method provided in this application. Figure 2 The diagram shown is a schematic of the graph-enhanced dual-branch and dual-attention network flexible workshop scheduling framework provided in this application. The method specifically includes S10~S60.

[0020] S10: Construct a directed graph structure for dynamic scheduling of the workshop, with processing steps as graph nodes and the execution order of processing steps and the resource competition relationship between processing machines and processing steps as edges.

[0021] For example, the processing steps of workpiece J1 are O11 and O12, and the processing steps of workpiece J2 are O21 and O22. The processing machines are M1 and M2. O11 and O21 can both be executed on processing machine M1, and O12 and O22 can both be executed on processing machine M2. Then the graph nodes include O11, O12, O21, and O22. Nodes O11 and O12 are connected by directed arrows according to the execution order of the processing steps, and nodes O21 and O22 are connected by directed arrows according to the execution order of the processing steps. A machine resource competition edge is set between nodes O11 and O21 to represent the competition for processing machine M1, and a machine resource competition edge is set between nodes O12 and O22 to represent the competition for processing machine M2. This means that M1 is simultaneously competed by O11 and O21, and M2 is simultaneously competed by O12 and O22. Thus, a directed graph structure for dynamic scheduling of the job shop can be obtained.

[0022] S20: Perform feature extraction on the directed graph structure to obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine, thereby obtaining the feature tensor set of the directed graph structure.

[0023] Furthermore, the feature vector of the processing operation node includes operation completion flag, schedulable flag, operation position code within the job, global operation position code, ratio of shortest processing time to global maximum processing time, ratio of average processing time to global maximum processing time, normalized waiting time, normalized remaining workload, percentage of remaining operations, and percentage of available processing machines.

[0024] Furthermore, the feature vector of the processing machine includes the proportion of candidate jobs, the number of candidate processing steps, the shortest processing time, the average processing time, the current waiting time, the working status, the queue length, the average waiting time, the time until the processing machine is idle, the processing machine idle rate, the processing machine available time, and the processing machine number.

[0025] Furthermore, the pairing feature vector between the processing operation node and the processing machine includes at least the ratio of the processing operation's processing time to the global maximum processing time, and the ratio of the processing operation's processing time to the maximum processing time of that processing operation. For example, it may also include: the ratio of processing time to the machine's maximum processing time, the combined waiting time of the operation and the machine, the difference between the machine's completion time and the average completion time, the impact of estimating the lower bound of the completion time, the current machine utilization rate, and the degree of matching between the processing time and the remaining working hours of the job.

[0026] Specifically, the feature vector of the processing step node is used to characterize the attributes of the processing task itself and its current execution state, the feature vector of the processing machine is used to characterize the load state and availability state of the processing machine, and the pairing feature vector of the processing step node and the processing machine is a feature vector independently constructed for the combination relationship between the processing step and the processing machine, used to represent the relative characteristics of the working time after the processing step node and the processing machine are combined.

[0027] S30: The processing time of each processing node in the directed graph structure is randomly perturbed multiple times. Features are extracted from the directed graph structure after each perturbation to obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine, thereby obtaining the random production scene feature tensor group after each perturbation.

[0028] Furthermore, step S30 includes S11 to S15.

[0029] S11: Based on the processing time of each processing operation node in the directed graph structure, construct a processing time matrix; where each row of the processing time matrix represents a processing operation, each column represents a processing machine, and the matrix elements represent the processing time of the corresponding processing operation on the corresponding processing machine. S12: Generate a random perturbation factor matrix with the same dimension as the processing time matrix based on a preset probability distribution. Multiply the random perturbation factors in the random perturbation factor matrix with the matrix elements at the corresponding positions in the processing time matrix to obtain the perturbation processing time matrix. For example, the preset probability distribution can be a log-normal distribution, and the coefficient of variation of the processing time after perturbation is 0.15.

[0030] S13: Update the processing time matrix based on the perturbation processing time matrix, thereby updating the processing time of each processing operation node in the directed graph structure, and obtaining a perturbed directed graph structure; S14: Extract features from the perturbed directed graph structure to obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine, thereby obtaining a set of random production scene feature tensors. S15: Return to step S12 until the number of random production scene feature tensor groups reaches the preset number.

[0031] For example, the number of feature tensor groups for a random production scenario can be 5.

[0032] S40: Utilize a learnable scene attention mechanism to generate two sets of FiLM parameters based on multiple randomly generated scene feature tensors generated through multiple perturbations.

[0033] Furthermore, step S40 includes S400~S407.

[0034] S400: Input the feature vectors of each processing node in each random production scenario feature tensor group into the linear mapping layer to obtain the mapping feature vectors of each processing node, thereby obtaining the process feature sequence of each random production scenario feature tensor group.

[0035] S401: Using the learnable induced matrix as the query and the process feature sequence of each random production scenario feature tensor group as the key and value, perform the first multi-head attention operation to obtain the induced feature representation of each random production scenario feature tensor group; using the process feature sequence of each random production scenario feature tensor group as the query and the induced feature representation as the key and value, perform the second multi-head attention operation to obtain the aggregated process features of each random production scenario feature tensor group.

[0036] S402: Perform global average pooling on the aggregated process features of each random production scenario feature tensor group along the processing process dimension, and perform layer normalization on the pooling results to obtain the process context features of each random production scenario feature tensor group.

[0037] S403: Input the process context features of each random production scenario feature tensor group into multiple parallel fully connected output layers to generate the first set of initial FiLM parameters and the second set of initial FiLM parameters for each random production scenario; wherein each set of initial FiLM parameters includes scaling parameters and offset parameters.

[0038] S404: Perform global average pooling on the feature vectors of each processing node in the feature tensor group of each random production scenario along the processing process dimension, and perform global average pooling on the feature vectors of each processing machine along the machine dimension. Then, concatenate the two pooling results along the feature dimension to obtain the scenario-level representation vector of each random production scenario.

[0039] S405: Input the scene-level representation vector of each random production scene into the scene attention network consisting of two fully connected layers and a ReLU activation function, and output the attention logit of each random production scene; perform Softmax normalization on the attention logit of all random production scenes to obtain the attention weight of each random production scene.

[0040] S406: Using attention weights as weighting coefficients, the first set of initial FiLM parameters for all random production scenarios are weighted and summed along the scenario dimension to obtain the first set of fused FiLM parameters.

[0041] S407: Using attention weights as weighting coefficients, the second set of initial FiLM parameters for all random production scenarios are weighted and summed along the scene dimension to obtain the fused second set of FiLM parameters.

[0042] The first and second sets of FiLM parameters after fusion are used for feature modulation of the graph-enhanced dual-branch attention network and the dual attention network, respectively.

[0043] Specifically, each set of FiLM parameters ( , The formula for generating ) is: , , in, and For trainable network submodules, The input is a set of feature tensors for random production scenarios.

[0044] It should be noted that the trainable network submodule is the FiLM parameter generation network, which specifically includes a linear mapping layer, a first multi-head attention layer, a second multi-head attention layer, an average pooling layer, a layer normalization layer, and four parallel fully connected output layers.

[0045] To generate stable and feasible scheduling decisions in stochastic environments, this application simulates random disturbances by randomly superimposing noise on processing times, thereby generating samples from multiple random production scenarios. For each random production scenario, a pre-defined FiLM generation network independently generates the corresponding first and second sets of FiLM parameters, ensuring that the modulation signal of each scenario fully retains its unique uncertainty pattern. Subsequently, through a learnable scenario attention mechanism, attention weights are dynamically calculated based on the global representation of each scenario, and the FiLM parameters of all scenarios are adaptively weighted and fused based on these weights. This fusion method ensures that the final FiLM parameters can fully cover random working conditions such as fluctuations in workshop hours and delays in processing machines, while automatically suppressing interference from abnormal disturbance scenarios. This generates a state vector for reinforcement learning, making the state vector adaptable not only to single deterministic working conditions but also solving the problem of decision failure in random scenarios for traditional static scheduling models.

[0046] Furthermore, directly inputting multiple random scene feature matrices into subsequent networks to output scheduling schemes would generate a large amount of redundant data, leading to a significant increase in computational overhead. Therefore, this application first uses a scene attention mechanism to weight and aggregate the FiLM parameters of multiple random scenes, and then uses the fused two sets of FiLM parameters to participate in subsequent feature modulation and integrate them into the final state vector. Since the FiLM parameters themselves have extremely small dimensions, the random uncertainty of the workshop can be fully injected into the scheduling state without significantly expanding the dimension of the state vector or increasing inference latency, thus balancing the real-time performance of dynamic scheduling with the completeness of environmental perception.

[0047] S50: Input the directed graph structure feature tensor set and the first set of FiLM parameters into the graph-enhanced dual-branch attention network for feature extraction and FiLM modulation, and output the node embedding features containing perturbations for each processing node; input the directed graph structure feature tensor set, the node embedding features of each processing node and the second set of FiLM parameters into the dual attention network for feature aggregation and FiLM modulation, and output the target features containing perturbations.

[0048] Furthermore, the directed graph structure and the first set of FiLM parameters are input into a graph-enhanced dual-branch attention network for feature extraction and FiLM modulation, and the node embedding features containing perturbations for each processing step node are output, including S500~S503.

[0049] S500: Based on the feature vectors of each processing node in the directed graph structure feature tensor group, obtain the node feature matrix; select the corresponding feature channel from the node feature matrix according to the two preset feature channel group indices to obtain the first channel feature sequence group and the second channel feature sequence group.

[0050] For example, the feature vectors of the three processing node are respectively , , If the preset indexes of the two feature channel groups are 1, 3 and 1, 2 respectively, then the first channel feature sequence group is: , The second channel feature sequence group is , .

[0051] S501: Input the first channel feature sequence group and the second channel feature sequence group into the independent first GRU coding branch and the second GRU coding branch respectively for temporal feature extraction. After linear mapping of the outputs of the two GRU coding branches, connect them along the feature dimension to obtain the fused temporal features of each processing node.

[0052] S502: Using the first set of FiLM parameters, perform element-wise affine transformation on the fusion timing features of each processing node to obtain the first modulation features of each processing node.

[0053] S503: Input the first modulation features of each processing node as query, key and value into the multi-head self-attention layer, perform attention aggregation on the first modulation features of each processing node, and obtain the node embedding features of each processing node containing random perturbation information.

[0054] Specifically, the first set of FiLM parameters is used to directly modulate the fused temporal features of the processing steps. Since the fused temporal features encode the sequential dependencies of the processing steps along the process flow, and the random fluctuations in processing time indirectly affect the strength of these temporal dependencies through inter-step constraints, the first set of FiLM parameters can adaptively adjust the amplitude of the temporal features of each step according to different random scenarios, so that the generated first modulation feature implicitly contains prior information about the random fluctuations in workshop hours. Subsequently, the attention weights between processing steps are learned through a multi-head self-attention mechanism, and the first modulation features of each processing step are weighted and fused with the first modulation features of the other processing steps, finally generating node embedding features for each processing step that include information on random time perturbations and global attention context.

[0055] Furthermore, step S503 is followed by steps S504 to S505.

[0056] S504: The node embedding features of every two processing steps with a connection relationship in the directed graph structure are spliced ​​along the feature dimension to obtain the edge features of the connecting edges.

[0057] S505: Input the edge features into the edge association weight generation network, which includes the first fully connected layer, ReLU activation function, second fully connected layer and Sigmoid activation function, to obtain the edge association weight of the connection edge between every two processing nodes with a connection relationship.

[0058] Furthermore, the directed graph structure feature tensor group, the node embedding features of each processing step node, and the second set of FiLM parameters are input into the dual attention network for feature aggregation and FiLM modulation, and the output includes perturbation target features, including S506~S518.

[0059] S506: Perform linear mapping on the feature vectors of each processing node, so that the feature vectors of each processing node after linear mapping have the same feature dimension as the node embedding features of each processing node.

[0060] S507: For each processing node, its linearly mapped feature vector is concatenated with its node embedding feature along the feature dimension, and the concatenation result is input into a gating network including fully connected layers and a Sigmoid activation function to obtain the element-wise gating coefficients of each processing node.

[0061] S508: The feature vectors of each processing step node after linear mapping are fused with the node embedding features of each processing step node using the element-wise gating coefficients of each processing step node, and the weighted fusion result is normalized to obtain the fused process features of each processing step node.

[0062] S509: Perform linear mapping on the fused process features of each processing node and the feature vector of each processing machine to obtain the process mapping features of each processing node and the machine mapping features of each processing machine.

[0063] S510: Use the second set of FiLM parameters to perform an element-wise affine transformation on the process mapping features of each processing node to obtain the second modulation features of each processing node.

[0064] S511: Linearly map the second modulation features of each processing node to generate queries, keys, and values, and then calculate the scaling dot product basic attention score between each processing node based on the queries and keys of each processing node.

[0065] S512: Adjust the scaling dot product base attention score between corresponding processing process nodes by using the edge association weight of the connection edge between every two processing process nodes with a connection relationship, thereby obtaining the graph-enhanced process attention weight between each processing process node and other processing process nodes.

[0066] S513: Use graph-enhanced process attention weights to weight and aggregate the values ​​of each processing process node to obtain the process self-attention features of each processing process node.

[0067] S514: Using the process self-attention features of each processing process node as the query and the machine mapping features of each processing machine as the key and value, perform the first cross-attention operation of the process-focused machine, and perform residual connection and layer normalization on the output of the first cross-attention operation and the process self-attention features of each processing process node to obtain the machine-enhanced process features of each processing process node.

[0068] S515: Using the machine mapping features of each processing machine as the query and the machine-enhanced process features of each processing process node as the key and value, perform the second cross-attention operation on the machine-focused process, and perform residual connection and layer normalization on the output of the second cross-attention operation and the machine mapping features of each processing machine to obtain the process-enhanced machine features of each processing machine.

[0069] S516: Perform linear mapping and ELU activation processing on the machine-enhanced process features of each processing node and the process-enhanced machine features of each processing machine to obtain the target process features of each processing node and the target machine features of each processing machine.

[0070] S517: Perform non-zero average pooling on the target process features of all processing process nodes to obtain global processing process features, and perform non-zero average pooling on the target machine features of all processing machines to obtain global processing machine features.

[0071] S518: Concatenate the global processing procedure features and global processing machine features along the feature dimension to obtain the target features containing perturbations.

[0072] Specifically, the second set of FiLM parameters is applied to the node embedding features that have already fused global information, thereby balancing the representation intensity of perturbation features of each processing step at the global level and generating the second modulation features of each processing step node. Then, the association weight between every two processing steps is calculated through an operational self-attention mechanism, and feature weighting aggregation is performed, enabling each step to fuse information from other steps. Next, an operational-machine cross-attention mechanism is used to fuse processing step features with processing machine features. If some processing steps experience extreme fluctuations in working hours due to random perturbations, cross-attention can compensate and smooth these fluctuations using the load state information of the corresponding machine and the stable features of other steps, thereby suppressing feature distortion caused by noise in a single scene. Finally, the average value of the cross-enhanced features of all processing steps is taken to obtain the global processing step features, and the average value of the cross-enhanced features of all processing machines is taken to obtain the global processing machine features. Concatenating the two global features yields the target feature containing random perturbation of working hours, processing step features, processing machine features, and global information.

[0073] S60: Using the features of unprocessed process nodes and target features as the state space and scheduling decisions as the action space, perform reinforcement learning trial and error iterative optimization to output a dynamic scheduling scheme for the job shop.

[0074] Furthermore, step S60 includes S21 to S27.

[0075] S21: Select unfinished processing nodes that meet the process pre-sequence constraints as candidate processing nodes. Concatenate the feature vectors of the candidate processing nodes, the feature vectors of the corresponding processing machines, the paired feature vectors of the corresponding processing machines, and the element-wise cross features of the feature vectors of the candidate processing nodes and the corresponding processing machines along the feature dimension to form the state vector of the t-th scheduling decision step.

[0076] S22: Input the state vector of the t-th scheduling decision step into the Actor network, output the logit of each candidate processing operation-machine action pair of the t-th scheduling decision step, and use the action mask to block invalid candidate processing operation-machine action pairs. After scaling the logit of the remaining valid candidate processing operation-machine action pairs according to the preset scaling factor, perform Softmax normalization to obtain the action probability distribution of the valid candidate processing operation-machine action pairs, and then select a valid candidate processing operation-machine action pair as the scheduling action of the t-th scheduling decision step.

[0077] S23: Update the target features based on the scheduling action of the (t-1)th scheduling decision step, input the updated target features into the Critic network, and output the state value estimate of the tth scheduling decision step.

[0078] It should be noted that since the state of the processing procedure and the processing machine will change after the scheduling decision step, the target features will also change. Therefore, after each scheduling decision step, it is necessary to re-acquire the target features based on the current state of the processing procedure and the processing machine.

[0079] S24: Execute the scheduling action pair for the t-th scheduling decision step and calculate the reward function value, and obtain the state vector for the (t+1)-th scheduling decision step; store the updated target features, the state vector for the t-th scheduling decision step, the scheduling action and its probability, the state value estimate and the reward function value as an empirical tuple in the temporary trajectory cache.

[0080] S25: Update t = t + 1 and return to execute step S21 until all unfinished processing operations that satisfy the process preconditions are scheduled, and obtain the trajectory dataset based on all temporary trajectory caches.

[0081] S26: Based on the reward function value in the trajectory dataset and the state value estimate output by the Critic network, calculate the advantage estimate for each scheduling decision step using the generalized advantage estimation method; calculate the reward value for each scheduling decision step based on the advantage estimate and the state value estimate output by the Critic network; randomly arrange the empirical tuple indexes in the trajectory dataset and divide the trajectory dataset into multiple mini-batches according to the preset mini-batch size; input each mini-batch into the Actor network and the Critic network respectively, recalculate the target action probability of each scheduling decision step under the current network parameters using the Actor network, and recalculate the target state value estimate under the current network parameters using the Critic network; calculate the value of the total loss function based on the target action probability, target state value estimate, action probability, advantage estimate, and reward value of each scheduling decision step, and update the parameters of the Actor network, Critic network, learnable scene attention mechanism, graph-augmented bi-branch attention network, and dual attention network based on the value of the total loss function.

[0082] S27: Return to step S21 to iteratively optimize the Actor network, Critic network, learnable scene attention mechanism, graph-augmented bi-branch attention network, and dual attention network until the number of iterations reaches the preset number; select scheduling actions based on the action probability distribution output by the trained Actor network at each scheduling decision step until all processing steps are completed.

[0083] It should be noted that when updating the parameters of the dual attention network, the parameters of the gating network within the dual attention network are also updated simultaneously.

[0084] Specifically, the total loss function The calculation formula is: , ,

[0085] , , = , , , , in, Represents the mathematical expectation; This represents the PPO pruning strategy loss of the Actor network; This represents the pruning value loss of the Critic network; The policy entropy represents the action probability distribution output by the Actor network; Indicates the value loss coefficient; This represents the entropy reward coefficient; Represents the parameters of the Actor network; These represent the parameters of the Critic network; This represents the advantage estimate for the t-th scheduling decision step, used to measure the candidate processing operation-machine action pair. A parameter indicating the degree of superiority or inferiority compared to the average level; This represents the advantage estimate for the (t+1)th scheduling decision step; Cutting operation; , This represents the clipping hyperparameter; This indicates the state of the Actor network after parameter updates. Output candidate processing steps - machine motion pairs The probability of the target action; This indicates the state of the Actor network before the parameter update. Output candidate processing steps - machine motion pairs The probability of the action; Represents the time-series differential residual; Let represent the reward function value at the t-th scheduling decision step; This represents the target state value estimate of the t-th scheduling decision step output by the Critic network after parameter updates. This represents the state value estimate of the t-th scheduling decision step output by the Critic network before parameter updates; This represents the state value estimate of the (t+1)th scheduling decision step output by the Critic network before parameter updates; Indicates Based on this, the change in the current value forecast relative to the old value forecast is limited to [- , The estimated value of the cut-off state obtained after [further details needed]. Indicates the discount factor; Indicates the end of the trajectory; This represents the set of all valid candidate processing steps-machine action pairs output by the t-th scheduling decision step; This parameter represents the degree to which the advantage estimate takes into account subsequent time-series difference residuals. This represents the target value used to train the current Critic network.

[0086] It should be noted that the target value refers to the cumulative discount reward that can be obtained by continuing subsequent scheduling according to the current scheduling action, starting from the current scheduling state.

[0087] Based on the graph-enhanced bi-branch and dual-attention network flexible shop floor scheduling method provided in the above embodiments, this application also provides a graph-enhanced bi-branch and dual-attention network flexible shop floor scheduling device, such as... Figure 3 As shown, the device includes: The topology graph construction module 10 is used to construct a directed graph structure for dynamic scheduling of the workshop, with the processing steps as graph nodes and the execution order of the processing steps and the resource competition relationship between the processing machines and the processing steps as edges.

[0088] The directed graph structure feature tensor group acquisition module 20 is used to extract features from the directed graph structure, obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine, thereby obtaining the directed graph structure feature tensor group.

[0089] The random scene feature tensor group generation module 30 is used to randomly perturb the processing time of each processing process node in the directed graph structure multiple times, extract features from the directed graph structure after each perturbation, and obtain the feature vectors of each processing process node, the feature vectors of each processing machine, and the paired feature vectors of the processing process node and the processing machine, thereby obtaining the random production scene feature tensor group after each perturbation.

[0090] The FiLM parameter generation module 40 is used to generate two sets of FiLM parameters based on multiple randomly generated scene feature tensors generated by multiple perturbations using a learnable scene attention mechanism.

[0091] The perturbation feature extraction module 50 is used to input the directed graph structure feature tensor group and the first set of FiLM parameters into a graph-enhanced dual-branch attention network for feature extraction and FiLM modulation, and output the node embedding features containing perturbations for each processing node; and input the directed graph structure feature tensor group, the node embedding features for each processing node and the second set of FiLM parameters into a dual attention network for feature aggregation and FiLM modulation, and output the target features containing perturbations.

[0092] The scheduling scheme acquisition module 60 is used to take the features of the unprocessed process nodes and the target features as the state space and the scheduling decision as the action space, perform reinforcement learning trial and error iterative optimization, and output the dynamic scheduling scheme of the job shop.

[0093] 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.

[0094] 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, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0095] 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.

[0096] 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.

[0097] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A flexible shop floor scheduling method using graph-reinforced bi-branch and dual-attention networks, characterized in that, include: Using processing steps as graph nodes and the execution order of processing steps and the resource competition relationship between processing machines and processing steps as edges, a directed graph structure for dynamic scheduling of the workshop is constructed. Feature extraction is performed on the directed graph structure to obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine, thereby obtaining the feature tensor group of the directed graph structure. The processing time of each processing node in the directed graph structure is randomly perturbed multiple times. Features are extracted from the directed graph structure after each perturbation to obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine. Thus, a set of random production scene feature tensors after each perturbation is obtained. By utilizing a learnable scene attention mechanism based on multiple randomly generated scene feature tensors generated through multiple perturbations, two sets of FiLM parameters are generated, including: The feature vectors of each processing node in each random production scenario feature tensor group are input into the linear mapping layer to obtain the mapped feature vectors of each processing node, thereby obtaining the process feature sequence of each random production scenario feature tensor group. Using the learnable inductive matrix as the query and the process feature sequence of each random production scenario feature tensor group as the key and value, perform the first multi-head attention operation to obtain the inductive feature representation of each random production scenario feature tensor group; using the process feature sequence of each random production scenario feature tensor group as the query and the inductive feature representation as the key and value, perform the second multi-head attention operation to obtain the aggregated process features of each random production scenario feature tensor group. Global average pooling is performed on the aggregated process features of each random production scenario feature tensor group along the processing process dimension, and the pooling results are layer normalized to obtain the process context features of each random production scenario feature tensor group. The process context features of each random production scenario feature tensor group are input into multiple parallel fully connected output layers to generate the first set of initial FiLM parameters and the second set of initial FiLM parameters for each random production scenario; each set of initial FiLM parameters includes scaling parameters and offset parameters. Global average pooling is performed on the feature vectors of each processing node in the feature tensor group of each random production scenario along the processing process dimension, and global average pooling is performed on the feature vectors of each processing machine along the machine dimension. The two pooling results are then concatenated along the feature dimension to obtain the scenario-level representation vector of each random production scenario. The scene-level representation vector of each random production scene is input into a scene attention network consisting of two fully connected layers and a ReLU activation function, and the attention logit of each random production scene is output. The attention logit of all random production scenes is normalized by Softmax to obtain the attention weight of each random production scene. Using attention weights as weighting coefficients, the first set of initial FiLM parameters for all random production scenarios are weighted and summed along the scene dimension to obtain the first set of fused FiLM parameters. Using attention weights as weighting coefficients, the second set of initial FiLM parameters for all random production scenarios are weighted and summed along the scene dimension to obtain the fused second set of FiLM parameters; wherein, the fused first set of FiLM parameters and the second set of FiLM parameters are used for feature modulation of the graph-enhanced dual-branch attention network and the dual attention network, respectively. The directed graph structure feature tensor set and the first set of FiLM parameters are input into a graph-enhanced dual-branch attention network for feature extraction and FiLM modulation, outputting perturbation-containing node embedding features for each processing step node, including: Based on the feature vectors of each processing node in the directed graph structure feature tensor group, the node feature matrix is ​​obtained; according to the two preset feature channel group indices, the corresponding feature channels are selected from the node feature matrix to obtain the first channel feature sequence group and the second channel feature sequence group. The first channel feature sequence group and the second channel feature sequence group are respectively input into the independent first GRU coding branch and the second GRU coding branch for temporal feature extraction. The outputs of the two GRU coding branches are linearly mapped and then connected along the feature dimension to obtain the fused temporal features of each processing node. The first set of FiLM parameters is used to perform an element-wise affine transformation on the fusion timing features of each processing node to obtain the first modulation features of each processing node. The first modulation features of each processing node are used as queries, keys and values ​​to input into the multi-head self-attention layer. Attention aggregation is performed on the first modulation features of each processing node to obtain the node embedding features of each processing node containing random perturbation information. The directed graph structure feature tensor group, the node embedding features of each processing node, and the second set of FiLM parameters are input into the dual attention network for feature aggregation and FiLM modulation, and the output is the target feature containing perturbation. Using the features of unprocessed process nodes and target features as the state space and scheduling decisions as the action space, reinforcement learning trial and error iterative optimization is performed to output a dynamic scheduling scheme for the job shop.

2. The flexible shop floor scheduling method using graph-enhanced bi-branch and dual-attention networks according to claim 1, characterized in that, The feature vector of a processing operation node includes operation completion flag, schedulable flag, operation position code within the job, global operation position code, ratio of shortest processing time to global maximum processing time, ratio of average processing time to global maximum processing time, normalized waiting time, normalized remaining workload, percentage of remaining operations, and percentage of available processing machines. The feature vector of a processing machine includes the proportion of candidate jobs, the number of candidate processing steps, the shortest processing time, the average processing time, the current waiting time, the working status, the queue length, the average waiting time, the time until the processing machine is idle, the processing machine idle rate, the processing machine available time, and the processing machine number. The pairing feature vector between a processing step node and a processing machine includes at least the ratio of the processing time of the processing step to the global maximum processing time, and the ratio of the processing step duration to the maximum processing time of that processing step.

3. The flexible shop floor scheduling method using graph-enhanced bi-branch and dual-attention networks according to claim 1, characterized in that, The processing time of each processing step node in the directed graph structure is randomly perturbed multiple times. Feature extraction is performed on the directed graph structure after each perturbation to obtain the feature vectors of each processing step node, the feature vectors of each processing machine, and the paired feature vectors of processing step nodes and processing machines. This yields a set of random production scene feature tensors after each perturbation, including: S11: Based on the processing time of each processing operation node in the directed graph structure, construct a processing time matrix; where each row of the processing time matrix represents a processing operation, each column represents a processing machine, and the matrix elements represent the processing time of the corresponding processing operation on the corresponding processing machine. S12: Generate a random perturbation factor matrix with the same dimension as the processing time matrix based on a preset probability distribution. Multiply the random perturbation factors in the random perturbation factor matrix with the matrix elements at the corresponding positions in the processing time matrix to obtain the perturbation processing time matrix. S13: Update the processing time matrix based on the perturbation processing time matrix, thereby updating the processing time of each processing operation node in the directed graph structure, and obtaining a perturbed directed graph structure; S14: Extract features from the perturbed directed graph structure to obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine, thereby obtaining a set of random production scene feature tensors. S15: Return to step S12 until the number of random production scene feature tensor groups reaches the preset number.

4. The flexible shop floor scheduling method using graph-enhanced bi-branch and dual-attention networks according to claim 1, characterized in that, After obtaining the node embedding features containing random perturbation information for each processing step node, the following is also included: The node embedding features of every two connected processing steps in the directed graph structure are concatenated along the feature dimension to obtain the edge features of the connecting edges. The edge features are input into an edge association weight generation network that includes a first fully connected layer, a ReLU activation function, a second fully connected layer, and a Sigmoid activation function to obtain the edge association weights of the connecting edges between every two processing nodes that have a connection relationship.

5. The flexible shop floor scheduling method using graph-enhanced bi-branch and dual-attention networks according to claim 4, characterized in that, The directed graph structure feature tensor set, the node embedding features of each processing step node, and the second set of FiLM parameters are input into a dual attention network for feature aggregation and FiLM modulation. The output includes perturbation-containing target features, including: Perform a linear mapping on the feature vectors of each processing node so that the feature vectors of each processing node after the linear mapping have the same feature dimension as the node embedding features of each processing node. For each processing node, its linearly mapped feature vector is concatenated with its node embedding feature along the feature dimension, and the concatenation result is input into a gating network including fully connected layers and a Sigmoid activation function to obtain the element-wise gating coefficients of each processing node. The feature vectors of each processing step node after linear mapping are obtained by using the element-wise gating coefficients of each processing step node and the node embedding features of each processing step node. The weighted fusion result is then normalized to obtain the fused process features of each processing step node. Linear mapping is performed on the fused process features of each processing node and the feature vector of each processing machine to obtain the process mapping features of each processing node and the machine mapping features of each processing machine. The process mapping features of each processing node are transformed element-wise using the second set of FiLM parameters to obtain the second modulation features of each processing node. The second modulation features of each processing node are linearly mapped to generate queries, keys, and values, thereby calculating the scaling dot product basic attention score between each processing node based on the queries and keys of each processing node; The scaling dot product base attention score between corresponding processing process nodes is adjusted by using the edge association weight of the connection edge between every two processing process nodes with a connection relationship, thereby obtaining the graph-enhanced process attention weight between each processing process node and other processing process nodes. By using graph-enhanced process attention weights, the values ​​of each processing process node are weighted and aggregated to obtain the process self-attention features of each processing process node; Using the process self-attention features of each processing node as the query and the machine mapping features of each processing machine as the key and value, the first cross-attention operation of the process-attention machine is executed. The output of the first cross-attention operation is then residually connected and layer normalized with the process self-attention features of each processing node to obtain the machine-enhanced process features of each processing node. Using the machine mapping features of each processing machine as the query and the machine-enhanced process features of each processing process node as the key and value, the second cross-attention operation of the machine-focused process is performed. The output of the second cross-attention operation is then residually connected and layer normalized with the machine mapping features of each processing machine to obtain the process-enhanced machine features of each processing machine. Linear mapping and ELU activation are performed on the machine augmentation process features of each processing process node and the process augmentation machine features of each processing machine to obtain the target process features of each processing process node and the target machine features of each processing machine. Non-zero average pooling is performed on the target process features of all processing process nodes to obtain global processing process features, and non-zero average pooling is performed on the target machine features of all processing machines to obtain global processing machine features. By concatenating the global processing procedure features and the global processing machine features along the feature dimension, the target features containing perturbations are obtained.

6. The flexible shop floor scheduling method using graph-enhanced bi-branch and dual-attention networks according to claim 5, characterized in that, Using the features of unprocessed process nodes and target features as the state space and scheduling decisions as the action space, reinforcement learning trial-and-error iterative optimization is performed to output a dynamic scheduling scheme for the job shop, including: S21: Select unfinished processing nodes that meet the process pre-sequence constraints as candidate processing nodes. Concatenate the feature vectors of the candidate processing nodes, the feature vectors of the corresponding processing machines, the paired feature vectors of the corresponding processing machines, and the element-wise cross features of the feature vectors of the candidate processing nodes and the feature vectors of the corresponding processing machines along the feature dimension as the state vector of the t-th scheduling decision step. S22: Input the state vector of the t-th scheduling decision step into the Actor network, output the logit of each candidate processing operation-machine action pair of the t-th scheduling decision step, and use the action mask to block invalid candidate processing operation-machine action pairs. After scaling the logit of the remaining valid candidate processing operation-machine action pairs according to the preset scaling factor, perform Softmax normalization to obtain the action probability distribution of the valid candidate processing operation-machine action pairs, and then select a valid candidate processing operation-machine action pair as the scheduling action of the t-th scheduling decision step. S23: Update the target features based on the scheduling action of the (t-1)th scheduling decision step, input the updated target features into the Critic network, and output the state value estimate of the tth scheduling decision step; S24: Execute the scheduling action pair of the t-th scheduling decision step and calculate the reward function value, and obtain the state vector of the (t+1)-th scheduling decision step; store the updated target features, the state vector of the t-th scheduling decision step, the scheduling action and its probability, the state value estimate and the reward function value as an empirical tuple in the temporary trajectory cache; S25: Update t = t + 1, and return to execute step S21 until all unfinished processing operations that satisfy the process preconditions are scheduled, and obtain the trajectory dataset based on all temporary trajectory caches; S26: Based on the reward function value in the trajectory dataset and the state value estimate output by the Critic network, calculate the advantage estimate for each scheduling decision step using the generalized advantage estimation method; calculate the reward value for each scheduling decision step based on the advantage estimate and the state value estimate output by the Critic network; randomly arrange the empirical tuple indexes in the trajectory dataset and divide the trajectory dataset into multiple mini-batches according to the preset mini-batch size; input each mini-batch into the Actor network and the Critic network respectively, recalculate the target action probability of each scheduling decision step under the current network parameters using the Actor network, and recalculate the target state value estimate under the current network parameters using the Critic network; calculate the value of the total loss function based on the target action probability, target state value estimate, action probability, advantage estimate, and reward value of each scheduling decision step, and update the parameters of the Actor network, Critic network, learnable scene attention mechanism, graph-augmented bi-branch attention network, and dual attention network based on the value of the total loss function; S27: Return to step S21 to iteratively optimize the Actor network, Critic network, learnable scene attention mechanism, graph-augmented bi-branch attention network, and dual attention network until the number of iterations reaches the preset number; select scheduling actions based on the action probability distribution output by the trained Actor network at each scheduling decision step until all processing steps are completed.

7. The flexible shop floor scheduling method using graph-enhanced bi-branch and dual-attention networks according to claim 6, characterized in that, Total loss function The calculation formula is: , , , , , = , , , , in, Represents the mathematical expectation; This represents the PPO pruning strategy loss of the Actor network; This represents the pruning value loss of the Critic network; The policy entropy represents the action probability distribution output by the Actor network; Indicates the value loss coefficient; This represents the entropy reward coefficient; Represents the parameters of the Actor network; These represent the parameters of the Critic network; This represents the advantage estimate for the t-th scheduling decision step, used to measure the candidate processing operation-machine action pair. A parameter indicating the degree of superiority or inferiority compared to the average level; This represents the advantage estimate for the (t+1)th scheduling decision step; Cutting operation; , This represents the clipping hyperparameter; This indicates the state of the Actor network after parameter updates. Output candidate processing steps - machine motion pairs The probability of the target action; This indicates the state of the Actor network before the parameter update. Output candidate processing steps - machine motion pairs The probability of the action; Represents the time-series differential residual; Let represent the reward function value at the t-th scheduling decision step; This represents the target state value estimate of the t-th scheduling decision step output by the Critic network after parameter updates. This represents the state value estimate of the t-th scheduling decision step output by the Critic network before parameter updates; This represents the state value estimate of the (t+1)th scheduling decision step output by the Critic network before parameter updates; Indicates Based on this, the change in the current value forecast relative to the old value forecast is limited to [- , The estimated value of the cut-off state obtained after [further details needed]. Indicates the discount factor; Indicates the end of the trajectory; This represents the set of all valid candidate processing steps-machine action pairs output by the t-th scheduling decision step; This parameter represents the degree to which the advantage estimate takes into account subsequent time-series difference residuals. This represents the target value used to train the current Critic network.

8. A flexible workshop scheduling device using graph-enhanced dual-branch and dual-attention networks, characterized in that, The method for implementing the flexible shop floor scheduling method using graph-enhanced bi-branch and dual-attention networks according to any one of claims 1 to 7 includes: The topology graph construction module is used to construct a directed graph structure for dynamic scheduling of the job shop, with processing operations as graph nodes and the execution order of processing operations and the resource competition relationship between processing machines and processing operations as edges. The directed graph structure feature tensor group acquisition module is used to extract features from the directed graph structure, obtain the feature vectors of each processing node, the feature vectors of each processing machine, and the paired feature vectors of the processing node and the processing machine, thereby obtaining the directed graph structure feature tensor group. The random scene feature tensor group generation module is used to randomly perturb the processing time of each processing process node in the directed graph structure multiple times, extract features from the directed graph structure after each perturbation, and obtain the feature vectors of each processing process node, the feature vectors of each processing machine, and the paired feature vectors of the processing process node and the processing machine, thereby obtaining the random production scene feature tensor group after each perturbation. The FiLM parameter generation module is used to generate two sets of FiLM parameters based on multiple randomly generated scene feature tensors generated through multiple perturbations using a learnable scene attention mechanism. The perturbation feature extraction module is used to input the directed graph structure feature tensor set and the first set of FiLM parameters into a graph-enhanced dual-branch attention network for feature extraction and FiLM modulation, and output the node embedding features containing perturbations for each processing node; the directed graph structure feature tensor set, the node embedding features for each processing node and the second set of FiLM parameters are input into a dual attention network for feature aggregation and FiLM modulation, and output the target features containing perturbations. The scheduling scheme acquisition module is used to take the features of the unprocessed process nodes and the target features as the state space and the scheduling decision as the action space, perform reinforcement learning trial and error iterative optimization, and output the dynamic scheduling scheme of the job shop.

Citation Information

Patent Citations

  • Flexible job shop scheduling method based on hybrid graph attention network and reward shaping

    CN121436251A

  • Flexible job shop scheduling method based on hybrid expert model and graph attention

    CN122261050A