Industrial knowledge graph completion method and system
Patent Information
- Application Number
- CN202610450012.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-08
- Publication Date
- 2026-08-18
AI Technical Summary
现有负采样策略多基于随机替换三元组中的实体生成负样本,或仅依据模型当前的评分结果构造困难负样本,虽能在一定程度上提升训练效率,但未能充分结合工业知识的领域特性,对工业知识图谱中表面表达相近但工艺作用相反的高价值困难负样本缺乏针对性挖掘
[0043] The beneficial effects of this invention are as follows: By acquiring a constructed industrial knowledge graph and combining entity text descriptions and graph structure information to perform semantic-structural joint initialization of entities, the semantic separability and structural consistency of entity representations can be improved; by constructing relation embeddings and relation-specific projection matrices, entities are mapped to corresponding relation spaces and triple scores are calculated, enhancing representation capabilities under different relational contexts; by employing a relation-aware negative sampling strategy to generate candidate negative sample triples, and inputting entity representations from the industrial knowledge graph into a generative large language model for semantic structure decomposition, the core process parameters, action components or trend components, and semantic polarity labels corresponding to each entity are obtained, and then based on the core... By filtering and constructing challenging negative samples with opposite semantic polarity using core process parameters and semantic polarity labels, the modeling ability for directional semantics and polarity differences of industrial entities can be enhanced. The self-adversarial weights, frequency weights, and semantic polarity weights of the negative sample triples are calculated and fused to generate a comprehensive attention weight for the negative samples. A weighted contrastive loss function is then constructed based on positive sample scores, negative sample scores, and the comprehensive attention weight to train the model, improving the accuracy and robustness of knowledge graph completion. Based on the trained model, the missing head or tail entities are predicted and ranked, enabling industrial knowledge graph completion and applicable to scenarios such as industrial defect diagnosis, root cause analysis, process optimization, and operation and maintenance decision-making.
Smart Images

Figure CN122594496A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge management technology, and in particular to a method and system for completing an industrial knowledge graph. Background Technology
[0002] As a structured form of semantic knowledge organization, knowledge graphs can clearly depict various concepts, objects and their related logic in the industrial field using a triple structure of entity-relationship-entity. They play a key supporting role in core scenarios such as industrial manufacturing, fault diagnosis, process optimization and intelligent operation and maintenance decision-making.
[0003] However, in the actual construction and application of industrial knowledge graphs, the problem of incomplete knowledge is prevalent and prominent. Limited by factors such as the dispersed sources of industrial knowledge, the difficulty in transforming tacit experience, and the lack of explicit recording of complex causal relationships, a large number of potential relationships fail to be effectively represented in the graph, significantly limiting the application effectiveness of knowledge graphs in downstream reasoning analysis, fault diagnosis, and decision support. Therefore, knowledge graph completion technology has become a key path to overcome this bottleneck. Its core idea is to map entities and relationships to a low-dimensional dense vector space using knowledge representation learning methods, and then use the semantic associations and scoring functions between vectors to predict missing head entities, tail entities, or relationships, thereby realizing the mining of potential knowledge and the improvement of the graph structure.
[0004] Currently, mainstream knowledge graph representation learning methods can be divided into four main categories: translational distance models, semantic matching models, graph neural network models, and semantic enhancement methods combining pre-trained language models. Among these, translational distance models, with their simple structural design and efficient training characteristics, are widely used in general scenarios. However, these models have limited ability to characterize complex semantic differences in industrial scenarios, making them difficult to adapt to the professional and fine-grained requirements of industrial knowledge. Semantic matching models possess strong semantic expression capabilities, but in industrial scenarios, they still have significant shortcomings in modeling fine-grained semantics such as causal transmission direction and parameter change trends. Graph neural network models can fully utilize the neighborhood structure information of entities for representation learning, but in scenarios where industrial knowledge graph data is sparse, relationship types are complex, and semantic noise exists, they are easily affected by noise propagation. To enhance the richness of entity semantic representation, some methods introduce pre-trained language models to extract semantic information from entity text. However, these methods often face the problem of high training costs and focus more on the semantic fusion of general texts, paying insufficient attention to the inherent structural constraints of knowledge graphs, making it difficult to achieve an effective balance between entity semantic expression and graph relationship modeling.
[0005] Compared to general-domain knowledge graphs, entity representations in industrial knowledge graphs exhibit significant domain specificity, displaying stronger professionalism, directionality, and contextual dependence. In industrial production and operation scenarios, the same core process parameter or operational behavior can correspond to drastically different or even completely opposite industrial meanings and actual effects depending on the direction of change, control method, or conditions of action. For example, "increasing injection pressure" and "decreasing injection pressure," while highly similar in wording, have completely opposite process action directions, corresponding to different physical molding mechanisms and potentially leading to opposite defects such as flash or material shortage. Therefore, industrial entities not only contain general textual semantics but also deep semantic information closely related to the direction, trend, and control of process parameters. This information is crucial for the accurate expression and reasoning of industrial knowledge. However, existing representation learning methods often struggle to fully identify the implicit parameter attributes, direction of change, and semantic polarity when dealing with such entities. They tend to map semantically similar but opposite entities to similar positions in a low-dimensional space, weakening the model's ability to identify key semantic boundaries and directly affecting the accuracy and reliability of knowledge graph completion results.
[0006] Negative sampling is a crucial step in knowledge graph representation learning, and its performance directly determines the model's discriminative ability and training effectiveness. Existing negative sampling strategies often generate negative samples by randomly replacing entities in triplet pairs or by constructing difficult negative samples solely based on the model's current scoring results. While this can improve training efficiency to some extent, it fails to fully leverage the domain characteristics of industrial knowledge and lacks targeted mining of high-value difficult negative samples in industrial knowledge graphs that have similar surface representations but opposite process effects. Furthermore, industrial knowledge graphs generally suffer from uneven entity distribution; high-frequency entities are more likely to be sampled as negative samples, and their over-occurrence can mask the training contributions of low-frequency but crucial entities, thus affecting the model's learning performance of core industrial knowledge.
[0007] In summary, existing technologies still face three core challenges in the process of industrial knowledge graph completion: it is difficult to fully mine and utilize the fine-grained semantic information such as directionality and trends contained in industrial entity texts; there is a lack of effective technical means to distinguish entities with similar semantics but opposite directions of process operation, and the ability to identify key semantic boundaries is insufficient; and it is difficult to achieve the organic integration of semantic information, graph structure constraints, and negative sample difficulty information in the representation learning process. Therefore, there is still considerable room for improvement in the accuracy, robustness, and industrial applicability of knowledge graph completion. Summary of the Invention
[0008] Aimed at at least in solving one of the technical problems existing in the prior art, the present invention provides an industrial knowledge graph completion method and system.
[0009] One aspect of the present invention provides an industrial knowledge graph completion method, comprising: Obtain the text description information of the industrial knowledge graph to be completed and its entities. The industrial knowledge graph to be completed includes multiple entities, multiple relations and multiple knowledge triples. The entities include head entities and tail entities. Based on the textual description information and graph structure information of the entities in the industrial knowledge graph, semantic-structural joint initialization is performed on the entities to obtain the initial embedded representation of the entities. Construct relation embedding and relation-specific projection matrices for the relation, and project the head entity embedding and tail entity embedding onto the relation space of the corresponding relation to obtain the triple representation under relation constraints; A relation-aware negative sampling strategy is used to generate negative sample triples from positive sample triples in the industrial knowledge graph. The entity representation is decomposed into semantic structure using a generative large language model, and difficult negative samples with core process parameters and opposite semantic polarity are constructed based on the decomposition results. The self-adversarial weight, frequency weight, and semantic polarity weight of the negative sample triple are calculated and fused to generate the comprehensive attention weight of the negative sample triple. A weighted contrastive loss function is constructed based on the comprehensive attention weights. The entity embedding, relation embedding, and relation feature projection matrix are iteratively optimized and trained to obtain the knowledge graph representation learning model. The knowledge graph representation learning model is used to predict the order of missing head entities or missing tail entities in the industrial knowledge graph to be completed, and then completes the industrial knowledge graph.
[0010] According to the aforementioned industrial knowledge graph completion method, based on the textual description information and graph structure information of the entities in the industrial knowledge graph, semantic-structural joint initialization is performed on the entities to obtain the initial embedding representation of the entities, including: Based on the textual description information of the entities, a pre-trained language model is used to obtain deep semantic representations. ,in The semantic vector dimension of the pre-trained language model; Projecting the deep semantic representation onto the knowledge graph embedding space yields the textual semantic representation vectors of the entities. for:
[0011] in, Represents a linear transformation matrix. The preset entity embedding dimension; The entity's prior structure vector and text semantic representation vector are fused according to the fusion weight parameters to obtain the initial embedding representation of the entity as follows:
[0012] in, The fusion weight parameters have a range of values. ; is the prior structure vector of the entity.
[0013] According to the aforementioned industrial knowledge graph completion method, relation embeddings and relation-specific projection matrices are constructed for the relations. The head entity embeddings and tail entity embeddings are projected onto the relation space of the corresponding relations to obtain a triple representation under relation constraints, including: Construct the relation vector for each relation And relational projection matrix ,in Embedding dimensions for relationships Embedding dimensions for entities, For relationship; Get triples Head Entity initial embedding representation Tail-end entity initial embedding representation The initial embedding representation of the head entity. and initial tail entity embedding representation Mapping to Relations Corresponding relation space:
[0014]
[0015] in, For head entities in relation Projective representation in semantic space For tail entities in relation Projective representation in semantic space Indicates transpose; Based on the head entity representation, relation vector, and tail entity representation in a specific relation space, a translation-based scoring function is used to calculate triples. Reasonableness score for:
[0016] Among them, the rationality score This is used to characterize the deviation between the representation of the head entity after translation by the relation vector and the projection representation of the tail entity, where the deviation represents the triplet. The rationality of semantics and structure.
[0017] According to the aforementioned industrial knowledge graph completion method, negative sample triples are generated by employing a relation-aware negative sampling strategy for positive sample triples in the industrial knowledge graph, including: Obtain the training set, and calculate the average number of tail entities corresponding to each head entity in the positive samples of the training set. and the average number of head entities corresponding to each tail entity. The Bernoulli sampling method is used to calculate the probability of generating a negative sample by replacing the head entity. for:
[0018] according to The probability of generating a negative sample by replacing the tail entity is determined to be: ; Based on the Bernoulli sampling probability, either the head entity or the tail entity is replaced, generating a triplet for each positive sample. For each negative sample, calculate the reasonableness score for both positive and negative samples using the triplet translation scoring function:
[0019]
[0020] in, For the first Reasonableness score of each positive sample triplet For the first The corresponding positive sample of the th Reasonableness score for each negative sample triplet To replace the tail entity with the negative sample entity, To replace the head entity with the negative sample entity, This is a triplet translational scoring function.
[0021] According to the aforementioned industrial knowledge graph completion method, entity representations are semantically decomposed using a generative large language model. Based on the decomposition results, difficult negative samples with core process parameters and opposite semantic polarities are constructed, including: Express each entity The generative large language model is guided by a preset prompt template to output the corresponding structured semantic representation. :
[0022] in, Representing entities The corresponding core process parameters, Representing entities The corresponding action component or trend component, Representing entities The corresponding semantic polarity tags, This indicates a positive deviation or positive operation of the parameter. This indicates a negative deviation or negative operation of the parameter. =0 indicates an entity with no directional semantics; Based on the structured semantics of entities, for any two entities and The comparability of the two is determined based on the consistency of their core process parameters:
[0023] in, For parameter consistency functions; Based on the entity semantic decomposition results, through the polarity conflict indicator function Determine the semantic polarity label associated with each entity, where the polarity conflict indicator function is:
[0024] For relationships Any positive sample triple under The replacement sample that simultaneously satisfies the constraints of consistent core parameters and polarity conflict is constructed as the set of difficult negative samples corresponding to the positive sample. :
[0025] in, Represents head entity With replacement head entity For the same core process parameters, This indicates that the two have opposite semantic polarities; Represents tail entity With replacement tail entity For the same core process parameters, This indicates that the two have opposite semantic polarities.
[0026] According to the industrial knowledge graph completion method, the preset prompt template includes a system role area, an entity expression input area, a field constraint area, and an output format area, wherein the system role area is used for the role instructions of industrial process semantic parsing experts. The entity representation input area is used to input the text of the industrial entity to be disassembled; The field constraint area is used to define the extraction rules for large models. These constraints include retaining only standard industrial terminology and removing redundant modifiers when extracting the names of core process parameters or operational objects from entities; defining the vocabulary describing parameter change trends or operational actions within the extracted entities; and according to... Semantic annotation polarity tags; The output format area is used to output structured semantic representations in JSON structured format.
[0027] According to the aforementioned industrial knowledge graph completion method, the self-adversarial weight, frequency weight, and semantic polarity weight of negative sample triples are calculated and fused to generate a comprehensive attention weight for negative sample triples, including: Calculate the self-adversarial attention weight based on the negative sample score. :
[0028] in, For the first The corresponding positive sample of the th The rating of a negative sample, For the first The corresponding positive sample of the th The rating of a negative sample, This indicates the number of negative samples generated for each positive sample. For temperature parameters, and temperature parameters Adjustments were made according to the annealing strategy during training; Calculate the inverse frequency weights based on the frequency of occurrence of negative sample entities, and then normalize them to obtain the frequency-aware attention weights:
[0029]
[0030] in, Indicates the first The corresponding positive sample of the th The replaced entity in a negative sample. To control the degree of preference for low-frequency entities, Represents negative sample entities The frequency of occurrence, Represents negative sample entities Inverse frequency weights, Represents negative sample entities Frequency-perceived attention weights; Negative sample entities are determined based on inverse frequency weighting. Is it a positive sample? The corresponding set of difficult negative samples The obtained semantic polarity prior weights are then normalized to obtain the semantic polarity attention weights:
[0031]
[0032] in, For the hard negative sample enhancement coefficient, Represents negative sample entities semantic polarity prior weights, Represents negative sample entities Semantic polarity attention weights; The three types of attention weights are fused using a fusion coefficient to obtain a comprehensive attention weight:
[0033] in, is the fusion coefficient, used to adjust the weight distribution between semantic polarity prior and model adaptive difficulty information.
[0034] According to the aforementioned industrial knowledge graph completion method, a weighted contrastive loss function is constructed based on comprehensive attention weights, and the entity embedding, relation embedding, and relation feature projection matrix are iteratively optimized and trained to obtain a knowledge graph representation learning model, including: Construct a marginal loss function based on each positive sample triplet and its corresponding set of negative samples. :
[0035] in, Indicates the marginal threshold. Indicates the first The score of a positive sample. Indicates the first The corresponding positive sample of the th The score of each negative sample; Apply regularization constraints to the relation-specific projection matrix and entity embedding, respectively:
[0036]
[0037] in, Represents a set of relations. Represents a set of entities. This represents the regularization term of the relation-specific projection matrix. This indicates that the entity is embedded in the regular expression. Representing entities Embedded representation before relational projection; Construct the final training objective function for:
[0038] in, and The regularization coefficient is used. During training, the training objective function is minimized. To achieve this goal, the gradient descent method is used to iteratively optimize entity embedding, relation embedding, and relation-specific projection matrix, thereby obtaining a knowledge graph representation learning model.
[0039] According to the aforementioned industrial knowledge graph completion method, the knowledge graph representation learning model is used to predict the order of missing head entities or missing tail entities in the industrial knowledge graph to be completed, thereby completing the industrial knowledge graph, including: Incomplete triples to be predicted in the completed industrial knowledge graph or The known entities and relationships are fixed; Substitute the candidate entities into the incomplete triplets, and then score based on the trained function. Ranking of candidate entities using knowledge graph links; The target entity is determined based on the sorting results, and the missing connections in the industrial knowledge graph to be completed are filled based on the target entity.
[0040] Another aspect of the present invention provides an industrial knowledge graph completion device, comprising: The acquisition module is used to acquire the text description information of the industrial knowledge graph to be completed and its entities. The industrial knowledge graph to be completed includes multiple entities, multiple relations and multiple knowledge triples. The entities include head entities and tail entities. The initialization module is used to perform semantic-structural joint initialization of entities based on the text description information and graph structure information of the entities in the industrial knowledge graph, so as to obtain the initial embedded representation of the entities. The relation representation module is used to construct relation embeddings and relation-specific projection matrices for relations, projecting the head entity embeddings and tail entity embeddings onto the relation space of the corresponding relation to obtain the triple representation under relation constraints; The negative sampling module is used to generate negative sample triples from positive sample triples in the industrial knowledge graph using a relation-aware negative sampling strategy. The semantic processing module is used to decompose the semantic structure of entity representations through a generative large language model, and construct difficult negative samples with core process parameters and opposite semantic polarity based on the decomposition results. The weight calculation module is used to calculate and fuse the self-adversarial weight, frequency weight and semantic polarity weight of the negative sample triple to generate the comprehensive attention weight of the negative sample triple. The training module is used to construct a weighted contrastive loss function based on the comprehensive attention weights, and to iteratively optimize and train the entity embedding, relation embedding, and relation feature projection matrix to obtain the knowledge graph representation learning model. The completion module is used to predict the order of missing head entities or missing tail entities in the industrial knowledge graph to be completed by using the knowledge graph representation learning model, and then complete the industrial knowledge graph.
[0041] Another aspect of the present invention provides an electronic device, including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method as described above.
[0042] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the methods described above.
[0043] The beneficial effects of this invention are as follows: By acquiring a constructed industrial knowledge graph and combining entity text descriptions and graph structure information to perform semantic-structural joint initialization of entities, the semantic separability and structural consistency of entity representations can be improved; by constructing relation embeddings and relation-specific projection matrices, entities are mapped to corresponding relation spaces and triple scores are calculated, enhancing representation capabilities under different relational contexts; by employing a relation-aware negative sampling strategy to generate candidate negative sample triples, and inputting entity representations from the industrial knowledge graph into a generative large language model for semantic structure decomposition, the core process parameters, action components or trend components, and semantic polarity labels corresponding to each entity are obtained, and then based on the core... By filtering and constructing challenging negative samples with opposite semantic polarity using core process parameters and semantic polarity labels, the modeling ability for directional semantics and polarity differences of industrial entities can be enhanced. The self-adversarial weights, frequency weights, and semantic polarity weights of the negative sample triples are calculated and fused to generate a comprehensive attention weight for the negative samples. A weighted contrastive loss function is then constructed based on positive sample scores, negative sample scores, and the comprehensive attention weight to train the model, improving the accuracy and robustness of knowledge graph completion. Based on the trained model, the missing head or tail entities are predicted and ranked, enabling industrial knowledge graph completion and applicable to scenarios such as industrial defect diagnosis, root cause analysis, process optimization, and operation and maintenance decision-making. Attached Figure Description
[0044] Figure 1 This is a schematic diagram of the industrial knowledge graph completion method according to an embodiment of the present invention.
[0045] Figure 2 This is a schematic diagram of the structure of the industrial knowledge graph completion method based on generative semantic parsing and difficult negative sampling according to an embodiment of the present invention.
[0046] Figure 3 This is a schematic diagram of the knowledge graph prediction and completion structure according to an embodiment of the present invention.
[0047] Figure 4 This is a schematic diagram of an industrial knowledge graph completion system according to an embodiment of the present invention. Detailed Implementation
[0048] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "part," or "unit" can be used interchangeably. Terms such as "first," "second," etc., are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the sequential relationship of the indicated technical features. In the following description, the consecutive reference numerals for method steps are for ease of review and understanding. Adjusting the implementation order of steps, in conjunction with the overall technical solution of the present invention and the logical relationship between the various steps, will not affect the technical effect achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0049] refer to Figure 1 , Figure 1 This is a schematic flowchart of the industrial knowledge graph completion method according to an embodiment of the present invention, which includes, but is not limited to, steps S100~S800: S100: Obtain the text description information of the industrial knowledge graph to be completed and its entities. The industrial knowledge graph to be completed includes multiple entities, multiple relations and multiple knowledge triples. The entities include head entities and tail entities.
[0050] The industrial knowledge graph to be completed obtained in this embodiment of the invention consists of an entity set, a relation set, and a triple set. Entities may include defect-type entities, cause-type entities, and measure-type entities; relations may represent semantic associations such as causality, similarity, or regulation; and knowledge triples may be represented as follows: ,in, Indicates the head entity. Indicates a relationship. This indicates the tail entity.
[0051] It is understood that the industrial knowledge graph obtained in the embodiments of the present invention may be a graph constructed by manual organization or a graph pre-generated by existing processes. The embodiments of the present invention do not limit the construction method of the industrial knowledge graph, but use the constructed industrial knowledge graph as the input object for subsequent knowledge representation learning and knowledge completion.
[0052] In addition to acquiring the industrial knowledge graph, this invention also acquires the text description information corresponding to each entity. For example, the text description information may include entity name, terminology definition, process description, fault description or measure description, etc., which are used to characterize the semantic content of the entity and provide a foundation for subsequent entity semantic representation initialization and knowledge graph completion.
[0053] S200: Based on the textual description information and graph structure information of the entities in the industrial knowledge graph, perform semantic-structural joint initialization on the entities to obtain the initial embedded representation of the entities.
[0054] In some embodiments, reference Figure 2 The diagram illustrates the structure of an industrial knowledge graph completion method based on generative semantic parsing and hard negative sampling. To enhance the semantic separability and structural consistency of entity representations, a joint semantic-structural initialization is performed on each entity. Specifically, for entity text descriptions, the Bidirectional Encoder Representations from Transformers (BERT) model is used to extract deep semantic representations of the entities. ,in, The semantic vector dimension output by the pre-trained language model.
[0055] In this embodiment of the invention, deep semantic representations are projected onto the knowledge graph embedding space to obtain textual semantic representation vectors of entities. :
[0056] in, Represents a linear transformation matrix. The preset entity embedding dimension; At the same time, the structural prior vector of the entity is introduced. This is used to represent the initial position of an entity within the industrial knowledge graph structure. In this embodiment, the structural prior vector is randomly initialized using a normal distribution with a mean of 0 and a standard deviation of 0.01, and its dimension is the same as that of the text semantic representation vector. Consistent.
[0057] Text semantic representation based on fusion weight parameters and structural prior vector Weighted fusion is performed to obtain the initial embedding representation of the entity. The calculation formula is as follows:
[0058] in, The fusion weight parameters have a range of values. .
[0059] By using the above method, the initial embedded representation of an entity can simultaneously contain semantic information from the entity text and structural prior information from the knowledge graph, thereby providing a more stable representation foundation for subsequent relation space mapping and knowledge graph completion.
[0060] S300: Construct relation embedding and relation-specific projection matrices for the relation, and project the head entity embedding and tail entity embedding onto the relation space of the corresponding relation to obtain the triple representation under relation constraints.
[0061] This invention takes into account that although the types of relations in industrial knowledge graphs are relatively limited, different relations have clear and differentiated semantics. Therefore, a relation vector is set for each type of relation. and the corresponding relational projection matrix ; In this embodiment, considering that although the types of relations in an industrial knowledge graph are relatively limited, different relations have clear and differentiated semantics, in order to enhance the entity representation capability under the semantic constraints of different relations, a relation vector and a relation projection matrix are constructed for each relation. Specifically, for each relation... Constructing relation vectors and the corresponding relational projection matrix ,in, Embedding dimensions for relationships Embedded dimension for entity.
[0062] For triples , head entity The corresponding initial embedding representation is denoted as Tail entity The corresponding initial embedding representation is denoted as And embed the head entity into the representation. Tail entity embedding representation Mapping to Relations In the corresponding relation space, we obtain the projection representations of the head entity and the tail entity in the relation space:
[0063]
[0064] in, For head entities in relation rProjective representation in semantic space For tail entities in relation r Projective representation in semantic space.
[0065] After obtaining the head entity projection representation, tail entity projection representation, and relation vector, triples are calculated using a translation-based scoring function based on the head entity representation, relation vector, and tail entity representation in a specific relation space. Reasonableness score :
[0066] Among them, the rationality score The smaller the value, the smaller the deviation between the head entity's representation after translation by the relation vector and the tail entity's projected representation. The higher the semantic and structural plausibility, the greater the probability of its validity.
[0067] The present invention maps entity representations to a relation-specific semantic space through the above-described method, thereby enhancing the model's ability to express entity interaction features in different relational contexts and providing a foundation for subsequent negative sample construction and knowledge graph completion.
[0068] S400 uses a relation-aware negative sampling strategy to generate negative sample triples from positive sample triples in the industrial knowledge graph.
[0069] It is understood that the relation-aware negative sampling strategy of this invention is based on the entity connectivity features of different relationships in the industrial knowledge graph, and adopts a Bernoulli distribution to adaptively adjust the entity replacement probability to generate negative samples, thereby reducing the probability of generating false negative samples and improving the training value of negative samples.
[0070] In some embodiments, a relation-aware negative sampling strategy is used to generate negative sample triples, specifically including: (1) For each relation The average number of tail entities corresponding to each head entity in the training set is statistically analyzed. and the average number of head entities corresponding to each tail entity. The probability of generating a negative sample by replacing the head entity is calculated using the Bernoulli sampling method:
[0071] Correspondingly, the probability of generating a negative sample by replacing the tail entity is .
[0072] In some implementations, the probability of head entity replacement and the probability of tail entity replacement can be determined by combining statistical results of specific relationships. For example, for a "cause" relationship, the average number of tail entities corresponding to each head entity can be statistically calculated. The average number of head entities corresponding to each tail entity Then, through the formula:
[0073] The calculated probability is that the replaced head entity generates a negative sample. Correspondingly, the probability of generating a negative sample by replacing the tail entity is... By using the above methods, the generation of negative samples under the "cause" relationship can be made more consistent with the mapping characteristics of the relationship, thereby reducing the probability of generating false negative samples.
[0074] (2) For a given positive sample triplet Based on the Bernoulli sampling probability, the head entity or tail entity is selected for replacement, and a sample is generated for each positive sample. One negative sample.
[0075] When you choose to replace the tail entity, the tail entity will be... Replace with candidate negative sample entities negative sample triples were obtained. ; When you choose to replace the header entity, the header entity will be... Replace with candidate negative sample entities negative sample triples were obtained. .
[0076] (3) Based on the preset triplet translational scoring function, calculate the scores for positive and negative samples respectively. Specifically, using the formula:
[0077]
[0078] Calculate the first one respectively The reasonableness score of the first positive sample triplet and the first The corresponding positive sample of the th Reasonableness score for each negative sample triple; in, For the first i Reasonableness score of each positive sample triplet For the first i The corresponding positive sample of the th j Reasonableness score for each negative sample triplet To replace the tail entity with the negative sample entity, To replace the head entity with the negative sample entity, This is a triplet translational scoring function.
[0079] S500 decomposes the semantic structure of entity representations using a generative large language model, and constructs difficult negative samples with core process parameters and opposite semantic polarities based on the decomposition results.
[0080] In some embodiments, in this embodiment, entity representations from an industrial knowledge graph are input into a generative large language model, and the generative large language model is guided to output corresponding structured semantic representations based on preset prompt templates:
[0081] in, Representing entities The corresponding core process parameters, Representing entities The corresponding action component or trend component, Representing entities The corresponding semantic polarity tags, This indicates a positive deviation or positive operation of the parameter. This indicates a negative deviation or negative operation of the parameter. =0 indicates an entity with no directional semantics.
[0082] In this embodiment, the generative large language model selected is the DeepSeek-R1-671B open-source large model, which has excellent adaptability to semantic understanding in the Chinese industrial field. It can also be replaced with other generative large language models with equivalent Chinese semantic understanding and instruction compliance capabilities, depending on the deployment environment. Before calling the large language model, a fixed system role is first assigned to the model. The system role's instructions are: "You are a process semantic parsing expert specializing in the industrial manufacturing field. Your core responsibility is to standardize and decompose the input industrial entity text, strictly extract information according to the given field constraints, prohibit the output of extra content beyond the constraints, and ensure the consistency and accuracy of the output format. Your parsing scope is limited to process, parameter, and defect-related entities in the industrial manufacturing field, such as injection molding, and you must strictly follow the professional terminology standards of the industrial field." In some embodiments, the preset prompt template is divided into four parts: system role area, entity expression input area, field constraint area, and output format area, wherein: The system role area is used to fix the role instructions of the aforementioned industrial process semantic parsing experts, ensuring the domain consistency of the large model output; The entity representation input area is used to input the text of the industrial entity to be disassembled, and each input is limited to containing only one independent entity; Field constraint area: used to limit the extraction rules of large models. The specific constraint contents are: (1) Extract the core process parameter names or operation objects from the entity, retain only the standard terms in the industrial field, and remove redundant modifiers; (2) Extract words from entities that describe the trend of parameter changes or operational actions, such as "increase", "decrease", "too high", "insufficient", etc.; (3) ,according to The semantic annotation polarity label is +1 for positive operations or trends, -1 for negative operations or trends, and 0 for defective and equipment entities without directional semantics. Output format section: Used to specify that large models should return results in a fixed JSON structured format. The output format template is: {" ":""," ":""," The colon ":""} indicates that the output of natural language interpretation is prohibited.
[0083] Furthermore, in some implementations, differentiated semantic processing strategies are employed for different types of entities. For measure-type entities, the structured semantic representation includes the core operation object, action components, and polarity labels. For example, the entity expression "increase injection speed" can be broken down into... For "injection speed", For the purpose of "improvement", for For causal entities, the structured semantic representation includes core process parameters, trends of change, and polarity labels. For example, the entity expressing "mold temperature too high" can be broken down into... For "mold temperature", "Too high" for For entities with no directional semantics, such as defect types and equipment types, in structured semantic representation... Empty The fixed annotation is 0. For example, for the entity representing "warping deformation", the decomposition yields... For "warping deformation", for"", It is 0.
[0084] Through the above methods, industrial entities of different forms and types can be uniformly converted into comparable and computable structured semantic information.
[0085] After obtaining the structured semantic representation of each entity, for any two entities and First, based on the consistency of core process parameters, we determine whether the two are comparable, and define a parameter consistency function:
[0086] Based on the entity semantic decomposition results, a semantic polarity label is associated with each entity, and a polarity conflict indicator function is defined. for:
[0087] For relationships Any positive sample triple under The replacement sample that simultaneously satisfies the constraints of consistent core parameters and polarity conflict is constructed as the set of difficult negative samples corresponding to the positive sample. :
[0088] in, Represents head entity With replacement head entity For the same core process parameters, This indicates that the two have opposite semantic polarities; Represents tail entity With replacement tail entity For the same core process parameters, This indicates that the two have opposite semantic polarities.
[0089] For example, for a positive sample triple "(Increase the injection pressure of the injection molding machine, resulting in flash)" in an industrial knowledge graph that conforms to the logic of a real process, its head entity "Increase the injection pressure of the injection molding machine" is semantically decomposed to obtain the core process parameter "injection pressure" with a semantic polarity of +1. The entity "Decrease the injection pressure", which also has the core process parameter "injection pressure" and a semantic polarity of -1, is then selected to replace the original head entity, thus constructing a difficult negative sample triple "(Decrease the injection pressure, resulting in flash)". Through this method, negative samples that are semantically similar to the positive samples but have opposite process effects can be selected, thereby providing more discriminative supervision signals for subsequent model training.
[0090] S600 calculates and fuses the self-adversarial weights, frequency weights, and semantic polarity weights of the negative sample triples to generate the comprehensive attention weights of the negative sample triples.
[0091] In this embodiment, for each set of negative samples corresponding to a positive sample, the weights of the negative samples are calculated from three perspectives: the current model score, the frequency of entity occurrence, and the semantic polarity prior. These weights are then fused to obtain the comprehensive attention weight of the negative samples.
[0092] Specifically, the self-adversarial attention weights are first calculated based on the negative sample scores. :
[0093] in, For the first i The corresponding positive sample of the th k The rating of a negative sample, For the first i The corresponding positive sample of the th j The rating of a negative sample, This indicates the number of negative samples generated for each positive sample. This refers to the temperature parameter. In some implementations, the temperature parameter... The annealing strategy can be adjusted to make the attention distribution in the later stages of training more focused on high-scoring difficult negative samples.
[0094] Then, inverse frequency weights are calculated based on the frequency of occurrence of negative sample entities, and normalized to obtain frequency-aware attention weights:
[0095]
[0096] in, Indicates the first The corresponding positive sample of the th The replaced entity in a negative sample. To control the degree of preference for low-frequency entities, Represents negative sample entities The frequency of occurrence, Represents negative sample entities Inverse frequency weights, Represents negative sample entities Frequency-aware attention weights.
[0097] At the same time, negative sample entities are determined using formulas. Is it a positive sample? The corresponding set of difficult negative samples The obtained semantic polarity prior weights are then normalized to obtain the semantic polarity attention weights:
[0098]
[0099] in, For the hard negative sample enhancement coefficient, Represents negative sample entities semantic polarity prior weights, Represents negative sample entities Semantic polarity attention weights.
[0100] Finally, a fusion coefficient is used to fuse the three types of attention weights to obtain a comprehensive attention weight:
[0101] in, is the fusion coefficient, used to adjust the weight distribution between semantic polarity prior and model adaptive difficulty information.
[0102] For example, when a negative sample has a high score, a low frequency of occurrence of its corresponding entity, and belongs to a set of difficult negative samples, its self-adversarial attention weight, frequency-aware attention weight, and semantic polarity attention weight are all relatively large, resulting in a higher overall attention weight after fusion. This approach allows the model to pay more attention to negative samples with high discrimination difficulty and obvious semantic conflicts during training.
[0103] S700 constructs a weighted contrastive loss function based on comprehensive attention weights, and iteratively optimizes and trains entity embedding, relation embedding, and relation feature projection matrix to obtain a knowledge graph representation learning model.
[0104] In this embodiment, a marginal loss function is constructed based on each positive sample triplet and its corresponding set of negative samples. :
[0105] in, Indicates the marginal threshold. This represents the score of the positive sample. Indicates the first Scores for each negative sample.
[0106] Apply regularization constraints to the relation-specific projection matrix and entity embedding, respectively:
[0107]
[0108] in, Represents a set of relations. Represents a set of entities. This represents the regularization term of the relation-specific projection matrix. This indicates that the entity is embedded in a regular expression. Therefore, the final training objective function is constructed. for:
[0109] in, and is the regularization coefficient.
[0110] In some implementations, to minimize the training objective function To achieve the goal, a gradient descent method is used to iteratively optimize entity embeddings, relation embeddings, and relation-specific projection matrices, thereby obtaining a knowledge graph representation learning model. Specifically, the Adam optimizer combined with the backpropagation algorithm can be used to train the model parameters in multiple rounds. In each round of training, the parameters of entity embeddings, relation vectors, and relation projection matrices are updated according to the training objective function until the training objective function converges or the preset number of training rounds is reached, and finally, the trained entity embedding representation and relation embedding representation are output.
[0111] After training, the completion performance of the knowledge graph representation learning model can be evaluated on the test set through a link prediction task. To illustrate the effectiveness of the industrial knowledge graph completion method proposed in this application in the link prediction task, it is considered to compare it with a variety of representative knowledge graph representation learning methods, including TransE, TransH, TransD, TransR, and RotatE based on translation models, DistMult, RESCAL, Analogy, SimpleE, and ComplEx based on semantic matching models, and RGCN, DSGNet, CompGCN, and KSG-GNN based on graph neural networks. Specifically, on an industrial injection molding knowledge graph dataset, under the same data partitioning, hyperparameter search strategy, and training configuration, multiple independent experiments were conducted on each comparison model, with a fixed random number seed. The final results were averaged, and the link prediction performance is shown in Table 1.
[0112] Table 1. Comparison of link prediction results among different knowledge graph representation learning methods
[0113] Here, Hits@I represents the percentage of all correct triples in the test set that rank in the top I, where I is usually 1, 3, or 10; Mean Reciprocal Rank (MRR) represents the average reciprocal rank of all correct triples in the test set, and a larger value indicates better link prediction performance.
[0114] As shown in Table 1, the method proposed in this application outperforms the comparative methods in link prediction on the injection molding knowledge graph dataset. Specifically, the method proposed in this application achieves the best results in MRR, Hits@1, Hits@3, and Hits@10 metrics, indicating that the method proposed in this application can more accurately rank the correct entities and achieve better knowledge graph completion. The above experimental results show that the method proposed in this application can effectively improve the link prediction capability of the industrial knowledge graph representation learning model through semantic-structure joint initialization, relation-aware negative sampling, semantic structure decomposition assisted by generative large language models, and construction of difficult negative samples driven by semantic polarity.
[0115] The S800 uses a knowledge graph representation learning model to predict the order of missing head entities or missing tail entities in the industrial knowledge graph to be completed, and then completes the industrial knowledge graph.
[0116] In this embodiment, based on a trained and validated knowledge graph representation learning model, missing head entities or missing tail entities are predicted and ranked to achieve industrial knowledge graph completion. The prediction and completion process is as follows: Figure 3 As shown. Specifically, for the incomplete triples to be predicted. or The known entities and relations are fixed, and candidate entities from the knowledge graph are substituted into incomplete triples, based on the training score function. Calculate the triple score for each candidate entity. Since a smaller value of the scoring function f(h,r,t) indicates that the corresponding triple is more semantically and structurally reasonable, the candidate entities can be sorted according to their scores. The top-ranked candidate entities are then identified as target entities and added to the original industrial knowledge graph to complete the missing connections in the knowledge graph.
[0117] For example, for the query triple (?, cause, material shortage), the fixed relation "cause" and the tail entity "material shortage" are used to substitute candidate entities into the head entity position one by one. After excluding real triples already existing in the original knowledge graph, the model outputs candidate head entities with the highest scores, including excessively long flow path, incomplete filling, and insufficient molding material, with corresponding scores of 3.679, 3.850, and 3.869, respectively. Based on the ranking results, these candidate entities can be used as potential causes of "material shortage" to complete the missing causal relationships.
[0118] In some implementations, the entity embedding representation, relation embedding representation, and relation-specific projection matrix obtained from the above training can be used not only for knowledge graph completion, but also for downstream tasks such as entity similarity calculation, causal relationship reasoning, and defect diagnosis path generation, thereby providing assistance for industrial defect diagnosis, cause analysis, process parameter optimization, or operation and maintenance decision support.
[0119] It is worth mentioning that this application introduces a generative large language model to decompose the semantic structure of industrial entities, which can explicitly extract the core process parameters, change trends and semantic polarity of the entities, and actively construct a set of semantically conflicting difficult negative samples. Compared with traditional methods that rely solely on structural embedding, it can more effectively distinguish entities with similar process directions but opposite effects, enhance the modeling ability of directional semantics and polarity differences of industrial entities, improve the accuracy and robustness of knowledge graph completion, and is applicable to scenarios such as industrial defect diagnosis, cause analysis, process optimization and operation and maintenance decision-making.
[0120] Another embodiment of the present invention discloses a schematic diagram of an industrial knowledge graph completion system, which includes: The acquisition module 410 is used to acquire the text description information of the industrial knowledge graph to be completed and its entities. The industrial knowledge graph to be completed includes multiple entities, multiple relations and multiple knowledge triples. The entities include head entities and tail entities. The initialization module 420 is used to perform semantic-structural joint initialization on entities based on the text description information and graph structure information of the entities in the industrial knowledge graph, so as to obtain the initial embedded representation of the entities. The relation representation module 430 is used to construct relation embedding and relation-specific projection matrices for relations, project the head entity embedding and tail entity embedding onto the relation space of the corresponding relation, and obtain the triple representation under relation constraints; The negative sampling module 440 is used to generate negative sample triples from positive sample triples of the industrial knowledge graph using a relation-aware negative sampling strategy. The semantic processing module 450 is used to decompose the semantic structure of entity representations through a generative large language model, and construct difficult negative samples with core process parameters and opposite semantic polarity based on the decomposition results. The weight calculation module 460 is used to calculate and fuse the self-adversarial weight, frequency weight and semantic polarity weight of the negative sample triple to generate the comprehensive attention weight of the negative sample triple. Training module 470 is used to construct a weighted contrastive loss function based on the comprehensive attention weights, and to iteratively optimize and train entity embedding, relation embedding and relation feature projection matrix to obtain a knowledge graph representation learning model. The completion module 480 is used to predict the order of missing head entities or missing tail entities in the industrial knowledge graph to be completed by using a knowledge graph representation learning model, and then complete the industrial knowledge graph.
[0121] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, considering the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed in the embodiments of the invention, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0122] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0123] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can include, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0124] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0125] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0126] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0127] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0128] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A method for completing an industrial knowledge graph, characterized in that, include: Obtain the text description information of the industrial knowledge graph to be completed and its entities. The industrial knowledge graph to be completed includes multiple entities, multiple relations and multiple knowledge triples. The entities include head entities and tail entities. Based on the textual description information and graph structure information of the entities in the industrial knowledge graph, semantic-structural joint initialization is performed on the entities to obtain the initial embedded representation of the entities. Construct relation embedding and relation-specific projection matrices for the relation, and project the head entity embedding and tail entity embedding onto the relation space of the corresponding relation to obtain the triple representation under relation constraints; A relation-aware negative sampling strategy is used to generate negative sample triples from positive sample triples in the industrial knowledge graph. The entity representation is decomposed into semantic structure using a generative large language model, and difficult negative samples with core process parameters and opposite semantic polarity are constructed based on the decomposition results. The self-adversarial weight, frequency weight, and semantic polarity weight of the negative sample triple are calculated and fused to generate the comprehensive attention weight of the negative sample triple. A weighted contrastive loss function is constructed based on the comprehensive attention weights. The entity embedding, relation embedding, and relation feature projection matrix are iteratively optimized and trained to obtain the knowledge graph representation learning model. The knowledge graph representation learning model is used to predict the order of missing head entities or missing tail entities in the industrial knowledge graph to be completed, and then completes the industrial knowledge graph.
2. The industrial knowledge graph completion method according to claim 1, characterized in that, The step of performing semantic-structural joint initialization on entities based on their textual description information and graph structure information to obtain initial embedded representations of the entities includes: Based on the textual description information of the entities, a pre-trained language model is used to obtain deep semantic representations. ,in The semantic vector dimension of the pre-trained language model; Projecting the deep semantic representation onto the knowledge graph embedding space yields the textual semantic representation vectors of the entities. for: in, Represents a linear transformation matrix. The preset entity embedding dimension; The entity's prior structure vector and text semantic representation vector are fused according to the fusion weight parameters to obtain the initial embedding representation of the entity as follows: in, The fusion weight parameters have a range of values. ; is the prior structure vector of the entity.
3. The industrial knowledge graph completion method according to claim 1, characterized in that, The construction of relation embeddings and relation-specific projection matrices for the relations, projecting the head entity embeddings and tail entity embeddings onto the relation space of the corresponding relation, yields a triple representation under relation constraints, including: Construct the relation vector for each relation And relational projection matrix ,in Embedding dimensions for relationships Embedding dimensions for entities, For relationship; Get triples Head Entity initial embedding representation Tail-end entity initial embedding representation The initial embedding representation of the head entity. and initial tail entity embedding representation Mapping to Relations Corresponding relation space: in, For head entities in relation Projective representation in semantic space For tail entities in relation Projective representation in semantic space Indicates transpose; Based on the head entity representation, relation vector, and tail entity representation in a specific relation space, a translation-based scoring function is used to calculate triples. Reasonableness score for: Among them, the rationality score This is used to characterize the deviation between the representation of the head entity after translation by the relation vector and the projection representation of the tail entity, where the deviation represents the triplet. The rationality of semantics and structure.
4. The industrial knowledge graph completion method according to claim 1, characterized in that, The method of generating negative sample triples from positive sample triples of the industrial knowledge graph using a relation-aware negative sampling strategy includes: Obtain the training set, and calculate the average number of tail entities corresponding to each head entity in the positive samples of the training set. and the average number of head entities corresponding to each tail entity. The Bernoulli sampling method is used to calculate the probability of generating a negative sample by replacing the head entity. for: according to The probability of generating a negative sample by replacing the tail entity is determined to be: ; Based on the Bernoulli sampling probability, either the head entity or the tail entity is replaced, generating a triplet for each positive sample. For each negative sample, calculate the reasonableness score for both positive and negative samples using the triplet translation scoring function: in,, For the first Reasonableness score of each positive sample triplet For the first The corresponding positive sample of the th Reasonableness score for each negative sample triplet To replace the tail entity with the negative sample entity, To replace the head entity with the negative sample entity, This is a triplet translational scoring function.
5. The industrial knowledge graph completion method according to claim 4, characterized in that, The process of decomposing entity representations into semantic structures using a generative large language model, and constructing difficult negative samples with opposite core process parameters and semantic polarities based on the decomposition results, includes: Express each entity The generative large language model is guided by a preset prompt template to output the corresponding structured semantic representation. : in, Representing entities The corresponding core process parameters, Representing entities The corresponding action component or trend component, Representing entities The corresponding semantic polarity tags, This indicates a positive deviation or positive operation of the parameter. This indicates a negative deviation or negative operation of the parameter. =0 indicates an entity with no directional semantics; Based on the structured semantics of entities, for any two entities and The comparability of the two is determined based on the consistency of their core process parameters: in, For parameter consistency functions; Based on the entity semantic decomposition results, through the polarity conflict indicator function Determine the semantic polarity label associated with each entity, where the polarity conflict indicator function is: For relationships Any positive sample triple under The replacement sample that simultaneously satisfies the constraints of consistent core parameters and polarity conflict is constructed as the set of difficult negative samples corresponding to the positive sample. : in, Represents head entity With replacement head entity For the same core process parameters, This indicates that the two have opposite semantic polarities; Represents tail entity With replacement tail entity For the same core process parameters, This indicates that the two have opposite semantic polarities.
6. The industrial knowledge graph completion method according to claim 5, characterized in that, The preset prompt template includes a system role area, an entity expression input area, a field constraint area, and an output format area, wherein the system role area is used for the role instructions of the industrial process semantic parsing expert. The entity representation input area is used to input the text of the industrial entity to be disassembled; The field constraint area is used to define the extraction rules for large models. These constraints include retaining only standard industrial terminology and removing redundant modifiers when extracting the names of core process parameters or operational objects from entities; defining the vocabulary describing parameter change trends or operational actions within the extracted entities; and according to... Semantic annotation polarity tags; The output format area is used to output structured semantic representations in JSON structured format.
7. The industrial knowledge graph completion method according to claim 5, characterized in that, The self-adversarial weight, frequency weight, and semantic polarity weight of the negative sample triple are calculated and fused to generate the comprehensive attention weight of the negative sample triple, including: Calculate the self-adversarial attention weight based on the negative sample score. : in, For the first The corresponding positive sample of the th The rating of a negative sample, For the first The corresponding positive sample of the th The rating of a negative sample, This indicates the number of negative samples generated for each positive sample. For temperature parameters, and temperature parameters Adjustments were made according to the annealing strategy during training; Calculate the inverse frequency weights based on the frequency of occurrence of negative sample entities, and then normalize them to obtain the frequency-aware attention weights: in, Indicates the first The corresponding positive sample of the th The replaced entity in a negative sample. To control the degree of preference for low-frequency entities, Represents negative sample entities The frequency of occurrence, Represents negative sample entities Inverse frequency weights, Represents negative sample entities Frequency-perceived attention weights; Negative sample entities are determined based on inverse frequency weighting. Is it a positive sample? The corresponding set of difficult negative samples The obtained semantic polarity prior weights are then normalized to obtain the semantic polarity attention weights: in, For the hard negative sample enhancement coefficient, Represents negative sample entities semantic polarity prior weights, Represents negative sample entities Semantic polarity attention weights; The three types of attention weights are fused using a fusion coefficient to obtain a comprehensive attention weight: in, is the fusion coefficient, used to adjust the weight distribution between semantic polarity prior and model adaptive difficulty information.
8. The industrial knowledge graph completion method according to claim 7, characterized in that, The step involves constructing a weighted contrastive loss function based on comprehensive attention weights, and iteratively optimizing and training the entity embedding, relation embedding, and relation feature projection matrix to obtain a knowledge graph representation learning model, including: Construct a marginal loss function based on each positive sample triplet and its corresponding set of negative samples. : in, Indicates the marginal threshold. Indicates the first The score of a positive sample. Indicates the first The corresponding positive sample of the th The score of each negative sample; Apply regularization constraints to the relation-specific projection matrix and entity embedding, respectively: in, Represents a set of relations. Represents a set of entities. This represents the regularization term of the relation-specific projection matrix. This indicates that the entity is embedded in the regular expression. Representing entities Embedded representation before relational projection; Construct the final training objective function for: in, and The regularization coefficient is used. During training, the training objective function is minimized. To achieve this goal, the gradient descent method is used to iteratively optimize entity embedding, relation embedding, and relation-specific projection matrix, thereby obtaining a knowledge graph representation learning model.
9. The industrial knowledge graph completion method according to claim 8, characterized in that, The step of using the knowledge graph representation learning model to predict the order of missing head entities or missing tail entities in the industrial knowledge graph to be completed, and then completing the industrial knowledge graph, includes: Incomplete triples to be predicted in the completed industrial knowledge graph or The known entities and relationships are fixed; Substitute the candidate entities into the incomplete triplets, and then score based on the trained function. Ranking of candidate entities using knowledge graph links; The target entity is determined based on the sorting results, and the missing connections in the industrial knowledge graph to be completed are filled based on the target entity.
10. An industrial knowledge graph completion system, characterized in that, include: The acquisition module is used to acquire the text description information of the industrial knowledge graph to be completed and its entities. The industrial knowledge graph to be completed includes multiple entities, multiple relations and multiple knowledge triples. The entities include head entities and tail entities. The initialization module is used to perform semantic-structural joint initialization of entities based on the text description information and graph structure information of the entities in the industrial knowledge graph, so as to obtain the initial embedded representation of the entities. The relation representation module is used to construct relation embeddings and relation-specific projection matrices for relations, projecting the head entity embeddings and tail entity embeddings onto the relation space of the corresponding relation to obtain the triple representation under relation constraints; The negative sampling module is used to generate negative sample triples from positive sample triples in the industrial knowledge graph using a relation-aware negative sampling strategy. The semantic processing module is used to decompose the semantic structure of entity representations through a generative large language model, and construct difficult negative samples with core process parameters and opposite semantic polarity based on the decomposition results. The weight calculation module is used to calculate and fuse the self-adversarial weight, frequency weight and semantic polarity weight of the negative sample triple to generate the comprehensive attention weight of the negative sample triple. The training module is used to construct a weighted contrastive loss function based on the comprehensive attention weights, and to iteratively optimize and train the entity embedding, relation embedding, and relation feature projection matrix to obtain the knowledge graph representation learning model. The completion module is used to predict the order of missing head entities or missing tail entities in the industrial knowledge graph to be completed by using the knowledge graph representation learning model, and then complete the industrial knowledge graph.