Multistage supply chain optimization system and method based on dynamic knowledge graph and large model
By adopting a multi-level supply chain optimization system with dynamic knowledge graphs and large models in cloud manufacturing supply chain management, the problem of untimely supply chain risk assessment and decision-making updates in the existing technology is solved, real-time assessment and dynamic optimization of supply chain risks are achieved, and decision-making efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510066893.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-13
AI Technical Summary
The existing cloud manufacturing supply chain management technology lacks effective risk assessment methods and decision-making models, which makes supply chain delays and risks difficult to control, and the traditional decision-making process is not updated in time, so it is impossible to respond to market changes in real time.
A multi-level supply chain optimization system based on dynamic knowledge graphs and large models is adopted to evaluate supplier risks by establishing dynamic knowledge graphs and train them using BERT models that introduce attention mechanisms to generate suppliers' preferred large models. The system includes a dynamic knowledge graph building module, a supplier's preferred model building module, a supplier's priority sorting tool and a supplier's preferred solution prediction module for real-time evaluation and optimization of supply chain decisions.
Real-time assessment and dynamic optimization of multi-level supply chain risks is achieved, the decision-making efficiency and accuracy of supply chain management is improved, and the ability to respond to market changes and supply chain dynamics is faster.
Smart Images

Figure CN119990992A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud manufacturing supply chain management, and in particular to a multi-level supply chain optimization system and method based on a dynamic knowledge graph and a large model. Background Art
[0002] In the context of order-based production, the multi-level supply chain formed by many supplier nodes needs to complete the entire process from raw material procurement to finished product delivery in a short period of time, which makes enterprises with order-based production mode face the challenges of supply chain delay and supply chain risk. In order to carry out timely and accurate capacity planning and risk warning for the supply chain, it is necessary to dynamically consider the impact of supply risk factors of cloud manufacturing supplier nodes, screen out appropriate supply chain procurement solutions, and quickly plan the appropriate supply and demand relationship between supplier nodes.
[0003] In terms of risk warning for cloud manufacturing supply chain management, there is a lack of effective assessment methods for measuring supply risks in the supply chain. Under the order-based production model, enterprises face the risk impact of multiple supply chains in the upstream, midstream and downstream. Once suppliers are affected by internal or external adverse factors and cannot provide purchased raw materials normally, it may cause supply chain disruptions and affect the normal operation of the downstream supply chain. For multi-level supply chains involving complex supplier relationships, current research lacks an overall framework for risk assessment. Therefore, it is necessary to combine the multi-level supply chain risk propagation method to make the model output results more interpretable.
[0004] In terms of decision-making methods for cloud manufacturing supply chain management, traditional decision-making processes often rely on static data and empirical rules, resulting in supplier selection decisions that are not updated in a timely manner and cannot be iteratively optimized according to real-time market changes and supply chain dynamics. In addition, traditional decision-making models usually lack the ability to analyze large-scale data in real time and cannot fully utilize the large-scale data generated by cloud manufacturing platforms, thus failing to achieve accurate evaluation and dynamic optimization of supplier selection. Compared with traditional decision-making methods, artificial intelligence methods can effectively process multi-dimensional large-scale data. However, current artificial intelligence methods lack expertise in the field of cloud manufacturing supply chain, making it difficult to efficiently understand and utilize large-scale vertical field data generated by supply chain companies, resulting in the decision-making model being unable to make accurate inferences about the supply chain situation and unable to respond quickly in the face of dynamically changing environments.
[0005] In terms of big model reasoning in cloud manufacturing supply chain management, the existing big model reasoning process lacks consideration of the big model input information preference settings and ignores the subtle differences in the big model's priority processing of information. This may cause the big model to ignore data sets that are more relevant to the business during the reasoning process, making its reasoning results inaccurate. Summary of the invention
[0006] The purpose of the present invention is to address the defects of the prior art and provide a multi-level supply chain optimization system based on a dynamic knowledge graph and a large model, including:
[0007] The dynamic knowledge graph establishment module is used to establish a knowledge graph based on historical supply chain multimodal data, formulate multi-level supply chain risk propagation rules based on the knowledge graph, and then establish a multi-level supply chain risk propagation model based on the multi-level supply chain risk propagation rules. The multi-level supply chain risk propagation model is used to evaluate the risks generated when each supplier in the knowledge graph is used as a supply risk propagation source and update the knowledge graph to obtain a dynamic knowledge graph of cloud manufacturing suppliers;
[0008] The cloud manufacturing supplier optimization large model building module is used to train and adjust the BERT model with the attention mechanism using the cloud manufacturing supplier dynamic knowledge graph to obtain the cloud manufacturing supplier optimization large model;
[0009] A supplier prioritization tool establishment module is used to establish a supplier prioritization tool based on the requirements of the supplier capacity and the risks in the cloud manufacturing supplier dynamic knowledge graph according to the order information;
[0010] The cloud manufacturing supplier optimization solution prediction module is used to input the cloud manufacturing supplier dynamic knowledge graph, cloud manufacturing supplier optimization model and supplier priority sorting tool into the language model development framework, make supplier predictions based on current order information, and determine the cloud manufacturing supplier optimization supply chain based on the supplier prediction results.
[0011] Furthermore, in the dynamic knowledge graph establishment module, the specific method for establishing the knowledge graph based on the historical supply chain multimodal data is:
[0012] The historical supply chain multimodal data includes text data and image data;
[0013] For text data, the Word2Vec model is used to encode the text data into text vectors, and then the text vectors are input into the BERT model. The BERT model uses the NER tool to identify and obtain the entity feature vectors in the text data. For image data, the image data is input into the FasterR CNN model to identify and obtain the entity feature vectors in the image data. The entity feature vectors in the text and the entity feature vectors in the image are merged to obtain the entity feature vector set E, which is expressed as E = {(e j ,t j )|e j is entity j,t j is the type of entity j};
[0014] Define the relationship patterns between different entities. For text data, input the text data encoded as vectors into the BERT model again to obtain the feature vectors reflecting the relationship between entities in the text data. For image data, input the image data into the CNN model. The CNN model obtains the feature vectors reflecting the relationship between entities in the image data based on the relationship patterns between different entities defined. The feature vectors reflecting the relationship between entities in the text data and the feature vectors reflecting the relationship between entities in the image data are combined to obtain the relationship feature vector set R, which is expressed as R = {(e k ,e j ,r k,j )|e k ,e j They are entity k and entity j, r k,j is the relationship between entity k and entity j};
[0015] The NER model is used to extract entity attribute feature vectors from text data, and the image recognition algorithm is used to extract entity attribute feature vectors from image data. The entity attribute feature vectors in the text data and the entity attribute feature vectors in the image data are combined to obtain the entity attribute feature vector set A, which is expressed as A = {(e j ,a j,n ,v n )|e j is entity j,a j,n is the attribute n,v of entity j n is the value of attribute n};
[0016] Use the graph database Neo4j to build a knowledge graph G = (E, R, A). For each entity e j , and its corresponding attribute a j,n and attribute value v n is added to the properties of the entity in the knowledge graph.
[0017] Furthermore, the dynamic knowledge graph building module is also used to update the knowledge graph according to the newly introduced supply chain multimodal data; wherein, the relationship between entities in the newly introduced supply chain multimodal data is obtained by the following method:
[0018] The entity feature vector set E and the relationship feature vector set R obtained from the historical supply chain multimodal data are input into the graph neural network GNN. The graph neural network GNN uses entities as nodes and relationships as edges to construct a feature network graph. Let the predicted relationship be The true relation is r in the relation feature vector set R k,j , the cross entropy loss function L is used to train the graph neural network GNN, and the formula is expressed as:
[0019]
[0020] Input any two entities in the new supply chain multimodal data or any entity in the current supply chain multimodal data and the existing entities in the knowledge graph into the trained graph neural network GNN to obtain the relationship between the two input entities.
[0021] Furthermore, in the dynamic knowledge graph establishment module, a knowledge graph is established based on historical supply chain multimodal data, and then a multi-level supply chain risk propagation rule is formulated based on the knowledge graph. Then, a multi-level supply chain risk propagation model is established based on the multi-level supply chain risk propagation rule. The multi-level supply chain risk propagation model is used to evaluate the risk generated when each supplier in the knowledge graph is used as a supply risk propagation source and the knowledge graph is updated. The specific method for obtaining the cloud manufacturing supplier dynamic knowledge graph is as follows:
[0022] According to the supply relationship between upstream and downstream suppliers in the knowledge graph, a multi-level supply chain hierarchical structure is constructed. The nodes in each level of the supply chain represent suppliers, and the connections between nodes represent the supply relationship between multi-level supply chains. The multi-level supply chain risk propagation rules are formulated as follows:
[0023] If the supplier's supply loss value exceeds its infection threshold, it becomes an infected supplier for supply risk propagation. The infection threshold is defined as n% of the supplier's purchase volume. The supply risk of infected suppliers at all levels is propagated among suppliers at each level of the supply chain.
[0024] According to the multi-level supply chain risk propagation rules, a multi-level supply chain risk propagation algorithm is formulated. First, the relevant variables are defined as follows:
[0025] l: the level number of the supplier in the multi-level supply chain, each level includes multiple suppliers; L: the total number of levels in the multi-level supply chain; m l,i : The i-th supplier in the l-th level supply chain; Supplier l,i The proportion of purchase volume reduction, i.e. supplier m l,i Current purchase volume / supplier m l,i The initial supply of Supplier l,i The infection threshold of supplier m l,i Procurement loss value Exceeding the preset purchase amount of times, that is Supplier m l,i Become a new source of risk transmission; x l,l+1 : The serial number of the edge between level l and level l+1 in the multi-level supply chain; S(x l,l+1 ): side x l,l+1The set of suppliers that act as suppliers among the connected suppliers; P(x l,l+1 ):edge r l,l+1 A collection of suppliers in the connected suppliers group that are in the purchasing role; Supplier l,i Through the edge x l,l+1 The preset purchase volume obtained by the supply relationship; IB l : The set of infected suppliers in the first-level supply chain; IX l,l+1 : The set of infected edges between the lth level to the l+1th level supply chain; IBadd l : The number of newly infected suppliers in the l-th level supply chain;
[0026] After each propagation, the results of the propagation are as follows:
[0027]
[0028] Then, a corresponding multi-level supply chain risk propagation algorithm is formulated according to the multi-level supply chain risk propagation algorithm. The algorithm is as follows: At the beginning of supply, all suppliers in the multi-level supply chain are initialized to a normal state; when a supplier m l-1,i When the product supply decreases, all the l-1,i Sub-suppliers supplying products l,i The purchase volume has decreased For any one connected to the parent exception provider m l-1,i and lower-tier suppliers l,i The edge number x l,l+1 , if supplier m l-1,i Sub-suppliers m l,i Procurement loss value Exceeds its initial total purchase volume of times, that is The lower-level partner supplier m l,i Become a new source of risk transmission and join the infected supplier group IB l , and the edge x l,l+1 Join the Infected Edge Collection IX l,l+1 ; Completely traverse the supply relationships from level l to l+1 until all edges between levels l to l+1 are traversed; traverse all levels of the multi-level supply chain until the traversal is complete;
[0029] According to the multi-level supply chain risk propagation algorithm, the avalanche rate is used to reflect the risk value generated when the supplier is the source of risk propagation. When the propagation ends, the initial propagation source in the upper supply chain network The impact of supply risk transmission on the downstream supply chain network is that the initial transmission source The number of infected suppliers ∑IBaddl The avalanche rate is the percentage of the total number of suppliers N in the multi-stage supply chain. The formula is:
[0030]
[0031] The supplier risk is added as a new attribute to the corresponding supplier node in the knowledge graph and the avalanche rate is used to calculate the supplier risk. The value of this attribute is updated as the supplier risk value to obtain the cloud manufacturing supplier dynamic knowledge graph.
[0032] Furthermore, in the cloud manufacturing supplier optimization large model building module, the specific method of using the cloud manufacturing supplier dynamic knowledge graph to train the BERT model that introduces the attention mechanism is as follows:
[0033] Extract entities, relations and attributes of entities from the cloud manufacturing supplier dynamic knowledge graph as training datasets;
[0034] First, an MLM training task is constructed. The text of the MLM training task includes entities, relationships, and attributes. The attributes include supplier risks. Then, the supply chain self-attention mechanism is integrated on the basis of the BERT model. The supply chain self-attention mechanism is used to focus on infected suppliers in multi-level supply chains. Finally, the loss function of the MLM training task is defined. Based on the suppliers and attributes in the training dataset, the cross-entropy loss function is used to train the BERT model integrated with the supply chain self-attention mechanism using the MLM training task. The cross-entropy loss function formula is expressed as:
[0035]
[0036] in It is for suppliers l,i The predicted avalanche rate, is the true avalanche rate. At the same time, the gradient of the loss function with respect to the parameters of the BERT model incorporating the supply chain self-attention mechanism is calculated, and the weights of the BERT model incorporating the supply chain self-attention mechanism are updated using the gradient descent method. The formula is expressed as:
[0037]
[0038] Among them, θ t is the parameter of the BERT model incorporating the supply chain self-attention mechanism at time step t, and η is the learning rate;
[0039] The training process of the supply chain self-attention mechanism is as follows:
[0040] For infected suppliers, initialize a weight matrix that matches the text dimension of the MLM training task, and set the weight matrix to be Wrisk , whose dimension is d input ×1, where d input is the dimension of the input text, the weight matrix W risk Includes supplier risk characteristics corresponding to supplier risks in the MLM training task text;
[0041] When calculating the attention score, the weight matrix W is used risk Adjust the query vector or key vector: Let the query vector be Q and the key vector be K, then the adjusted query vector Q′=W risk Q, adjusted key vector K′=W risk K;
[0042] Then design the attention mechanism head to pay attention to the weight matrix W risk Risk features in: First, dot product operation is performed on the adjusted query vector Q′ and key vector K′ to obtain the attention score matrix A = Q′K′ T Then, the attention score matrix A is normalized using the Softmax function to obtain the normalized attention score matrix A′=Softmax(A). Finally, the normalized attention score matrix A′ is dot-producted with the value vector V to obtain the final attention mechanism head output O=A′V.
[0043] Furthermore, in the cloud manufacturing supplier optimization large model building module, the specific method of using the cloud manufacturing supplier dynamic knowledge graph to adjust the BERT model that introduces the attention mechanism is as follows:
[0044] Based on the training data set, using the CoT thinking chain prompt template, combined with the actual situation of the supply chain, the decision-making scenario is designed, and decision-making questions are proposed for the decision-making scenario. At the same time, multiple levels of reasoning requirements are set, and multiple possible answers, answer analysis and reasoning processes are given to obtain dialogue sample data;
[0045] The conversation sample data is input into the trained BERT model with the attention mechanism for parameter adjustment.
[0046] Furthermore, in the supplier priority sorting tool establishment module, the specific method of establishing the supplier priority sorting tool according to the requirements of the supplier capacity and risk in the cloud manufacturing supplier dynamic knowledge graph based on the order information is:
[0047] Use the relevance evaluation algorithm bge reranker base to establish a supplier prioritization tool, specifically:
[0048] First, prioritize suppliers that meet the production capacity requirements of the order. The formula is as follows:
[0049]
[0050] Among them, the function ρ rank1 Based on the supplier capacity requirement o1 in the order information, the relevance evaluation algorithm Bgereranker Base is used to evaluate the relevance score of each supplier in the supplier set in the cloud manufacturing supplier dynamic knowledge graph. Indicated by the supplier and its relevance score The pairs of suppliers that are screened by production capacity are obtained. rank1 , the supplier set S rank1 Suppliers in the Sort in descending order;
[0051] Then, for the supplier set S rank1 The suppliers in the list are then prioritized according to the risks they generate when they are the source of supply risk transmission. The formula is as follows:
[0052]
[0053] Among them, the function ρ rank2 Based on the requirement of supplier risk in order demand, o2 uses the relevance evaluation algorithm Bgereranker base to evaluate the supplier set S that has been screened by production capacity. rank1 The relevance score for each supplier in G stands for Supplier by and its relevance score The supplier set S rank2 Suppliers in G are scored based on relevance i Sort in descending order.
[0054] Furthermore, in the cloud manufacturing supplier optimization solution prediction module, the cloud manufacturing supplier dynamic knowledge graph, the cloud manufacturing supplier optimization model and the supplier priority sorting tool are input into the language model development framework and predicted based on the current order information. The specific method for obtaining the cloud manufacturing supplier optimization supply chain is as follows:
[0055] First, the NER model is applied to identify the current entity in the current order information, and then the current entity is encoded into the current entity feature vector using Word Embeddings. The current entity is matched with the entity in the cloud manufacturing supplier dynamic knowledge graph, and the matching score is calculated based on the following formula:
[0056] Score(entity,concept)=sim(entityembedding,conceptembedding)
[0057] Among them, sim represents the similarity calculation function, entityembedding is the current entity feature vector, and conceptembedding is the entity feature vector in the dynamic knowledge graph of cloud manufacturing suppliers;
[0058] Then, combining entities and attributes, a weighted sum method is used to calculate the matching score between the current entity and the entity in the cloud manufacturing supplier dynamic knowledge graph. Score , the formula is:
[0059] Final Score =αentityScore+βAttributeScore
[0060] Among them, entityScore and AttributeScore respectively represent the entity matching score and attribute matching score between the current entity feature vector and the entity feature vector in the cloud manufacturing supplier dynamic knowledge graph calculated by the above matching score formula, and α and β are the corresponding weight coefficients, which can be determined by the following steps:
[0061] Define the objective function J(α,β)=αL to measure the matching accuracy entity +βL Attribute , where the loss function L entity , L Attrubute They represent the loss when the entity does not match the entity in the cloud manufacturing supplier dynamic knowledge graph, and the loss when the attribute is inconsistent with the attribute in the cloud manufacturing supplier dynamic knowledge graph;
[0062] Initialize weights α, β and calculate the gradient of the objective function with respect to each weight And update the weight according to the gradient and learning rate η, the formula is expressed as:
[0063]
[0064] Then, the current entity feature vector and the entity feature vector in the cloud manufacturing supplier dynamic knowledge graph are used as the initial embedding representation H of the input node of the graph convolutional network GCN. (0) and Taking the current entity feature vector as the central node, apply the graph convolutional network GCN to update the initial embedding representation H (0) and The formula is:
[0065]
[0066] in, is the adjacency matrix representing the edges between the current entity feature vector and the entity feature vector in the cloud manufacturing supplier dynamic knowledge graph, is the degree matrix, W (l′) is the weight matrix of the l′th layer, σ is the nonlinear activation function, and then, according to the matching score between the current entity and the entity in the cloud manufacturing supplier dynamic knowledge graph, Final Score Adjust the adjacency matrix The weight of the middle edge is expressed as:
[0067]
[0068] in, The adjusted adjacency matrix, H (0) is the current entity feature vector matrix extracted from the current order information, is the entity feature vector matrix in the cloud manufacturing supplier dynamic knowledge graph, ⊙ represents the Hadamard product;
[0069] Set the weight threshold and adjust the adjacency matrix Suppliers in the cloud manufacturing supplier dynamic knowledge graph that exceed the weight threshold are selected as candidate suppliers to obtain a candidate supplier set;
[0070] The cloud manufacturing supplier dynamic knowledge graph, cloud manufacturing supplier optimization model and supplier priority sorting tool are input into the Langchain framework. The prompt word engineering is used to assign prompt word templates to the acquired order information, restrictions, long-term memory and short-term memory. The prompt words are input into the cloud manufacturing supplier optimization model to predict suppliers that match the current order information. The cloud manufacturing supplier optimization model performs the first round of iteration. The process is as follows:
[0071] The cloud manufacturing supplier selection model calls the supplier priority sorting tool to determine the supplier priority sorting. Specifically: first, the priority of each candidate supplier is sorted in descending order based on the correlation between the capacity data and the current order information of each candidate supplier. Then, based on the supplier risk assessment, the priority of each candidate supplier is sorted in descending order again on the basis of the preliminary descending order. The result of the second descending order is used as the result of the first round of iteration.
[0072] Starting from the second round of iteration, the cloud manufacturing supplier selection model does not call the supplier priority sorting tool. In each round of iteration, a corresponding tool is used to sort the results of the previous round of iteration in descending order of priority according to the constraints. The remaining steps are the same as the first round of iteration. When all tools are applied, the iteration ends, and the top n suppliers at the end of the iteration are output as the prediction results.
[0073] According to the supply chain hierarchy, the suppliers at each level are predicted in turn. Specifically, it is determined whether the suppliers at each level need to continue to issue orders to their upper-level suppliers. If there are still upper-level orders, the updated Prompt template is input into the cloud manufacturing supplier optimization model for prediction. If the suppliers obtained in a certain round of iteration do not need to issue orders to their upper-level suppliers, the cloud manufacturing supplier optimization model outputs the final cloud manufacturing supplier optimization supply chain based on the suppliers obtained in each round of iteration.
[0074] The short-term memory is updated according to the prediction results and iterative process of each supplier, and the attributes and corresponding order information of all suppliers involved in the cloud manufacturing supplier optimization supply chain are used as long-term memory, and the dynamic knowledge graph of cloud manufacturing suppliers is updated according to the long-term memory.
[0075] A multi-level supply chain optimization method based on a dynamic knowledge graph and a large model includes the following steps:
[0076] A knowledge graph is established based on historical supply chain multimodal data. Multi-level supply chain risk propagation rules are formulated based on the knowledge graph. A multi-level supply chain risk propagation model is then established based on the multi-level supply chain risk propagation rules. The multi-level supply chain risk propagation model is used to evaluate the risks generated when each supplier in the knowledge graph is used as a supply risk propagation source and the knowledge graph is updated to obtain a dynamic knowledge graph for cloud manufacturing suppliers.
[0077] The BERT model with attention mechanism is trained and adjusted using the dynamic knowledge graph of cloud manufacturing suppliers to obtain a large model for cloud manufacturing supplier optimization.
[0078] Establish a supplier prioritization tool based on order information requirements for supplier capacity and risk in the cloud manufacturing supplier dynamic knowledge graph;
[0079] The dynamic knowledge graph of cloud manufacturing suppliers, the cloud manufacturing supplier optimization model and the supplier priority sorting tool are input into the language model development framework and predictions are made based on the current order information to obtain the cloud manufacturing supplier optimization supply chain, and the dynamic knowledge graph of cloud manufacturing suppliers is updated based on the cloud manufacturing supplier optimization supply chain.
[0080] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the above-mentioned multi-level supply chain optimization method based on a dynamic knowledge graph and a large model.
[0081] The beneficial effects of the present invention are:
[0082] 1. By constructing a relationship network between entities, the knowledge graph can organically organize scattered data to form a structured knowledge base, provide rich domain knowledge and context information for the cloud manufacturing supplier optimization model, and significantly improve the performance of the cloud manufacturing supplier optimization model. At the same time, the incremental update of the knowledge graph can reflect the latest changes in the market and supply chain, thereby improving the timeliness of decision-making. Therefore, training the cloud manufacturing supplier optimization model based on the dynamically updated knowledge graph can effectively understand large-scale vertical field data and realize the timely and rapid formulation of supply chain management decisions.
[0083] 2. Through the establishment of a dynamic knowledge graph, the supplier's information and risk status can be updated in real time based on historical supply chain multimodal data. This means that when the supplier's situation changes (such as capacity adjustment, increased risk, etc.), the knowledge graph can quickly reflect these changes and provide the latest data support for the subsequent optimization process. The establishment of a multi-level supply chain risk propagation model can accurately simulate the risk propagation process in the supply chain, which helps to consider not only the supplier's own risks when optimizing suppliers, but also assess the potential risks that it may bring to the entire supply chain, so as to make more comprehensive decisions. The cloud manufacturing supplier optimization model obtained by training and adjusting the BERT model with the introduction of the attention mechanism can more accurately understand the various characteristics of suppliers (such as capacity, quality, price, risk, etc.), and perform intelligent optimization based on these characteristics, so as to process a large amount of data and quickly give optimization results to improve decision-making efficiency. The supplier priority sorting tool sorts the supplier's capacity and risk requirements according to the order information, and can flexibly adapt to different order requirements, which means that in different order scenarios, the priority of suppliers can be quickly adjusted to meet specific business needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 This is a system block diagram of the present invention.
[0085] Figure 2 This is the updating process of the dynamic knowledge graph of the present invention.
[0086] Figure 3 The figure is a flow chart of the method of the present invention.
[0087] Figure 4 This is a schematic diagram of the supply chain of the present invention. DETAILED DESCRIPTION
[0088] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0089] Example 1
[0090] refer to Figure 1 , a multi-level supply chain optimization system based on dynamic knowledge graph and large model, including:
[0091] The dynamic knowledge graph establishment module is used to establish a knowledge graph based on historical supply chain multimodal data, formulate multi-level supply chain risk propagation rules based on the knowledge graph, and then establish a multi-level supply chain risk propagation model based on the multi-level supply chain risk propagation rules. The multi-level supply chain risk propagation model is used to evaluate the risks generated when each supplier in the knowledge graph is used as a supply risk propagation source and update the knowledge graph to obtain a dynamic knowledge graph of cloud manufacturing suppliers;
[0092] The cloud manufacturing supplier optimization large model building module is used to train and adjust the BERT model with the attention mechanism using the cloud manufacturing supplier dynamic knowledge graph to obtain the cloud manufacturing supplier optimization large model;
[0093] A supplier prioritization tool establishment module is used to establish a supplier prioritization tool based on the requirements of order information on supplier capacity and risk in the cloud manufacturing supplier dynamic knowledge graph;
[0094] The cloud manufacturing supplier optimization solution prediction module is used to input the cloud manufacturing supplier dynamic knowledge graph, the cloud manufacturing supplier optimization model and the supplier priority sorting tool into the language model development framework and make predictions based on the current order information to obtain the cloud manufacturing supplier optimization supply chain, and update the cloud manufacturing supplier dynamic knowledge graph based on the cloud manufacturing supplier optimization supply chain.
[0095] By establishing a dynamic knowledge graph, the supplier's information and risk status can be updated in real time based on historical supply chain multimodal data. This means that when the supplier's situation changes (such as capacity adjustment, increased risk, etc.), the knowledge graph can quickly reflect these changes and provide the latest data support for the subsequent optimization process. The establishment of a multi-level supply chain risk propagation model can accurately simulate the risk propagation process in the supply chain, which helps to consider not only the supplier's own risks when optimizing suppliers, but also assess the potential risks that it may bring to the entire supply chain, so as to make more comprehensive decisions. The cloud manufacturing supplier optimization model obtained by training and adjusting the BERT model with the introduction of the attention mechanism can more accurately understand the various characteristics of suppliers (such as capacity, quality, price, risk, etc.), and perform intelligent optimization based on these characteristics, so as to process a large amount of data and quickly give optimization results to improve decision-making efficiency. The supplier priority sorting tool sorts the supplier's capacity and risk requirements according to the order information, and can flexibly adapt to different order requirements, which means that in different order scenarios, the priority of suppliers can be quickly adjusted to meet specific business needs.
[0096] (1) In the dynamic knowledge graph building module, the specific method for building a knowledge graph based on historical supply chain multimodal data is:
[0097] The historical supply chain multimodal data includes text data and image data; among them, the basic data of suppliers includes: supplier name, supplier description, factory picture, name of products produced by the supplier, quality control report submitted by the supplier, performance evaluation report, etc.; the order data is historical order data and pending order data, including: order number, product name, quantity, specification, price, delivery date, etc.; the product data includes: product information data (product name, product description, product picture, name of the supplier producing the product), product information data required to purchase the product (product name, product description, product picture, name of the supplier producing the product), and the production capacity data of the product supplier (supplier name, product name, predicted production volume, etc.).
[0098] Preprocess the collected multimodal data of the cloud manufacturing platform supply chain. For text data, remove special characters and redundant spaces, and use the jieba word segmentation tool and NLTK tool to perform word segmentation and stop word preprocessing on Chinese text and English text respectively; for image data, first resize the image and use the OpenCV image processing library to uniformly resize the image to ensure the consistency of the image in the subsequent processing process. To further standardize the image data, map the pixel value of the image to the [0, 1] interval to achieve image normalization.
[0099] For text data, the Word2Vec model is used to encode the text data into a text vector, and then the text vector is input into the BERT model. The BERT model uses the NER tool to identify and obtain entity feature vectors in the text data, such as supplier name, product name, order number and other entities. The BERT model comprehensively analyzes the context of each word in the text to determine whether it belongs to a certain entity category and gives the corresponding probability value. Finally, the entity recognition result is obtained from the matrix of entity category prediction probability output by the BERT model. By setting a probability threshold (for example, the probability is greater than 0.5), the words recognized as entities can be screened out and they are combined into an entity list; for image data, the image data is input into the FasterR CNN model to identify and obtain the entity feature vector in the image data. First, it extracts features from the image through the layers of the convolutional neural network (CNN) to obtain the high-level feature representation of the image. Then, based on these feature representations, the region proposal network (RPN) is used to generate region proposals that may contain objects. Finally, these region proposals are classified and regressed to determine the category of the object in each region and the location of its border. Finally, the recognized object and its border are returned. The entity feature vector in the text is combined with the entity feature vector in the image to obtain the entity feature vector set E, which is expressed as E = {(e j ,t j )|e j is entity j,t j is the type of entity j};
[0100] Define the relationship patterns between different entities, such as the relationship between suppliers and products (specify the products produced by suppliers), the relationship between orders and products (reflect that orders contain specific products), the relationship between orders and suppliers (identify which suppliers have received specific orders), etc. For text data, the text data encoded as vectors is input into the BERT model again to obtain the feature vector reflecting the relationship between entities in the text data: the text data after entity recognition (including entity information) is used as the input of the BERT model. Let the input text be Text. The BERT model can be expressed as BERT(Text; W bert ,b bert ), where W bert is the model weight, b bert is the bias parameter. The BERT model processes the input text according to its pre-trained weights and neural network structure, and extracts the feature vector TextFeature=BERT(Text; W bert ,b bert), for example, for a text description of a supplier and its products, the BERT model will extract a feature vector that can reflect the relationship between the supplier and the product; for image data, the image data is input into the CNN model, and the CNN model obtains the feature vector reflecting the relationship between entities in the image data according to the relationship pattern between different entities defined: the normalized image data is used as the input of the CNN model, and the input image is I. The CNN model can be expressed as CNN(I; W cnn ,b cnn ), where W cnn is the model weight, b cnn is the bias parameter. The CNN model will extract features from the image through its convolutional layer and pooling layer, and obtain the high-level feature representation of the image: ImageFeature = CNN (I; W cnn ,b cnn ). For image data containing product images, the CNN model can extract feature vectors related to product appearance, shape, color, size, etc. The feature vectors reflecting the relationship between entities in the text data and the feature vectors reflecting the relationship between entities in the image data are combined to obtain the relationship feature vector set R, which is expressed as R = {(e k ,e j ,r k,j )|e k ,e j They are entity k and entity j, r k,j is the relationship between entity k and entity j};
[0101] According to the characteristics of the supply chain field, determine the type of attributes that need to be extracted. For example, in terms of suppliers, relevant attributes may include: the establishment time of the supplier, qualification certificates, supplier reputation rating (which can be obtained through data from industry assessment agencies), the number of employees and skill levels of suppliers (relevant clues can be obtained from employee recruitment information, training records, etc.), etc. In terms of products, relevant attributes may include: product price range, production process (through analysis of the description text of the product production process or related technical documents), raw material source (obtained from the purchase order or raw material information provided by the supplier), market share (estimated through market research data or industry reports), etc. In terms of orders, relevant attributes may include: the urgency of the order, delivery time, customer source (determined from the customer identification or sales channel information in the order information), profit margin (calculated in combination with product price and cost information), special requirements (such as packaging requirements, transportation conditions, etc., obtained from order notes or communication records with customers), etc. Use the NER model to extract entity attribute feature vectors from text data. Use image recognition algorithms to extract entity attribute feature vectors from image data. When extracting color attributes, color histogram technology can be used. First, convert the image to the HSV color space. Then calculate the color histogram of the image in the HSV color space. By analyzing the distribution of the color histogram, the main color components of the image and their proportions can be obtained. For images containing objects, shape descriptor technology can be used. For example, for images containing product pictures, shape descriptors such as Hu moments can be used to describe the shape characteristics of the product. For text information in the image (such as text on product labels), optical character recognition (OCR) technology can be used for recognition and extraction. The entity attribute feature vectors in the text data and the entity attribute feature vectors in the image data are combined to obtain the entity attribute feature vector set A, which is expressed as A={(e j ,a j,n ,v n )|e j is entity j,a j,n is the attribute n,v of entity j n is the value of attribute n};
[0102] Use the graph database Neo4j to build a knowledge graph G = (E, R, A). For each entity e j , and its corresponding attribute a j,n and attribute value v n is added to the properties of the entity in the knowledge graph.
[0103] In addition, the dynamic knowledge graph establishment module is also used to update the knowledge graph according to the newly introduced supply chain multimodal data; wherein, the relationship between entities in the newly introduced supply chain multimodal data is obtained by the following method:
[0104] The entity feature vector set E and the relationship feature vector set R obtained from the historical supply chain multimodal data are input into the graph neural network GNN. The graph neural network GNN uses entities as nodes and relationships as edges to construct a feature network graph. Let the predicted relationship be The true relation is r in the relation feature vector set R k,j , the cross entropy loss function L is used to train the graph neural network GNN, and the formula is expressed as:
[0105]
[0106] Input any two entities in the new supply chain multimodal data or any entity in the current supply chain multimodal data and the existing entities in the knowledge graph into the trained graph neural network GNN to obtain the relationship between the two input entities. For example, if the input is a new supplier and a feature vector of a product, the graph neural network may infer that the relationship between them is a "production" relationship or other relationship types that conform to the actual situation.
[0107] The extraction of entities and attributes from the newly introduced supply chain multimodal data is the same as the steps for building the knowledge graph.
[0108] Through the graph neural network GNN, the solution can update the knowledge graph according to the newly introduced supply chain multimodal data, realizing the dynamic nature of the knowledge graph.
[0109] (2) In the dynamic knowledge graph establishment module, a knowledge graph is established based on historical supply chain multimodal data, and then a multi-level supply chain risk propagation rule is formulated based on the knowledge graph. Then, a multi-level supply chain risk propagation model is established based on the multi-level supply chain risk propagation rule. The multi-level supply chain risk propagation model is used to evaluate the risk generated when each supplier in the knowledge graph is used as a supply risk propagation source and the knowledge graph is updated. The specific method for obtaining the cloud manufacturing supplier dynamic knowledge graph is as follows:
[0110] Construct a multi-level supply chain hierarchy structure according to the supply relationship between upstream and downstream suppliers in the knowledge graph, such as Figure 4 As shown in the figure, the nodes in each level of the supply chain represent suppliers, and the connections between nodes represent the supply relationship between multi-level supply chains. The risk propagation rules for multi-level supply chains are formulated as follows:
[0111] If the supplier's supply loss value exceeds its infection threshold, it becomes an infected supplier for supply risk propagation. The infection threshold is defined as n% of the supplier's purchase volume. The supply risk of infected suppliers at all levels is propagated among suppliers at each level of the supply chain.
[0112] Specifically, in a certain level of supply chain, due to the decline in market demand, shortage of raw materials, failure of production equipment, labor shortage, policy changes, natural disasters, outbreaks of epidemics or other uncertain factors, a supplier will significantly reduce its production volume, becoming the initial source of supply risk transmission, thereby causing supply risk to its downstream partner suppliers. If the purchase reduction of a downstream partner supplier exceeds its infection threshold, the partner supplier will have a supply shortage and become an infected supplier for supply risk transmission. The infection threshold of a supplier is defined as a certain percentage of the supplier's original total purchase volume, representing the supplier's ability to resist supply risk, and its size depends on the supplier's own internal factors. This is not studied in this invention. The infected supplier will reduce its product production, thereby causing a supply shock to its downstream partner suppliers, thereby becoming a new source of risk transmission, further triggering the downstream partner suppliers with whom it has a supply relationship to reduce their purchase volume. Through such a cascading effect, the supply risk will spread to the entire multi-level supply chain. When there are no new infected suppliers in the multi-level supply chain, the supply risk transmission of the multi-level supply chain ends.
[0113] According to the multi-level supply chain risk propagation rules, a multi-level supply chain risk propagation algorithm is formulated. First, the relevant variables are defined as follows:
[0114] l: the level number of the supplier in the multi-level supply chain, each level includes multiple suppliers; L: the total number of levels in the multi-level supply chain; m l,i : The i-th supplier in the l-th level supply chain; Supplier l,i The proportion of purchase volume reduction, i.e. supplier m l,i Current purchase volume / supplier m l,i The initial supply of Supplier l,i The infection threshold of supplier m l,i Procurement loss value Exceeding the preset purchase amount of times, that is Supplier m l,i Become a new source of risk transmission; x l,l+1 : The serial number of the edge between level l and level l+1 in the multi-level supply chain; S(x l,l+1 ): side x l,l+1 The set of suppliers that act as suppliers among the connected suppliers; P(x l,l+1 ):edge r l,l+1 A collection of suppliers in the connected suppliers group that are in the purchasing role; Supplier l,i Through the edge x l,l+1 The preset purchase volume obtained by the supply relationship; IBl : The set of infected suppliers in the first-level supply chain; IX l,l+1 : The set of infected edges between the lth level to the l+1th level supply chain; IBadd l : The number of newly infected suppliers in the l-th level supply chain;
[0115] After each propagation, the results of the propagation are as follows:
[0116]
[0117] Then, a corresponding multi-level supply chain risk propagation algorithm is formulated according to the multi-level supply chain risk propagation algorithm. The algorithm is as follows: At the beginning of supply, all suppliers in the multi-level supply chain are initialized to a normal state; when a supplier m l-1,i When the product supply decreases, all the l-1,i Sub-suppliers supplying products l,i The purchase volume has decreased For any one connected to the parent exception provider m l-1,i and lower-tier suppliers l,i The edge number x l,l+1 , if supplier m l-1,i Sub-suppliers m l,i Procurement loss value Exceeds its initial total purchase volume of times, that is The lower-level partner supplier m l,i Become a new source of risk transmission and join the infected supplier collection IB l , and the edge x l,l+1 Join the Infected Edge Collection IX l,l+1 ; Completely traverse the supply relationships from level l to l+1 until all edges between levels l to l+1 are traversed; traverse all levels of the multi-level supply chain until the traversal is complete;
[0118] According to the multi-level supply chain risk propagation algorithm, the avalanche rate is used to reflect the risk value generated when the supplier is the source of risk propagation. When the propagation ends, the initial propagation source in the upper supply chain network The impact of supply risk transmission, downstream supply chain networks at all levels affected by the initial transmission source The number of infected suppliers ∑IBadd l The avalanche rate is the percentage of the total number of suppliers N in the multi-stage supply chain. The formula is:
[0119]
[0120] The supplier risk is added as a new attribute to the corresponding supplier node in the knowledge graph and the avalanche rate is used to calculate the supplier risk. As the supplier risk value, the value of this attribute is updated to obtain the cloud manufacturing supplier dynamic knowledge graph. The update process is as follows: Figure 2 shown.
[0121] By constructing a multi-level supply chain hierarchy, the supply relationship between upstream and downstream suppliers in the supply chain is taken into account, so that the risks in the entire supply chain can be comprehensively assessed. By defining the infection threshold and risk propagation algorithm, the risk propagation process in the supply chain can be accurately simulated to help identify potential high-risk suppliers. When the supply volume of a supplier in the supply chain decreases, the risk value of the lower-level supplier can be updated in real time. This dynamic update mechanism keeps the supplier risk information in the knowledge graph up to date, providing timely and accurate data support for decision-making. For the subsequent selection of suppliers, the supplier risk information in the knowledge graph can serve as an important basis for supply chain management decisions.
[0122] (3) In the cloud manufacturing supplier optimization large model building module, the specific method of using the cloud manufacturing supplier dynamic knowledge graph to train the BERT model with the attention mechanism is as follows:
[0123] Entities, relationships, and attributes of entities are extracted from the cloud manufacturing supplier dynamic knowledge graph as training data sets. Specifically, first, entities (such as supplier name, product name, order number, etc.) and relationships (such as the association between suppliers and products, the relationship between orders and suppliers, etc.) are extracted from the knowledge graph, and relevant attribute values (such as supplier capacity data, risk value, product level, etc.) are obtained. Then, the entities, relationships, and attribute values extracted from the knowledge graph are used to build databases for large model pre-training and fine-tuning. For large model pre-training tasks based on Masked Language Model (MLM), the dataset includes descriptions of entities, relationships, and attributes, which are used to train the model to understand and generate text related to entities and relationships. For example, if the knowledge graph contains entities "supplier A" and "product X", as well as the "production" relationship between them, this information and the attributes of the entities can be used to build pre-training datasets in the following form: "Supplier A produces product X." "Supplier A, located in Guangdong Province, produces product X." "Supplier A has a risk value of 85% and has delivered 10% of product X orders." Etc. For large model fine-tuning tasks, the dataset needs to contain features and labels related to the specific task at different time points, especially risk-related features, such as the supplier's risk value, historical order information, delivery time and other structured features and text features of descriptive text related to suppliers, products, and orders.
[0124] First, an MLM training task is constructed, which involves randomly masking entities or descriptive content in the supply chain text and requiring the model to predict these masked parts. For example, the model needs to infer the specific "product X" provided by "supplier A" in the "supply shortage" scenario. The text of the MLM training task includes entities, relationships, and attributes, and the attributes include supplier risks. Then, the supply chain self-attention mechanism is integrated on the basis of the BERT model. The supply chain self-attention mechanism is used to focus on infected suppliers in multi-level supply chains. Finally, the loss function of the MLM training task is defined. Based on the suppliers and attributes in the training dataset, the cross-entropy loss function is used to train the BERT model integrated with the supply chain self-attention mechanism using the MLM training task. The cross-entropy loss function formula is expressed as:
[0125]
[0126] in It is for suppliers l,i The predicted avalanche rate, is the true avalanche rate. At the same time, the gradient of the loss function with respect to the parameters of the BERT model incorporating the supply chain self-attention mechanism is calculated, and the weights of the BERT model incorporating the supply chain self-attention mechanism are updated using the gradient descent method. The formula is expressed as:
[0127]
[0128] Among them, θ t is the parameter of the BERT model incorporating the supply chain self-attention mechanism at time step t, and η is the learning rate;
[0129] The training process of the supply chain self-attention mechanism is as follows:
[0130] For infected suppliers, initialize a weight matrix that matches the text dimension of the MLM training task, and set the weight matrix to be W risk , whose dimension is d input ×1, where d input is the dimension of the input text, the weight matrix W risk Includes supplier risk characteristics corresponding to supplier risks in the MLM training task text;
[0131] When calculating the attention score, the weight matrix W is used risk Adjust the query vector or key vector: Let the query vector be Q and the key vector be K, then the adjusted query vector Q′=W risk Q, adjusted key vector K′=W risk K, so that in the calculation process of the self-attention mechanism, the information related to high-risk suppliers will be considered more prominently.
[0132] Then design the attention mechanism head to pay attention to the weight matrix W risk Risk features in: First, dot product operation is performed on the adjusted query vector Q′ and key vector K′ to obtain the attention score matrix A = Q′K′ T Then, the attention score matrix A is normalized using the Softmax function to obtain the normalized attention score matrix A′=Softmax(A). Finally, the normalized attention score matrix A′ is dot-producted with the value vector V to obtain the final attention mechanism head output O=A′V.
[0133] Then, adjust the BERT model with the attention mechanism as follows:
[0134] According to the training data set, the CoT thinking chain prompt template is used to design decision scenarios in combination with the actual situation of the supply chain. Decision questions are proposed for decision scenarios, and multiple levels of reasoning requirements are set at the same time. Multiple possible answers, answer analysis and reasoning processes are given to obtain dialogue sample data; based on this, a standardized prompt template is created based on the four principles of information comprehensiveness, logical coherence, situation simulation authenticity and decision-making orientation, ensuring that the template can guide the model to fully capture key information, reason in a logical order, and make reasonable decisions in the simulated real situation. The prompt template contains relevant factors such as order details, product specifications, demand product information, and supplier risk assessment to ensure that the model can fully consider all important information. At the same time, the template also contains prompts to guide the model to make step-by-step reasoning, such as "First, we need to confirm the accuracy of the order information; then, based on the product specifications and demand information, evaluate which suppliers can meet the requirements; finally, comprehensively consider the risk factors of the supplier and make the best choice."
[0135] Based on the template and the extracted data, a sample generation strategy of "scenario simulation + problem orientation" was adopted. First, according to the actual situation of supply chain management, a series of highly simulated decision-making scenarios were designed, such as emergency order processing, supplier emergency response, product quality issues, etc. Then, for each scenario, we proposed one or more specific decision-making questions and gave multiple possible answer options, including both correct decision paths and common errors or trap options. In order to ensure the validity and challenge of the samples, multiple levels of reasoning requirements were set in each sample. For example, in the emergency order processing scenario, the model not only needs to quickly confirm the accuracy of the order information, but also needs to evaluate the delivery capabilities and risk levels of multiple suppliers within a limited time, and finally make the optimal order allocation decision. In addition, a detailed answer parsing and reasoning process is provided for each sample to provide timely feedback and guidance to the model during the training process, for example, for each answer option, explain why it is correct or wrong, and how to reason based on relevant information to get the correct answer.
[0136] The conversation sample data is input into the trained BERT model with the attention mechanism for parameter adjustment to obtain the optimal cloud manufacturing supplier. In this process, the large model will gradually learn how to make correct decisions in different supply chain scenarios based on the reasoning requirements and answer analysis in the samples, thereby improving the ability and accuracy of handling supply chain-related issues.
[0137] By using the MLM (Masked Language Model) training task and combining it with the BERT model, we can efficiently process and understand supplier information in the text, including key attributes such as risks. The BERT model that incorporates the supply chain self-attention mechanism can focus on infected suppliers in multi-level supply chains, that is, those suppliers that may have risk transmission or influence. By adjusting the weight matrix, the BERT model can pay more attention to the characteristics related to supplier risks, thereby improving the ability to identify supply chain risks. Based on the training data set and the CoT (Chain of Thought) thinking chain prompt template, designing decision scenarios and raising decision questions in combination with the actual situation of the supply chain can simulate the real supply chain risk management and decision-making process.
[0138] (4) In the supplier priority sorting tool establishment module, the specific method of establishing the supplier priority sorting tool according to the requirements of the supplier capacity and risk in the cloud manufacturing supplier dynamic knowledge graph based on the order information is as follows:
[0139] Use the relevance evaluation algorithm bge reranker base to establish a supplier prioritization tool, specifically:
[0140] First, prioritize suppliers that meet the production capacity requirements of the order. The formula is as follows:
[0141]
[0142] Among them, the function ρ rank1 Based on the supplier capacity requirement o1 in the order information, the relevance evaluation algorithm bge reranker base is used to evaluate the relevance score of each supplier in the supplier set in the cloud manufacturing supplier dynamic knowledge graph. Indicated by the supplier and its relevance score The pairs of suppliers that are screened by production capacity are obtained. rank1 , the supplier set S rank1 Suppliers in the Sort in descending order;
[0143] Then, for the supplier set S rank1 The suppliers in the list are then prioritized according to the risks they generate when they are the source of supply risk transmission. The formula is as follows:
[0144]
[0145] Among them, the function ρ rank2 Based on the requirements for supplier risk in order demand, o2 uses the relevance evaluation algorithm bge reranker base to evaluate the supplier set S that has been screened by production capacity. rank1 The relevance score for each supplier in G stands for Supplier by and its relevance score The supplier set S rank2 Suppliers in G are scored based on relevance i Sort in descending order.
[0146] By using the BGE Reranker Base algorithm, the relevance score of each supplier to the order demand can be quickly calculated, thereby realizing rapid sorting of suppliers. This greatly improves the efficiency of supplier screening.
[0147] First, based on the production capacity requirements of the order, the suppliers are preliminarily screened to ensure that only suppliers that meet the production capacity requirements enter the subsequent evaluation process. This greatly improves the accuracy of supplier screening. On the basis of the preliminary screening, the risks generated when the supplier is a source of supply risk transmission are also considered, and the suppliers are further sorted, which helps companies identify and give priority to cooperating with suppliers with lower risks, thereby reducing the risk of supply chain disruptions. By comprehensively considering the production capacity and risk level of suppliers, companies can build a more stable and reliable supply chain system and improve the resilience and risk resistance of the supply chain. According to different order requirements, the evaluation criteria for supplier production capacity and risk level can be flexibly adjusted, which enables companies to quickly screen out the most suitable suppliers according to the characteristics and requirements of different orders.
[0148] (5) In the cloud manufacturing supplier optimization solution prediction module, the cloud manufacturing supplier dynamic knowledge graph, the cloud manufacturing supplier optimization model and the supplier priority sorting tool are input into the language model development framework and predicted based on the current order information. The specific method for obtaining the cloud manufacturing supplier optimization supply chain is as follows:
[0149] First, the NER model is applied to identify the current entity in the current order information. For example, for the order information "Order number 123, product A, quantity 10, specification [specific specification], price [specific price], delivery date [specific date]", the NER model will identify "Order number 123" as the order number entity, "Product A" as the product entity, etc. Then, Word Embeddings is used to encode the current entity into the current entity feature vector, and the current entity is matched with the entity in the cloud manufacturing supplier dynamic knowledge graph, and the matching score is calculated based on the following formula:
[0150] Score(entity,concept)=sim(conceptembedding,conceptembedding)
[0151] Among them, sim represents the similarity calculation function (such as cosine similarity), conceptembedding is the current entity feature vector, and conceptembedding is the entity feature vector in the cloud manufacturing supplier dynamic knowledge graph;
[0152] Then, combining entities and attributes, a weighted sum method is used to calculate the matching score between the current entity and the entity in the cloud manufacturing supplier dynamic knowledge graph. Score , the formula is:
[0153] Final Score =αentityScore+βAttributeScore
[0154] Among them, entityScore and AttributeScore respectively represent the entity matching score and attribute matching score between the current entity feature vector and the entity feature vector in the cloud manufacturing supplier dynamic knowledge graph calculated by the above matching score formula, and α and β are the corresponding weight coefficients, which can be determined by the following steps:
[0155] Define the objective function J(α,β)=αL to measure the matching accuracy entity +βL Attribute , where the loss function L entity , L Attribute They represent the loss when the entity does not match the entity in the cloud manufacturing supplier dynamic knowledge graph, and the loss when the attribute is inconsistent with the attribute in the cloud manufacturing supplier dynamic knowledge graph;
[0156] Initialize weights α, β and calculate the gradient of the objective function with respect to each weight And update the weight according to the gradient and learning rate η, the formula is expressed as:
[0157]
[0158] Then, the current entity feature vector and the entity feature vector in the cloud manufacturing supplier dynamic knowledge graph are used as the initial embedding representation H of the input node of the graph convolutional network GCN. (0) and Taking the current entity feature vector as the central node, apply the graph convolutional network GCN to update the initial embedding representation H (0) and The formula is:
[0159]
[0160] in, is the adjacency matrix representing the edges between the current entity feature vector and the entity feature vector in the cloud manufacturing supplier dynamic knowledge graph, is the degree matrix, W (l′) is the weight matrix of the l′th layer, σ is the nonlinear activation function, and then, according to the matching score between the current entity and the entity in the cloud manufacturing supplier dynamic knowledge graph, Final Score Adjust the adjacency matrix The weight of the middle edge is expressed as:
[0161]
[0162] in, The adjusted adjacency matrix, H (0) is the current entity feature vector matrix extracted from the current order information, is the entity feature vector matrix in the cloud manufacturing supplier dynamic knowledge graph, ⊙ represents the Hadamard product;
[0163] Set the weight threshold and adjust the adjacency matrix The suppliers in the cloud manufacturing supplier dynamic knowledge graph that exceed the weight threshold are taken as candidate suppliers to obtain a set of candidate suppliers. First, the similarity between the current entity and the entity in the knowledge graph is calculated, and then the relationship weights between the nodes in the GNN are adjusted according to the similarity, so as to more accurately reflect the actual relationship strength between the entities, realize the reasoning of complex relationships between entities, and achieve more accurate matching, such as accurately matching the products in the order with the suppliers in the knowledge graph.
[0164] The cloud manufacturing supplier dynamic knowledge graph, cloud manufacturing supplier optimization model and supplier priority sorting tool are input into the Langchain framework. The prompt word engineering is used to assign prompt word templates to the acquired order information, restrictions, long-term memory and short-term memory. The prompt words are input into the cloud manufacturing supplier optimization model to predict suppliers that match the current order information. The cloud manufacturing supplier optimization model performs the first round of iteration. The process is as follows:
[0165] The cloud manufacturing supplier selection model calls the supplier priority sorting tool to determine the supplier priority sorting. Specifically: first, the priority of each candidate supplier is sorted in descending order based on the correlation between the capacity data and the current order information of each candidate supplier. Then, based on the supplier risk assessment, the priority of each candidate supplier is sorted in descending order again on the basis of the preliminary descending order. The result of the second descending order is used as the result of the first round of iteration.
[0166] Starting from the second round of iteration, the cloud manufacturing supplier selection model does not call the supplier priority sorting tool. In each round of iteration, a corresponding tool is used to sort the results of the previous round of iteration in descending order of priority according to the constraints. The remaining steps are the same as the first round of iteration. When all tools are applied, the iteration ends, and the top n suppliers at the end of the iteration are output as the prediction results.
[0167] According to the supply chain hierarchy, the suppliers at each level are predicted in turn. Specifically, it is determined whether the suppliers at each level need to continue to issue orders to their upper-level suppliers. If there are still upper-level orders, the updated Prompt template is input into the cloud manufacturing supplier optimization model for prediction. If the suppliers obtained in a certain round of iteration do not need to issue orders to their upper-level suppliers, the cloud manufacturing supplier optimization model outputs the final cloud manufacturing supplier optimization supply chain based on the suppliers obtained in each round of iteration.
[0168] The short-term memory is updated according to the prediction results and iterative process of each supplier. The attributes and corresponding order information of all suppliers involved in the cloud manufacturing supplier optimization supply chain are used as long-term memory. The dynamic knowledge graph of cloud manufacturing suppliers is updated according to the long-term memory to ensure that the entities and relationships in the knowledge graph reflect the current business status. It is used for real-time fine-tuning training of the cloud manufacturing supplier optimization large model.
[0169] Based on an order information, only the supplier of the corresponding level of the order information can be predicted each time, and each supplier may also have a superior supplier. Therefore, through repeated predictions, the entire optimal supply chain is finally obtained, avoiding the waste of resources and cost increase caused by improper supplier selection, and improving the economic benefits and market competitiveness of the enterprise. And through the iterative optimization process, the supplier data is continuously accumulated and optimized to update the knowledge graph, realizing the dynamic update of the knowledge graph.
[0170] Example 2
[0171] refer to Figure 3 , a multi-level supply chain optimization method based on dynamic knowledge graph and large model, including the following steps:
[0172] A knowledge graph is established based on historical supply chain multimodal data. Multi-level supply chain risk propagation rules are formulated based on the knowledge graph. A multi-level supply chain risk propagation model is then established based on the multi-level supply chain risk propagation rules. The multi-level supply chain risk propagation model is used to evaluate the risks generated when each supplier in the knowledge graph is used as a supply risk propagation source and the knowledge graph is updated to obtain a dynamic knowledge graph for cloud manufacturing suppliers.
[0173] The BERT model with attention mechanism is trained and adjusted using the dynamic knowledge graph of cloud manufacturing suppliers to obtain a large model for cloud manufacturing supplier optimization.
[0174] Establish a supplier prioritization tool based on order information requirements for supplier capacity and risk in the cloud manufacturing supplier dynamic knowledge graph;
[0175] The dynamic knowledge graph of cloud manufacturing suppliers, the cloud manufacturing supplier optimization model and the supplier priority sorting tool are input into the language model development framework and predictions are made based on the current order information to obtain the cloud manufacturing supplier optimization supply chain, and the dynamic knowledge graph of cloud manufacturing suppliers is updated based on the cloud manufacturing supplier optimization supply chain.
[0176] By establishing a dynamic knowledge graph, the supplier's information and risk status can be updated in real time based on historical supply chain multimodal data. This means that when the supplier's situation changes (such as capacity adjustment, increased risk, etc.), the knowledge graph can quickly reflect these changes and provide the latest data support for the subsequent optimization process. The establishment of a multi-level supply chain risk propagation model can accurately simulate the risk propagation process in the supply chain, which helps to consider not only the supplier's own risks when optimizing suppliers, but also assess the potential risks that it may bring to the entire supply chain, so as to make more comprehensive decisions. The cloud manufacturing supplier optimization model obtained by training and adjusting the BERT model with the introduction of the attention mechanism can more accurately understand the various characteristics of suppliers (such as capacity, quality, price, risk, etc.), and perform intelligent optimization based on these characteristics, so as to process a large amount of data and quickly give optimization results to improve decision-making efficiency. The supplier priority sorting tool sorts the supplier's capacity and risk requirements according to the order information, and can flexibly adapt to different order requirements, which means that in different order scenarios, the priority of suppliers can be quickly adjusted to meet specific business needs.
[0177] Example 3
[0178] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the multi-level supply chain optimization method based on a dynamic knowledge graph and a large model in Example 2.
[0179] The contents not described in detail in this specification belong to the prior art known to those skilled in the art. It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0180] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0181] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit its protection scope. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that after reading the present invention, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the invention, but these changes, modifications or equivalent substitutions are all within the protection scope of the pending claims of the invention.
Claims
1. A multi-level supply chain optimization system based on dynamic knowledge graph and large model, characterized by: include: The dynamic knowledge graph establishment module is used to establish a knowledge graph based on historical supply chain multimodal data, formulate multi-level supply chain risk propagation rules based on the knowledge graph, and then establish a multi-level supply chain risk propagation model based on the multi-level supply chain risk propagation rules. The multi-level supply chain risk propagation model is used to evaluate the risks generated when each supplier in the knowledge graph is used as a supply risk propagation source and update the knowledge graph to obtain a dynamic knowledge graph of cloud manufacturing suppliers; The cloud manufacturing supplier optimization large model building module is used to train and adjust the BERT model with the attention mechanism using the cloud manufacturing supplier dynamic knowledge graph to obtain the cloud manufacturing supplier optimization large model; A supplier prioritization tool establishment module is used to establish a supplier prioritization tool based on the requirements of the supplier capacity and the risks in the cloud manufacturing supplier dynamic knowledge graph according to the order information; The cloud manufacturing supplier optimization solution prediction module is used to input the cloud manufacturing supplier dynamic knowledge graph, cloud manufacturing supplier optimization model and supplier priority sorting tool into the language model development framework, make supplier predictions based on current order information, and determine the cloud manufacturing supplier optimization supply chain based on the supplier prediction results.
2. The multi-level supply chain optimization system based on dynamic knowledge graph and large model according to claim 1 is characterized by: In the dynamic knowledge graph establishment module, the specific method for establishing the knowledge graph based on the historical supply chain multimodal data is: The historical supply chain multimodal data includes text data and image data; For text data, the Word2Vec model is used to encode the text data into text vectors, and then the text vectors are input into the BERT model. The BERT model uses the NER tool to identify and obtain the entity feature vectors in the text data. For image data, the image data is input into the FasterR CNN model to identify and obtain the entity feature vectors in the image data. The entity feature vectors in the text and the entity feature vectors in the image are merged to obtain the entity feature vector set E, which is expressed as E = {(e j ,t j )|e j is entity j,t j is the type of entity j}; Define the relationship patterns between different entities. For text data, input the text data encoded as vectors into the BERT model again to obtain the feature vectors reflecting the relationship between entities in the text data. For image data, input the image data into the CNN model. The CNN model obtains the feature vectors reflecting the relationship between entities in the image data based on the relationship patterns between different entities defined. The feature vectors reflecting the relationship between entities in the text data and the feature vectors reflecting the relationship between entities in the image data are combined to obtain the relationship feature vector set R, which is expressed as R = {(e k , e j , r k,j )|e k , e j are entities k and j, r k,j is the relationship between entity k and entity j}; The NER model is used to extract entity attribute feature vectors from text data, and the image recognition algorithm is used to extract entity attribute feature vectors from image data. The entity attribute feature vectors in the text data and the entity attribute feature vectors in the image data are combined to obtain the entity attribute feature vector set A, which is expressed as A = {(e j , a j,n , v n )|e j is entity j, a j,n are the attributes n, v of entity j n is the value of attribute n}; Use the graph database Neo4j to build a knowledge graph G = (E, R, A). For each entity e j , and its corresponding attribute a j,n and attribute value v n is added to the properties of the entity in the knowledge graph.
3. The multi-level supply chain optimization system based on dynamic knowledge graph and large model according to claim 2 is characterized by: The dynamic knowledge graph establishment module is also used to update the knowledge graph according to the newly introduced supply chain multimodal data; wherein, the relationship between entities in the newly introduced supply chain multimodal data is obtained by the following method: The entity feature vector set E and the relationship feature vector set R obtained from the historical supply chain multimodal data are input into the graph neural network GNN. The graph neural network GNN uses entities as nodes and relationships as edges to construct a feature network graph. Let the predicted relationship be The true relation is r in the relation feature vector set R k,j , the cross entropy loss function L is used to train the graph neural network GNN, and the formula is expressed as: Input any two entities in the new supply chain multimodal data or any entity in the current supply chain multimodal data and the existing entities in the knowledge graph into the trained graph neural network GNN to obtain the relationship between the two input entities.
4. The multi-level supply chain optimization system based on dynamic knowledge graph and large model according to claim 1 is characterized by: In the dynamic knowledge graph establishment module, a knowledge graph is established based on historical supply chain multimodal data, and then a multi-level supply chain risk propagation rule is formulated based on the knowledge graph. Then, a multi-level supply chain risk propagation model is established based on the multi-level supply chain risk propagation rule. The multi-level supply chain risk propagation model is used to evaluate the risk generated when each supplier in the knowledge graph is used as a supply risk propagation source and the knowledge graph is updated. The specific method for obtaining the cloud manufacturing supplier dynamic knowledge graph is as follows: According to the supply relationship between upstream and downstream suppliers in the knowledge graph, a multi-level supply chain hierarchical structure is constructed. The nodes in each level of the supply chain represent suppliers, and the connections between nodes represent the supply relationship between multi-level supply chains. The multi-level supply chain risk propagation rules are formulated as follows: If the supplier's supply loss value exceeds its infection threshold, it becomes an infected supplier for supply risk propagation. The infection threshold is defined as n% of the supplier's purchase volume. The supply risk of infected suppliers at all levels is propagated among suppliers at each level of the supply chain. According to the multi-level supply chain risk propagation rules, a multi-level supply chain risk propagation algorithm is formulated. First, the relevant variables are defined as follows: l is the level number of the supplier in the multi-level supply chain, and each level includes multiple suppliers; L is the total number of levels in the multi-level supply chain; m l,i is the i-th supplier in the l-th level supply chain; For supplier m l,i The proportion of purchase volume reduction, i.e. supplier m l,i Current purchase volume / supplier m l,i The initial supply of For supplier m l,i The infection threshold of supplier m l,i Procurement loss value Exceeding the preset purchase amount of times, that is Supplier m l,i Become a new source of risk transmission; x l,l+1 is the serial number of the edge between level l and level l+1 in the multi-level supply chain; S(x l,l+1 ) is the edge x l,l+1 The set of suppliers that act as suppliers among the connected suppliers; P(x l,l+1 ) is the edge r l,l+1 A collection of suppliers in the connected suppliers group that are in the purchasing role; For supplier m l,i Through the edge x l,l+1 The preset purchase volume obtained by the supply relationship; IB l The set of infected suppliers in the first-level supply chain; IX l,l+1 is the set of infected edges between the supply chain from level l to level l+1; IBadd l is the number of newly infected suppliers in the l-th level supply chain; After each propagation, the results of the propagation are as follows: Then, a corresponding multi-level supply chain risk propagation algorithm is formulated according to the multi-level supply chain risk propagation algorithm. The algorithm is as follows: At the beginning of supply, all suppliers in the multi-level supply chain are initialized to a normal state; when a supplier m l-1i When the product supply decreases, all the l-1,i Sub-suppliers supplying products l,i The purchase volume has decreased For any one connected to the parent exception provider m l-1,i and lower-tier suppliers l,i The edge number x l,l+1 , if supplier m l-1,i Sub-suppliers m l,i Procurement loss value Exceeding its initial total purchase volume of times, that is The lower-level partner supplier m l,i Become a new source of risk transmission and join the infected supplier collection IB l , and the edge x l,l+1 Join the Infected Edge Collection IX l,l+1 ; Completely traverse the supply relationships from level l to l+1 until all edges between levels l to l+1 are traversed; traverse all levels of the multi-level supply chain until the traversal is complete; According to the multi-level supply chain risk propagation algorithm, the avalanche rate is used to reflect the risk value generated when the supplier is the source of risk propagation. When the propagation ends, the initial propagation source in the upper supply chain network The impact of supply risk transmission, downstream supply chain networks at all levels affected by the initial transmission source The number of infected suppliers ∑IBadd l The avalanche rate is the percentage of the total number of suppliers N in the multi-stage supply chain. The formula is: The supplier risk is added as a new attribute to the corresponding supplier node in the knowledge graph and the avalanche rate is used to calculate the supplier risk. The value of this attribute is updated as the supplier risk value to obtain the cloud manufacturing supplier dynamic knowledge graph.
5. The multi-level supply chain optimization system based on dynamic knowledge graph and large model according to claim 1 is characterized by: In the cloud manufacturing supplier optimization large model building module, the specific method of using the cloud manufacturing supplier dynamic knowledge graph to train the BERT model with the attention mechanism is as follows: Extract entities, relations and attributes of entities from the cloud manufacturing supplier dynamic knowledge graph as training datasets; First, an MLM training task is constructed. The text of the MLM training task includes entities, relationships, and attributes. The attributes include supplier risks. Then, the supply chain self-attention mechanism is integrated on the basis of the BERT model. The supply chain self-attention mechanism is used to focus on infected suppliers in multi-level supply chains. Finally, the loss function of the MLM training task is defined. Based on the suppliers and attributes in the training dataset, the cross-entropy loss function is used to train the BERT model integrated with the supply chain self-attention mechanism using the MLM training task. The cross-entropy loss function formula is expressed as: in It is for suppliers l,i The predicted avalanche rate, is the true avalanche rate. At the same time, the gradient of the loss function with respect to the parameters of the BERT model that incorporates the supply chain self-attention mechanism is calculated, and the weights of the BERT model that incorporates the supply chain self-attention mechanism are updated using the gradient descent method. The formula is expressed as: Among them, θ t is the parameter of the BERT model incorporating the supply chain self-attention mechanism at time step t, and η is the learning rate; The training process of the supply chain self-attention mechanism is as follows: For infected suppliers, initialize a weight matrix that matches the text dimension of the MLM training task, and set the weight matrix to be W risk , whose dimension is d input ×1, where d input is the dimension of the input text, the weight matrix W risk Includes supplier risk characteristics corresponding to supplier risks in the MLM training task text; When calculating the attention score, the weight matrix W is used risk Adjust the query vector or key vector: Let the query vector be Q and the key vector be K, then the adjusted query vector Q′=W risk Q, adjusted key vector K′=W risk K; Then design the attention mechanism head to pay attention to the weight matrix W risk Risk features in: First, dot product operation is performed on the adjusted query vector Q′ and key vector K′ to obtain the attention score matrix A = Q′K′ T Then, the attention score matrix A is normalized using the Softmax function to obtain the normalized attention score matrix A′=Softmax(A). Finally, the normalized attention score matrix A′ is dot-producted with the value vector V to obtain the final attention mechanism head output O=A′V.
6. The multi-level supply chain optimization system based on dynamic knowledge graph and large model according to claim 5 is characterized by: In the cloud manufacturing supplier optimization large model building module, the specific method of using the cloud manufacturing supplier dynamic knowledge graph to adjust the BERT model that introduces the attention mechanism is as follows: Based on the training data set, using the CoT thinking chain prompt template, combined with the actual situation of the supply chain, the decision-making scenario is designed, and decision-making questions are proposed for the decision-making scenario. At the same time, multiple levels of reasoning requirements are set, and multiple possible answers, answer analysis and reasoning processes are given to obtain dialogue sample data; The conversation sample data is input into the trained BERT model with the attention mechanism for parameter adjustment.
7. The multi-level supply chain optimization system based on dynamic knowledge graph and large model according to claim 1 is characterized by: In the supplier priority sorting tool establishment module, the specific method of establishing the supplier priority sorting tool according to the requirements of the supplier capacity and risk in the cloud manufacturing supplier dynamic knowledge graph based on the order information is: Use the relevance evaluation algorithm bge reranker base to establish a supplier prioritization tool, specifically: First, prioritize suppliers that meet the production capacity requirements of the order. The formula is as follows: Among them, the function ρ rank1 Evaluate the relevance score of each supplier in the supplier set in the cloud manufacturing supplier dynamic knowledge graph based on the supplier capacity requirement o1 in the order information Indicated by the supplier and its relevance score The supplier set S that is screened by production capacity is obtained rank1 , the supplier set S rank1 Suppliers in the Sort in descending order; Then, for the supplier set S rank1 The suppliers in the list are then prioritized according to the risks they generate when they are the source of supply risk transmission. The formula is as follows: Among them, the function ρ rank2 Based on the supplier risk requirement o2 in the order demand, evaluate the supplier set S that has passed the production capacity screening rank1 The relevance score for each supplier in G stands for Supplier by and its relevance score The supplier set S rank2 Suppliers in G are scored based on relevance i Sort in descending order.
8. The multi-level supply chain optimization system based on dynamic knowledge graph and large model according to claim 7 is characterized by: In the cloud manufacturing supplier optimization solution prediction module, the cloud manufacturing supplier dynamic knowledge graph, the cloud manufacturing supplier optimization model and the supplier priority sorting tool are input into the language model development framework and predicted based on the current order information. The specific method for obtaining the cloud manufacturing supplier optimization supply chain is as follows: First, the NER model is applied to identify the current entity in the current order information, and then the current entity is encoded into the current entity feature vector using Word Embeddings. The current entity is matched with the entity in the cloud manufacturing supplier dynamic knowledge graph, and the matching score is calculated based on the following formula: Score(entity,concept)=sim(entityembedding,conceptembedding) Among them, sim represents the similarity calculation function, entityembedding is the current entity feature vector, and conceptembedding is the entity feature vector in the dynamic knowledge graph of cloud manufacturing suppliers; Then, combining entities and attributes, a weighted sum method is used to calculate the matching score between the current entity and the entity in the cloud manufacturing supplier dynamic knowledge graph. score , the formula is: Final Score =αentityScore+βAttributeScore Among them, entityScore and AttributeScore respectively represent the entity matching score and attribute matching score between the current entity feature vector and the entity feature vector in the cloud manufacturing supplier dynamic knowledge graph calculated by the above matching score formula, and α and β are the corresponding weight coefficients, which can be determined by the following steps: Define the objective function J(α, β) = αL to measure the matching accuracy entity +βL Attribute , where the loss function L entity , L Attribute They represent the loss when the entity does not match the entity in the cloud manufacturing supplier dynamic knowledge graph, and the loss when the attribute is inconsistent with the attribute in the cloud manufacturing supplier dynamic knowledge graph; Initialize weights α, β and calculate the gradient of the objective function with respect to each weight And update the weight according to the gradient and learning rate η, the formula is expressed as: Then, the current entity feature vector and the entity feature vector in the cloud manufacturing supplier dynamic knowledge graph are used as the initial embedding representation H of the input node of the graph convolutional network GCN. (0) and Taking the current entity feature vector as the central node, apply the graph convolutional network GCN to update the initial embedding representation H (0) and The formula is: in, is the adjacency matrix representing the edges between the current entity feature vector and the entity feature vector in the cloud manufacturing supplier dynamic knowledge graph, is the degree matrix, W (l′) is the weight matrix of the l′th layer, σ is the nonlinear activation function, and then, according to the matching score between the current entity and the entity in the cloud manufacturing supplier dynamic knowledge graph, Final Score Adjust the adjacency matrix The weight of the middle edge is expressed as: in, The adjusted adjacency matrix, H (0) is the current entity feature vector matrix extracted from the current order information, is the entity feature vector matrix in the cloud manufacturing supplier dynamic knowledge graph, ⊙ represents the Hadamard product; Set the weight threshold and adjust the adjacency matrix Suppliers in the cloud manufacturing supplier dynamic knowledge graph that exceed the weight threshold are selected as candidate suppliers to obtain a candidate supplier set; The cloud manufacturing supplier dynamic knowledge graph, cloud manufacturing supplier optimization model and supplier priority sorting tool are input into the Langchain framework. The prompt word engineering is used to assign prompt word templates to the acquired order information, restrictions, long-term memory and short-term memory. The prompt words are input into the cloud manufacturing supplier optimization model to predict suppliers that match the current order information. The cloud manufacturing supplier optimization model performs the first round of iteration. The process is as follows: The cloud manufacturing supplier selection model calls the supplier priority sorting tool to determine the supplier priority sorting. Specifically: first, the priority of each candidate supplier is sorted in descending order based on the correlation between the capacity data and the current order information of each candidate supplier. Then, based on the supplier risk assessment, the priority of each candidate supplier is sorted in descending order again on the basis of the preliminary descending order. The result of the second descending order is used as the result of the first round of iteration. Starting from the second round of iteration, the cloud manufacturing supplier selection model does not call the supplier priority sorting tool. In each round of iteration, a corresponding tool is used to sort the results of the previous round of iteration in descending order of priority according to the constraints. The remaining steps are the same as the first round of iteration. When all tools are applied, the iteration ends, and the top n suppliers at the end of the iteration are output as the prediction results. According to the supply chain hierarchy, the suppliers at each level are predicted in turn. Specifically, it is determined whether the suppliers at each level need to continue to issue orders to their upper-level suppliers. If there are still upper-level orders, the updated Prompt template is input into the cloud manufacturing supplier optimization model for prediction. If the suppliers obtained in a certain round of iteration do not need to issue orders to their upper-level suppliers, the cloud manufacturing supplier optimization model outputs the final cloud manufacturing supplier optimization supply chain based on the suppliers obtained in each round of iteration. The short-term memory is updated according to the prediction results and iterative process of each supplier, and the attributes and corresponding order information of all suppliers involved in the cloud manufacturing supplier optimization supply chain are used as long-term memory, and the dynamic knowledge graph of cloud manufacturing suppliers is updated according to the long-term memory.
9. A multi-level supply chain optimization method based on dynamic knowledge graph and large model, characterized in that: The following steps are involved: A knowledge graph is established based on historical supply chain multimodal data. Multi-level supply chain risk propagation rules are formulated based on the knowledge graph. A multi-level supply chain risk propagation model is then established based on the multi-level supply chain risk propagation rules. The multi-level supply chain risk propagation model is used to evaluate the risks generated when each supplier in the knowledge graph is used as a supply risk propagation source and the knowledge graph is updated to obtain a dynamic knowledge graph for cloud manufacturing suppliers. The BERT model with attention mechanism is trained and adjusted using the dynamic knowledge graph of cloud manufacturing suppliers to obtain a large model for cloud manufacturing supplier optimization. Establish a supplier prioritization tool based on order information requirements for supplier capacity and risk in the cloud manufacturing supplier dynamic knowledge graph; The dynamic knowledge graph of cloud manufacturing suppliers, the cloud manufacturing supplier optimization model and the supplier priority sorting tool are input into the language model development framework and predictions are made based on the current order information to obtain the cloud manufacturing supplier optimization supply chain.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by the processor, the multi-level supply chain optimization method based on dynamic knowledge graph and large model described in claim 9 is implemented.
Citation Information
Cited By
Supply chain middle station data management system and method applying large model technology
CN120448448A
Combined electric appliance supply chain multi-dimensional early warning method and system based on knowledge graph
CN120672125A
Quantitative evaluation system based on contract file document dynamic risk map model
CN120746276A
A quantitative evaluation system based on a contract file document dynamic risk map model
CN120746276B
Logistics supply chain collaborative optimization method and device based on knowledge graph, equipment, medium and program product
CN121032351A