Intelligent planning and decision-making method for complex manufacturing process based on knowledge graph multi-hop reasoning

By constructing a manufacturing process knowledge graph and using shallow feedforward convolutional network and multi-query attention module for multi-hop reasoning, the mining of implicit knowledge between processes and cross-link dependency modeling problems are solved, and the accuracy and production efficiency of process planning are improved.

CN120450477APending Publication Date: 2025-08-08CHONGQING UNIV
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510554934.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing process planning methods based on knowledge graphs are difficult to effectively model the hidden interaction information and long-distance and cross-link dependencies between processes, resulting in process planning solutions often falling into local optimization, affecting production efficiency and product quality.

Method used

By constructing a manufacturing process knowledge graph, using shallow feedforward convolutional network and parallel multi-query attention module for multi-hop inference, combining rotational position coding and beam search, a cross-process dependency relationship is established to generate a global optimal process solution.

Benefits of technology

It improves the accuracy and adaptability of process planning, avoids overall production efficiency and resource waste caused by local optimization, and realizes efficient decision-making in intelligent process planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120450477A_ABST
    Figure CN120450477A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge graph multi-hop reasoning-based complex manufacturing process intelligent planning decision method, which comprises the following steps of: 1, constructing a manufacturing process knowledge graph to obtain a triple set, generating a query-path pair sequence, and mapping entities and relationships in the query-path pair sequence into low-dimensional vectors through an embedded layer; 2, performing expansion causal convolution calculation on the query-path pair sequence through a shallow feed-forward convolution network module, extracting key process features and potential correlation between processes, and generating a feature vector fusing the potential process correlation; 3, performing rotation position coding and causal mask processing on the feature vector output in the step 2 by adopting a parallel multi-query attention module, and realizing cross-process dependency relationship modeling through a multi-head attention mechanism; 4, generating a global optimal process scheme through beam search; and on the basis of a rule-guided dynamic aggregation iteration strategy, mixing a process path generated by the model with an original training set, and updating parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent manufacturing technology, and specifically provides an intelligent planning and decision-making method for complex manufacturing processes based on knowledge graph multi-hop reasoning. Background Art

[0002] Process planning is a knowledge-intensive activity that transforms product design models into manufacturing processes and determines the optimal operating sequence for production. Therefore, product quality, manufacturing efficiency, and cost are all closely related to process planning. As an important link between product design and production, process planning plays a key role in transferring product diversity to the process while maintaining high responsiveness and adaptability. In traditional process planning, process designers rely on existing knowledge and experience to manually design process plans, which is unable to efficiently handle the complexity of process planning caused by part diversity. With the development of computer technology, Niebel first proposed the concept of computer-aided process planning (CAPP) in 1965. Computer-aided methods have gradually replaced manual methods and become the mainstream method for process planning. CAPP reduces the difficulty for process designers to manage process data by transforming product design into the optimal manufacturing sequence and rationally allocating manufacturing resources. It significantly improves the automation level of process planning and the ability to cope with complex process planning.

[0003] The manufacturing industry is undergoing a transition from automation to intelligence. Traditional process planning methods are no longer able to meet the demands of intelligent manufacturing. The application of intelligent decision-making methods in process planning is crucial for improving efficiency and addressing complexity. Expert experience, process documentation, and design documents contain a vast amount of knowledge. Accurately representing and utilizing this process knowledge is crucial in intelligent process planning. Knowledge graphs (KGs), derived from traditional knowledge-based expert systems (KB-ES), are a structured form of knowledge organization and representation and are widely used in intelligent decision-making, semantic search, recommendation systems, and intelligent question-answering. The application of KG technology in process planning has become a trend in the manufacturing sector. By constructing a KG structure to store process knowledge, rules, and historical cases in the manufacturing process, it leverages techniques such as semantic reasoning and representation learning to discover the global optimal solution for the processing route, achieving a closed-loop intelligent decision-making process from data collection, knowledge processing, and decision generation. Furthermore, traditional CAPPs often rely on local rules for process orchestration and planning, lacking global optimization capabilities and struggling to handle complex constraints and dependencies between processes. Process planning based on knowledge graph realizes knowledge linkage of the entire process flow through methods such as path search, realizes complex relationship modeling, and ensures that process generation is the global optimal result combining all process knowledge in the knowledge graph.

[0004] The manufacturing industry's growing demand for intelligent manufacturing has led to increasingly complex and lengthy process flows due to the increasing number and types of steps involved. Existing knowledge graph-based process planning methods typically rely on explicit knowledge for planning and decision-making, primarily including parameter settings and basic operating procedures for each process. However, in actual production, the interactive information between many processes is implicit and difficult to make explicit, making it difficult to fully model the interdependencies in the process flow. For example, in the body-in-white welding process, the adjustment of body welding parameters is not only influenced by the preceding stamping process but also closely related to the subsequent painting process. These implicit relationships between adjacent processes are often overlooked, resulting in the inability to effectively extract key information between processes and effectively characterize the interactive information between processes, thereby reducing the accuracy and practicality of process planning. In the automotive manufacturing process, improper die design in the stamping process can lead to dimensional errors. These errors trigger thermal stress transfer during the welding process, which in turn affects the film thickness uniformity in the painting process. Existing process planning methods based on knowledge graphs lack the ability to establish long-distance, cross-link dependencies. Process optimization is forced to be limited to segmented parameter adjustment, causing process planning schemes to often fall into local optimality, affecting overall production efficiency and product quality. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide an intelligent planning and decision-making method for complex manufacturing processes based on knowledge graph multi-hop reasoning, which can mine implicit knowledge and extract key information between processes, establish dependency relationships between links across multiple processes, effectively improve the accuracy of process planning, avoid overall low production efficiency and waste of resources due to local optimization, and realize intelligent process planning in the manufacturing industry.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A method for intelligent planning and decision-making of complex manufacturing processes based on knowledge graph multi-hop reasoning includes the following steps:

[0008] Step 1: Build a manufacturing process knowledge graph, map the process steps, equipment, and process parameters into a structured triple set, generate a query-path pair sequence, and map the entities and relationships in the query-path pair sequence into low-dimensional vectors through an embedding layer.

[0009] Step 2: Perform dilated causal convolution calculations on the query-path pair sequence through a shallow feedforward convolutional network module to extract key process features and potential associations between processes, achieve the capture and deep fusion of key process features and potential associations, and generate a feature vector that integrates potential process associations;

[0010] Step 3: Use a parallel multi-query attention module to perform rotational position encoding and causal masking on the feature vector output from step 2, and implement cross-process dependency modeling through a multi-head attention mechanism;

[0011] Step 4: Generate the global optimal process plan through beam search; based on the rule-guided dynamic aggregation iteration strategy, mix the process path generated by the model with the original training set and update the parameters.

[0012] Furthermore, in step 1, the method of mapping entities and relationships in the query-path pair sequence into low-dimensional vectors through the embedding layer is as follows: constructing an embedding matrix W∈R V×d , projecting the query-path pair sequence into a shared semantic space; the embedding matrix is a dictionary of all tokens; the size of the token vocabulary is V = |E| + |R| + |S|, including the entity set |E|, the relationship set |R| and other special tag sets |S|.

[0013] Furthermore, in step 2, the shallow feedforward convolutional network module performs the following steps:

[0014] 21) The shallow feedforward neural network passes the embedded representation x obtained by the embedding layer into three linear transformation layers, respectively with a learnable weight matrix and Associated, generate query vector q1, key vector k1 and value vector v1 respectively; key Sum Splice into a new process feature vector

[0015] qkv=Concat(q1,k1,v1)

[0016] 22) The shallow feedforward neural network performs nonlinear transformation on the process feature vector qkv through two layers of feedforward neural network;

[0017] 23) Perform two dilated causal convolutions on the outputs of the two-layer feedforward neural network layer to gradually expand the receptive field;

[0018] The principle of dilated causal convolution is:

[0019]

[0020] Where: y t is the output at time step t; x t―p·j is the input at time step t-ε·j; w j is the jth weight of the convolution kernel; ε is the expansion coefficient, which is used to control the spacing between convolution kernel elements; k is the size of the convolution kernel;

[0021] 24) Weight normalization is introduced to stabilize training, and residual blocks are constructed to effectively alleviate the gradient vanishing problem, achieving efficient and stable process feature extraction;

[0022] 25) Process features of different scales are extracted by stacking three layers of networks. Each convolutional layer processes the input through convolution kernels of different sizes to capture features of different time ranges in the process query-path pair sequence and obtain the output

[0023] Furthermore, in step 22), the method steps for performing nonlinear transformation on the process characteristic vector qkv are as follows:

[0024] 221) The first feedforward neural network layer performs feature extraction and information fusion on the process feature vector qkv:

[0025] a (l) =f l (W (l) ·a (l―1) +b (l) )

[0026] in: is the output of the l-layer neuron; f l (·) is the activation function of neurons in layer l; W (l) is the weight matrix from layer l-1 to layer l; b (l) is the bias from layer l-1 to layer l;

[0027] 222) Perform root mean square layer normalization on the layer feature a1 to obtain the normalized layer feature

[0028] 223), add the input x and the normalized layer feature a2 to achieve residual connection and obtain the output of the first feedforward neural network layer

[0029] 224) The second feedforward neural network layer performs a root mean square layer normalization operation and a residual connection on the output a3 of the first feedforward neural network layer to obtain the output of the second feedforward neural network layer

[0030] Furthermore, in step 3, the parallel multi-query attention module performs the following steps:

[0031] 31) Pre-normalize the input vector to obtain the process feature vector The process feature vector X norm Perform linear layer projection, respectively with the learnable weight matrix and W ff Associate and generate query vector Key Vector Value vector and the input of the feedforward network

[0032] 32) Split the query vector q2 into H heads, each with its own unique query vector. Perform rotation position encoding on each vector of query and key to introduce position information, and obtain query vector and key vector

[0033] 33) Perform dot product calculation to obtain the query vector and key vector similarity between

[0034] 34) Perform causal masking on the similarity matrix sim and construct a causal mask matrix. The masked similarity matrix sim is converted into a probability distribution through the softmax function to form the attention weight. Based on the calculated attention weight, the value vector is weighted summed to obtain the process feature representation of a single attention head.

[0035] 35) Combine the outputs calculated from each head and obtain the initial process feature output through fused projection

[0036] Furthermore, the parallel multi-query attention module uses parallel multi-head attention and feedforward networks for feature fusion, and inputs F into the feedforward network to obtain the output The features obtained by fusion of parallel multi-query attention modules are:

[0037] X out =α comb X in +β ff MLP(Norm(X in ))+β sa MQA(Norm(X in ))=α comb X norm +β ff X ff +β sa X attn

[0038] Where: α comb , β sa and β ff is the weight coefficient used to control the ratio of the input vector and the module output; MLP represents the feedforward network; MQA is multi-query attention; X in is the input feature.

[0039] Furthermore, in step 32), the method of performing rotation position encoding on each vector of the query and key to introduce position information is:

[0040]

[0041] in: is an orthogonal rotation matrix; x t is the encoding information of the tth dimension of the current token; x 2t and x 2t+1 are the encoding information of the 2tth dimension and 2t+1th dimension of the current token respectively; θ t is the rotation angle of the t-th dimension of the current token; and:

[0042]

[0043] Where: θ t is the rotation angle of the t-th dimension of the current token, m is the position index of the current token; d is the total dimension of the embedding vector, t is the dimension index of the current token, t ≥ 0 and is an integer.

[0044] Furthermore, in step 34), the masked similarity matrix sim is converted into a probability distribution through a softmax function to form an attention weight:

[0045]

[0046] Attn(X)=A(X)XW v

[0047] in: and is a learnable embedding weight matrix; is the attention matrix, which represents the weight distribution when different tokens are mixed; L is the length of the token sequence; is a mask matrix, whose elements are 0 or -∞; R p (θ t ) is an orthogonal rotation matrix; X is the feature representation obtained after processing by the shallow feedforward convolutional network module; d v =d k =d / H;

[0048] Based on the calculated attention weight, the value vector is weighted and summed to obtain the process feature representation X1 of a single attention head:

[0049] X attn =MQA(X)=Concat(Attn1(X),…,AttnH (X))W P

[0050] in, is the projection matrix.

[0051] Furthermore, in step 4, the method for generating the global optimal process solution through beam search is:

[0052]

[0053] Where: τ b represents the maximum length of the process path obtained by beam search; τ is the target path; τ k is the kth tag in the output path; τ <k is the previous mark; p(τ k |q,τ <k ) is the distribution probability of the kth tag; q is the query vector; and:

[0054] For a given triple (h, r, t), path reasoning is performed and the search path is represented as h, r1, t1, ..., r n , t; target entity t passes through intermediate entity t i Connected, where each entity is connected through a relationship edge r i and r i+1 connected; n indicates that this is an n-hop path, that is, the length of the inference path is n, and the query q is:

[0055] q:=(h,r),τ:=(r1,t1,...,r n ,t, <eos>)

[0056] The reasoning process continues until the termination symbol <eos> is generated or the target entity is reached within the given maximum sequence length;

[0057] Given a query q, a multi-hop reasoning sequence is generated through an autoregressive generative model:

[0058]

[0059] Where: τ is the candidate token, i.e. the target path; |τ| is the number of tokens in the path; τ k is the kth token in the output path.

[0060] Furthermore, in step 4, the method for updating parameters of the rule-guided dynamic aggregation iteration strategy is:

[0061] 41) Dynamic aggregation iteration strategy dynamically adjusts the training cycle according to the number of iterations k:

[0062]

[0063] Where: iter_epoch k Indicates the training round of the current iteration stage; k indicates the index of the current iteration stage; epoch indicates the total training rounds of the model; Represents the sum of the reciprocals of the weighted coefficients of all stages; (·) represents the rounding down operation to ensure that the iterative training cycle is an integer;

[0064] 42) After mixing the process path generated by the model with the original training set, use cross-entropy loss to calculate the loss between the target token and the model predicted token, and add label smoothing to the cross-entropy loss calculation to update the parameters until the cross-entropy loss converges; the cross-entropy loss is:

[0065]

[0066] Where: α i =ξ indicates that i is the target tokeni = τ k The probability of represents the probability when i is any of the other tokens; K represents the number of categories, that is, the size of the token vocabulary V; ξ is a label smoothing hyperparameter with a value range of 0 to 1.

[0067] The beneficial effects of the present invention are:

[0068] Process planning transforms product design models into manufacturing processes and determines the optimal sequence of production operations. As the number and types of links in the manufacturing process flow increase, existing process planning methods have significant shortcomings in extracting key process features between adjacent steps and establishing long-chain dependencies within process knowledge, severely impacting the efficiency and quality of process solution generation. Therefore, this paper proposes an intelligent planning and decision-making method for complex manufacturing processes based on multi-hop reasoning on knowledge graphs, aiming to meet the demands of process planning for complex manufacturing process decisions. Specifically, this method simulates an attention mechanism by constructing a shallow feedforward convolutional network and combines it with dilated causal convolution to capture and deeply fuse key process features and potential correlations. Furthermore, a multi-query attention mechanism with a parallel architecture, combined with rotational position encoding, enables long-range modeling of dependencies between process links and efficient decoding of fused process features. Finally, a rule-guided dynamic aggregation and iteration strategy is proposed. By introducing generated process content during model training, the model's adaptability and accuracy in process solution generation are significantly improved. In summary, the intelligent planning and decision-making method for complex manufacturing processes based on knowledge graph multi-hop reasoning in the present invention can mine implicit knowledge and extract key information between processes, establish dependency relationships between links across multiple processes, effectively improve the accuracy of process planning, avoid overall low production efficiency and waste of resources due to local optimization, and realize intelligent process planning in the manufacturing industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to make the purpose, technical solutions and beneficial effects of the present invention more clear, the present invention provides the following drawings for illustration:

[0070] Figure 1 This is the overall architecture diagram of the complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning of the present invention;

[0071] Figure 2 This is the overall framework diagram of the shallow feedforward neural network module (SFCN Module);

[0072] Figure 3 It is the overall framework of the Parallel Multi-Query Attention Module (PMA Module);

[0073] Figure 4 Schematic diagram for rotary position encoding;

[0074] Figure 5 It is the knowledge graph of car body manufacturing process. DETAILED DESCRIPTION

[0075] 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 the present invention and implement it. However, the embodiments are not intended to limit the present invention.

[0076] 1. Intelligent Planning and Decision-making Method for Complex Manufacturing Processes Based on Knowledge Graph Multi-hop Reasoning

[0077] Traditional process planning methods face significant challenges in addressing the long, complex process flows of complex manufacturing systems, and struggle to meet the manufacturing industry's requirements for intelligent process planning. Knowledge graphs (KGs) facilitate the storage and processing of diverse forms of complex process knowledge, including structured, semi-structured, and unstructured. Furthermore, the structure of KGs enables them to mine explicit and implicit relationships between process knowledge, connecting previously isolated pieces of knowledge for efficient organization and understanding. However, existing knowledge representation paradigms struggle to fully capture the implicit interaction parameters between processes, resulting in significant gaps in the acquisition of key information from adjacent process links. Existing KG entity-relationship models struggle to capture the implicit knowledge of processes across the entire process flow. Furthermore, process planning lacks effective modeling of long-range, cross-link dependencies. These long-range transmission paths across links are difficult to represent using the shallow connections of traditional KGs, forcing existing KG-based process planning methods to adopt a piecewise optimization strategy, which can lead to process planning solutions becoming trapped in local optima. To this end, it is urgent to build a deep reasoning mechanism based on knowledge graphs that can transcend the barriers of process links, and realize the transition from local feature extraction to global long-chain dependency modeling through multi-level knowledge fusion of multi-hop reasoning.

[0078] Specifically, such as Figure 1 As shown in the figure, the overall framework of the multi-hop reasoning model MKGR based on knowledge graph is as follows: Figure 1 As shown in the figure, it consists of an embedding layer, a SFCN module, and a PMA module. By gradually inferring and mining key information between process links, it establishes and fusion models cross-link dependencies in the process flow. Specifically, structured triple knowledge is obtained from the manufacturing process knowledge graph and converted into a query-path pair sequence as the source sequence input. The embedding layer maps the entities and relationships in the query-path pair sequence into low-dimensional vectors. Then, a shallow feedforward convolutional network is used to capture the key semantic features of the process query-path pair sequence, deeply mining the potential associations between its entities and relationships, and achieving a deep fusion of semantic features and potential process information. In addition, the PMA module is constructed through a parallel architecture of multi-query attention mechanism to further efficiently capture the relative relationships between each position in the input sequence, completing the long-range modeling of entity-relationship dependencies. Combined with rotational position encoding, it can capture long-range, cross-link dependencies and express the deep associations of the structured process knowledge in the knowledge graph. At the same time, an autoregressive masking mechanism is used to gradually generate representations of the output path sequence, completing efficient decoding of the fused features. A beam search is then used to generate the process planning decision triples, enabling intelligent process planning. Finally, a rule-guided dynamic aggregation and iteration strategy is proposed. By introducing model-generated process content for training, the accuracy of process planning decision results is effectively improved.

[0079] In this embodiment, a complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning includes the following steps.

[0080] Step 1: Build a manufacturing process knowledge graph, map the process steps, equipment, and process parameters into a structured triple set, generate a query-path pair sequence, and map the entities and relationships in the query-path pair sequence into low-dimensional vectors through the embedding layer.

[0081] Specifically, the set of entities and relations in the knowledge graph are represented as E and R respectively. Each directed edge in the knowledge graph can be formalized as a triple (h, r, t), where h, t∈E, t∈R. γ represents the set of all triples similar to the above triples.

[0082] In process planning, there are a large number of discrete data, such as processes, equipment, parameters, etc. These elements are often stored in the form of discrete symbols in the knowledge graph. Directly using such symbolic representations for multi-hop reasoning of the knowledge graph is difficult to capture the implicit associations and deep relationships between processes. Therefore, it is necessary to map these discrete process elements into a unified continuous semantic space, and then effectively extract their semantic information. By constructing an appropriate embedding matrix W∈R V ×d , projecting the query-path pair sequence into a shared semantic space to ensure the accuracy of the query-path pair sequence embedding. The embedding matrix is a dictionary of all tokens. The size of the token vocabulary is V = |E| + |R| + |S|, including the entity set |E|, the relationship set |R|, and other special token sets |S|. Other special token sets |S| play a specific role in the model training and inference process and usually do not represent the actual input data content, such as the start token <bos>and termination token <eos>wait.

[0083] Step 2: Perform dilated causal convolution calculations on the query-path pair sequence through a shallow feedforward convolutional network module to extract key process features and potential associations between processes, capture and deeply fuse key process features and potential associations, and generate a feature vector that integrates potential process associations.

[0084] As the manufacturing industry transitions from automation to intelligence, process planning faces challenges caused by the increasing complexity and diversity of process flows. Traditional process planning methods mostly rely on existing knowledge and manual experience to design process plans. They lack the ability to fully explore and utilize implicit connections between processes, making it difficult to effectively capture key information between adjacent processes and effectively address the complexity of process planning caused by process diversity, which seriously affects the efficiency and accuracy of process planning. The shallow feedforward convolutional network module combines the characteristics of shallow feedforward neural networks and temporal convolutional networks, eliminating the complex computational processes of traditional attention mechanisms and enabling the model to mine semantic features embedded in process knowledge representations. At the same time, the introduction of dilated causal convolutions gradually expands the model's receptive field, enhancing its ability to capture local features in process knowledge query-path pair sequences, mining deep-level connections between entities and relationships in the process knowledge graph, and achieving a deep fusion of process knowledge semantic features and potential connections between entities and relationships.

[0085] Specifically, such as Figure 2 As shown in the figure, the shallow feedforward neural network combines the ideas of shallow neural network structure and attention mechanism, abandoning the complex calculation process of the traditional attention mechanism. It performs feature extraction and information interaction through multi-layer feedforward neural networks, enabling the model to obtain richer process feature information and deeply explore the potential relationship in the process query-path pair sequence.

[0086] Specifically, the shallow feedforward convolutional network module performs the following steps.

[0087] 21) The shallow feedforward neural network passes the embedded representation x obtained by the embedding layer into three linear transformation layers, and makes them respectively interact with a learnable weight matrix and Associated, and through linear representation to mine the hidden features, generate query vector q1, key vector k1 and value vector v1 respectively, as shown Figure 2 (a). key Sum Splice into a new process feature vector

[0088] qkv=Concat(q1,k1,v1)

[0089] 22) The shallow feedforward neural network performs nonlinear transformation on the process feature vector qkv through two layers of feedforward neural network layers.

[0090] In deep neural networks, a single feature transformation is often insufficient to capture complex feature relationships. Multiple feature transformations on process feature vectors can provide a richer feature learning process and enhance the model's expressiveness. Similar to the combination of self-attention calculations and feedforward neural network layers in transformers, the shallow feedforward neural network in this example includes two feedforward neural network layers.

[0091] Specifically, in this embodiment, the method steps for performing nonlinear transformation on the process characteristic vector qkv are as follows.

[0092] 221) For the first feedforward neural network layer, the entire feedforward neural network can be regarded as a composite function. The process feature vector qkv passes through the fully connected layer and is combined with the weight matrix W (l) Perform linear changes, pass information layer by layer, use nonlinear activation functions to update the features, and get the final output To achieve the purpose of feature extraction and information fusion. Specifically, the method for the first feedforward neural network layer to extract features and fuse information on the process feature vector qkv is:

[0093] a (l) =f l (W (l) ·a (l―1) +b (l) )

[0094] in: is the output of the l-layer neuron; f l (·) is the activation function of the l-layer neurons (such as GELU); W (l) is the weight matrix from layer l-1 to layer l; b (l) is the bias from layer l-1 to layer l. In the same layer, all parameters are shared.

[0095] 222) Perform root mean square layer normalization on the layer feature a1 to obtain the normalized layer feature

[0096] Specifically, the layer features after being processed by the first feedforward neural network layer have not fully played their role. There is some feature redundancy. It is necessary to reshape and reduce the features in the high-dimensional feature space through mapping operations to retain the key process features, improve the model's expression ability and effectively integrate feature information, and obtain the layer features after linear projection.

[0097] Therefore, in order to alleviate the gradient explosion or gradient disappearance problem during training, the root mean square layer normalization operation (RMSNorm) is performed on the layer feature a1 to obtain the normalized layer feature

[0098] 223), add the input x and the normalized layer feature a2 to achieve residual connection and obtain the output of the first feedforward neural network layer

[0099] 224) The second feedforward neural network layer performs a root mean square layer normalization operation and a residual connection on the output a3 of the first feedforward neural network layer to obtain the output of the second feedforward neural network layer

[0100] 23) Perform two dilated causal convolutions on the outputs of the two feedforward neural network layers to gradually expand the receptive field.

[0101] Dilated causal convolution is the core computational structure in temporal convolutional networks, which consists of two types of convolutions: causal convolution and dilated convolution. Figure 2 As shown in (b), the output a4 obtained by the shallow feedforward network gradually expands the receptive field by performing two dilated causal convolutions, while capturing long-distance dependencies and ensuring that the output of each time step only depends on the current and previous inputs.

[0102] Specifically, the principle of dilated causal convolution is:

[0103]

[0104] Where: y t is the output at time step t; x t―p·j is the input at time step t-ε·j; w j is the jth weight of the convolution kernel; ε is the expansion coefficient, which is used to control the spacing between convolution kernel elements; k is the size of the convolution kernel;

[0105] 24) Weight normalization is introduced to stabilize training, and residual blocks are constructed to effectively alleviate the gradient vanishing problem, achieving efficient and stable process feature extraction.

[0106] 25) Process features of different scales are extracted by stacking three layers of networks. Each convolutional layer processes the input through convolution kernels of different sizes to capture features of different time ranges in the process query-path pair sequence and obtain the output

[0107] Step 3: Use a parallel multi-query attention module to perform rotational position encoding and causal mask processing on the feature vector output in step 2, and realize cross-process dependency modeling through a multi-head attention mechanism.

[0108] In actual manufacturing, the interactions between processes often span multiple links, forming complex and lengthy process flows. These long-distance transmission paths are difficult to accurately represent using the shallow associations of traditional knowledge graphs. Faced with increasingly complex manufacturing processes and multi-level process dependencies, traditional sequence processing methods struggle to effectively capture these long-distance, cross-link dependencies. The parallel multi-query attention module significantly improves the model's processing power and efficiency for complex process features and dependencies by introducing an innovative parallel architecture design and multi-query attention mechanism. Combined with rotational position encoding, it more accurately captures the relative positions and dependencies between processes in the process flow. Assisted by a beam search strategy, this ensures the rationality and accuracy of the generated process plan.

[0109] Specifically, in this embodiment, the parallel multi-query attention module performs the following steps.

[0110] 31) Perform pre-normalization (Pre-LN) on the input vector to obtain the process feature vector The process feature vector X norm Perform linear layer projection, respectively with the learnable weight matrix and W ff Associate and generate query vector Key Vector Value vector and the input of the feedforward network like Figure 3 As shown in (a).

[0111] 32) All heads share the same key vector k2 and value vector v2. The query vector q2 is split into H heads. Each attention head has its own unique query vector like Figure 3 (b) shown.

[0112] Transformer was first proposed by Vaswani et al. in 2017 as a deep learning model framework for natural language processing and sequence-to-sequence tasks. The core innovation of the Transformer architecture is the introduction of the self-attention mechanism, which enables the model to capture the relationship between elements in the sequence directly through dot product attention calculations when processing sequences, without relying on the sequential processing of the sequence. Compared with the original transformer method of adding layer normalization to the last output position of each sublayer, Pre-LN moves LayerNorm to the beginning of each sublayer and performs normalization before calculating multi-head attention or FFN. The gradient norm in the deep layer is approximately equal to Post-LN, but the gradient propagation is more stable and converges faster, and performs better in long sequence tasks and complex models. Subsequent models are all explained based on the Pre-LN architecture. The general function expression of the transformer model is:

[0113]

[0114] in: is the intermediate representation after fusing the original input features and attention information; X in is the feature representation input to the transformer module; X out is the feature representation obtained after processing by the transformer module; α sa , β sa , α ff and β ff It is the weight coefficient used to control the proportion of input vector and module output. The default value is 1.

[0115] Combined with the above formula, each vector of query and key is rotated and encoded to introduce position information, and the query vector is obtained Perform rotation position encoding on each vector of query and key to introduce position information, and obtain query vector and key vector

[0116] Positional encoding is a crucial component of the Transformer model, directly impacting the model's ability to process sequence information. Rotational positional encoding encodes positional information by introducing the concept of a rotation matrix, incorporating explicit relative positional dependencies into the self-attention formula. Compared to traditional positional encodings (such as sine / cosine positional encoding), this offers significant advantages in modeling long sequences. Through its unique rotation matrix mechanism, rotational positional encoding effectively captures and expresses long-range dependencies between entities and relationships in the process knowledge graph, optimizing the interaction of process feature information across processes and enabling accurate modeling of complex process chains in process planning.

[0117] The core idea of rotation position encoding is to embed position information directly during attention calculation without adding position encoding for each position separately. Figure 4 As shown, in the transformer, each token's embedding representation has a corresponding position index p (typically an integer starting at 0), indicating its position in the input sequence. Rotational position encoding rotates the process feature vector using a method similar to a two-dimensional rotation matrix. Therefore, the even-numbered dimensions of the process feature vector need to be partitioned, with each pair of adjacent dimensions treated as a two-dimensional vector and transformed by applying a rotation matrix. RoPE calculates the rotation angle based on each token's position index p. These angles are used to define the rotation matrix, which in turn rotates the embedding vector. As the dimension increases, the rate of change of the angle slows down, making higher-dimensional rotations more subtle and capable of capturing longer-range dependencies. The dimension d of the embedded process feature vector (such as the query vector q and the key vector k) is partitioned into pairs, resulting in a total of 2 / d angles theta. The value vector v is typically used to convey information in the attention mechanism that is not directly related to relative positions. Therefore, the value vector v is generally not subjected to rotational position encoding.

[0118] For each set of dimensions at each position in the process feature vector, compare it with the corresponding rotation matrix R p (θ t ) to transform, rotation matrix R p (θ t ) By rotating the dimensions of each group of vectors, they change their orientation in space while maintaining the same size. This process is repeated for all groups until the entire process feature vector is rotated. This allows each token in the embedding vector to embed position-related information, introducing relative position information for subsequent dot-product attention calculations. This allows the Transformer to effectively capture relative position relationships when modeling sequences.

[0119] In this embodiment, the method of performing rotation position encoding on each query and key vector to introduce position information is as follows:

[0120]

[0121] in: is an orthogonal rotation matrix; x t is the encoding information of the tth dimension of the current token; x 2t and x 2t+1 are the encoding information of the 2tth dimension and 2t+1th dimension of the current token respectively; θ t is the rotation angle of the t-th dimension of the current token; and:

[0122]

[0123] Where: θ t is the rotation angle of the t-th dimension of the current token, m is the position index of the current token; d is the total dimension of the embedding vector, t is the dimension index of the current token, t ≥ 0 and is an integer.

[0124] 33) Perform dot product calculation to obtain the query vector and key vector The calculation result of the similarity between them will also imply the relative position relationship between the two. The similarity calculation formula is:

[0125] <f(q,m),f(k,n)> =g(q,k,m―n)

[0126] Where: <·> represents the dot product operation; m and n represent the position indexes of the query vector q and the key vector k; m-n represents the distance between m and n in the sequence, implying the relative position information between the two.

[0127] 34) Perform causal masking on the similarity matrix sim and construct a causal mask matrix. The masked similarity matrix sim is converted into a probability distribution through the softmax function to form the attention weight. Based on the calculated attention weight, the value vector is weighted summed to obtain the process feature representation of a single attention head.

[0128] like Figure 3 As shown in (c), the similarity matrix sim is causally masked. By constructing the causal mask matrix, the output of each position of the decoder can only depend on the current and previous inputs to avoid information leakage. Then, the masked similarity matrix sim is converted into a probability distribution through the softmax function to form the attention weight. Based on the calculated attention weight, the value vector is weighted and summed to obtain the process feature representation of a single attention head. Specifically, the masked similarity matrix sim is converted into a probability distribution through the softmax function to form the attention weight:

[0129]

[0130] Attn(X)=A(X)XW v

[0131] in: and is a learnable embedding weight matrix; is the attention matrix, which represents the weight distribution when different tokens are mixed; L is the length of the token sequence; is a mask matrix, whose elements are 0 or -∞; R p (θ t ) is an orthogonal rotation matrix; X is the feature representation obtained after processing by the shallow feedforward convolutional network module; d v =d k =d / H;

[0132] Based on the calculated attention weight, the value vector is weighted and summed to obtain the process feature representation X1 of a single attention head:

[0133] X attn =MQA(X)=Concat(Attn1(X),…,Attn H (X))W P

[0134] in, is the projection matrix.

[0135] 35) Combine the outputs calculated from each head and obtain the initial process feature output through fused projection

[0136] The parallel multi-query attention module PMA Module is used for feature fusion. Specifically, the PMA Module transforms the original serial structure of multi-head attention (MHA) and MLP into a parallel structure, eliminating a jump connection and a Norm operation to reduce unnecessary calculations, and introduces a more efficient position information representation by rotating the position code. At the same time, the PMA Module adopts multi-query attention (MQA) to improve the decoding efficiency of the model, and merges the calculation of the attention and feedforward network into the same layer through fused projection, reducing the repeated calculation of each individual projection step in the traditional Transformer. Specifically, Figure 3 As shown in (d), while performing multi-query attention calculation, F is passed into the feedforward network of PMA Module for nonlinear transformation to obtain the feedforward network output The initial process feature vector X is converted into attn , the process feature vector X of the feedforward network ff and the process feature vector X after Pre-LN norm Add together to get the fusion process feature vector That is, the features obtained by fusion of parallel multi-query attention modules are:

[0137] X out =α comb X in +β ff MLP(Norm(X in ))+β sa MQA(Norm(X in ))=a comb X norm +β ff X ff +β sa X attn

[0138] Where: α comb , β sa and β ff is the weight coefficient used to control the ratio of the input vector and the module output; MLP represents the feedforward network; MQA is multi-query attention; X in is the input feature.

[0139] Step 4: Generate the global optimal process plan through beam search; based on the rule-guided dynamic aggregation iteration strategy, mix the process path generated by the model with the original training set and update the parameters.

[0140] (1) Generate the global optimal process plan through beam search

[0141] Multiple PMA modules are stacked to form the decoder part of the autoregressive generation model. The fused process feature vector generated by the model is combined with the search strategy to provide context-aware decoding information for the candidate process sequence. By iteratively expanding and evaluating these process paths, the subsequent generation process path is selected based on the probability distribution containing context information, thereby ensuring that the generation process can take into account global dependencies and optimize the output process route solution. Directly using greedy decoding may cause the model to tend to select shorter paths and produce local optimal solutions. Therefore, this embodiment adopts a beam search strategy to generate a series of potential process paths through beam search. By gradually expanding these process paths and evaluating their possibilities, the subsequent process path generation can capture potential better process choices to ensure the accuracy of the generated process path and avoid the occurrence of an excessively large search space or a local optimal solution. Finally, the optimal process path set is obtained to form the optimal process route solution, realizing complex manufacturing process planning decisions.

[0142] The method of generating the global optimal process plan through beam search is:

[0143]

[0144] Where: τ b represents the maximum length of the process path obtained by beam search; τ is the target path; τ k is the kth tag in the output path; τ <k is the previous mark; p(τ k |q,τ <k ) is the distribution probability of the kth tag; q is the query vector.

[0145] Specifically, the set of entities and relations in the knowledge graph are represented as E and R respectively. Each directed edge in the knowledge graph can be formalized as a triple (h, r, t), where h, t∈E, t∈R. γ represents the set of all triples similar to the above. For multi-hop reasoning, given a query triple (h, r, ?), the path reasoning can be specifically represented as h, r1, τ1, ..., r n , t; target entity t passes through intermediate entity t i Connected, where each entity is connected through a relationship edge r i and r i+1 n indicates that this is an n-hop path, that is, the length of the inference path is n. The query q is:

[0146] q:=(h,r),τ:=(r1,t1,...,r n ,t, <eos>)

[0147] Different from the RL framework that usually makes sequential decisions through components such as state, action, and reward, the decision-making process is abstracted into a sequence modeling problem. Given a query q, a multi-hop reasoning sequence is generated through an autoregressive generative model. The sequence will not stop during the reasoning process until a termination symbol is generated. <eos>Or the target entity is reached within a given maximum sequence length, which indicates that the inference process of the autoregressive generative model is completed.

[0148] At the same time, the multi-hop reasoning process is defined, and τ k When performing sequential decoding, the model can only observe previous reasoning information, including the previous token τ <τ and query tags h and r. To prevent the leakage of subsequent sequence information, we use a causal mask during decoding to predict the next entity or relation in an autoregressive manner. This mask blocks subsequent tags, making it impossible for the model to access information about subsequent sequence items. Specifically, given a query q, the method for generating a multi-hop reasoning sequence using an autoregressive generative model is as follows:

[0149]

[0150] Where: τ is the candidate token, i.e. the target path; |τ| is the number of tokens in the path; τ k is the kth token in the output path.

[0151] (2) Update parameters of rule-based dynamic aggregation iterative strategy

[0152] Exposure bias is a common problem in autoregressive generative models, resulting in discrepancies between the model's generated decision results during training and inference. In complex process planning scenarios, the model uses the actual process flow path as a historical path during training to predict the process parameters or processing methods required for the next step. However, during the inference phase, the process flow is generated from scratch by the model, which deviates from the process flow path provided during training. This causes the model-generated content to differ from the actual data used during training, affecting the quality and accuracy of the generated process plan.

[0153] In order to alleviate the exposure bias problem of the autoregressive generative model to a certain extent, this embodiment proposes a dynamic aggregation iteration strategy. By introducing generated samples for training, the new generation process paths are iteratively aggregated into the training set. At the same time, the learning rate is dynamically adjusted as the number of iterations increases, so that the model can achieve better training results. The number of iterations k and the period iter_epoch required for the model are determined according to the dynamic aggregation iteration strategy. k . It should be noted that the number of iterations k is equal to the maximum number of hops N of the path. The training cycles of each stage are allocated according to the weight ratio of the current stage. The ones with large weights and earlier stages are allocated more training cycles; the ones with small weights and later stages are allocated fewer training cycles. When the model performs the first iteration, the model has been trained for iter_expoch1 epochs. Based on the query-path pairs previously generated by the model, an iterative training set M is constructed, and it is used as the training sample of the model to partially mix with the original training data set to form a new training data set for the next stage of training. After the kth iteration (k>1), the training data set of the model is updated k times according to the above steps, and its size becomes k times the size of the initial data set.

[0154] In this embodiment, the method for updating parameters of the rule-guided dynamic aggregation iteration strategy is:

[0155] 41) Dynamic aggregation iteration strategy dynamically adjusts the training cycle according to the number of iterations k:

[0156]

[0157] Where: iter_epoch k Indicates the training round of the current iteration stage; k indicates the index of the current iteration stage; epoch indicates the total training rounds of the model; represents the sum of the reciprocals of the weight coefficients of all stages; (·) represents the rounding down operation to ensure that the iterative training cycle is an integer. 42)

[0159] After mixing the process path generated by the model with the original training set, the cross-entropy loss is used to calculate the loss between the target token and the model predicted token, and label smoothing is added to the cross-entropy loss calculation to update the parameters until the cross-entropy loss converges.

[0160] In decoding τ k When , the decoder can only see the previous mark τ <k The distribution probability of the kth tag is obtained by multi-hop reasoning. During the training process of the model, a path from all the reasoning paths of each triple (h, r, t) is randomly sampled as the target path τ. For the triples whose paths cannot be sampled, we define their paths as τ: = (r, t, <eos>). At the same time, in order to avoid model overfitting, cross entropy loss is used to calculate the loss between the target token and the model predicted token, and label smoothing is added to the cross entropy loss calculation. Specifically, the cross entropy loss is:

[0161]

[0162] Where: α i =ξ indicates that i is the target tokeni = τ k The probability of represents the probability when i is any of the other tokens; K represents the number of categories, that is, the size of the token vocabulary V; ξ is a label smoothing hyperparameter with a value range of 0 to 1.

[0163] 2. Experimental Design and Analysis

[0164] To validate the effectiveness of the proposed method, this section details the data sources for complex manufacturing processes and constructs a vehicle body manufacturing process knowledge dataset. Furthermore, to verify the performance of the MKGR model, detailed experimental studies from different perspectives are conducted using this dataset.

[0165] 2.1 Experimental Data

[0166] The dataset used in this experiment comes from process planning and process standardization documents, production management and resource scheduling documents, and equipment operation and maintenance management documents from an automobile manufacturing production line in Chongqing, China. Process planning and process standardization documents primarily involve the development and standardization of process flows, operating specifications, and technical requirements during the production process, such as process flow diagrams (PFDs), work instructions (SOPs), and process cards. Production management and resource scheduling documents include production plans, production schedules, bills of materials (BOMs), and quality control plans (QCPs), primarily used for the rational allocation of production resources, job scheduling, material management, and quality monitoring. Equipment operation and maintenance management documents, including equipment maintenance manuals and process improvement reports, focus on the normal operation, troubleshooting, and maintenance of production equipment, ensuring equipment stability and long-term efficient operation while supporting the continuous optimization of production processes.

[0167] By studying and organizing the above data, a knowledge graph of car body manufacturing process is constructed, such as Figure 5 As shown in the figure, a dataset for the experiment was constructed based on this knowledge graph. The dataset stores a large amount of automotive body manufacturing process knowledge in the form of triples (h, r, t). Specifically, given the data "body-in-white welding dependent technology / resistance spot welding / control parameters / welding current / associated defective welds", this data occupies a single line and contains a header entity, path information, and a tail entity, all separated by two spaces. The path information uses the separator / to connect multiple entities or relationships to help distinguish individual relationships and the hierarchical relationship between entities.

[0168] The dataset used in this example is saved in txt file format and contains 7,896 entities and 7,941 relationships, based on which 33,468 triples are formed, as shown in Table 1. This paper divides the dataset into training, validation, and test sets in a 3:1:1 ratio. No data augmentation is performed during training; only a subset of triples from the original data are used to more realistically reflect the model's performance in real applications.

[0169] Table 1 Dataset type statistics

[0170]

[0171] 3.2 Evaluation indicators and parameter settings

[0172] 3.2.1 Evaluation indicators

[0173] This experiment uses Mean Reciprocal Rank (MRR) and Hits@K, two commonly used metrics for multi-hop reasoning tasks. For each triple (h, r, t) in the test set, it is converted into a triple query (h, r, ?), and a ranked list of tail entities is obtained from the model. MRR evaluates the quality of the model's generation by calculating the inverse of the rank of the correct answer to each query, performing the same operation across all queries in the triple set, and averaging the results.

[0174]

[0175] Where: γ is the set of triples, |γ| is the number of triples in the set, rank i is the ranking of the correct answer to the i-th triple query. Generally speaking, a larger MRR value indicates a higher ranking of the correct answer to the query, which means the model’s prediction effect is better.

[0176] Hits@K refers to the average proportion of triplets ranked less than K in the list of candidate answers generated by the model. Generally speaking, a larger value of Hits@K indicates that the model is able to effectively capture the correct answer from fewer returned results.

[0177]

[0178] Where: Ⅱ is the indicator function, when the input is True, the output is 1, when the input is False, the output is 0, and the value of K is 1, 3, and 10.

[0179] Process planning transforms product design models into manufacturing processes and determines the optimal sequence of production operations. As the number and types of steps in the manufacturing process increase, existing process planning methods have significant shortcomings in extracting key process features between adjacent steps and establishing long-chain dependencies within process knowledge, severely impacting the efficiency and quality of process plan generation. Therefore, this paper proposes a knowledge graph multi-hop reasoning model (MKGR) combined with a parallel multi-query attention mechanism to address the complex manufacturing process decision-making requirements of process planning. MKGR simulates the attention mechanism by constructing a shallow feedforward convolutional network and combines it with dilated causal convolutions to capture and deeply fuse key process features and potential correlations. Furthermore, a parallel multi-query attention mechanism combined with rotational position encoding enables long-range modeling of dependencies between process steps and efficient decoding of fused process features. Finally, a rule-guided dynamic aggregation and iteration strategy is proposed. By incorporating generative process content into the model training process, the model's adaptability and accuracy in process plan generation are significantly improved. Experiments on a manufacturing process dataset from an automotive production workshop test the MKGR model's performance and validate its effectiveness in the manufacturing sector. The results show that the MKGR model achieves an MRR score of 89.2%, which is 1.6% higher than the state-of-the-art baseline model.

[0180] The above embodiments are merely preferred embodiments for the purpose of fully illustrating the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are within the scope of protection of the present invention. The scope of protection of the present invention shall be subject to the claims.< / eos> < / eos> < / eos> < / eos> < / bos> < / eos>

Claims

1. A method for intelligent planning and decision-making of complex manufacturing processes based on knowledge graph multi-hop reasoning, characterized by: The steps include: Step 1: Build a manufacturing process knowledge graph, map the process steps, equipment, and process parameters into a structured triple set, generate a query-path pair sequence, and map the entities and relationships in the query-path pair sequence into low-dimensional vectors through an embedding layer. Step 2: Perform dilated causal convolution calculations on the query-path pair sequence through a shallow feedforward convolutional network module to extract key process features and potential associations between processes, achieve the capture and deep fusion of key process features and potential associations, and generate a feature vector that integrates potential process associations; Step 3: Use a parallel multi-query attention module to perform rotational position encoding and causal masking on the feature vector output from step 2, and implement cross-process dependency modeling through a multi-head attention mechanism; Step 4: Generate the global optimal process plan through beam search; based on the rule-guided dynamic aggregation iteration strategy, mix the process path generated by the model with the original training set and update the parameters.

2. The complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning according to claim 1 is characterized by: In step 1, the method of mapping entities and relationships in the query-path pair sequence into low-dimensional vectors through the embedding layer is as follows: construct an embedding matrix W∈R V×d , projecting the query-path pair sequence into a shared semantic space; the embedding matrix is a dictionary of all tokens; the size of the token vocabulary is V = |E| + |R| + |S|, including the entity set |E|, the relationship set |R| and other special tag sets |S|.

3. The complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning according to claim 1 is characterized by: In step 2, the shallow feedforward convolutional network module performs the following steps: 21) The shallow feedforward neural network passes the embedded representation x obtained by the embedding layer into three linear transformation layers, respectively with a learnable weight matrix and Associated, generate query vector q1, key vector k1 and value vector v1 respectively; key Sum Splice into a new process feature vector qkv=Concat(q1,k1,v1) 22) The shallow feedforward neural network performs nonlinear transformation on the process feature vector qkv through two layers of feedforward neural network; 23) Perform two dilated causal convolutions on the outputs of the two-layer feedforward neural network layer to gradually expand the receptive field; The principle of dilated causal convolution is: Where: y t is the output at time step t; x t―p·j is the input at time step t-ε·j; w j is the jth weight of the convolution kernel; ε is the expansion coefficient, which is used to control the spacing between convolution kernel elements; k is the size of the convolution kernel; 24) Weight normalization is introduced to stabilize training, and residual blocks are constructed to effectively alleviate the gradient vanishing problem, achieving efficient and stable process feature extraction; 25) Process features of different scales are extracted by stacking three layers of networks. Each convolutional layer processes the input through convolution kernels of different sizes to capture features of different time ranges in the process query-path pair sequence and obtain the output 4. The complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning according to claim 3 is characterized by: In step 22), the method steps for performing nonlinear transformation on the process characteristic vector qkv are as follows: 221) The first feedforward neural network layer performs feature extraction and information fusion on the process feature vector qkv: a (l) =f l (W (l) ·a (l―1) +b (l) ) in: is the output of the l-layer neuron; f l (·) is the activation function of neurons in layer l; W (l) is the weight matrix from layer l-1 to layer l; b (l) is the bias from layer l-1 to layer l; 222) Perform root mean square layer normalization on the layer feature a1 to obtain the normalized layer feature 223), add the input x and the normalized layer feature a2 to achieve residual connection and obtain the output of the first feedforward neural network layer 224) The second feedforward neural network layer performs a root mean square layer normalization operation and a residual connection on the output a3 of the first feedforward neural network layer to obtain the output of the second feedforward neural network layer 5. The complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning according to claim 1 is characterized by: In step 3, the parallel multi-query attention module performs the following steps: 31) Pre-normalize the input vector to obtain the process feature vector The process feature vector X norm Perform linear layer projection, respectively with the learnable weight matrix and W ff Associate and generate query vector Key Vector Value vector and the input of the feedforward network 32) Split the query vector q2 into H heads, each with its own unique query vector. Perform rotation position encoding on each vector of query and key to introduce position information, and obtain query vector and key vector 33) Perform dot product calculation to obtain the query vector and key vector similarity between 34) Perform causal masking on the similarity matrix sim and construct a causal mask matrix. The masked similarity matrix sim is converted into a probability distribution through the softmax function to form the attention weight. Based on the calculated attention weight, the value vector is weighted summed to obtain the process feature representation of a single attention head. 35) Combine the outputs calculated from each head and obtain the initial process feature output through fused projection 6. The complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning according to claim 5 is characterized by: The parallel multi-query attention module uses parallel multi-head attention and feedforward networks for feature fusion, and inputs F into the feedforward network to obtain the output The features obtained by fusion of parallel multi-query attention modules are: X out =a comb X in +b ff MLP(Norm(X in ))+b sa MQA(Norm(X in ))=a comb X norm +b ff X ff +b sa X attn Where: α comb , β sa and β ff is the weight coefficient used to control the ratio of the input vector and the module output; MLP represents the feedforward network; MQA is multi-query attention; X in is the input feature.

7. The complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning according to claim 5 is characterized by: In step 32), the method of performing rotation position encoding on each vector of the query and key to introduce position information is: in: is an orthogonal rotation matrix; x t is the encoding information of the tth dimension of the current token; x 2t and x 2t+1 are the encoding information of the 2tth dimension and 2t+1th dimension of the current token respectively; θ t is the rotation angle of the t-th dimension of the current token; and: Where: θ t is the rotation angle of the t-th dimension of the current token, m is the position index of the current token; d is the total dimension of the embedding vector, t is the dimension index of the current token, t ≥ 0 and is an integer.

8. The complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning according to claim 5 is characterized by: In step 34), the masked similarity matrix sim is converted into a probability distribution through a softmax function to form an attention weight: Attn(X)=A(X)XW v in: and is a learnable embedding weight matrix; is the attention matrix, which represents the weight distribution when different tokens are mixed; L is the length of the token sequence; is a mask matrix, whose elements are 0 or -∞; R p (θ t ) is an orthogonal rotation matrix; X is the feature representation obtained after processing by the shallow feedforward convolutional network module; d v =d k =d / H; Based on the calculated attention weight, the value vector is weighted and summed, and the process feature representation X1 of each attention head is added to obtain the process feature representation X of the total attention head. attn : X attn =MQA(X)=Concat(Attn1(X),…,Attn H (X))W P in, is the projection matrix.

9. The complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning according to claim 1 is characterized by: In step 4, the method for generating the global optimal process solution through beam search is: Where: τ b represents the process path with the maximum length obtained by beam search; τ is the target path; τ k is the k-th token in the output path; τ<k is the previous token; p(τ k |q, τ<k) is the distribution probability of the k-th token; q is the query vector; and: For a given triple (h, r, t), path reasoning is performed and the search path is represented as h, r1, t1, ..., r n , t; target entity t passes through intermediate entity t i Connected, where each entity is connected through a relationship edge r i and r i+1 connected; n indicates that this is an n-hop path, that is, the length of the inference path is n, and the query q is: q:=(h,r),τ:=(r1,t1,...,r n ,t, <eos> )< / eos> The reasoning process continues until a termination symbol is generated. <eos> or reaching the target entity within a given maximum sequence length;< / eos> Given a query q, a multi-hop reasoning sequence is generated through an autoregressive generative model: Where: τ is the candidate token, i.e. the target path; |τ| is the number of tokens in the path; τ k is the kth token in the output path.

10. The complex manufacturing process intelligent planning and decision-making method based on knowledge graph multi-hop reasoning according to claim 1 is characterized by: In step 4, the method for updating parameters of the rule-guided dynamic aggregation iterative strategy is: 41) Dynamic aggregation iteration strategy dynamically adjusts the training cycle according to the number of iterations k: Where: iter_epoch k Indicates the training round of the current iteration stage; k indicates the index of the current iteration stage; epoch indicates the total training rounds of the model; Represents the sum of the reciprocals of the weighted coefficients of all stages; (·) represents the rounding down operation to ensure that the iterative training cycle is an integer; 42) After mixing the process path generated by the model with the original training set, use cross-entropy loss to calculate the loss between the target token and the model predicted token, and add label smoothing to the cross-entropy loss calculation to update the parameters until the cross-entropy loss converges; the cross-entropy loss is: Where: α i =ξ indicates that i is the target tokeni = τ k The probability of represents the probability when i is any of the other tokens; K represents the number of categories, that is, the size of the token vocabulary V; ξ is a label smoothing hyperparameter with a value range of 0 to 1.

Citation Information

Cited By

  • AI intelligent production service management cloud platform and system for bamboo industry

    CN120893981A

  • An ai intelligent production service management cloud platform and system for bamboo industry

    CN120893981B

  • Knowledge base-based reasoning comparison method

    CN121119142A

  • Multi-attention-based electric power knowledge graph construction method and system, and storage medium

    CN121706905A

  • Power knowledge graph construction method and system based on multi-head attention, storage medium

    CN121706905B