Inductive relation prediction method for manufacturing service fusion supply chain field

By constructing a relationship weight graph and an anchor path set, embedding vectors are generated for new relationships and entities, and combined with neural networks and pre-trained models for training, the prediction accuracy problem caused by ignoring global features in the existing technology is solved, and more efficient supply chain relationship prediction is achieved.

CN120197769APending Publication Date: 2025-06-24HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510305307.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

When predicting potential supply chain relationships, the prior art ignores global features outside the sub-graph, which affects the prediction accuracy, especially when the knowledge graph is incomplete, the prediction effect is more significant.

Method used

By constructing a relationship weight graph and an anchor path collection, embedding vectors are generated for new relationships and entities, and neural network models and pre-trained models are used to combine structural and semantic information for training to improve prediction accuracy.

Benefits of technology

It improves the prediction accuracy and inductive reasoning ability of the knowledge graph, and can predict new entities and relationships more accurately during reasoning, enhancing the overall efficiency of supply chain relationship prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120197769A_ABST
    Figure CN120197769A_ABST
Patent Text Reader

Abstract

The invention discloses a manufacturing service fusion supply chain field-oriented inductive relationship prediction method, and belongs to the field of knowledge maps, an APIRP model provided by the method can compensate for the influence of closed path loss on model prediction performance by constructing an anchoring path set of a given supply chain field knowledge map; defining a neighborhood relation structure of each relation by creating a relation weight graph of the knowledge graph, and aggregating and representing relation embedding by utilizing an attention mechanism of fusion relation weight grouping information; adopting a neural network model to perform structure vector representation on the anchoring path by utilizing relation embedding representation; performing semantic representation on the anchoring path fusing the entity relationship description information by utilizing a pre-training model; according to the method, training is carried out by taking scores of maximized path representation and semantic representation as targets, and a training mode of structure and semantic information is combined, so that the APIRP model provided by the invention can more accurately predict new entities and relationships during reasoning, and the inductive reasoning capability of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of knowledge graphs, and more specifically, relates to an inductive relationship prediction method for the field of manufacturing service integrated supply chains. Background Art

[0002] In the digital age, manufacturing enterprises need to improve the transparency and collaborative efficiency of the supply chain through digital technologies. The prediction of potential "supply" relationships has become a key link in realizing the digital transformation of the supply chain, which helps enterprises better respond to market changes and risks. By predicting potential relationships, enterprises can more accurately identify potential suppliers in the supply chain, provide data support for the strategic decision-making of enterprises, optimize resource allocation, such as supplier selection, procurement plan formulation, etc., thereby improving the overall efficiency of the supply chain and enhancing the operational efficiency and competitiveness of enterprises.

[0003] In recent years, many studies have achieved the completion of knowledge graphs by predicting new relationships that were not observed during training. Among them, some methods focus on learning potential relationship patterns through logical rule mining, while others use closed subgraph structures to learn relationship embedding representations. Although existing methods are gradually focusing on improving the generalization ability of new relationship modeling, there are still many challenges. Some methods only focus on closed subgraphs when extracting features, while ignoring global features outside the subgraph. These global features may contain relationship paths or patterns useful for new relationship prediction. In addition, when the given knowledge graph is incomplete, closed subgraphs between many head and tail entities may not exist. In this case, the prediction accuracy of existing methods will be significantly affected. Summary of the Invention

[0004] In view of the above defects or improvement requirements of the prior art, the present invention provides an inductive relationship prediction method for the field of manufacturing service integrated supply chains, which generates embedding vectors for new relationships and entities that only appear during inference through a relationship weight graph and an anchored path set, thereby improving prediction accuracy.

[0005] To achieve the above object, according to the first aspect of the present invention, there is provided an inductive relationship prediction method for the field of manufacturing service integrated supply chains, including:

[0006] Training stage:

[0007] S1, establish an APIRP model; the APIRP model includes:

[0008] An anchored path set construction module, configured to construct an anchored path set for query triples in a given supply chain domain knowledge graph G; wherein, the types of entities in G include suppliers, raw material products in the industry field, and the types of relationships include: upstream materials, product subcategories, main products, supply relationships;

[0009] The relationship representation calculation module is used to construct the relationship weight graph of G to calculate the vector representation of the relationships in G; wherein, the relationship weight graph is an undirected weighted graph, each node corresponds to a relationship in G, and the weight of each edge represents the similarity between two relationships. The adjacency matrix A of the relationship weight graph is A h +A t , The element E h in matrix E h [i, j] represents the frequency of entity e i appearing as the head entity of relationship r j . The diagonal element D h of the diagonal matrix D h [i, j] represents the total frequency of entity e i appearing as the head entity in all relationships. The element E t in matrix E t [i, j] represents the frequency of entity e i appearing as the tail entity of relationship r j . The diagonal element D t of the diagonal matrix D t [i, j] represents the total frequency of entity e i appearing as the head entity in all relationships; the vector representation of relationship r i at the (l + 1)-th training is σ is the sigmoid activation function, is the vector representation of the adjacent relationship r i of relationship r j at the l-th training, is the attention score of the relationship pair with index s(i, j), || is the vertical concatenation vector; W l is the weight matrix at the l-th training, which is a learning parameter; is the bias term of the relationship pair with index s(i, j) at the l-th training, which is a learnable parameter; is the vector representation of relationship r i at the l-th training; N(r i ) represents the neighbor relationships of relationship r i , and r j′ represents a relationship in N(r i ); is the bias term of the relationship pair with index s(i, j') at the l-th training, which is a learnable parameter; is the vector representation of relationship r j′ at the l-th training, rank(aij ) is the rank of a when the non - zero elements in the relationship weight graph are sorted in descending order ij , where a ij is the element in the i - th row and j - th column of A, and NZ(A) is the number of non - zero elements in the relationship weight graph;

[0010] A neural network model for predicting the structured representations of each anchored path in the structured representation of a query triple according to the set of anchored paths of the query triple and the vector representation of the relationship; the structural parameters of the neural network model are learnable parameters;

[0011] A pre - trained model for encoding the text description of the query triple and the text descriptions of each anchored path to obtain the semantic representation of the query triple and the semantic representations of each anchored path;

[0012] A scoring module for calculating the similarity between the structured representations of the query triple and the target anchored path, and the similarity between the semantic representations of the query triple and the target anchored path, and adding the maximum values of the two types of similarities to obtain the score of the query triple;

[0013] S2. Use the data set to train the APIRP model to update the learnable parameters in the APIRP model and the neural network model; wherein, the data set includes a plurality of reasonable triples and unreasonable triples; reasonable triples are positive samples with a scoring label of 1; unreasonable triples are negative samples with a scoring label of - 1;

[0014] Application stage:

[0015] Input the target triple as the query triple into the trained APIRP model to obtain the corresponding score. If the score is higher than the threshold, it is considered that the relationship between the head entity and the tail entity in the target triple is a potential relationship.

[0016] According to the second aspect of the present invention, an electronic device is provided, including: a computer - readable storage medium and a processor;

[0017] The computer - readable storage medium is used to store executable instructions;

[0018] The processor is used to read the executable instructions stored in the computer - readable storage medium and execute the method as described in the first aspect.

[0019] According to the third aspect of the present invention, a computer - readable storage medium is provided, and the computer - readable storage medium stores computer instructions for causing a processor to execute the method as described in the first aspect.

[0020] According to the fourth aspect of the present invention, there is provided a computer program product, including a computer program or instructions, which when executed by a processor implement the method described in the first aspect.

[0021] Generally speaking, compared with the prior art through the above technical solutions conceived by the present invention, the following beneficial effects can be achieved:

[0022] The method provided by the present invention realizes inductive relationship prediction based on a relationship weight graph and an anchored path. This method first constructs a set of anchored paths for a given knowledge graph in the supply chain domain to make up for the impact of the lack of closed paths on the model prediction performance; then defines the neighborhood relationship structure of each relationship by creating a relationship weight graph of the knowledge graph, and uses an attention mechanism that fuses relationship weight grouping information to aggregate the representation of relationship embeddings, and uses a neural network model to represent the anchored path with the relationship embedding representation; in addition, in order to further improve the prediction accuracy, a pre-trained model is used to semantically represent the anchored path that fuses entity relationship description information; finally, with the goal of maximizing the scores of the path representation and the semantic representation, the neural network model parameters and the learnable parameters in the structural vector representation are trained. The training method that combines structural and semantic information enables the APIRP model provided by the present invention to more accurately predict new entities and relationships during inference, thereby improving the inductive reasoning ability of the model. Description of the Drawings

[0023] Figure 1 is a flowchart of the training stage of the inductive relationship prediction method for the manufacturing service integration supply chain domain provided by the embodiment of the present invention;

[0024] Figure 2 is a schematic diagram of calculating the relationship representation based on the relationship weight graph in the method provided by the embodiment of the present invention;

[0025] Figure 3 is a schematic diagram of the anchored path representation of the neural network model based on the relationship weight graph in the method provided by the embodiment of the present invention;

[0026] Figure 4 is a schematic diagram of the pre-trained model semantically representing the text descriptions of the target triple and the anchored path in the method provided by the embodiment of the present invention;

[0027] Figure 5 is a schematic diagram of the comparison result between the method provided by the embodiment of the present invention and other methods;

[0028] Figure 6 is an example of an anchored path extracted from the supply chain dataset using the method provided by the embodiment of the present invention. Detailed Embodiments

[0029] To make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0030] An embodiment of the present invention provides an inductive relationship prediction method for the field of manufacturing service integration supply chain. This method conducts inductive relationship prediction (Inductive Relationship Prediction Based on Anchored Paths, APIRP) based on a relationship weight graph and an anchored path, aiming to explore how to generate embedding vectors for new relationships and entities that only appear during inference through the relationship weight graph and the set of anchored paths, thereby improving the prediction ability of the knowledge graph. This method includes:

[0031] Training stage:

[0032] S1. Establish an APIRP model; the APIRP model includes:

[0033] An anchored path set construction module for constructing a set of anchored paths for query triples in a given supply chain domain knowledge graph G.

[0034] Those skilled in the art know that the types of entities in the supply chain domain knowledge graph include multiple categories such as suppliers, industry domains, raw materials, products, etc.;

[0035] The types of relationships include:

[0036] "Upstream material" relationship: Describes the supply relationship between raw materials and finished products;

[0037] "Product subcategory" relationship: Characterizes the classification hierarchy of products;

[0038] "Main product" relationship: Records the main production scope of an enterprise;

[0039] "Supply" relationship: Specifies the specific cooperation information between a supplier and a manufacturer.

[0040] By constructing a set of anchored paths for a given supply chain domain knowledge graph, the impact on the prediction performance of the APIRP model caused by the lack of closed paths is compensated.

[0041] The relationship representation calculation module is used to construct a relationship weight graph of a given knowledge graph in the supply chain domain. After dividing it into M weight intervals according to the weights between each pair of relationships, a corresponding bias term is constructed for each pair of relationships. The attention score between each pair of relationships is calculated according to the bias term, and the vector representation of the relationships in the knowledge graph of the supply chain domain is calculated according to the attention score.

[0042] Specifically, a relationship weight graph is created to define the neighborhood relationship structure of each relationship, and an attention mechanism that fuses relationship weight grouping information is used to aggregate relationship representation embeddings.

[0043] The main goal of the relationship weight graph is not to determine a set of exact similar relationships, but to define a reasonable semantic neighborhood for relationships, so as to generate effective representation vectors for each relationship. These vectors can be used to construct the embedding representation of the target relationship.

[0044] Specifically, the relationship weight graph of a given knowledge graph in the supply chain domain is defined as an undirected weighted graph, where each node corresponds to a relationship, and the weight of each edge represents the similarity between two relationships.

[0045] First, calculate the adjacency matrix A = A h +A t (The adjacency matrix represents the connection relationship between vertices in the relationship graph, and each element a ij represents the weight).

[0046] Among them, (A h represents the adjacency matrix of the head entity; E h represents the head entity neighborhood relationship association matrix, and its element E h [i, j] represents the frequency of entity e i appearing as the head entity of relationship r j , calculates the number of entities shared by two relationships; D h represents the degree diagonal matrix of the head entity, and its diagonal element D h [i, j] represents the total frequency of entity e i appearing as the head entity in all relationships, The role of

[0047] (A t represents the adjacency matrix of the tail entity; E t represents the head entity neighborhood relationship association matrix, and its element E t [i, j] represents the frequency of entity e i appearing as the head entity of relationship rj Frequency of occurrence of the tail entity; D t Degree diagonal matrix representing the tail entity, with diagonal elements D t [i, j] represents entity e i As the total frequency of the head entity appearing in all relationships).

[0048] After constructing the relationship weight graph, the relationship pairs are divided into M different intervals according to the weights between all relationship pairs. Taking M = 2 as an example, as Figure 2 shown, the relationship pairs are divided into 2 intervals (i.e., A1, A2). Further, use the index value of the relationship pair Construct a bias term corresponding to each relationship pair and containing the global relationship pair weight

[0049] where s(i, j) is an integer representing the index of the relationship pair, 1 ≤ s(i, j) ≤ M, rank(a ij ) represents the rank of a when the non-zero elements in the relationship weight graph A are sorted in descending order ij ; NZ(A) is the number of non-zero elements in the relationship weight graph A. For example, when M = 2, there are 2 weight intervals A1, A2, and the relationship pair with index value 1 is divided into interval A1, and the relationship pair with index value 2 is divided into interval A2.

[0050] There are as many bias terms as there are partitions, that is, the number of bias terms is the number of relationship pairs. l represents the l-th training, the bias term is a learnable parameter, with an initial value of 0, and will be adjusted according to the gradient of the loss function in each iteration.

[0051] The bias term can capture the global semantic association between relationship pairs and incorporate it into the attention mechanism to obtain attention scores, thereby enhancing the ability to model complex dependencies between relationships.

[0052] Specifically, during the training process, the attention score is expressed as where || represents vertical concatenation of vectors; W l represents a learnable weight matrix, which is a learnable parameter; represents the bias term based on the relationship pair index value s(i, j); represents the vector representation of relationship r during the l-th training process i ; N(r i ) represents the neighbor relationships of relationship r i .

[0053] After obtaining the attention scores, update the representation of each relationship by aggregating the representation vectors of each relationship itself and its adjacent relationships. The specific calculation formula is where Denote the aggregated relationship r i 's vector representation; σ is the sigmoid activation function; is the attention score; W l is a learnable parameter; Denote the relationship r i 's adjacency relationship r j 's vector representation.

[0054] The larger the value of M, the more weight intervals are divided, which can distinguish different relationships more finely, thus improving the discrimination ability; however, too large M will lead to an increase in the number of parameters, thus increasing the training difficulty. Therefore, the value of M can be set according to actual needs. In the embodiments of the present invention, M = 10.

[0055] A neural network model, used to predict the structured representation of each anchored path in the structured representation of the query triple according to the set of anchored paths of the query triple and the vector representation of the relationship; the structural parameters of the neural network model are learnable parameters.

[0056] The neural network model can optionally select an existing neural network model, such as LSTM, RNN, CNN, etc. Considering that BiLSTM can obtain information in both the forward and backward directions through forward and backward propagation, which has significant advantages for processing long sequence tasks because it can simultaneously consider the information before and after in the sequence, thus capturing information that is far apart but relevant. Preferably, the neural network model is a BiLSTM model.

[0057] Through the neural network model, use the relationship representation embedding to perform structural vector representation on the anchored path.

[0058] In order to further utilize the relationship representation of the knowledge graph in the supply chain field output by the relationship representation calculation module, a neural network is used to perform path representation learning on the set of anchored paths. As Figure 3 shown, the set of anchored paths of the query triple (specifically including the head entity h, the relationship r, and the tail entity t) output by the anchored path set construction module and the relationship representation of the knowledge graph in the supply chain field output by the relationship representation calculation module are used as a training set to train the neural network so that it can predict the query query triple T p 's vector representation and the structured vector representation of the anchored path P i (The vector representation usually refers to a set of ordered numbers representing different features or attributes). (The vector representation usually refers to a set of ordered numbers representing different features or attributes).

[0059] A pre-training model, used to encode the text description of the query triple and the text description of each anchored path to obtain the semantic representation of the query triple and the semantic representation of each anchored path;

[0060] The pre-trained model can be any existing pre-trained model. For example, BERT pre-trained model, RoBERTa pre-trained model, etc. Considering that SBERT is more suitable for tasks that require fast generation of sentence embeddings and can maintain high semantic representation ability, preferably, the pre-trained model is the SBERT pre-trained model.

[0061] It can be understood that SBERT (Sentence-BERT) is a model based on BERT (classical pre-trained model), which is specifically used to generate sentence-level embedding representations. The input of the SBERT model is a single sentence or a pair of sentences. The input sentence or sentence pair will be tokenized and converted into BERT format (including [CLS] and [SEP]); if it is a sentence pair, the two sentences will be concatenated together. The output of the SBERT model is a fixed-length representation of each sentence, usually a vector (for example, 768-dimensional). This vector can be directly used for tasks such as semantic similarity calculation. In the present invention, only the pre-trained model is called and no fine-tuning operation is performed, and no additional training is required. The same applies to the BERT pre-trained model, RoBERTa pre-trained model, etc., and no additional training is required.

[0062] Use the pre-trained model to perform semantic representation (vectorized representation of text semantics) on the anchored path that fuses entity relationship description information, such as Figure 4 shown.

[0063] By introducing detailed text descriptions of entities and relationships, two sentence representation forms T s and S i are constructed, which are respectively used to represent the semantic information of the query triple and the set of anchored paths; among them, and respectively represent the text descriptions of the head entity h t , relationship r t and tail entity t t in the target triple; and respectively represent the text descriptions of entity e i and relationship r i in the anchored path.

[0064] Entity types include multiple categories such as suppliers, industry fields, raw materials, products, etc. Each entity has a corresponding text description. For example: Supplier type entities include information such as supplier name, supplier number, and supplier address; Industry field type entities include information such as the name of the affiliated field, the affiliated field number, and industry policies; Raw material type entities include information such as raw material name, raw material origin, and storage warehouse; Product type entities include information such as variety name, variety code, and resource number. Each relationship has a corresponding text description: The "upstream material" relationship describes the supply relationship between raw materials and finished products; The "product subcategory" relationship describes the classification hierarchy of products; The "main product" relationship describes the main production scope of an enterprise; The "supply" relationship describes the specific cooperation information between suppliers and manufacturers.

[0065] Then, use the pre-trained model to encode the text description sentences of the query triple and the anchored path to obtain the corresponding vector representations, that is, the semantic vector representation of the query triple. and the semantic vector representation of the anchored path

[0066] The scoring module is used to calculate the similarity (i.e., similarity score) between the structured representations of the query triple and the target anchored path, as well as the similarity between the semantic representations of the query triple and the target anchored path, and add the maximum value of the two types of similarities to obtain the score of the query triple.

[0067] The target anchored path can be all paths in the anchored path set. To reduce the computational complexity, preferably, the target anchored path is the top k paths in the anchored path set that are closest to the head entity.

[0068] To quantify the semantic similarity between the anchored path and the query triple, cosine similarity is used as the evaluation metric.

[0069] To reduce the computational complexity, at most k anchored paths are allowed as inputs to calculate the similarity score. Among them, the anchored path with the highest similarity score is considered the most reasonable path, and the highest similarity score is regarded as the final score of the corresponding triple, including: calculating the cosine similarity of T p and P i calculating the cosine similarity of T and S s and S i calculating the cosine similarity of T

[0070] The final scoring function SCORE combines the sentence semantic similarity S_Score and the path structure similarity P_Score, that is, SCORE = S_SCORE + P_SCORE, where P_SCORE is P_Score iThe highest similarity score in (h, r, t), S_SCORE is S_Score i The highest similarity score in (h, r, t), SCORE is the final score of the query triple.

[0071] A loss function is constructed using a scoring function to provide a training signal. That is, during the training phase, the loss function of the APIRP model is:

[0072]

[0073] where SCORE(h, r, t) is the score of the query triple, h, r, and t are the head entity, relation, and tail entity of the query triple respectively, y is the score label of the sample, 1 is a positive sample (reasonable query triple), and -1 is a negative sample (unreasonable query triple). The design of this loss function aims to maximize the score of positive samples while minimizing the score of negative samples.

[0074] S2. Use the dataset to train the APIRP model to update the learnable parameters in the APIRP model and the neural network model; where the dataset includes multiple reasonable triples and unreasonable triples; reasonable triples are positive samples with a score label of 1; unreasonable triples are negative samples with a score label of -1.

[0075] After l times of training, the learnable parameter W in the relation representation calculation module is obtained l 、 and the value of the learnable parameter in the neural network model. In the application phase, the relation representation calculation module directly uses the obtained W l 、 to calculate the vector representation of the relation.

[0076] Application phase:

[0077] Input the target triple as the query triple into the trained APIRP model to obtain the corresponding score. If the score is higher than the threshold, it is considered that the relation between the head entity and the tail entity in the target triple is a potential relation.

[0078] Taking supplier selection as an example, first, collect various information about potential suppliers, such as text description information like supplier names, geographical locations, and historical performance, and establish connections between suppliers to construct triples like (Supplier A, supplies, Supplier B). Then, input these triples and the given supply chain domain knowledge graph into the APIRP model. The trained APIRP model first constructs an anchored path set, then performs structural path representation and semantic path representation on the target triple and the anchored path respectively, and calculates the similarity score between the target triple and the anchored path. The final score of the target triple represents the rationality of this triple. Select the best target triple from multiple groups of target triples according to the scoring results to determine the best supplier. The higher the score, the greater the possibility of cooperation between suppliers.

[0079] Test the link prediction performance of the APIRP model provided by the present invention and multiple types of baseline models on three public datasets, namely WN18RR, FB15k - 237, and NELL - 995, and a supply chain domain dataset SupplyChain, and verify the effectiveness and generalization ability of the method proposed by the present invention. Figure 5 For the link prediction results, the best results are shown in bold, and the second - best results are underlined. According to the link prediction results therein, the present invention performs better than other models on the WN18RR, FB15k - 237, NELL - 995, and SupplyChain datasets, verifying that the method provided by the present invention has high accuracy and robustness when dealing with link prediction problems, and excellent scores are obtained in datasets of multiple fields. Figure 6 This is an example of the anchored path extracted from the supply chain dataset, and the prediction performance is improved by comprehensively analyzing the anchored path.

[0080] That is, by comparing the link prediction performance of the inductive relation prediction method based on the relation weight graph and the anchored path with multiple types of baseline models on three public datasets, the effectiveness of the method proposed by the present invention is verified. The experimental results show that the APIRP model provided by the present invention performs better than other models on the four datasets, indicating that the inductive relation prediction method using the relation weight graph and the anchored path in the present invention has high accuracy when dealing with link prediction problems.

[0081] An embodiment of the present invention provides an electronic device, including: a computer - readable storage medium and a processor;

[0082] The computer - readable storage medium is used to store executable instructions;

[0083] The processor is used to read the executable instructions stored in the computer - readable storage medium and execute the method according to any one of the above - mentioned embodiments.

[0084] An embodiment of the present invention provides a computer-readable storage medium storing computer instructions for causing a processor to execute the method according to any one of the above embodiments.

[0085] An embodiment of the present invention provides a computer program product including a computer program or instructions, which, when executed by a processor, implement the method according to any one of the above embodiments.

[0086] Those skilled in the art can easily understand that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An inductive relationship prediction method for the field of manufacturing service integrated supply chain, characterized in that: include: Training phase: S1, establish APIRP model; The APIRP model includes: The anchor path set construction module is used to construct the anchor path set of the query triples in the given supply chain knowledge graph G; the types of entities in G include suppliers, raw materials and products in the industry field, and the types of relationships include upstream materials, product subcategories, main products, and supply relationships; A relationship representation calculation module is used to construct a relationship weight graph of G to calculate the vector representation of the relationship in G; wherein the relationship weight graph is an undirected weighted graph, each node corresponds to a relationship in G, and the weight of each edge represents the similarity between two relationships. The adjacency matrix A of the relationship weight graph is A = h +A t , Matrix E h The element E in h [i,j] represents entity e i As a relation j The frequency of occurrence of the head entity, the diagonal matrix D h The diagonal elements D h [i,j] represents entity e i As the total frequency of the head entity appearing in all relations, Matrix E t The element E in t [i,j] represents entity e i As a relation j The frequency of the tail entity; the diagonal matrix D t The diagonal elements D t [i,j] represents entity e i As the total frequency of the head entity in all relations; in the l+1th training, relation r i The vector representation is σ is the sigmoid activation function, is the relationship r during the lth training i The adjacency relationship r j The vector representation of is the attention score of the relation pair with index value s(i,j), || is the vertical connection vector; W l is the weight matrix during the lth training, and is the learning parameter; is the bias term of the relationship pair with index value s(i,j) in the lth training, which is a learnable parameter; is the relationship r during the lth training i The vector representation of N(r i ) represents the relationship r i Neighbor relationship, r j′ N(r i ) The index value for the lth training is s(i,j ′ ) is a bias term for the relationship pair, which is a learnable parameter; is the relationship r during the lth training j′ The vector representation of rank(a ij ) is the non-zero elements in the relationship weight graph sorted in descending order a ij The ranking of ij is the i-th row and j-th column element in A, NZ(A) is the number of non-zero elements in the relationship weight graph; A neural network model for predicting structured representations of each anchor path of a structured representation of a query triple based on a set of anchor paths of the query triple and a vector representation of the relationship; the structural parameters of the neural network model being learnable parameters; A pre-trained model is used to encode the text description of the query triple and the text description of each anchor path to obtain the semantic representation of the query triple and the semantic representation of each anchor path; A scoring module is used to calculate the similarity between the structured representation of the query triple and the target anchor path, as well as the similarity between the semantic representation of the query triple and the target anchor path, and to add the maximum values ​​of the two types of similarities to obtain the score of the query triple; S2, training the APIRP model with a data set to update the learnable parameters in the APIRP model and the neural network model; wherein the data set includes a plurality of reasonable triplets and unreasonable triplets; a reasonable triplet is a positive sample with a score label of 1; an unreasonable triplet is a negative sample with a score label of -1; Application phase: The target triplet is input as the query triplet into the trained APIRP model to obtain the corresponding score. If the score is higher than the threshold, the relationship between the head entity and the tail entity in the target triplet is considered to be a potential relationship.

2. The method according to claim 1, characterized in that The target anchor path is the first k paths in the anchor path set that are closest to the head entity.

3. The method according to claim 1 or 2, characterized in that During the training phase, the loss function of the APIRP model is: Among them, SCORE(h,r,t) is the score of the query triple, h, r, t are the head entity, relation and tail entity of the query triple, respectively, and y is the score label.

4. The method according to claim 1, characterized in that The neural network model is a BiLSTM model.

5. The method according to claim 1, characterized in that The pre-training model is an SBERT pre-training model.

6. An electronic device, characterized in that: include: A computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the method according to any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute the method according to any one of claims 1 to 5.

8. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 5 is implemented.