Defect cause knowledge graph reasoning method for casting blanks with different type relationships

Through the knowledge graph reasoning method for the causes of casting defects of different types of relationships, combined with attention network and convolution operation, the ConvKB and CapsE models are used to solve the problem of unbalanced accuracy of continuous casting relationship in the existing technology, and the casting is improved Accuracy and model adaptability of the cause analysis of blank defects.

CN118917413AActive Publication Date: 2024-11-08XI AN JIAOTONG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410916194.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-08
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

When the existing knowledge graph inference method deals with different types of relationship characteristics, it leads to imbalance in the accuracy of continuous casting relationship inference, making it difficult to effectively identify and process different types of continuous casting relationships, which affects the accurate analysis of the causes of mass defects of cast steel and the optimization of production process. .

Method used

The knowledge graph reasoning method for casting defect causes for different types of relationships is adopted. By classifying continuous casting relationships, the feature map vector is generated using attention network and convolutional operations, and the inference method of ConvKB model and CapsE model is combined to generate negative samples and Build an inference model, select suitable inference methods for inference, and improve accuracy.

Benefits of technology

Improve the accuracy and robustness of the cause reasoning of the defects of continuous casting casting billets, enhance the understanding of the knowledge graph structure, adapt to the diverse continuous casting relationship characteristics and task requirements, reduce the complexity of the model, improve interpretability and Adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917413A_ABST
    Figure CN118917413A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge graph reasoning method for defect causes of casting blanks aiming at different types of relationships, which classifies continuous casting relationships, and when the defect causes of the continuous casting blanks are reasoned, a model can more accurately identify and process different types of continuous casting relationships and more effectively distinguish various continuous casting relationship types, so that the accuracy of reasoning the defect causes of the continuous casting blanks is improved. And the understanding of the model on the continuous casting blank defect cause knowledge graph structure is enhanced. Classification processing can be carried out on subsequent continuous casting triple reasoning tasks, and the accuracy of continuous casting blank defect cause reasoning on the knowledge graph is improved. By adopting different reasoning methods, the continuous casting blank defect cause reasoning model can better adapt to diversified continuous casting relation characteristics and continuous casting blank defect cause reasoning tasks in the continuous casting field, a continuous casting blank defect cause knowledge graph structure is better processed, and the robustness of continuous casting blank defect cause reasoning and the generalization of the model are improved; and the complexity of a continuous casting blank defect cause reasoning model is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of knowledge graph reasoning of causes of defects in continuous steel casting, and relates to a knowledge graph reasoning method of causes of defects in casting billets for different types of relationships. Background Art

[0002] In the field of continuous steel casting, traditional methods mainly rely on manual experience and rules to infer the causes of steel casting quality defects. Practitioners in this field try to identify the possible causes of steel casting quality problems by observing and analyzing various factors in the production process. However, this traditional reasoning method is inefficient when dealing with large amounts of steel casting production data and complex relationships between data. It is difficult to fully grasp all potential causes of steel casting quality defects, and there are also some subjective factors caused by manual reasoning. These limitations restrict the optimization of the production process in the continuous casting field and the improvement of steel casting quality.

[0003] The introduction of knowledge graphs provides new possibilities for solving these problems in the field of continuous casting. By establishing a knowledge graph of the causes of continuous casting billet defects, researchers can systematically organize and represent the relationships between various continuous casting production factors and achieve effective management of complex data, which makes the reasoning process for the causes of cast steel quality defects more objective and comprehensive. By reasoning based on the knowledge graph of the causes of continuous casting billet defects, researchers can deeply explore the causes of cast steel quality defects, more accurately analyze the impact of different production process parameters on product quality, and provide guidance for optimization in the production process. At the same time, through in-depth research on the causes of cast steel quality defects, enterprises can promptly discover potential problems and take effective measures during the production process, thereby reducing scrap rates, improving product qualification rates, and improving overall production efficiency.

[0004] Generally, knowledge graph reasoning methods often use the same processing method to handle different types of relationship features. However, there are differences in the number of head and tail entities in the relationship in the knowledge graph, which leads to the problem of coexistence of good and bad reasoning accuracy of different types of relationships. In practical applications in the field of continuous casting, the reasoning of the causes of quality defects in ingots involves four types of continuous casting relationships in the continuous casting knowledge graph: 1-1, 1-N, N-1, and NN. Each type of continuous casting relationship has its own unique characteristics and reasoning mode. The head and tail continuous casting entities of each continuous casting relationship are unevenly distributed, so if a traditional single algorithm is used to uniformly process all continuous casting relationships, the reasoning accuracy of different types of continuous casting relationships will be unbalanced. Summary of the invention

[0005] The purpose of the present invention is to solve the problem that the existing knowledge graph reasoning methods in the prior art often use the same processing method to process different types of relationship features, resulting in unbalanced accuracy of reasoning for different types of continuous casting relationships, and to provide a knowledge graph reasoning method for the causes of casting defects for different types of relationships.

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

[0007] A method for reasoning about knowledge graphs of causes of casting defects for different types of relationships, comprising the following steps:

[0008] The triplet data in the existing knowledge graph of causes of continuous casting ingot defects is processed to obtain the number of continuous casting entities and the number of different continuous casting relationships, and the continuous casting relationships are classified to obtain the classification results of the continuous casting relationships;

[0009] The triple data in the existing knowledge graph of causes of continuous casting slab defects are converted into feature vectors and input into the attention network to obtain updated triple embedding vectors. The updated triple embedding vectors are concatenated into an embedding matrix and convolution operation is performed to obtain continuous casting triple feature mapping vectors.

[0010] Based on the triple data in the existing knowledge graph of causes of defects in continuous casting billets, negative samples of continuous casting triples are generated. Based on the triple data in the existing knowledge graph of causes of defects in continuous casting billets, negative samples of continuous casting triples, the number of continuous casting entities, the number of different continuous casting relationships, the classification results of continuous casting relationships and the feature mapping vector of continuous casting triples, the reasoning model of the knowledge graph of causes of continuous casting defects is constructed. The task requirements of the causes of defects in continuous casting billets to be inferred are used as the input of the reasoning model of the knowledge graph of causes of continuous casting defects. Different reasoning methods are selected for reasoning to obtain the reasoning accuracy of continuous casting triples.

[0011] Construct a scoring mechanism, score the reasoning accuracy of the continuous casting triples based on the scoring mechanism, and obtain the reasoning results.

[0012] A further improvement of the present invention is:

[0013] The classification of the continuous casting relationship includes: 1-1, 1-N, N-1 and NN.

[0014] The generating of the continuous casting triplet negative sample comprises:

[0015] Based on the triple data in the existing knowledge graph of causes of defects in continuous casting billets, for the continuous casting entity set, another continuous casting entity that is not equal to the current continuous casting entity to be replaced is randomly selected for replacement. Specifically, for 1-N types of continuous casting triples, the existing continuous casting head entity is replaced, and the continuous casting relationship and the continuous casting tail entity are retained to generate a 1-N type of continuous casting head entity negative sample;

[0016] Replace the existing continuous casting tail entity, retain the continuous casting relationship and the continuous casting head entity to generate a 1-N type of continuous casting tail entity negative sample;

[0017] Generate the head entity negative sample and tail entity negative sample for all continuous casting triples, and generate all negative sample sets It is a set of invalid continuous casting triples.

[0018] When reasoning, different reasoning methods are selected according to different categories of continuous casting relationships and different requirements of the causes of defects in the continuous casting billet to be inferred, and the modulus operation is performed according to the same scoring function. The larger the modulus of the vector, the higher the accuracy of the continuous casting entity obtained by reasoning.

[0019] The different inference methods include a connection operation layer of the ConvKB model and two capsule layers of the CapsE model.

[0020] The inference steps of the ConvKB model connection operation layer are:

[0021] For the 1-1, 1-N type continuous casting triple continuous casting head entity reasoning tasks and the 1-1, N-1 type continuous casting triple continuous casting tail entity reasoning tasks, their feature mapping vectors will be input into the connection operation layer and connected head to tail to form a continuous vector of the continuous casting triple.

[0022] The inference steps of the two capsule layers of the CapsE model are:

[0023] For N-1, NN type continuous casting triples continuous casting head entity reasoning tasks and 1-N, NN type continuous casting triples continuous casting tail entity reasoning tasks, their feature mapping vectors will be reconstructed into the corresponding first-layer capsule network, reconstructed into a 4×5 continuous casting matrix and routed to the second-layer capsule network;

[0024] In the second layer of capsule network, the squash function is used to compress the continuous casting matrix to obtain a continuous vector of continuous casting triples.

[0025] The inference steps of the two capsule layers of the CapsE model are:

[0026] For each capsule vector u of the first layer capsule network i , multiplied by a weight matrix W i , get the updated capsule vector

[0027]

[0028] Perform weighted summation on all capsule vectors, where the weight coefficient c iThe softmax result of the first layer of capsules is obtained, and the routing result s is obtained by weighted summation. The final continuous casting triple output vector e of this layer is obtained by squash function compression:

[0029]

[0030] Among them, s represents the routing result obtained by weighted summation.

[0031] A knowledge graph reasoning system for causes of casting defects targeting different types of relationships, including:

[0032] A data processing module is used to process the triple data in the existing knowledge graph of causes of continuous casting slab defects, obtain the number of continuous casting entities and the number of different continuous casting relationships, and classify the continuous casting relationships to obtain the classification results of the continuous casting relationships;

[0033] A data feature processing module is used to convert the triple data in the existing continuous casting slab defect cause knowledge graph into a feature vector and input it into the attention network to obtain an updated triple embedding vector, and then concatenate the updated triple embedding vector into an embedding matrix and perform a convolution operation to obtain a continuous casting triple feature mapping vector;

[0034] The reasoning module of triples is used to generate continuous casting triple negative samples based on the triple data in the existing knowledge graph of causes of continuous casting billet defects, and to build a reasoning model of the knowledge graph of causes of continuous casting defects based on the triple data in the existing knowledge graph of causes of continuous casting billet defects, the continuous casting triple negative samples, the number of continuous casting entities, the number of different continuous casting relationships, the classification results of continuous casting relationships, and the continuous casting triple feature mapping vectors. The task requirements of the causes of continuous casting billet defects to be inferred are used as the input of the reasoning model of the knowledge graph of causes of continuous casting defects, and different reasoning methods are selected for reasoning to obtain the reasoning accuracy of continuous casting triples.

[0035] The inference result acquisition module is used to build a scoring mechanism, score the inference accuracy of the continuous casting triples based on the scoring mechanism, and obtain the inference results.

[0036] A terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any method described in the present invention when executing the computer program.

[0037] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any method described in the present invention.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] The present invention discloses a knowledge graph reasoning method for causes of defects in billets of different types of relationships. First, the continuous casting relationship classification is classified. When reasoning about the causes of defects in continuous casting billets, the model can more accurately identify and process different types of continuous casting relationships, and can more effectively distinguish various types of continuous casting relationships, thereby enhancing the model's understanding of the knowledge graph structure of causes of defects in continuous casting billets. In the subsequent reasoning tasks of continuous casting triples, it can be classified and processed, and the accuracy of continuous casting slab defect cause reasoning on the knowledge graph is improved, and the problem that the existing knowledge graph reasoning method cannot balance the reasoning accuracy of all continuous casting relationships is solved. Through different relationship classifications and task requirements, different reasoning methods are adopted to enable the continuous casting slab defect cause reasoning model to better adapt to the diverse continuous casting relationship characteristics and continuous casting slab defect cause reasoning tasks in the continuous casting field, and can better handle the continuous casting slab defect cause knowledge graph structure, improve the robustness of continuous casting slab defect cause reasoning and the generalization of the model. This method reduces the complexity of the continuous casting slab defect cause reasoning model, improves the interpretability and adaptability of the model, and provides a better foundation for the application of the continuous casting slab defect cause reasoning method knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 It is the overall flow chart of the knowledge graph reasoning method for the causes of continuous casting slab defects for different types of relationships;

[0042] Figure 2 It is a graph of the number of continuous casting triples contained in each continuous casting relationship type;

[0043] Figure 3 It is a structural diagram of the graph neural network model;

[0044] Figure 4 It is a convolutional layer structure diagram of the knowledge graph reasoning model of the causes of continuous casting billet defects;

[0045] Figure 5 It is the reasoning layer structure diagram of the knowledge graph reasoning model of the causes of continuous casting billet defects. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0047] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0049] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0050] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0051] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0052] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0053] See also Figure 1 This embodiment discloses a method for reasoning a knowledge graph of causes of casting defects for different types of relationships. Different continuous casting triple reasoning methods are adopted for continuous casting relationships with different continuous casting entity distribution characteristics in the knowledge graph of causes of casting defects, so as to improve the generalization and accuracy of the reasoning model of causes of casting defects.

[0054] The present embodiment discloses a method for reasoning about the knowledge graph of causes of continuous casting slab defects for different types of relationships, comprising the following steps:

[0055] Firstly, the continuous casting triples (continuous casting head entity, continuous casting relationship, and continuous casting tail entity) in the knowledge graph of the causes of continuous casting billet defects are preprocessed, and the number of continuous casting entities and the number of different continuous casting relationships contained therein are counted, and the continuous casting relationships are classified according to the distribution of the head and tail continuous casting entities. Then, the continuous casting relationships and their adjacent continuous casting entity features are incorporated into the attention mechanism and input into the graph attention network to obtain the updated continuous casting head entity embedding vector, the continuous casting tail entity embedding vector, and the continuous casting relationship embedding vector. Then, these updated vectors are concatenated to obtain the continuous casting triple embedding matrix, and the convolutional neural network is used to perform convolution operations on the embedding matrix. Finally, according to the different continuous casting relationship types obtained by the previous classification and the needs of the continuous casting billet defect cause reasoning task, the continuous casting triple negative samples are generated, and the continuous casting triple feature mapping vectors obtained by convolution are processed by different reasoning algorithms. The reasoning accuracy of the continuous casting triples is obtained through the scoring function, and the evaluation results of the continuous casting billet defect cause reasoning model are output according to four evaluation indicators. Experimental verification shows that the continuous casting slab defect cause reasoning method proposed in the present invention has strong generalization and high accuracy.

[0056] Specifically include:

[0057] Step 1: pre-process the continuous casting triples (continuous casting head entity, continuous casting relationship, and continuous casting tail entity) in the knowledge graph of the causes of continuous casting ingot defects, count the number of continuous casting entities and the number of different continuous casting relationships contained therein, and classify the continuous casting relationships according to the distribution of the head and tail continuous casting entities.

[0058] Specific:

[0059] The specific method for preprocessing the continuous casting ternary is:

[0060] The number of different continuous casting head entities and continuous casting tail entities in the knowledge graph of causes of continuous casting billet defects was counted, and the number of different continuous casting relationships in the knowledge graph of causes of continuous casting billet defects was counted. The knowledge graph of causes of continuous casting billet defects contained 1192 continuous casting triples and 1144 continuous casting entities. The continuous casting relationships included 5 items, including "description, feature is, cause, lead, take", among which the "description" relationship contained 94 continuous casting triples, the "feature is" relationship contained 231 continuous casting triples, the "cause" relationship contained 445 triples, the "lead" relationship contained 259 continuous casting triples, and the "take" relationship contained 163 continuous casting triples, covering four types of 1-1, 1-N, N-1, and NN.

[0061] See also Figure 2 , the specific processing method for continuous casting relationship classification is:

[0062] Count the average number of continuous casting tail entities of each continuous casting head entity η t , and the average number of continuous casting head entities η of each continuous casting tail entity h For a continuous casting triple (h, r, t), when η h <1.5 and η t <1.5, the continuous casting relationship r is classified as 1-1 type; when η h <1.5 and η t ≥1.5, the continuous casting relationship r is classified as 1-N type; when η h ≥1.5 and η t <1.5, the continuous casting relationship r is classified as N-1 type; when η h ≥1.5 and η t When ≥1.5, the continuous casting relationship r is classified as NN type.

[0063] All continuous casting relationships are classified according to the corresponding frequencies of occurrence of the continuous casting head entity and the continuous casting tail entity. Through this step, when reasoning about the causes of continuous casting billet defects, the model can more accurately identify and process different types of continuous casting relationships, can more effectively distinguish various types of continuous casting relationships, and enhance the model's understanding of the knowledge graph structure of the causes of continuous casting billet defects. In the subsequent continuous casting triple reasoning tasks, classification processing can be performed to improve the accuracy of continuous casting billet defect reasoning on the knowledge graph, and solve the problem that the existing knowledge graph reasoning method cannot balance the reasoning accuracy of all continuous casting relationships.

[0064] Step 2: Incorporate the features of the continuous casting relationship and its adjacent continuous casting entities obtained in step 1 into the attention mechanism and input them into the graph attention network to obtain the updated continuous casting head entity embedding vector, continuous casting tail entity embedding vector and continuous casting relationship embedding vector, see Figure 3 .

[0065] Specifically:

[0066] For a specific continuous casting triple (η) denoted as (h, r, t) i ,r k ,e j ), the specific process of the graph attention network for obtaining the updated continuous casting head entity embedding vector, continuous casting tail entity embedding vector and continuous casting relationship embedding vector is as follows:

[0067] In order to obtain the continuous casting head entity i The updated embedding vector needs to be learned with e i The representation of each continuous casting triplet is related to the continuous casting triplet. i ,r k ,e j ) is obtained by performing linear transformation on the concatenation of the three feature vectors of the continuous casting head entity, the continuous casting tail entity and the continuous casting relationship, as shown in the following formula:

[0068]

[0069] Where: They are respectively the continuous casting head entity e i , continuous casting tail entity j And the continuous casting relationship k Embedded vector representation of ; It is a continuous casting triad The embedding vector representation of ; W1 is the linear transformation matrix.

[0070] Further, obtain the attention coefficient b of each continuous casting triple ijk , which represents the importance of each continuous casting triplet in the continuous casting billet defect reasoning task, b ijk Through a linear transformation and a nonlinear activation function, the obtained attention coefficient is normalized to obtain the normalized attention coefficient a ijk , as shown in the following formula:

[0071] b ijk =LeakyReLU(W2c ijk )

[0072]

[0073] Where: N i Represents all entities related to the continuous casting head e i A collection of adjacent continuous casting entities; R in Represents the set N i Each continuous casting entity n With continuous casting head entity i The set of continuous casting relations r.

[0074] Furthermore, after obtaining the normalized attention coefficient, the new continuous casting head entity embedding vector is weighted and calculated. The weighted calculation formula is as follows:

[0075]

[0076] In order to stabilize the learning process of the graph attention network model and obtain more information about the neighboring continuous casting entities, a multi-head attention mechanism is introduced for the weighted continuous casting head entity embedding vector, and the average method is used at the highest level of the graph attention network model to obtain the final continuous casting head entity embedding vector Get the continuous casting tail entity e j The updated embedding vector method is the same, using the multi-head attention mechanism and the average formula as follows:

[0077]

[0078] Step 3: concatenate the updated continuous casting head entity embedding vector, continuous casting tail entity embedding vector and continuous casting relationship embedding vector obtained in step 2 to obtain the continuous casting triple embedding matrix, and perform convolution operation on the continuous casting triple embedding matrix using a convolutional neural network, see Figure 4 .

[0079] Specifically:

[0080] The specific method for performing convolution operation on the continuous casting triple embedding matrix is:

[0081] The convolutional layer consists of τ = 5 filters, each filter size is 1 × 3, and the embedding dimension of each convolutional vector is k = 4. The embedding form (v h ,v r ,v t ) is considered as a k×3 continuous casting matrix A i Denotes the i-th row of the continuous casting matrix A. Referring to the transfer characteristics based on the transfer model, a filter ω of size 1×3 is set on the convolution layer, and this filter is used to study the embedded continuous casting triples (v h ,v r ,v t ) is the overall relationship between items of the same dimension. The filter ω repeats the operation on each row of the continuous casting matrix A, and finally generates a set of continuous casting triple feature maps As follows, where b∈R is the bias term and g is an activation function such as RELU:

[0082] v i =g(ω·A i,: +b)

[0083] Step 4: Generate negative samples of continuous casting triples according to the different continuous casting relationship types classified in step 1 and the needs of the continuous casting billet defect cause reasoning task, and use different reasoning algorithms to process the continuous casting triplet feature mapping vectors obtained by convolution in step 3. Finally, the reasoning accuracy of the continuous casting triplet is obtained by the scoring function.

[0084] Specifically, the specific method for generating continuous casting triplet negative samples is:

[0085] Use the set of continuous casting entities obtained in step 1, randomly select another continuous casting entity that is not equal to the current continuous casting entity to be replaced for replacement. For example, for 1-N types of continuous casting triples, replace its existing continuous casting head entity, retain the continuous casting relationship and continuous casting tail entity to generate a 1-N type of continuous casting head entity negative sample for 1-N types of continuous casting triples continuous casting head entity reasoning task training; at the same time, replace its existing continuous casting tail entity, retain the continuous casting relationship and continuous casting head entity to generate a 1-N type of continuous casting tail entity negative sample for 1-N types of continuous casting triples continuous casting tail entity reasoning task training. Generate head entity negative samples and tail entity negative samples for all continuous casting triples, and generate all negative sample sets It is a set of invalid continuous casting triples.

[0086] The continuous casting triplet feature mapping vector obtained by the convolutional layer in step 3 will be inferred using different reasoning algorithms according to the different categories of continuous casting relationships it contains and the different needs of the continuous casting billet defect cause reasoning task, see Figure 5 .

[0087] Specifically:

[0088] For the 1-1, 1-N type continuous casting triple continuous casting head entity reasoning tasks and the 1-1, N-1 type continuous casting triple continuous casting tail entity reasoning tasks, their feature mapping vectors will be input into the connection operation layer to obtain the continuous casting triple continuous vector. The specific connection operation is: the continuous casting triple feature mapping vectors are directly connected head to tail to form an output vector Where τ is the number of filters and k is the embedding dimension of the convolutional layer continuous casting vector.

[0089] For the N-1, NN type continuous casting triplet continuous casting head entity reasoning tasks and the 1-N, NN type continuous casting triplet continuous casting tail entity reasoning tasks, their feature mapping vectors will be reconstructed into the corresponding first-layer capsule network, reconstructed into a 4×5 continuous casting matrix and routed to the second-layer capsule network to compress with the squash function to produce a continuous vector of continuous casting triples.

[0090] The number of neurons in the first layer of capsule network is 5, and the number of neurons in the second layer of capsule network is 2. Specifically, k capsules are constructed in the first layer of capsule network, where entries of the same dimension from all continuous casting triple feature mapping vectors are encapsulated into the same capsule, so that each capsule can capture many features between entries of corresponding dimensions in the embedded continuous casting triple. These features are summarized again through the routing process and squash function compression and recorded in the capsules of the second layer of capsule network.

[0091] Furthermore, the routing process between the two layers of capsules is as follows: for each capsule vector u of the first layer of capsule network i , multiplied by a weight matrix W i , get the updated capsule vector As shown in the formula:

[0092]

[0093] Perform weighted summation on all capsule vectors, where the weight coefficient c i The softmax result of the first layer capsule is obtained. The routing result s is obtained by weighted summation, and the final continuous casting triple output vector e of this layer is obtained by squash function compression. The calculation formula is as follows:

[0094]

[0095] The output vector e of the continuous casting triplet obtained by the above two inference methods has a modulus length that is the inference accuracy of the continuous casting triplet, and the scoring function is:

[0096] f(h,r,t)=||e||

[0097] Where:

[0098]

[0099] The continuous casting slab defect cause inference model is trained by minimizing the loss function and optimized using the Adam optimizer. The loss function is as follows, where is the set of invalid casting triples, the valid set is damaged by step 4 The continuous casting head entity or continuous casting tail entity of the valid continuous casting triplet is generated:

[0100]

[0101] Where:

[0102]

[0103] The specific classification of continuous casting relations and the selection example of continuous casting triple reasoning method are shown in Table 1.

[0104] Table 1. Example of continuous casting relationship classification and continuous casting triple reasoning method selection

[0105]

[0106]

[0107] This embodiment combines two continuous casting triple reasoning ideas and makes improvements based on them, which is more suitable for the diversity of continuous casting relationships of knowledge graph triples in the continuous casting field. Specifically: the connection operation layer of the ConvKB model and the capsule layer of the CapsE model are combined to adopt flexible reasoning ideas for different types of continuous casting triples, and the reasoning process is refined, so that the continuous casting billet defect cause reasoning model can better adapt to the diverse continuous casting relationship characteristics and continuous casting billet defect cause reasoning tasks in the continuous casting field, and can better handle the knowledge graph structure of continuous casting billet defect causes, and improve the robustness of continuous casting billet defect cause reasoning and the generalization of the model.

[0108] Third, while integrating the two continuous casting triplet reasoning ideas, the present invention focuses on the overall consistency and simplicity of the continuous casting reasoning model: unifying the convolutional layer operations required for 1-end continuous casting entity reasoning and N-end continuous casting entity reasoning, and unifying the scoring function of continuous vectors of continuous casting triples, so that the two continuous casting triplet reasoning ideas have a consistent basic structure, reducing the complexity of the continuous casting billet defect cause reasoning model as much as possible, improving the interpretability and adaptability of the model, and providing a better foundation for the application of the continuous casting billet defect cause knowledge graph reasoning method.

[0109] Step 5: Output the evaluation results of the continuous casting slab defect cause reasoning model.

[0110] The reasoning results of each continuous casting triplet to be inferred are ranked respectively, and four evaluation indicators MR, MRR, HITS@1 and HITS@10 are used to evaluate the model reasoning results.

[0111] The definitions of each evaluation index are as follows:

[0112] MR refers to the average ranking of the correct triples obtained in each continuous casting triple reasoning prediction task among all reasoning results;

[0113] MRR refers to the mean of the reciprocal rankings of the correct triples obtained in each continuous casting triple inference prediction task among all inference results;

[0114] HITS@K refers to the average proportion of correct triples ranked less than K in the list of continuous casting triple inference prediction results. The evaluation index K of this model is 1 and 10.

[0115] This embodiment discloses a knowledge graph reasoning system for causes of casting defects for different types of relationships, including:

[0116] A data processing module is used to process the triple data in the existing knowledge graph of causes of continuous casting slab defects, obtain the number of continuous casting entities and the number of different continuous casting relationships, and classify the continuous casting relationships to obtain the classification results of the continuous casting relationships;

[0117] A data feature processing module is used to convert the triple data in the existing continuous casting slab defect cause knowledge graph into a feature vector and input it into the attention network to obtain an updated triple embedding vector, and then concatenate the updated triple embedding vector into an embedding matrix and perform a convolution operation to obtain a continuous casting triple feature mapping vector;

[0118] The reasoning module of triples is used to generate continuous casting triple negative samples based on the triple data in the existing knowledge graph of causes of continuous casting billet defects, and to build a reasoning model of the knowledge graph of causes of continuous casting defects based on the triple data in the existing knowledge graph of causes of continuous casting billet defects, the continuous casting triple negative samples, the number of continuous casting entities, the number of different continuous casting relationships, the classification results of continuous casting relationships, and the continuous casting triple feature mapping vectors. The task requirements of the causes of continuous casting billet defects to be inferred are used as the input of the reasoning model of the knowledge graph of causes of continuous casting defects, and different reasoning methods are selected for reasoning to obtain the reasoning accuracy of continuous casting triples.

[0119] The inference result acquisition module is used to build a scoring mechanism, score the inference accuracy of the continuous casting triples based on the scoring mechanism, and obtain the inference results.

[0120] A schematic diagram of a terminal device provided in an embodiment of the present invention. The terminal device of this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0121] The computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to accomplish the present invention.

[0122] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0123] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0124] The memory may be used to store the computer program and / or module, and the processor implements various functions of the terminal device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.

[0125] If the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0126] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A knowledge graph reasoning method for causes of casting defects for different types of relationships, characterized in that: The following steps are involved: The triplet data in the existing knowledge graph of causes of continuous casting ingot defects is processed to obtain the number of continuous casting entities and the number of different continuous casting relationships, and the continuous casting relationships are classified to obtain the classification results of the continuous casting relationships; The triple data in the existing knowledge graph of causes of continuous casting slab defects are converted into feature vectors and input into the attention network to obtain updated triple embedding vectors. The updated triple embedding vectors are concatenated into an embedding matrix and convolution operation is performed to obtain continuous casting triple feature mapping vectors. Based on the triple data in the existing knowledge graph of causes of defects in continuous casting billets, negative samples of continuous casting triples are generated. Based on the triple data in the existing knowledge graph of causes of defects in continuous casting billets, negative samples of continuous casting triples, the number of continuous casting entities, the number of different continuous casting relationships, the classification results of continuous casting relationships and the feature mapping vector of continuous casting triples, the reasoning model of the knowledge graph of causes of continuous casting defects is constructed. The task requirements of the causes of defects in continuous casting billets to be inferred are used as the input of the reasoning model of the knowledge graph of causes of continuous casting defects. Different reasoning methods are selected for reasoning to obtain the reasoning accuracy of continuous casting triples. Construct a scoring mechanism, score the reasoning accuracy of the continuous casting triples based on the scoring mechanism, and obtain the reasoning results.

2. The method for reasoning about the knowledge graph of causes of casting defects for different types of relationships according to claim 1 is characterized in that: The classification of continuous casting relationships includes: 1-1, 1-N, N-1 and NN.

3. The method for reasoning about the knowledge graph of causes of casting defects for different types of relationships according to claim 1 is characterized in that: The generating of the continuous casting triplet negative sample comprises: Based on the triple data in the existing knowledge graph of causes of defects in continuous casting billets, for the continuous casting entity set, another continuous casting entity that is not equal to the current continuous casting entity to be replaced is randomly selected for replacement. Specifically, for 1-N types of continuous casting triples, the existing continuous casting head entity is replaced, and the continuous casting relationship and the continuous casting tail entity are retained to generate a 1-N type of continuous casting head entity negative sample; Replace the existing continuous casting tail entity, retain the continuous casting relationship and the continuous casting head entity to generate a 1-N type of continuous casting tail entity negative sample; Generate the head entity negative sample and tail entity negative sample for all continuous casting triples, and generate all negative sample sets It is a set of invalid continuous casting triples.

4. The method for reasoning about the knowledge graph of causes of casting defects for different types of relationships according to claim 1 is characterized in that: When reasoning, different reasoning methods are selected according to different categories of continuous casting relationships and different requirements of the causes of defects in the continuous casting billet to be inferred, and the modulus operation is performed according to the same scoring function. The larger the modulus of the vector, the higher the accuracy of the continuous casting entity obtained by reasoning. The different inference methods include a connection operation layer of the ConvKB model and two capsule layers of the CapsE model.

5. The method for reasoning about the knowledge graph of causes of casting defects for different types of relationships according to claim 4 is characterized in that: The inference steps of the ConvKB model connection operation layer are: For the 1-1, 1-N type continuous casting triple continuous casting head entity reasoning tasks and the 1-1, N-1 type continuous casting triple continuous casting tail entity reasoning tasks, their feature mapping vectors will be input into the connection operation layer and connected head to tail to form a continuous vector of the continuous casting triple.

6. The method for reasoning about the knowledge graph of causes of casting defects for different types of relationships according to claim 5 is characterized in that: The inference steps of the two capsule layers of the CapsE model are: For N-1, NN type continuous casting triples continuous casting head entity reasoning tasks and 1-N, NN type continuous casting triples continuous casting tail entity reasoning tasks, their feature mapping vectors will be reconstructed into the corresponding first-layer capsule network, reconstructed into a 4×5 continuous casting matrix and routed to the second-layer capsule network; In the second layer of capsule network, the squash function is used to compress the continuous casting matrix to obtain a continuous vector of continuous casting triples.

7. The method for reasoning about the knowledge graph of causes of casting defects for different types of relationships according to claim 6 is characterized in that: The inference steps of the two capsule layers of the CapsE model are: For each capsule vector u of the first layer capsule network i , multiplied by a weight matrix W i , get the updated capsule vector Perform weighted summation on all capsule vectors, where the weight coefficient c i The softmax result of the first layer of capsules is obtained, and the routing result s is obtained by weighted summation. The final continuous casting triple output vector e of this layer is obtained by squash function compression: Among them, s represents the routing result obtained by weighted summation.

8. A knowledge graph reasoning system for causes of casting defects for different types of relationships, characterized in that: include: A data processing module is used to process the triple data in the existing knowledge graph of causes of continuous casting slab defects, obtain the number of continuous casting entities and the number of different continuous casting relationships, and classify the continuous casting relationships to obtain the classification results of the continuous casting relationships; A data feature processing module is used to convert the triple data in the existing continuous casting slab defect cause knowledge graph into a feature vector and input it into the attention network to obtain an updated triple embedding vector, and then concatenate the updated triple embedding vector into an embedding matrix and perform a convolution operation to obtain a continuous casting triple feature mapping vector; The reasoning module of triples is used to generate continuous casting triple negative samples based on the triple data in the existing knowledge graph of causes of continuous casting billet defects, and to build a reasoning model of the knowledge graph of causes of continuous casting defects based on the triple data in the existing knowledge graph of causes of continuous casting billet defects, the continuous casting triple negative samples, the number of continuous casting entities, the number of different continuous casting relationships, the classification results of continuous casting relationships, and the continuous casting triple feature mapping vectors. The task requirements of the causes of continuous casting billet defects to be inferred are used as the input of the reasoning model of the knowledge graph of causes of continuous casting defects, and different reasoning methods are selected for reasoning to obtain the reasoning accuracy of continuous casting triples. The inference result acquisition module is used to build a scoring mechanism, score the inference accuracy of the continuous casting triples based on the scoring mechanism, and obtain the inference results.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Knowledge graph representation learning method through combination of entity hierarchy category

    CN107423820A

  • Knowledge reasoning method and system of knowledge graph based on meta-knowledge and medium

    CN111260064A

  • Multi-source heterogeneous knowledge graph collaborative reasoning method and device based on entity alignment

    CN112818137A

  • Knowledge graph automatic construction method and system for steel and iron manufacturing enterprise

    CN113868432A

  • Fault diagnosis method and device based on mixed knowledge graph reasoning and storage medium

    CN116561302A