Industrial knowledge generative decision-making method based on multi-granularity semantics and large model assistance
By employing multi-granular semantics and large model-assisted methods, and utilizing technologies such as BERT and GNN for industrial knowledge-based decision-making, this approach addresses the issues of inaccurate decision-making and low automation levels in existing technologies, achieving efficient and accurate industrial knowledge processing and decision-making.
Patent Information
- Application Number
- CN202411100117.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Existing industrial decision-making methods are not precise enough when dealing with complex business needs and knowledge matching, especially when a large number of proper nouns and domain-specific terms are involved. They are difficult to fully capture and match multiple heterogeneous data sources, resulting in low information utilization efficiency, one-sided decision results, low degree of automation, and difficulty in coping with complex and dynamic production environments.
We adopt a multi-granularity semantic and large-scale model approach, constructing semantic features of business questions through the BERT large language model, and using graph neural networks (GNN) and graph convolutional networks (GCN) to fuse multi-granularity semantic features. Combined with SPARQL query and large language model fine-tuning, we can achieve deep understanding of multimodal data and generation of decision solutions.
It improves the accuracy and automation of industrial decision-making, enhances the ability to process complex semantic relationships, realizes comprehensive analysis and real-time performance of global information, and improves the continuity and efficiency of the decision-making process.
Smart Images

Figure CN118966342B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of industrial intelligent decision-making technology, and specifically provides an industrial knowledge generation decision-making method based on multi-granularity semantics and large model assistance. Background Art
[0002] Industrial environments often involve complex operational processes and diverse equipment, resources, and personnel. Effective decision-making can manage this complexity, ensuring coordinated operation across all processes, improving production efficiency, and reducing errors. By optimizing production processes and resource allocation, decision-making not only improves production efficiency and product quality, but also helps companies maintain cost advantages in a fiercely competitive market. Furthermore, industrial environments often face uncertainties and risks, such as market fluctuations, supply chain disruptions, and equipment failures. Scientific decision-making methods can proactively identify and assess these risks and develop appropriate response strategies to mitigate the negative impact of uncertainty.
[0003] However, existing decision-making methods for the industrial sector often lack precision when handling complex business needs and knowledge matching, especially when involving a large number of proper nouns and domain-specific terminology. Traditional methods have limited ability to understand and process semantic relationships, making it difficult to fully capture and match business needs at different levels. Industrial decision-making often requires integrating information from multiple data sources, such as sensor data, text reports, and image data. Existing methods struggle to effectively integrate this heterogeneous data, resulting in inefficient information utilization. While the application of knowledge graphs has improved, challenges remain in the deep integration and semantic understanding of multimodal data. Furthermore, traditional decision-making methods often focus solely on specific data or features, lacking a comprehensive analysis of global information. This leads to one-sided decisions and makes them inadequate for addressing the complexities of real-world business situations. For example, equipment fault diagnosis may rely solely on historical fault data, failing to consider the real-time status of the equipment and environmental factors. Furthermore, the decision-making process relies on human experience and manual operations, with a low degree of automation and susceptible to human error. Especially in complex and dynamic production environments, ensuring real-time and accurate decision-making is difficult, impacting production continuity and efficiency. Therefore, it is particularly important to improve the accuracy and automation of industrial decision-making methods, especially when dealing with complex and dynamic production environments.
[0004] Multi-granularity semantic information modeling methods aim to model sentences at different granularities, such as entity-level, sentence-level, and topic-level. After modeling, these multi-granularity semantic representations must be merged to form the final semantic representation. This multi-granularity semantic information can be extracted using graph neural networks (GNNs). GNNs can model the dependencies between semantic vectors of different granularities, enabling the modeling of multi-granularity semantic information. This addresses the semantic sparsity and low matching accuracy issues associated with brevity and the inclusion of domain-specific vocabulary in text matching tasks. This approach can improve translation quality and text matching accuracy, enhancing the model's ability to handle complex semantic relationships.
[0005] As an important technology in the field of natural language processing (NLP), knowledge graphs effectively improve the performance of tasks such as information retrieval and question-answering systems by representing structured knowledge as graph structures. In a knowledge graph, nodes represent entities or concepts, and edges represent the relationships between entities. The construction and utilization of knowledge graphs require solving key problems such as entity recognition, relationship extraction, and knowledge fusion. Large language models (LLMs), such as GPT and BERT, have demonstrated strong generalization capabilities in a variety of NLP tasks through the pre-training-fine-tuning paradigm. These models are also significantly applied in the construction of knowledge graphs. For example, entity recognition and relationship extraction through pre-training models can automatically extract knowledge from massive amounts of text. Summary of the Invention
[0006] In view of this, in order to address the problems of inaccurate knowledge matching and one-sided decision-making plans in industrial decision-making, the purpose of the present invention is to provide an industrial knowledge generation decision-making method based on multi-granularity semantics and large model assistance. Through the assistance of large language models and multi-level semantic modeling, multimodal data can be effectively integrated, which can improve the accuracy and degree of automation of decision-making, and enhance the accuracy and full cycle of decision-making plans.
[0007] In order to achieve the above object, the present invention provides the following technical solutions:
[0008] A method for generating industrial knowledge-based decision-making based on multi-granularity semantics and large models, including the following steps:
[0009] Step 1: Based on the high-dimensional feature representation method of industrial business problems, a business problem semantic feature embedding model based on the BERT large language model is constructed to encode business problems into high-dimensional problem semantic features;
[0010] Step 2: Use entity linking to perform multi-layer feature extraction and global fusion processing on the multimodal industrial knowledge graph; based on TOP-K path expansion, extend a path from each subject entity and lead to the corresponding tree, merge the trees of different subject entities to form a unified subgraph, and obtain different subgraphs;
[0011] Step 3: Use graph neural network (GNN) to capture different granularity features in the subgraph and obtain multi-granularity semantic features of industrial knowledge;
[0012] Step 4: Use the graph convolutional network (GCN) to unify and fuse the multi-granularity semantic features of industrial knowledge and the semantic features of questions. This allows the multi-granularity semantic features of industrial knowledge and the semantic features of questions to be fused in the same feature space, forming a semantic feature fusion space for full-cycle industrial knowledge.
[0013] Step 5: Build a triple sampling process based on SPARQL query writing, define business problems and convert them into corresponding SPARQL queries, and extract relevant triple data from the multimodal industrial knowledge graph and semantic feature fusion space;
[0014] Step 6: Rewrite the structured triple data into free-form text to construct a dataset of industrial business-based question-decision pairs;
[0015] Step 7: Fine-tune the large language model based on the problem-decision pair dataset to obtain an industrial knowledge generation decision model enhanced by knowledge text.
[0016] Furthermore, in step 2, based on TOP-K path expansion, the method steps for extending a path from each subject entity are as follows:
[0017] 21) Encode the question q into a vector representation, calculate the relationship distribution through the linear classification layer, and select the top K relationships with the highest probability as the one-hop relationship path;
[0018] 22) Question q and the previous step’s relational path are connected as input, encoded into a vector representation, and then the relational distribution is calculated; different subgraphs are obtained by sorting the predicted relational paths based on their scores.
[0019] Furthermore, the step 21) further includes the following steps:
[0020] 211) Given a problem q, use PLM to encode the problem q and obtain the vector representation q v :
[0021] q v =PLM(q)
[0022] Among them: PLM is the pre-trained language model;
[0023] 212) Let vector q be represented v Input linear classification layer to predict potential hop counts h1,h2,...,h H The probability distribution D′ h :
[0024]
[0025] Among them: Linear is the linear transformation function; is a given problem representation q v The number of hops h c Probability of:
[0026]
[0027] 213) Select the hop count h with the highest probability as the prediction result:
[0028]
[0029] Where: H is the total number of potential hops.
[0030] Furthermore, during training, the ground truth distribution D h Represented as a one-hot vector, where the true hop count h gold The probability of is 1, and the probability of other hops is 0:
[0031]
[0032] Use cross entropy loss L CE , predicted probability distribution D′ h will be different from the ground truth distribution D h Being punished for being different:
[0033]
[0034] in: is the probability of the actual hop count distribution of the model during training.
[0035] Further, the step 22) includes the following steps:
[0036] 221) Let vector q be represented v Input the linear classification layer to calculate the probability distribution D′ of R relations in the knowledge graph r,1 :
[0037]
[0038] in: is a given problem representation q v The relationship c Probability of:
[0039]
[0040] Select the top K relationships with the highest probability as the first-hop relationship path p1; R represents the total number of possible relationships in the knowledge graph;
[0041] 222) In the t-th hop relationship, the t-1-th hop relationship path p t―1 The relationship path p in t―1,i It can be expressed as:
[0042] p t―1,i =r i,1 |r i,2 |...|r i,t―1 ,i=1,2,...,K t―1
[0043] The question q and the relationship path p t―1,i Use "|" to connect as input sequence Q t :
[0044] Q t =q|r i,1 |r i,2 |...|r i,t―1
[0045] Q t Encoded by PLM as vector table Q t,v , calculate the relationship distribution D′ in KG through the linear classification layer r,t :
[0046] Q t,v =PLM(Q t )
[0047]
[0048] in: Is a given input sequence representation Q t,v Time relationship c Probability of:
[0049]
[0050] Keep the top K relations with the highest probability as the t-1th hop relation path p t―1,i The t-th hop relationship of
[0051] 223) After h-step prediction, we can get K h relationship paths; relationship path p t,i The score of is the product of the probabilities of all relationships in the path:
[0052]
[0053] Among them: Score(p t,i ) represents the relationship path p t,i score;
[0054] Different subgraphs are obtained by sorting the predicted relationship paths according to their scores.
[0055] Furthermore, in step seven, the method steps for fine-tuning the large language model are as follows:
[0056] 71) Select a pre-trained model: First, select a pre-trained model suitable for the target task;
[0057] 72) Prepare fine-tuning data: Prepare a fine-tuning dataset related to the target task;
[0058] 73) Designing Hints: Designing additional hints to guide model learning during fine-tuning. Hints include task-related labels, features, or constraints to enhance the model’s understanding and learning of the task.
[0059] 74) Constructing a prompt learning task: Combining prompt information with fine-tuning data to construct a prompt learning task;
[0060] 75) Fine-tuning the model: Fine-tune the pre-trained model using the fine-tuning data and the prompt learning task; during the fine-tuning process, the prompt information is input together with the model input to guide model learning; the model parameters are updated through the backpropagation algorithm and the optimizer to gradually adapt the model to the target task;
[0061] 76) Tuning and Evaluation: During fine-tuning, adjust the fine-tuning strategy based on the performance feedback from the validation set; use the test set to evaluate the performance of the fine-tuned model and further optimize and improve the model.
[0062] 77) Deployment and Application: Deploy the fine-tuned model to real-world applications and apply it to solve specific tasks or problems. Continuously monitor the model's performance and make adjustments and optimizations based on actual conditions.
[0063] The beneficial effects of the present invention are:
[0064] The industrial knowledge generation decision-making method based on multi-granularity semantics and large models in this invention has shown significant advantages in industrial decision-making and knowledge application. Specifically, it has the following technical effects:
[0065] (1) By adopting large language models such as BERT, we can deeply understand and embed the high-dimensional semantic features of business problems, thereby ensuring accurate understanding and matching of complex business needs. This invention not only improves the accuracy of text matching and multimodal industrial knowledge processing, but also enhances the model's adaptability when processing complex semantic relationships and domain-specific terminology.
[0066] (2) Graph Neural Networks (GNNs) are used to model multi-granularity semantic information, effectively capturing the dependencies and global context between features of different granularities, thereby improving the efficiency of building and applying industrial knowledge graphs. GNN subgraph fusion methods enable seamless transitions from local details to global semantic understanding, making knowledge integration in industrial decision-making more complete and accurate.
[0067] The application of the triple sampling process and rewriting module based on SPARQL queries enables structured knowledge graph data to be converted into free-form text, and then trains and optimizes large language models to generate high-quality decision solutions. This not only improves the degree of automation in the decision-making process, but also enhances the model's adaptability and practicality for actual business scenarios.
[0068] In summary, the present invention is based on an industrial knowledge generation decision-making method assisted by multi-granularity semantics and large models. By integrating advanced natural language processing technology and graph neural network algorithms, it significantly improves the full cycle of industrial knowledge processing and decision-making quality. It not only helps to fully understand and match business knowledge needs, but also can effectively deal with problems such as inaccurate knowledge matching and one-sided decision-making plans in the industrial field, thereby building a more intelligent and efficient industrial knowledge application system. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to make the purpose, technical solutions and beneficial effects of the present invention more clear, the present invention provides the following drawings for illustration:
[0070] Figure 1 This is a flow chart of the industrial knowledge generation decision-making method based on multi-granularity semantics and large model assistance of the present invention;
[0071] Figure 2 This is the schematic diagram of the triplet sampling process;
[0072] Figure 3 An example diagram for rewriting structured triple data into free-form text;
[0073] Figure 4 This is an example diagram of an industrial knowledge generation decision model;
[0074] Figure 5 Flowchart for fine-tuning large models. DETAILED DESCRIPTION
[0075] The present invention will be further described below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention.
[0076] This embodiment aims to solve the problems of inaccurate knowledge matching and one-sided decision solutions in industrial decision-making by constructing a Retrieve-Rewrite-Answer framework. This framework realizes the interaction of different granularity features of full-cycle business knowledge by building modules such as subgraph retrieval, question-decision pairing, and knowledge text-enhanced decision-making. Figure 1 As shown, this embodiment is based on a multi-granularity semantic and large-model-assisted industrial knowledge generation decision-making method, which includes the following steps.
[0077] Step 1: Based on the high-dimensional feature representation method for industrial business problems, a business problem semantic feature embedding model based on the BERT large language model is constructed to encode the business problem into high-dimensional problem semantic features. Specifically, this embodiment studies the characteristics of multimodal data (such as text, images, sensor data, etc.) and uses the BERT large language model to convert the business problem q into a high-dimensional semantic feature embedding to ensure an accurate understanding of the business needs.
[0078] Step 2: Research on precise graph embedding methods for multimodal industrial knowledge graphs to achieve accurate graph embedding. Specifically, entity linking is used to perform multi-layer feature extraction and global fusion processing on the multimodal industrial knowledge graph. Based on TOP-K path expansion, a path is extended from each subject entity and the corresponding tree is derived. The trees of different subject entities are merged to form a unified subgraph, resulting in different subgraphs.
[0079] Specifically, in this embodiment, an entity linking method based on multi-layer feature extraction and global fusion is adopted to model jump prediction as a classification task based on a pre-trained language model. Based on TOP-K path expansion, a path is extended from each subject entity and the corresponding tree is derived, and then the trees of different subject entities are merged to form a unified subgraph. Specifically, the question q is encoded as a vector representation, and the relationship distribution is calculated through the linear classification layer, and the top K relationships with the highest probability are selected as one-hop relationship paths. In the subsequent steps, the question q and the relationship path of the previous step are connected as input, encoded into a vector representation, and the relationship distribution is calculated. Parameter optimization is performed through cross entropy loss, and the predicted relationship path is sorted according to the score to achieve the acquisition of different subgraphs, which are used as relevant knowledge to enhance the efficient decision-making and collective intelligence application of industrial knowledge by large-scale language models.
[0080] Specifically, in this embodiment, based on TOP-K path expansion, the method steps for expanding a path from each subject entity are as follows:
[0081] 21) The goal of jump prediction is to predict the number of hops in a question, which is then used to predict the next relationship path. Jump prediction is modeled as a PLM-based classification task. Question q is encoded as a vector representation, and the relationship distribution is calculated using a linear classification layer. The top K relationships with the highest probability are selected as the one-hop relationship path. Specifically, the process includes the following steps.
[0082] 211) Given a problem q, use PLM to encode the problem q and obtain the vector representation q v :
[0083] q v =PLM(q)
[0084] Among them: PLM is the pre-trained language model;
[0085] 212) Let vector q be represented v Input linear classification layer to predict potential hop counts h1,h2,...,h H The probability distribution D′ h :
[0086]
[0087] Among them: Linear is the linear transformation function; is a given problem representation q v The number of hops h c Probability of:
[0088]
[0089] 213) Select the hop count h with the highest probability as the prediction result:
[0090]
[0091] Where: H is the total number of potential hops; For the model to represent the given problem vector q v When the predicted hop count h c probability.
[0092] During training, the ground truth distribution D h Represented as a one-hot vector, where the true hop count h gold The probability of hops is 1, and the probability of other hops is 0:
[0093]
[0094] Use cross entropy loss L CE , predicted probability distribution D′ h will be different from the ground truth distribution D h Being punished for being different:
[0095]
[0096] in: is the probability of the actual hop count distribution of the model during training.
[0097] 22) Question q and the concatenated relational path from the previous step are taken as input, encoded into a vector representation, and the relational distribution is calculated. The predicted relational paths are ranked by score to obtain different subgraphs. Specifically, given question q and a predicted number of hops, h, h prediction steps are performed, each corresponding to a hop relation. In step t, the t-th hop relation is predicted using the PLM as a classification task based on the predicted t-1-hop relational path and question q. That is, for each predicted relational path, candidate relations for the next step are sampled. Specifically, the following steps are included.
[0098] 221) Let vector q be represented v Input the linear classification layer to calculate the probability distribution D′ of R relations in the knowledge graph r,1 :
[0099]
[0100] in: is a given problem representation q v The relationship c Probability of:
[0101]
[0102] The top K relations with the highest probability are selected as the first-hop relation path p1; R is represented as the total number of possible relations in the knowledge graph, which are the target categories when the model makes classification predictions in multi-hop reasoning tasks.
[0103] 222) In the t-th hop relationship, the t-1-th hop relationship path p t―1 The relationship path p in t―1,i It can be expressed as:
[0104] p t―1,i =r i,1 |r i,2 |...|r i,t―1 ,i=1,2,...,K t―1
[0105] The question q and the relationship path p t―1,i Use "|" to connect as input sequence Q t :
[0106] Q t =q|r i,1 |r i,2 |...|ri,t―1
[0107] Q t Encoded by PLM as vector table Q t,v , calculate the relationship distribution D′ in KG through the linear classification layer r,t :
[0108] Q t,v =PLM(Q t )
[0109]
[0110] in: Is a given input sequence representation Q t,v Time relationship c Probability of:
[0111]
[0112] Keep the top K relations with the highest probability as the t-1th hop relation path p t―1,i The t-th hop relationship of .
[0113] 223) After h-step prediction, we can get K h relationship paths; relationship path p t,i The score of is the product of the probabilities of all relationships in the path:
[0114]
[0115] Among them: Score(p t,i ) represents the relationship path p t,i score.
[0116] Different subgraphs are obtained by sorting the predicted relationship paths according to their scores.
[0117] Step 3: Use graph neural network (GNN) to capture different granularity features in the subgraph, obtain multi-granularity semantic features of industrial knowledge, form a multi-granularity feature space, and achieve deep integration and semantic understanding of business needs and industrial knowledge graphs.
[0118] Specifically, in this embodiment, a subgraph fusion method based on a graph neural network (GNN) is adopted. Based on obtaining several subgraphs with different granularity features with semantic associations, the node and edge structure within each subgraph can capture local features at the corresponding granularity level while maintaining its association with the global graph. These subgraphs are subjected to feature extraction by the GNN model, and rich graph structure information is extracted at different granularities. Through the multi-head attention mechanism, fine-grained and coarse-grained features are fused together to generate a unified feature representation, forming a multi-granularity feature space, which enables the retention of local detailed information and the capture of global contextual information.
[0119] Step 4: Study the unified modeling method of multi-granularity features of industrial knowledge and problem semantic features, and use the graph convolutional network (GCN) to unify the multi-granularity semantic features of industrial knowledge and problem semantic features, so that the multi-granularity semantic features of industrial knowledge and problem semantic features can be fused in the same feature space, forming a semantic feature fusion space for full-cycle industrial knowledge, supporting the entire process from knowledge generation, updating to application.
[0120] Step 5: Construct a triple sampling process based on SPARQL query writing, define the business problem and convert it into the corresponding SPARQL query, and extract relevant triple data from the multimodal industrial knowledge graph and semantic feature fusion space, such as Figure 2 shown.
[0121] Specifically, in this embodiment, a SPARQL query is defined as performing a SPARQL query to obtain triples that meet certain conditions. These triples typically consist of a subject, a predicate, and an object, representing entities and their relationships in a knowledge graph. SPARQL is a standard language for querying RDF data. By writing a specific query, triples that meet business requirements are selected from the knowledge graph.
[0122] Step 6: Rewrite the structured triple data into free-form text to construct a dataset based on industrial business problem-decision pairs.
[0123] Specifically, in this embodiment, a rewriting module is used to convert structured triples into free-form text, such as Figure 3 As shown in the figure, the BERT large language model is trained based on question-related image-text pairs. Given a graph and corresponding free-form text, the graph triples are converted into triple-form text by connecting the subject, predicate, and object. The triple-form text is then converted into a graph-text conversion prompt p1 using template T1. The prompt p1 is input into the large model for fine-tuning, using a forcing strategy during training and a cross-entropy loss function to update parameters. Finally, the free-form text is obtained. This is then integrated into a paragraph as question-related knowledge to enhance the performance of the language model, making industrial knowledge graph data more suitable for natural language processing.
[0124] In this embodiment, template T1 is defined as: "Your task is to convert a knowledge graph into one or more sentences. The knowledge graph is: {text x in triple form}. The sentence is: ". Meanwhile, the prompt p1 and the free-form text y serve as the input and output of the rewriting module, respectively.
[0125] Step 7: Fine-tune the large language model based on the problem-decision pairing dataset to obtain a knowledge-text-enhanced, generative decision-making model for industrial knowledge. This enables efficient decision-making and collective intelligence application of multimodal industrial knowledge, improving the application effectiveness and decision quality of industrial knowledge. Import real data and compare and evaluate the model's predictions to determine their accuracy.
[0126] like Figure 4 As shown, in this embodiment, enhanced reasoning assisted by knowledge text knowledge is performed through a large model. The generated knowledge y is integrated with the question q, and a template T2 is designed: "The following are facts that may be relevant to answering the question: {free-form text y} question: {question q} answer:". Template T2 is used to map the free-form text y and question q to KG to enhance the prompt p2, and the prompt p2 is input into the Meta LIama3 large model that has been fine-tuned to accurately generate a decision plan to solve the problem. Real data is imported, compared and evaluated with the model prediction results to determine whether it is correct. A standard is established to evaluate the accuracy of the answer, that is, if the answer contains at least one answer entity, the question is considered to be answered correctly.
[0127] In this example, template T2 is defined as: "The following facts may be relevant to answering the question: {free-form text y} question: {question q} answer:". Template T2 is used to map the free-form text y and question q to a KG-enhanced prompt P2. Prompt P2 is then input into the fine-tuned Meta LIama3 model to accurately generate a decision solution to the problem.
[0128] Large model fine-tuning refers to the process of further adjusting model parameters on a specific task to improve performance based on a pre-trained model. This method has been widely used in fields such as natural language processing and computer vision, and has achieved remarkable results. Figure 5 As shown, in this embodiment, the method steps for fine-tuning the large language model are:
[0129] 71) Select a pre-trained model: First, select a pre-trained model suitable for the target task; common pre-trained models include BERT, GPT, RoBERTa, etc. Select an appropriate pre-trained model based on the nature and requirements of the task.
[0130] 72) Prepare fine-tuning data: Prepare a fine-tuning dataset related to the target task; this includes collecting, cleaning, and preprocessing data to ensure that the data quality and format meet the input requirements of the model.
[0131] 73) Design Hints: Design additional hints to guide model learning during fine-tuning; the hints include task-related labels, features, or constraints to enhance the model’s understanding and learning of the task.
[0132] 74) Construct a cue learning task: Combine the cue information with the fine-tuning data to construct a cue learning task; the cue learning task can be a supervised learning task in which the cue information serves as an auxiliary label, or a reinforcement learning task in which the cue information serves as a reward signal.
[0133] 75) Fine-tuning the model: Fine-tune the pre-trained model using fine-tuning data and a prompt learning task; during the fine-tuning process, the prompt information is input together with the model input to guide model learning; the model parameters are updated through the backpropagation algorithm and the optimizer to gradually adapt the model to the target task.
[0134] 76) Tuning and Evaluation: During fine-tuning, adjust the fine-tuning strategy based on the performance feedback from the validation set; use the test set to evaluate the performance of the fine-tuned model and further optimize and improve the model.
[0135] 77) Deployment and Application: Deploy the fine-tuned model to real-world applications and apply it to solve specific tasks or problems. Continuously monitor the model's performance and make adjustments and optimizations based on actual conditions.
[0136] Large model fine-tuning can utilize additional prompt information to improve the performance of the model on specific tasks and is an effective model optimization strategy.
[0137] This example uses two different large language models for different applications. Specifically, the BERT large language model is used to convert the business question q into a high-dimensional semantic feature embedding process, and the BERT large language model is used to convert the industrial knowledge graph into text. The LIama3 large language model is used for text-enhanced reasoning answers.
[0138] Specifically, the BERT large language model excels in question semantic embedding, as its bidirectional encoder mechanism captures contextual information within sentences, generating high-quality semantic representations. In knowledge graph-to-text conversion, BERT, through pre-training and fine-tuning, can understand complex relationships and entities, making text generation more natural and accurate, significantly improving the effectiveness of automated knowledge representation and question-answering systems.
[0139] The Meta LIama3 large language model offers significant advantages in text-enhanced reasoning and answering. Its optimized architecture and large-scale training data enable it to possess stronger contextual understanding and reasoning capabilities. The Meta LIama3 large language model can generate more accurate and coherent responses, handle complex questions, and provide detailed explanations, thereby enhancing the user experience. It is widely used in fields such as intelligent customer service, education, and research.
[0140] The above embodiments are merely preferred embodiments for the purpose of fully illustrating the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are within the scope of protection of the present invention. The scope of protection of the present invention shall be subject to the claims.
Claims
1. A method for generating industrial knowledge-based decision-making based on multi-granularity semantics and large models, characterized by: The steps include: Step 1: Based on the high-dimensional feature representation method of industrial business problems, a business problem semantic feature embedding model based on the BERT large language model is constructed to encode business problems into high-dimensional problem semantic features; Step 2: Use entity linking to perform multi-layer feature extraction and global fusion processing on the multimodal industrial knowledge graph; Based on TOP-K path expansion, a path is extended from each subject entity and the corresponding tree is derived. The trees of different subject entities are merged to form a unified subgraph, resulting in different subgraphs. Step 3: Use graph neural network (GNN) to capture different granularity features in the subgraph and obtain multi-granularity semantic features of industrial knowledge; Step 4: Use the graph convolutional network (GCN) to unify and fuse the multi-granularity semantic features of industrial knowledge and the semantic features of questions. This allows the multi-granularity semantic features of industrial knowledge and the semantic features of questions to be fused in the same feature space, forming a semantic feature fusion space for full-cycle industrial knowledge. Step 5: Build a triple sampling process based on SPARQL query writing, define business problems and convert them into corresponding SPARQL queries, and extract relevant triple data from the multimodal industrial knowledge graph and semantic feature fusion space; Step 6: Rewrite the structured triple data into free-form text to construct a dataset of industrial business-based question-decision pairs; Step 7: Fine-tune the large language model based on the problem-decision pair dataset to obtain an industrial knowledge generation decision model enhanced by knowledge text.
2. The industrial knowledge generation decision-making method based on multi-granularity semantics and large models according to claim 1 is characterized by: In step 2, based on TOP-K path expansion, the method steps for extending a path from each subject entity are as follows: 21) Encode the question q into a vector representation, calculate the relationship distribution through the linear classification layer, and select the top K relationships with the highest probability as the one-hop relationship path; 22) Take the question q and the relation path of the previous step as input, encode them into vector representation and calculate the relation distribution; Different subgraphs are obtained by sorting the predicted relationship paths according to their scores.
3. The industrial knowledge generation decision-making method based on multi-granularity semantics and large model assistance according to claim 2 is characterized by: The step 21) further comprises the following steps: 211) Given a problem q, use PLM to encode the problem q and obtain the vector representation q v : q v =PLM(q) Among them: PLM is the pre-trained language model; 212) Let vector q be represented v Input linear classification layer to predict potential hop counts h1,h2,...,h H The probability distribution D′ h : Among them: Linear is the linear transformation function; is a given problem representation q v The number of hops h c Probability of: 213) Select the hop count h with the highest probability as the prediction result: Where: H is the total number of potential hops.
4. The industrial knowledge generation decision-making method based on multi-granularity semantics and large model assistance according to claim 3 is characterized by: During training, the ground truth distribution D h Represented as a one-hot vector, where the true hop count h gold The probability of is 1, and the probability of other hops is 0: Use cross entropy loss L CE , predicted probability distribution D′ h will be different from the ground truth distribution D h Being punished for being different: in: is the probability of the actual hop count distribution of the model during training.
5. The industrial knowledge generation decision-making method based on multi-granularity semantics and large model assistance according to claim 2 is characterized by: The step 22) comprises the following steps: 221) Let vector q be represented v Input the linear classification layer to calculate the probability distribution D′ of R relations in the knowledge graph r,1 : in: is a given problem representation q v The relationship c Probability of: Select the top K relationships with the highest probability as the first-hop relationship path p1; R represents the total number of possible relationships in the knowledge graph; 222) In the t-th hop relationship, the t-1-th hop relationship path p t―1 The relationship path p in t―1,i It can be expressed as: p t―1,i =r i,1 |r i,2 |...|r i,t―1 ,i=1,2,...,K t―1 The question q and the relationship path p t―1,i Use "|" to connect as input sequence Q t : Q t =q|r i,1 |r i,2 |...|r i,t―1 Q t Encoded by PLM as vector table Q t,v , calculate the relationship distribution D′ in KG through the linear classification layer r,t : Q t,v =PLM(Q t ) in: Is a given input sequence representation Q t,v Time relationship c Probability of: Keep the top K relations with the highest probability as the t-1th hop relation path p t―1,i The t-th hop relationship of 223) After h-step prediction, we can get K h relationship paths; relationship path p t,i The score of is the product of the probabilities of all relationships in the path: Among them: Score(p t,i ) represents the relationship path p t,i score; Different subgraphs are obtained by sorting the predicted relationship paths according to their scores.
6. The industrial knowledge generation decision-making method based on multi-granularity semantics and large model assistance according to claim 2 is characterized by: In step seven, the method steps for fine-tuning the large language model are as follows: 71) Select a pre-trained model: First, select a pre-trained model suitable for the target task; 72) Prepare fine-tuning data: Prepare a fine-tuning dataset related to the target task; 73) Designing Hints: Designing additional hints to guide model learning during fine-tuning. Hints include task-related labels, features, or constraints to enhance the model’s understanding and learning of the task. 74) Constructing a prompt learning task: Combining prompt information with fine-tuning data to construct a prompt learning task; 75) Fine-tuning the model: Fine-tune the pre-trained model using fine-tuning data and prompt learning tasks; During fine-tuning, prompt information is fed into the model along with the input to guide model learning. Model parameters are updated through the back-propagation algorithm and optimizer, allowing the model to gradually adapt to the target task. 76) Tuning and evaluation: During fine-tuning, adjust the fine-tuning strategy based on the performance feedback of the validation set; Use the test set to evaluate the performance of the fine-tuned model and further optimize and improve the model; 77) Deployment and Application: Deploy the fine-tuned model to real-world applications and apply it to solve specific tasks or problems. Continuously monitor the performance of the model and adjust and optimize it based on actual conditions.
Citation Information
Patent Citations
Primary school Chinese personalized learning system based on knowledge graph and large model
CN116860978A
Method and apparatus for automatically generating inference questions and answers
WO2021184311A1
Cited By
Bionic design scheme intelligent generation method and system fused with dual-granularity knowledge base
CN121744896A