Equipment knowledge graph internal link relationship completion method

By combining a translation model and an improved graph attention network model with a multi-dimensional adaptive convolutional decoder, the problem of poor relationship completion in the equipment knowledge graph is solved, achieving richer relationship representation and more efficient knowledge graph application.

CN119557452BActive Publication Date: 2025-10-10CHINESE PEOPLES LIBERATION ARMY UNIT 93209
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411294959.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-10-10
Estimated Expiration
2044-09-14

AI Technical Summary

Technical Problem

Existing methods for completing internal link relationships in equipment knowledge graphs ignore the rich semantic information around instance nodes, resulting in poor connection relationship completion effects.

Method used

The translation model is used to initialize instance and relation embeddings, combined with an improved graph attention network model and a multi-dimensional adaptive convolutional decoder, to complete the relations by calculating the scores of each pair of feature matrices under different relations.

Benefits of technology

The number and types of relationship triplets in the equipment knowledge graph have been increased, the application value of the knowledge graph has been enhanced, and the effects of applications such as search and question-answering have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557452B_ABST
    Figure CN119557452B_ABST
Patent Text Reader

Abstract

The disclosure provides an equipment knowledge graph internal link relationship completion method, which comprises: obtaining an instance embedding initialization matrix, a relationship embedding initialization matrix and an attribute embedding initialization matrix; obtaining a first layer instance embedding optimization matrix; obtaining a second layer instance embedding optimization matrix; fusing the second layer instance embedding optimization matrix and the instance embedding initialization matrix to obtain an instance embedding fusion matrix; constructing an encoder to train the instance embedding fusion matrix and the relationship embedding matrix to obtain a final instance embedding matrix and a relationship embedding matrix; and constructing a multi-dimensional adaptive convolution decoder, inputting an instance attribute embedding feature matrix of a to-be-completed relationship into the decoder, calculating the score of each pair of feature matrices under different relationships through the decoder, and obtaining the relationship corresponding to the highest score as the final completed relationship of the input instance pair.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a method for completing the internal link relationship of an equipment knowledge graph, and in particular to a method for completing the internal link relationship of an equipment knowledge graph based on an attention mechanism. Background Art

[0002] The knowledge triples in the knowledge graph can be divided into type triples, attribute triples, and relationship triples. The relationships in the relationship triples are the key elements that connect different instance nodes in the knowledge graph and are the main feature that distinguishes the knowledge graph from other data representation structures.

[0003] Knowledge graphs represent network-like data structures, where relationships logically connect different instance nodes. From a semantic perspective, relationships transform one type of node into another; from a logical perspective, relationships reflect real-world understanding of the connections between different things. Therefore, the richness of relationship information in a knowledge graph directly impacts the effectiveness of applications like knowledge graph search and question-answering. It can be said that the number and types of relationship triples in a knowledge graph determine its ultimate application value.

[0004] In an equipment knowledge graph built around open source data, the types of relationship information can be well-preserved. However, due to issues such as a lack of focus on basic knowledge and a scarcity of rare knowledge, it's difficult to guarantee the number of relationship triplets for some types of relationships from open source data. Therefore, it's necessary to utilize existing internal knowledge through link relationship completion to enhance the content of the equipment knowledge graph and improve its application value.

[0005] Traditional methods for completing instance link relationships within knowledge graphs mainly utilize the relationship triple knowledge in the knowledge graph and process each set of relationship triple information as an independent triple. This type of processing is simple and efficient, but it ignores the rich semantic information around the instance nodes to a certain extent, resulting in poor connection relationship completion effects. Summary of the Invention

[0006] In order to solve one of the above technical problems, the present disclosure provides a method for completing the internal link relationship of an equipment knowledge graph.

[0007] According to one aspect of the present disclosure, a method for completing internal link relationships in an equipment knowledge graph is provided, comprising:

[0008] Use the translation model to process the instance relationship triples and instance attribute triples of the equipment knowledge graph to obtain the instance embedding initialization matrix, the relationship embedding initialization matrix, and the attribute embedding initialization matrix;

[0009] Use the improved first-layer graph attention network model to process the instance embedding initialization matrix and the relation embedding initialization matrix to obtain the first-layer instance embedding optimization matrix;

[0010] The first-layer instance embedding optimization matrix and the relationship embedding matrix are processed by the improved second-layer graph attention network model to obtain the second-layer instance embedding optimization matrix;

[0011] Fuse the second-layer instance embedding optimization matrix with the instance embedding initialization matrix to obtain the instance embedding fusion matrix;

[0012] Construct an encoder to train the instance embedding fusion matrix and the relation embedding matrix to obtain the final instance embedding matrix and the relation embedding matrix; and

[0013] A multi-dimensional adaptive convolutional decoder is constructed, and the instance attribute embedding feature matrix of the relationship to be completed is input into the decoder. The decoder calculates the score of each pair of feature matrices under different relationships, and obtains the relationship corresponding to the highest score as the final completion relationship of the input instance pair.

[0014] According to the method for completing the internal link relationship of the equipment knowledge graph of at least one embodiment of the present disclosure, the improved first-layer graph attention network model and the improved second-layer graph attention network model are relationship-based graph attention network models.

[0015] According to the method for completing the internal link relationship of the equipment knowledge graph according to at least one embodiment of the present disclosure, the relationship-based graph attention network model inputs the instance embedding initialization matrix in the first layer of the graph attention network model and relation embedding initialization matrix

[0016] For instance relation triples (e i ,r k ,e j )'s initial embedding information The splicing is performed and the linear transformation matrix M1 is used to process the splicing result to obtain a new embedding vector. The formula is shown in formula (3):

[0017]

[0018] in, Represents a triple (e i ,r k ,e j ) is the embedded vector after M1 processing, || represents the concatenation operation, Represents instance e i The initial embedding vector of Represents instance e j The initial embedding vector of Represents the relationship r k The initial embedding vector of

[0019] Then use another linear transformation matrix M2 to transform the new embedding vector Convert and use LeakyReLU function to calculate the current triplet (e i ,r k ,e j )’s attention value, the calculation formula is shown in formula (4):

[0020]

[0021] Finally, the calculation results are normalized using the softmax function, as shown in formula (5):

[0022]

[0023] Among them, N i is an instance of i The set of all adjacent instance nodes, R in Represents a link instance e i and instance e n The set of all relations of

[0024] After obtaining the instance node e i The attention information of each relation triplet is applied to the instance node e i The embedding representation of is updated, and the formula for updating the embedding representation is shown in formula (6):

[0025]

[0026] Where σ1 represents an arbitrary nonlinear function.

[0027] The multi-head attention mechanism is used to average the learned domain information; for the first-layer graph attention network model, the calculated multi-head attention results are integrated by splicing to obtain the first-layer instance embedding optimization matrix Among them, H′ represents the matrix composed of all instance embedding information after optimization, N e is the number of instances, T′ represents the dimension after instance embedding optimization, and the calculation formula for each instance embedding information is shown in formula (7):

[0028]

[0029] Here, Z represents the set of attention heads and |Z| represents the number of attention heads.

[0030] According to the method for completing the internal link relationship of the equipment knowledge graph of at least one embodiment of the present disclosure, the fully connected layer is used to transform the relationship embedding matrix. The transformation formula is shown in formula (8):

[0031] G′=GM R (8)

[0032] Among them, G represents the relationship embedding matrix, represents the transformation matrix corresponding to the fully connected layer, and P′ represents the dimension of the transformed relation embedding.

[0033] According to the method for completing the internal link relationship of the equipment knowledge graph according to at least one embodiment of the present disclosure, the first layer instance output by the first layer graph attention network model is embedded in the optimization matrix The converted relation embedding matrix G′ is input into the second-layer graph attention network model to obtain the second-layer instance embedding optimization matrix.

[0034] According to the method for completing the internal link relationship of the equipment knowledge graph in at least one embodiment of the present disclosure, the fusion matrix H″=H i +H f =M E H t +H f (10)

[0035] Among them, H t represents the initial instance embedding matrix, H i represents the transformed instance embedding matrix, represents the transformation matrix, T i represents the dimension of the initial instance embedding vector, T f represents the dimension of the final instance embedding vector, Represents the instance embedding matrix output by the second-layer graph attention network model, N e Indicates the number of instances. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0037] Figure 1 It is a flowchart of a method for completing internal link relationships in an equipment knowledge graph according to an embodiment of the present disclosure.

[0038] Figure 2 It is an architectural diagram of a model of a method for completing internal connection relationships in an assembly knowledge graph according to an embodiment of the present disclosure.

[0039] Figure 3 This is an architecture diagram of a single-head attention mechanism for a relation-based graph attention network model according to one embodiment of the present disclosure.

[0040] Figure 4 It is an architectural diagram of a multi-dimensional adaptive convolutional network model according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0041] The present disclosure will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only intended to explain the relevant content and are not intended to limit the present disclosure. It should also be noted that, for ease of description, only the portions relevant to the present disclosure are shown in the accompanying drawings.

[0042] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0043] Unless otherwise stated, the exemplary embodiments / examples shown are to be understood as providing exemplary features of various details of some ways in which the technical concepts of the present disclosure can be implemented in practice. Therefore, unless otherwise stated, the features of the various embodiments / examples may be further combined, separated, interchanged, and / or rearranged without departing from the technical concepts of the present disclosure.

[0044] The use of cross hatching and / or shading in the accompanying drawings is generally used to make the boundaries between adjacent components clear. As such, unless otherwise indicated, the presence or absence of cross hatching or shading does not convey or indicate any preference or requirement for the specific materials, material properties, dimensions, proportions, commonalities between the components shown, and / or any other characteristics, attributes, properties, etc. of the components. In addition, in the accompanying drawings, the sizes and relative sizes of the components may be exaggerated for clarity and / or descriptive purposes. When the exemplary embodiments can be implemented differently, the specific process sequence can be performed in a different order than described. For example, two successively described processes can be performed substantially simultaneously or in an order opposite to the order described. In addition, the same figure numbers represent the same components.

[0045] When a component is referred to as being “on,” “over,” “connected to,” or “coupled to” another component, the component may be directly on, directly connected to, or directly coupled to the other component, or intervening components may be present. However, when a component is referred to as being “directly on,” “directly connected to,” or “directly coupled to” another component, there are no intervening components present. For this purpose, the term “connected” may refer to a physical connection, an electrical connection, etc., with or without intervening components.

[0046] For descriptive purposes, the present disclosure may use spatially relative terms such as "below," "beneath," "under," "down," "above," "upper," "above," "higher," and "side (e.g., as in "sidewall")," to describe the relationship of one component to another (other) component as shown in the accompanying drawings. The spatially relative terms are intended to encompass different orientations of the device in use, operation, and / or manufacture in addition to the orientation depicted in the accompanying drawings. For example, if the device in the drawings is turned over, a component described as "below" or "beneath" another component or feature would then be positioned "above" the other component or feature. Thus, the exemplary term "below" can encompass both the "above" and "below" orientations. Furthermore, the device may be otherwise oriented (e.g., rotated 90 degrees or at other orientations), and as such, the spatially relative descriptors used herein should be interpreted accordingly.

[0047] The terms used herein are for the purpose of describing specific embodiments and are not intended to be restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, the features, integral bodies, steps, operations, parts, assemblies and / or their groups stated are explained, but the presence or addition of one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups is not excluded. It should also be noted that, as used herein, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values ​​and / or the values ​​provided that will be recognized by those of ordinary skill in the art.

[0048] Figure 1 It is a structural diagram of a method for completing internal link relationships in an equipment knowledge graph according to an embodiment of the present disclosure.

[0049] The present disclosure provides a method for completing internal link relationships in an equipment knowledge graph, which includes: using a translation model to process instance relationship triple information and instance attribute triple information of an equipment knowledge graph to obtain an instance embedding initialization matrix, a relationship embedding initialization matrix, and an attribute embedding initialization matrix; using an improved first-layer graph attention network model to process the instance embedding initialization matrix and the relationship embedding initialization matrix to obtain a first-layer instance embedding optimization matrix; processing the first-layer instance embedding optimization matrix and the relationship embedding matrix through an improved second-layer graph attention network model to obtain a second-layer instance embedding optimization matrix; fusing the second-layer instance embedding optimization matrix with the instance embedding initialization matrix to obtain an instance embedding fusion matrix; constructing an encoder to train the instance embedding fusion matrix and the relationship embedding matrix to obtain a final instance embedding matrix and a relationship embedding matrix; and constructing a multi-dimensional adaptive convolutional decoder, and inputting the instance attribute embedding feature matrix of the relationship to be completed into the decoder, calculating the score of each pair of feature matrices under different relationships through the decoder, and obtaining the relationship corresponding to the highest score as the final completion relationship of the input instance pair.

[0050] Figure 2 It is an architectural diagram of a model of a method for completing internal connection relationships in an assembly knowledge graph according to an embodiment of the present disclosure.

[0051] In this disclosure, a translation model (TransE model) is first used to initialize instance embedding, relationship embedding, and attribute embedding in the equipment knowledge graph, providing an initial embedding vector for subsequent acquisition of a deeper embedding representation.

[0052] Specifically, the translation model is used to train the instance relationship triple information. The basic idea of ​​the translation model is based on the translation invariance of independent knowledge triples. The score function of the translation model is shown in formula (1):

[0053]

[0054] Among them, e represents the embedding of the head instance, r represents the embedding of the relation, Represents the embedding of the tail instance.

[0055] Thus, the instance embedding initialization matrix can be obtained and relation embedding initialization matrix Among them, H represents the matrix composed of all instance embedding information, N e is the number of instances, T represents the dimension of instance embedding, G represents the matrix composed of all relationship embedding information, N r is the number of relations, and P represents the dimension of relation embedding. The instance embedding initialization matrix and the relation embedding initialization matrix can be used as initialization input for subsequently obtaining semantic information around the target instance node.

[0056] Similarly, the instance-based and attribute-based translation model (EPRTP model) is used to learn attribute embedding representation. This model introduces attribute information based on the TransE model. The score function of the EPRTP model is shown in formula (2):

[0057]

[0058] Among them, e represents the embedding of head instance e, r represents the embedding of relation r, Represents the tail instance Embedded, represents the embedding of the i-th attribute name related to instance e in the instance space, W e ∈W represents the set of all attribute names related to instance e, |W e | represents the number of attribute names in the attribute name set related to instance e, Indicates an instance in the instance space The embedding of the relevant j-th attribute name, Representation instance The collection of all related attribute names, Representation instance The number of attribute names in the relevant attribute name set. W represents the set of all attribute names in the instance space.

[0059] Thus, the attribute embedding initialization matrix can be obtained Among them, K represents the matrix composed of all attribute embedding information, N P is the number of attributes, and Q represents the dimension of attribute embedding. This attribute embedding matrix can be used to subsequently construct attribute filters in the multi-dimensional adaptive convolutional decoder.

[0060] In the present disclosure, the improved first-layer attention model and the improved second-layer attention model are the same model. For example, both models can be a relation-based graph attention network model (RGAT model).

[0061] Figure 3 This is an architecture diagram of a single-head attention mechanism for a relation-based graph attention network model according to one embodiment of the present disclosure.

[0062] The relation-based graph attention network model inputs the instance embedding initialization matrix in the first layer of the graph attention network model. and relation embedding initialization matrix

[0063] In order to obtain new instance embedding information, the instance embedding information and relation embedding information are processed through the attention mechanism.

[0064] First, for the instance relation triple (ei ,r k ,e j )'s initial embedding information The splicing is performed and the linear transformation matrix M1 is used to process the splicing result to obtain a new embedding vector. The formula is shown in formula (3):

[0065]

[0066] in, Represents a triple (e i ,r k ,e j ) is the embedded vector after M1 processing, || represents the concatenation operation, Represents instance e i The initial embedding vector of Represents instance e j The initial embedding vector of Represents the relationship r k The initial embedding vector of .

[0067] Then another linear transformation matrix M2 is used to transform the new embedding vector Convert and use LeakyReLU function to calculate the current triplet (e i ,r k ,e j )’s attention value, the calculation formula is shown in formula (4):

[0068]

[0069] Finally, the calculation results are normalized using the softmax function, as shown in formula (5):

[0070]

[0071] Among them, N i is an instance of i The set of all adjacent instance nodes, R in Represents a link instance e i and instance e n The set of all relations.

[0072] Therefore, after obtaining the instance node e i The attention information of each relation triple can be used to analyze the instance node e i The embedding representation of is updated, and the formula for updating the embedding representation is shown in formula (6):

[0073]

[0074] Where σ1 represents an arbitrary nonlinear function.

[0075] In order to obtain a more balanced instance embedding representation and encapsulate more adjacency information, a multi-head attention mechanism is used to average the learned domain information to obtain stable learning results.

[0076] After the optimization of the multi-head attention mechanism, the instance node e i A more accurate embedding representation can be obtained. For the first-layer graph attention network model, the calculated multi-head attention results are integrated by splicing to obtain the first-layer instance embedding optimization matrix Among them, H′ represents the matrix composed of all instance embedding information after optimization, N e is the number of instances, T′ represents the dimension after instance embedding optimization, and the calculation formula for each instance embedding information is shown in formula (7):

[0077]

[0078] Here, Z represents the set of attention heads and |Z| represents the number of attention heads.

[0079] Since the dimension of the instance embedding vector changes after splicing, in order to train the second-layer graph attention network model, it is necessary to use the fully connected layer to transform the relation embedding matrix. The transformation formula is shown in formula (8):

[0080] G′=GM R (8)

[0081] Among them, G represents the relationship embedding matrix, represents the transformation matrix corresponding to the fully connected layer, and P′ represents the dimension of the transformed relation embedding.

[0082] Embed the first-layer instance output by the first-layer graph attention network model into the optimization matrix The transformed relation embedding matrix G′ is input into the second-layer graph attention network model. The single-head graph attention mechanism of the second-layer graph attention network model is consistent with that of the first-layer graph attention network model. However, in order to reduce the dimension of the final embedding vector, the instance embedding information is optimized by averaging the multi-head attention results in the second-layer graph attention network model. The optimization method is shown in formula (9):

[0083]

[0084] After the instance embedding information is learned by the multi-head attention model, a large amount of semantic information around the instance node will be retained, thereby obtaining the second-layer instance embedding optimization matrix H f .

[0085] Considering that after processing through the first-layer graph attention network model and the second-layer graph attention model, the final embedding representation result will lose the initial embedding information of the instance node itself, therefore, it is necessary to optimize the second-layer instance embedding matrix H f and the instance embedding matrix.

[0086] That is, in this disclosure, the initial embedding of the model is merged into the final attention learning result, and the formula for the merged embedding result (i.e., the fusion matrix) is shown in formula (10):

[0087] H″=H i +H f =M E H t +H f (10)

[0088] Among them, H t represents the initial instance embedding matrix, H i represents the transformed instance embedding matrix, represents the transformation matrix, T i represents the dimension of the initial instance embedding vector, T f represents the dimension of the final instance embedding vector, Represents the instance embedding matrix output by the second-layer graph attention network model, N e Indicates the number of instances.

[0089] After the multi-layer graph attention network model, the final optimized instance embedding matrix H″ (i.e., fusion matrix) and relation embedding matrix G′ will be obtained, and the final optimized instance embedding matrix H″ (i.e., fusion matrix) and relation embedding matrix G′ will be used as input for decoder training.

[0090] In this disclosure, the encoder is trained by fusion matrix to obtain the final instance embedding vector and relation embedding vector.

[0091] The encoder is trained using negative sampling to obtain the final instance embedding vector and relation embedding vector. The score function used is shown in formula (11), and the loss function used is shown in formulas (11) and (12):

[0092] S gat (h i ,g k ,h j )=||h i +g k -h j || l2 (11)

[0093]

[0094] Where γ3 represents the margin hyperparameter, Y represents the set of instance-relation triples in the training set, and Y′ is the set of negative samples of instance-relation triples. The set Y′ contains the following content:

[0095] Y′={(e i ′,r k ,e j )|(e i ,r k ,e j )∈D,e i ′∈ε,e i ′≠e i}

[0096] ∪{(e i ,r k ,e j ′)|(e i ,r k ,e j )∈D,e j ′∈ε,e j ′≠e j} (13)

[0097] Through encoding training, we can obtain instance embedding information, attribute embedding information and relationship embedding information in the equipment knowledge graph. In the decoding part, a multi-dimensional adaptive convolutional network model is used to fuse the features in the embedded information learned above.

[0098] Since the model constructs the corresponding convolution kernel through attribute embedding and relation embedding, it is referred to as ConvPR model. The architecture of the model is as follows Figure 4 shown.

[0099] Set the instance embedding vector of the instance of the relation to be completed where d e is the dimension of instance embedding vector, relation embedding vector where d r is the dimension of the relation embedding vector, and the attribute embedding vector is calculated as shown in formula (14):

[0100]

[0101] Where P is the set of attribute embedding vectors related to instance e, |P| is the number of vectors in the attribute embedding vector set, and d p is the dimension of the attribute embedding vector.

[0102] The multi-dimensional adaptive convolutional network model first embeds the vector according to the attribute Constructing attribute convolution kernel Where x and y represent the length and width of each attribute convolution kernel, and the number of attribute convolution kernels b = d p / (xy), while embedding the instance into the vector Reorganize into instance embedding matrix in and Represents the length and width of the instance embedding matrix. Through the attribute convolution kernel Get the instance attribute embedding matrix The calculation method of each matrix unit in is shown in formula (15):

[0103]

[0104] in, Represents the instance attribute embedding matrix B (l) The value at (m,n), f(·) represents the ReLU function, e m+i-1,n+j-1 Represents the instance embedding matrix The value at (m+i-1,n+j-1) in Represents attribute convolution kernel The value at (i,j) in .

[0105] Then embed the vector according to the relationship Constructing relational convolution kernel Where h and w represent the length and width of each convolution kernel, and the number of convolution kernels c = d r / (hw). Through the relational convolution kernel Obtained instance attribute relationship embedding matrix The calculation method of each matrix unit is shown in formula (16):

[0106]

[0107] in, Represents the instance attribute relationship embedding matrix C (l) The value at (m,n), f(·) represents the ReLU function, b m+i-1,n+j-1 Represents the instance attribute embedding matrix B (l) The value at (m+i-1,n+j-1) in Representing the relational convolution kernel The value at (i,j) in .

[0108] For the obtained head instance attribute relation tuple (e s ,P es ,r k )’s final feature matrix Convert it into a feature vector by expanding and concatenating rows Finally, embed the vector with another instance Perform matrix multiplication to obtain the scores of all predicted tail instances. The score function is shown in Equation (17):

[0109]

[0110] in, Represents the header instance e s With the tail instance e o In the attribute set P es And the relationship is r k The score in this case, f(·) represents the ReLU function, and Represents the parameters corresponding to the fully connected layer.

[0111] The relationship with the highest score is obtained as the final completion relationship of the input instance pair.

[0112] In order to perform decoding training, the sigmoid function σ(x) = 1 / (1+e -x ), the cross entropy loss function is used for training. The loss function formula is shown in formula (18):

[0113]

[0114] Where N represents the set of all instances, |N| represents the number of instances in the instance set, If (s,P,r,o) is a correct instance attribute relation tuple, then otherwise,

[0115] The following describes the method for completing the internal link relationship of the equipment knowledge graph disclosed in the present invention in conjunction with specific embodiments.

[0116] The equipment knowledge graph data mainly comes from encyclopedia knowledge and media information within the scope of Internet open source data. The collection scale of each original data is shown in Table 1.

[0117] Table 1. Raw data collection scale

[0118]

[0119] Among them, encyclopedia web pages with high equipment knowledge content account for 34.1% of the original data web pages, mainly providing common basic equipment knowledge triple information; while media web pages, which account for 65.9% of the original data web pages, mainly provide the latest and rare equipment knowledge triple information.

[0120] According to the nature and positioning of the equipment knowledge graph, a total of 117,185 equipment-related triplet data were extracted from the collected 67,747 web pages. The statistical results of each dimension of the dataset are shown in Table 2.

[0121] Table 2 Statistics of equipment knowledge graph data

[0122]

[0123] The equipment knowledge graph data is split into training set, validation set and test set. The statistical results of each data set are shown in Table 3.

[0124] Table 3 Data statistics of the data set

[0125]

[0126] The equipment knowledge graph data used in this study, as well as the data in the subsequent training, validation, and test sets, do not contain bidirectional relationships. However, these datasets all contain "one-to-many" and "many-to-one" relationships. Table 4 shows the number of "one-to-many" and "many-to-one" relationships in each dataset.

[0127] Table 4 Statistics of the number of complex relationships in the dataset

[0128]

[0129] This paper uses indicators commonly used in the field of knowledge graph completion to evaluate model performance, namely MRR and HITS@n.

[0130] (1)MRR

[0131] The full name of MRR is Mean Reciprocal Ranking, which means the average of the last ranking. This evaluation indicator uses the last ranking for evaluation. Its calculation formula is shown in formula (19):

[0132]

[0133] Among them, S represents the triple set, |S| represents the number of triples in the triple set, and rank i Represents the completion prediction ranking of the i-th triple. From this formula, we can see that the larger the MRR index, the higher the rank i The better the completion effect of the representative model.

[0134] (2)HITS@n

[0135] HITS@n refers to the proportion of correct answers ranked in the top n triples in the completion prediction, and its calculation formula is shown in formula (20):

[0136]

[0137] Among them, S, |S| and their meanings are consistent with those in the MRR indicator, and Ⅱ represents the indicator function, which is calculated as follows: i If HITS@n is less than or equal to n, the result is 1; otherwise, it is 0. As can be seen from this calculation method, the larger the HITS@n index, the better the model's completion effect. This study uses HITS@1, HITS@3, and HITS@10 for experimental evaluation of this evaluation metric.

[0138] The hyperparameter settings during the experiment of the equipment knowledge graph internal link relationship completion model are shown in Table 5.

[0139] Table 5 Description of hyperparameter values ​​for the equipment knowledge graph internal link relationship completion model

[0140]

[0141] In order to verify the effectiveness and advancement of the attention-based internal link relationship completion method for equipment knowledge graphs proposed in this paper, two groups of implementations were set up for comparative explanation from different perspectives. The first group of experiments compared the completion effect of the internal link relationship completion model proposed in this paper (RGAT-ConvPR model) with the mainstream link relationship completion model in recent years on the equipment knowledge graph. The superiority of this method in completing the internal link relationship of equipment knowledge graphs will be explained by analyzing the experimental results. The second group of experiments, based on the experiments of the KBGAT model, respectively tested a model combined with an adaptive convolutional network (RGAT-ConvR model), a model that incorporates attribute embedding information (RGAT-ConvKBP model), and a comprehensive model including the above two components (RGAT-ConvPR model).

[0142] (1) Comparison of the RGAT-ConvPR model and mainstream link relationship completion models

[0143] Based on equipment knowledge graph data, experiments were conducted on mainstream knowledge graph internal link relationship completion models from recent years and the RGAT-ConvPR model proposed in this paper. The ConvE model, ConvKB model, R-GCN model, ConvR model, KG-BERT model, GenKGC model, and SimKGC model were compared. The characteristics of each model are shown in Table 6. By comparing the experimental results and analyzing the processing characteristics of the models, the advantages of the RGAT-ConvPR model in the task of completing internal link relationships in the equipment knowledge graph are demonstrated. The experimental results are shown in Table 7.

[0144] Table 6 Characteristics of mainstream link relationship completion models

[0145]

[0146] Table 7 Performance comparison of mainstream models and RGAT-ConvPR model

[0147]

[0148] The experimental comparison results in Table 7 show that in the field of internal link relationship completion in the equipment knowledge graph, the RGAT-ConvPR model proposed in this paper outperforms the mainstream link relationship completion models compared in this paper in terms of MRR, HITS@1, HITS@3, and HITS@10 indicators, improving by approximately 1.13%, 2.33%, 2.93%, and 3.04% respectively.

[0149] Among them, by analyzing the experimental results of the ConvE model, ConvKB model, R-GCN model and ConvR model in Table 7, it can be seen that in the field of equipment knowledge graph completion, the traditional convolutional neural network-based model can capture the embedded semantic information of equipment instance triples to a certain extent. At the same time, in the above models, as the global interaction between instance embedding and relationship embedding gradually deepens, the final completion effect of the model also gradually improves. However, due to the number and sparsity of relationship triplets in the equipment knowledge graph, this type of model mainly based on convolutional neural networks is difficult to achieve a good completion effect.

[0150] According to the experimental results of the KG-BERT model in Table 7, it can be seen that using the pre-trained language model to encode the instance-relationship triples in the equipment knowledge graph and perform predictions can achieve better completion effects. Since the pre-trained language model encoding can obtain semantic information beyond the traditional relational structure, and the instance-relationship triple information in the equipment knowledge graph is closer to the real semantic scene, the semantic embedding information obtained by using the pre-trained language model can better reflect the characteristics of the corresponding knowledge. Therefore, the final completion effect is higher than that of the ConvE, ConvKB, R-GCN, and ConvR models based only on convolutional neural networks.

[0151] The experimental results of the GenKGC model in Table 7 show that by converting the completion task into a generation task to reduce the triple scoring cost, the problem of reduced completion effect caused by training instability due to negative samples can be greatly reduced. At the same time, the introduced relationship-guided examples and instance-aware hierarchical decoding strategies can not only help obtain better knowledge embedding representations but also speed up reasoning and completion. Therefore, the completion effect of this model is better than the more basic KG-BERT pre-trained language model.

[0152] The experimental results of the SimKGC model in Table 7 show that effective contrastive learning can further help improve the completion effect. Based on the pre-trained model, this model introduces three negative sampling strategies: intra-batch negative sampling, pre-batch negative sampling, and self-negative sampling. It also uses a dual-encoder model to learn the instance relationship embedding representation in the equipment knowledge graph, improving learning efficiency while obtaining more semantic information. As a result, the completion effect is also better than the more basic KG-BERT pre-trained language model.

[0153] The RGAT-ConvPR model proposed in this paper incorporates instance relationship triples and instance attribute triples in the equipment knowledge graph. Compared with the above-mentioned model that only uses instance relationship triples, it can obtain richer embedding representations, so the model effect is better than the model that only encodes instance relationship triples. At the same time, the RGAT-ConvPR model applies a multi-dimensional adaptive convolutional network in the decoding layer to optimize the combination of instance embedding, relationship embedding, and attribute embedding. It integrates relationship embedding and attribute embedding into the instance embedding representation through global interaction, further improving the comprehensive representation ability of the embedded information. Therefore, the completion effect of the model is further improved, and ultimately it is better than all the models compared above.

[0154] (2) The impact of multi-dimensional adaptive convolutional network models and attribute embedding information on link relationship completion

[0155] Based on the equipment knowledge graph data and taking the KBGAT model as a benchmark, experiments were conducted using a model that incorporates an adaptive convolutional network (RGAT-ConvR model), a model that incorporates attribute embedding information (RGAT-ConvKBP model), and a model that incorporates attribute embedding and a multi-dimensional adaptive convolutional network (RGAT-ConvPR model). By comparing the results of the MRR, HITS@1, HITS@3, and HITS@10 indicators, the positive effect of each component on completing the internal link relationships of the equipment knowledge graph was demonstrated. The experimental results are shown in Table 8.

[0156] Table 8 The impact of multi-dimensional adaptive convolutional network model and attribute embedding information on link relationship completion

[0157]

[0158] Table 8 shows that incorporating attribute embeddings or the multidimensional adaptive convolutional network model has a positive effect on internal link completion. The RGAT-ConvPR model, which combines both components, surpasses all of the aforementioned models in completion performance. Compared to the KBGAT baseline model, the RGAT-ConvPR model improves the MRR, HITS@1, HITS@3, and HITS@10 metrics in the link completion task by approximately 3.77%, 4.5%, 5.05%, and 6.62%, respectively.

[0159] The KBGAT model uses the attention mechanism from the RGAT model to supplement instance embeddings with neighborhood relationship information during encoding. During decoding, it uses multiple one-dimensional convolution kernels from the ConvKB model to decode the embedding information obtained during encoding. The KBGAT model improves its handling of relationship information through the attention mechanism, successfully obtaining more accurate triple embedding representations. Therefore, the model's equipment link relationship completion performance generally meets application requirements.

[0160] By comparing the KBGAT model and the RGAT-ConvR model, it can be proved that the integration of the adaptive convolutional network model improves the ability of the link relationship completion model to obtain deep features, which can enhance the features of instance embedding information. At the same time, the adaptive convolutional network model realizes the global interaction of instance embedding and relationship embedding, which reduces the problem of unbalanced feature combination caused by local interaction to a certain extent. Therefore, the final experimental results are better than the KBGAT model that does not realize the global interaction of instance embedding and relationship embedding in the decoding part.

[0161] By comparing the experiments of the KBGAT model and the RGAT-ConvKBP model, it can be proved that the incorporation of attribute embedding information can supplement the instance-relationship tuple feature embedding representation obtained by the decoding layer, so that it is no longer limited to the embedding representation of a single node itself, but obtains a more comprehensive instance embedding representation. Therefore, the final experimental results are better than the KBGAT model that only uses instance embedding information and relationship embedding information in the decoding part.

[0162] Experiments comparing the KBGAT model, RGAT-ConvR model, RGAT-ConvKBP model, and RGAT-ConvPR model show that incorporating attribute embedding information can enhance the feature embedding representation capability of the original instance-relationship tuple. At the same time, the use of a multi-dimensional adaptive convolutional network model to achieve global interaction among instance embedding, attribute embedding, and relationship embedding further improves the balance of the final embedding results. Therefore, the final experimental results are better than those of the KBGAT model, RGAT-ConvR model, and RGAT-ConvKBP model.

[0163] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present application. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, materials or characteristics described may be combined in an appropriate manner in any one or more embodiments / methods or examples. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and the features of different embodiments / methods or examples, unless they are contradictory.

[0164] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0165] Those skilled in the art will appreciate that the above embodiments are merely intended to clearly illustrate the present disclosure and are not intended to limit the scope of the present disclosure. Other changes or modifications may be made based on the above disclosure, and such changes or modifications are still within the scope of the present disclosure.

Claims

1. A method for completing internal link relationships in an equipment knowledge graph, characterized in that: include: Use the translation model to process the instance relationship triples and instance attribute triples of the equipment knowledge graph to obtain the instance embedding initialization matrix, the relationship embedding initialization matrix, and the attribute embedding initialization matrix; Use the improved first-layer graph attention network model to process the instance embedding initialization matrix and obtain the first-layer instance embedding optimization matrix; The relation embedding initialization matrix is ​​transformed using the fully connected layer. The transformation formula is shown in formula (1): (1) in, represents the relation embedding initialization matrix, Represents the transformation matrix corresponding to the fully connected layer, Dimensions representing the transformed relation embeddings; Embed the first-layer instance output by the first-layer graph attention network model into the optimization matrix and the transformed relation embedding matrix Input into the second-layer graph attention network model to obtain the second-layer instance embedding optimization matrix; Fuse the second-layer instance embedding optimization matrix with the instance embedding initialization matrix to obtain the instance embedding fusion matrix; Constructing an encoder to train the instance embedding fusion matrix and the transformed relational embedding matrix to obtain the final instance embedding matrix and the final transformed relational embedding matrix; and A multi-dimensional adaptive convolutional decoder is constructed, and the instance attribute embedding feature matrix of the relationship to be completed is input into the decoder. The decoder calculates the score of each pair of feature matrices under different relationships, and obtains the relationship corresponding to the highest score as the final completion relationship of the input instance pair.

2. The method for completing internal link relationships in the equipment knowledge graph according to claim 1, characterized in that: The improved first-layer graph attention network model and the improved second-layer graph attention network model are relationship-based graph attention network models.

3. The method for completing internal link relationships in the equipment knowledge graph according to claim 2, characterized in that: The relation-based graph attention network model inputs the instance embedding initialization matrix in the first layer of the graph attention network model. and relation embedding initialization matrix ; Instance relation triples Initial embedding information Splicing and using linear transformation matrix Process the concatenation result to obtain a new embedding vector, as shown in formula (2): (2) in, Represents a triple go through The processed embedding vector, Represents a splicing operation, Representation instance The initial embedding vector of Representation instance The initial embedding vector of Representing relationships The initial embedding vector of Then through another linear transformation matrix For the new embedding vector Perform the conversion and use the LeakyReLU function to calculate the current triplet The attention value is calculated as shown in formula (3): (3) Finally, the calculation results are normalized using the softmax function, as shown in formula (4): (4) in, is an instance The set of all adjacent instance nodes, Represents a link instance and examples The set of all relations of By obtaining the instance node The attention information of each relation triplet is given to the instance node The embedding representation of is updated, and the formula for updating the embedding representation is shown in formula (5): (5) in, represents any nonlinear function; The multi-head attention mechanism is used to average the learned domain information; for the first-layer graph attention network model, the calculated multi-head attention results are integrated by splicing to obtain the first-layer instance embedding optimization matrix ,in, Represents the matrix composed of all instance embedding information after optimization, is the number of instances, represents the dimension after instance embedding optimization. The calculation formula for each instance embedding information is shown in formula (6): (6) in, represents the set of attention heads, Represents the number of heads of attention.

4. The method for completing internal link relationships in the equipment knowledge graph according to claim 1, characterized in that: The fusion matrix (7) in, represents the initial instance embedding matrix, represents the transformed instance embedding matrix, represents the transformation matrix, represents the dimension of the initial instance embedding vector, represents the dimension of the final instance embedding vector, represents the instance embedding matrix output by the second-layer graph attention network model, Indicates the number of instances.

Citation Information

Patent Citations

  • Economic domain knowledge graph completion algorithm based on graph attention mechanism

    CN114625881A

  • Small sample knowledge graph completion method based on error-aware network

    CN117271783A