Entity alignment method and system for market subject dishonesty information knowledge graph
Through the method of combining large language model and graph neural network, the entity structure and name information are integrated, and the problem of poor entity alignment in the existing technology is solved, especially in the long-tail entity alignment, which significantly improves accuracy and efficiency. And improve parallel performance through multi-model training.
Patent Information
- Application Number
- CN202411151867.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing structural features-based entity alignment methods do not work well on real-world knowledge graphs, especially the low coverage and efficiency problems caused by the sparseness of long-tail entities.
A large language model is used to combine random walks for entity and relationship embedding, combined with graph neural network and multi-model training, and integrated entity structure information and name information to improve the accuracy and efficiency of entity alignment through cosine similarity and BERT word embedding.
The accuracy and efficiency of entity alignment are significantly improved, especially in long-tail entity alignment, which enhances the alignment effect and improves parallelism through multi-model training.
Smart Images

Figure CN119129720A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of knowledge graph data processing, and in particular to an entity alignment method and system for a knowledge graph of dishonest information of market entities. Background Art
[0002] In recent years, with the rapid growth of the number of market entities and the diversification of market formats, market dishonesty cases have continued to increase, and the supervision task has become increasingly arduous. The different structures of dishonesty information of market entities between departments, unclear subject relationships, difficulty in integrating dishonesty information knowledge, and inconsistent representations have restricted the improvement of market supervision efficiency. Therefore, it is urgent to carry out research on the construction and integration technology of knowledge graphs of dishonesty information of market entities between departments based on knowledge graphs, big data, and artificial intelligence.
[0003] In order to improve the coverage and accuracy of knowledge graphs, a feasible method is to introduce relevant knowledge from other knowledge graphs, because there is redundancy and complementarity of knowledge between knowledge graphs constructed in different ways. For example, a general knowledge graph extracted and constructed from web pages may only contain basic information about the dishonest behavior of market entities, while more detailed information can be found in the knowledge graph built based on market supervision data. In order to integrate the knowledge in the external knowledge graph into the target knowledge graph, the most important step is to align different knowledge graphs. To this end, the entity alignment (EA) task was proposed and received widespread attention. This task aims to find entity pairs that express the same meaning in different knowledge graphs. These entity pairs serve as hubs to link different knowledge graphs and serve subsequent tasks.
[0004] At present, mainstream entity alignment methods mainly use the structural features of knowledge graphs to determine whether two entities refer to the same thing. This type of method assumes that entities expressing the same meaning in different knowledge graphs have similar adjacency information. This type of method has achieved the best experimental results on artificially constructed datasets. However, recent studies have pointed out that the knowledge graphs in these artificially constructed datasets are denser than the knowledge graphs in the real world, and the entity alignment methods based on structural features are much less effective on the knowledge graphs in the real world.
[0005] By analyzing the entity distribution in the real-world knowledge graph, we can find that more than half of the entities are only connected to one or two other entities. These entities are called long-tail entities, which occupy most of the knowledge graph entities, making the graph as a whole highly sparse. This is also consistent with the understanding of the real-world knowledge graph: only a small number of entities are frequently used and have rich adjacency information, while the vast majority of entities are rarely mentioned and contain little structural information. Therefore, the current entity alignment methods based on structural information do not perform well on real-world datasets.
[0006] In response to the above challenges, this patent proposes a multi-department market subject default information knowledge graph fusion technology. Specifically, it includes the following three aspects:
[0007] Ontology alignment method based on knowledge graph of dishonest information of market entities in multiple departments: In order to solve the problem of difficulty in aligning ontology of multi-source heterogeneous knowledge graphs, similarity calculation method and neural network clustering are used to perform ontology division to improve the accuracy and efficiency of knowledge graph ontology alignment.
[0008] Knowledge graph entity matching method integrating individual characteristics of knowledge graph entities: While considering individual characteristics of knowledge graph entities, knowledge graph entities are mapped in blocks, and a knowledge graph entity matching method under block mapping is proposed to reduce the complexity of entity matching in large-scale knowledge graph fusion and improve efficiency.
[0009] Knowledge graph fusion method based on ontology alignment and entity matching: On the basis of knowledge graph ontology alignment and entity matching, knowledge conflict and knowledge resolution are studied based on deep neural networks to solve the problem of knowledge graph fusion in the presence of knowledge conflict, and the efficiency and accuracy of knowledge graph fusion are improved by combining the knowledge graph quality control framework.
[0010] The technology of this patent aims to solve the problem of cross-departmental interaction, integration and sharing of untrustworthy information, build a knowledge representation model for untrustworthy information, and establish a knowledge graph of untrustworthy information of multi-department market entities. Through this technology, it can provide important theoretical and technical support for the application of new generation information technology in the field of market supervision in my country, help market supervision departments improve the effectiveness of credit-based market supervision, and promote the stable and efficient operation of social economy. Summary of the invention
[0011] The content of the present invention is to provide an entity alignment method and system for the knowledge graph of market entity default information, which can overcome the problem of insufficient effect caused by only using the structural information of the entity for entity alignment in the prior art, and can make full use of the structural information and entity name information of the entity, and comprehensively use them for entity alignment, thereby improving the efficiency of alignment.
[0012] According to the present invention, an entity alignment method for a knowledge graph of dishonest information of market entities comprises the following steps:
[0013] Step 1, obtain the data of two heterogeneous knowledge graphs;
[0014] Step 2: Use the pre-trained large language model to obtain the embedding of the text in the knowledge graph;
[0015] Step 3: Use graph neural networks to learn and model the characteristics of entity relationships and capture the potential correlations and structures within the knowledge graph.
[0016] Step 4: Calculate and measure the accuracy of the entity alignment task, and use indicators to calculate the accuracy of the relationship between entities;
[0017] Step 5: Fusion the two heterogeneous knowledge graphs to obtain the result of the knowledge graph entity alignment task.
[0018] Preferably, in step 1, data of two heterogeneous knowledge graphs are obtained, the relationship between the two heterogeneous knowledge graphs is processed, and the corresponding data set is generated after feature engineering processing, specifically:
[0019]
[0020] in is a function that maps the corresponding entity to the entity index and obtains the dictionary of entity indexes about the knowledge graph;
[0021]
[0022] in is a function that maps the corresponding relations between corresponding entities to the relation index, and obtains the dictionary of the corresponding relation indexes between entities in the knowledge graph;
[0023] For entities The method of calculating similarity is to measure by introducing cosine similarity space, specifically:
[0024]
[0025] Among them, α i,j is the similarity between entities; From G1, From G2, G1 and G2 are two knowledge graphs to be aligned, G1 = (E1, R1, T1) and G2 = (E2, R2, T2), where E represents the entity, R represents the relationship between entities, and Represents a triple in the knowledge graph, and the known entity pair is represented as For the task of entity alignment in knowledge graphs, we need to consider the similarity between entities and the scores of similar entities in the entire graph structure, specifically:
[0026]
[0027] in is used to calculate α i,j The score of the entire graph structure on G2, is used to calculate α i,jThe score of the entire graph structure on G1 is calculated by the above formula to obtain a score on the corresponding graph, and the score for calculating the similarity of the graph structure is specifically:
[0028]
[0029] where β i,j It calculates all the similarities in the entire graph structure, that is, obtains a global feature.
[0030] Preferably, in step 2, word embedding is performed on two heterogeneous knowledge graphs, specifically:
[0031] The relationship between knowledge graphs is as follows: According to TransE, entities and relations are mapped to the same real plane, and for each triple (e h ,r,e t )∈T calculation provides a scoring function, specifically:
[0032] f(e h ,r,e t )=||h h +rh t || L1orL2
[0033] where e h ,e t It represents two entities, r represents the entity e h ,e t The relationship between entities; using this method, the calculation of entities can be modeled by calculating the distance between entities; h h and h t They refer to the head node and tail node of the two entities to be aligned, L1 and L2 are as follows:
[0034]
[0035] The knowledge graph is embedded with the BERT large language model, including:
[0036]
[0037] Where W is the word embedding matrix of the pre-trained large language model generated by the BERT large language model according to the probability model of the above formula; P is a set function formed by the BERT large language word embedding;
[0038] The word embedding matrix W needs to be fine-tuned through random walks; where d(v (t) ) means v (t) In the figure, N(v (t) ) represents v (t)Neighbor node set;
[0039]
[0040] In the above formula, W = v (0) ,...v (L-1) The word embedding matrix generated by the large language model BERT with initialization is fine-tuned on the random walk sequence of the relationship between the edges and nodes on the graph; while v (0) Represents the starting node; by fusing random walk and large language model word embedding, we get the embedding matrix W.
[0041] Preferably, in step 3, specifically:
[0042] Applying the loss function based on interval sorting as the optimization objective of the knowledge graph TransE translation model R :
[0043]
[0044] Among them, entity e h and e t The entity representation matrix E after random walk fine-tuning of the large language model word embedding, and the relation r is also the relation representation matrix R after random walk fine-tuning of the large language model word embedding, where γ1,γ2>0 are two hyperparameters, μ1 is a balancing hyperparameter; and e h ',r',e t ' is the set T generated by negative sampling of samples during training, which represents the erroneous triples in the knowledge graph.
[0045] Preferably, in step 4, the indicators include MRR, MR and HIST@n indicators, specifically:
[0046]
[0047] Where G is the triple set G(h,r,t), |G| is the number of triple samples, and rank i It refers to the link prediction ranking of the i-th triple. The quality of this indicator is judged based on the fact that the larger the MRR score, the better.
[0048]
[0049] Where G is the triple set G(h,r,t), |G| is the number of triple samples, and rank i Refers to the link prediction ranking of the i-th triple. The MR indicator is similar to MRR. It is the inverse of MRR. Unlike MRR, the larger the score, the better. For MR, the smaller the score, the better.
[0050]
[0051] Hit represents the hit status of the first n predictions, if it is a hit, it is 1, otherwise it is 0;
[0052] Graph neural networks are used to learn and model the characteristics of relevant entity relationships and their topological results, including:
[0053]
[0054] where a is the learned attention parameter vector, W1 and W2 are the learned weight matrices of the large language model fine-tuned by random walk, and α i,j is the similarity between entities, h i 、h j is the edge that brings together i and j, and β i,j is the similarity of the entire graph structure, τ is the balance coefficient, σ(·) is called the activation function, and the LeakyRelu activation function is selected:
[0055] LeakyRelu=max(0,x)+α·min(0,x)
[0056] The form of LeakyRelu is that when x ≥ 0, x is returned, and when x < 0, 0 < α < < 1 is returned;
[0057]
[0058] h is the feature after attention weighted aggregation of the graph neural network; for node Its feature representation h' after weighted aggregation by the attention mechanism is obtained by The characteristics of the neighbor nodes h j And the corresponding attention coefficient α ij Weighted summation is obtained; h' is the node The updated feature representation after considering the importance of neighbor nodes; express Neighbor nodes, α ij is the attention coefficient, W3 is the linearly varying embedding matrix weight, and σ(·) is the activation function.
[0059] Preferably, in step 5, specifically:
[0060] Use graph neural networks to continuously predict tail nodes, and minimize L by continuously reducing the loss function to learn the relationship within the model;
[0061] For a specific relation triple (h, r, t) ∈ G, the optimization goal is as follows:
[0062]
[0063] Where D refers to the training set in the data set, and the triple (h h ,r,h t ) is the optimization objective of the minimization process of L, that is, minimizing the cumulative sum error;
[0064] The above formula defines a fitting process based on the evaluation index. Its purpose is to obtain better results during training. The specific steps are as follows:
[0065] λ(x)=λ1MR+λ2MRR+λ3HIST@n
[0066] where λ i It represents the weight of the relevant indicators, 0<λ i <1, and ∑λ i =1; each λ is a pre-set hyperparameter that needs to be adjusted through training. Its role is to act on multiple graph neural networks to obtain multiple graph neural networks with different performances, including:
[0067] (λ1(x)Gnn1,λ2(x)Gnn2,λ3(x)Gnn3,...λ4(x)Gnn4)×τβ i,j
[0068] Use the weight coefficients set in the above formula to act on multiple graph neural networks. During the training process of each graph neural network, there is a λ i (x) corresponds to it, and will be similar to the graph structure with the balance coefficient τ i,j For λ i (x) Perform cross multiplication operations, so that after a period of training, some graph neural network models with different scores will be obtained. Some processing is done on the models, including:
[0069] Worst(Gnn k )=σ(ω1Best(Gnn k )+ω2Worst(Gnn k )+ρ)
[0070] Among them, σ(·) is the activation function, ρ is the hyperparameter in the training process; ω1, ω2 are two interval hyperparameters, which are used to ensure that there will be no non-convergence during the training process, and ω1+ω2=1;
[0071] In this way, the graph neural network with the lowest score is selected, and the attention parameters of the worst graph neural network are adjusted. The idea of adjustment is to select the graph neural network with the highest score and give different parameters to each attention parameter; the attention parameters of the graph neural network with the worst performance are updated, and ω1 acts on the attention parameters of the graph neural network with the best performance and ω2 acts on the attention parameters of the current graph neural network. The sum of these two models is used as the new graph neural network attention parameters for the graph neural network with the lowest current score;
[0072] During the training process, a model is randomly selected and its λ i Make small adjustments:
[0073] Random Selectλ i ,letλ i change.
[0074] The present invention provides an entity alignment system for a knowledge graph of market subject dishonesty information, which adopts the above-mentioned entity alignment method for a knowledge graph of market subject dishonesty information.
[0075] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0076] (1) The present invention uses a large language model combined with random walk to embed entities and relations, which enhances the semantics of entities and relations and thus can better improve the effect of entity alignment.
[0077] (2) The present invention uses a multi-graph neural network training method, which can integrate multiple graph neural networks into one for training, thereby improving the parallel capability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 It is a flowchart of an entity alignment method for a knowledge graph of dishonest information of market entities in an embodiment. DETAILED DESCRIPTION
[0079] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments are only for explaining the present invention and are not intended to limit it.
[0080] Example
[0081] like Figure 1 As shown, this embodiment provides an entity alignment method for a knowledge graph of dishonest information of market entities, which includes the following steps:
[0082] Step 1, obtain the data of two heterogeneous knowledge graphs;
[0083] In step 1, the data of two heterogeneous knowledge graphs are obtained, the relationship between the two heterogeneous knowledge graphs is processed, and the corresponding data sets are generated after feature engineering, specifically:
[0084]
[0085] in is a function that maps the corresponding entity to the entity index and obtains the dictionary of entity indexes about the knowledge graph;
[0086]
[0087] in is a function that maps the corresponding relations between corresponding entities to the relation index, and obtains the dictionary of the corresponding relation indexes between entities in the knowledge graph;
[0088] For entities The method of calculating similarity is to measure by introducing cosine similarity space, specifically:
[0089]
[0090] Among them, α i,j is the similarity between entities; From G1, From G2, G1 and G2 are two knowledge graphs to be aligned, G1 = (E1, R1, T1) and G2 = (E2, R2, T2), where E represents the entity, R represents the relationship between entities, and Represents a triple in the knowledge graph, and the known entity pair is represented as For the task of entity alignment in knowledge graphs, we need to consider the similarity between entities and the scores of similar entities in the entire graph structure, specifically:
[0091]
[0092] in is used to calculate α i,j The score of the entire graph structure on G2, is used to calculate α i,j The score of the entire graph structure on G1 is calculated by the above formula to obtain a score on the corresponding graph, and the score for calculating the similarity of the graph structure is specifically:
[0093]
[0094] where β i,j It calculates all the similarities in the entire graph structure, that is, obtains a global feature.
[0095] Step 2: Use the pre-trained large language model to obtain the embedding of the text in the knowledge graph;
[0096] In step 2, word embedding is performed on the two heterogeneous knowledge graphs, specifically:
[0097] The relationship between knowledge graphs is as follows: According to TransE, entities and relations are mapped to the same real plane, and for each triple (e h ,r,e t )∈T calculation provides a scoring function, specifically:
[0098] f(e h ,r,e t )=||h h +rh t || L1orL2
[0099] where e h ,e t It represents two entities, r represents the entity e h ,e t The relationship between entities; using this method, the calculation of entities can be modeled by calculating the distance between entities; h h and h t They refer to the head node and tail node of the two entities to be aligned, L1 and L2 are as follows:
[0100]
[0101] The knowledge graph is embedded with the BERT large language model, including:
[0102]
[0103] Where W is the word embedding matrix of the pre-trained large language model generated by the BERT large language model according to the probability model of the above formula; P is a set function formed by the BERT large language word embedding;
[0104] The matrix W generated by the pre-trained large language model BERT cannot well describe the actual structure of edges and nodes on the knowledge graph. The word embedding matrix W needs to be fine-tuned through random walks; where d(v (t) ) means v (t) In the figure, N(v (t) ) represents v (t) Neighbor node set;
[0105]
[0106] In the above formula, W = v (0) ,...v (L-1) The word embedding matrix generated by the large language model BERT with initialization is fine-tuned on the random walk sequence of the relationship between the edges and nodes on the graph; while v (0) Represents the starting node; by fusing random walk and large language model word embedding, we get the embedding matrix W.
[0107] Step 3: Use graph neural networks to learn and model the characteristics of entity relationships and capture the potential correlations and structures within the knowledge graph.
[0108] In step 3, specifically:
[0109] Applying the loss function based on interval sorting as the optimization objective of the knowledge graph TransE translation model R :
[0110]
[0111] Among them, entity e h and e t The entity representation matrix E after random walk fine-tuning of the large language model word embedding, and the relation r is also the relation representation matrix R after random walk fine-tuning of the large language model word embedding, where γ1,γ2>0 are two hyperparameters, μ1 is a balancing hyperparameter; and e h ',r',e t ' is the set T generated by negative sampling of samples during training, which represents the erroneous triples in the knowledge graph.
[0112] Step 4: Calculate and measure the accuracy of the entity alignment task, and use indicators to calculate the accuracy of the relationship between entities;
[0113] In step 4, the indicators include MRR, MR and HIST@n indicators, specifically:
[0114]
[0115] Where G is the triple set G(h,r,t), |G| is the number of triple samples, rank i It refers to the link prediction ranking of the i-th triple. The quality of this indicator is judged based on the fact that the larger the MRR score, the better.
[0116]
[0117] Where G is the triple set G(h,r,t), |G| is the number of triple samples, and rank iRefers to the link prediction ranking of the i-th triple. The MR indicator is similar to MRR. It is the inverse of MRR. Unlike MRR, the larger the score, the better. For MR, the smaller the score, the better.
[0118]
[0119] Hit represents the hit status of the first n predictions, if it is a hit, it is 1, otherwise it is 0; HIST@10 is selected in this embodiment, which refers to the performance of the knowledge graph representation learning model in the tail entity prediction task. It measures whether the model can accurately predict the true tail entity given the head entity and relationship, and regard the top 10 tail entities as the correct answer.
[0120] Graph neural networks are used to learn and model the characteristics of relevant entity relationships and their topological results, including:
[0121]
[0122] where a is the learned attention parameter vector, W1 and W2 are the learned weight matrices of the large language model fine-tuned by random walk, and α i,j is the similarity between the entities mentioned above, h i 、h j is the edge that brings together i and j, and β i,j is the similarity of the entire graph structure, τ is the balance coefficient, σ(·) is called the activation function, and the LeakyRelu activation function is selected:
[0123] LeakyRelu=max(0,x)+α·min(0,x)
[0124] The form of LeakyRelu is that when x ≥ 0, x is returned, and when x < 0, 0 < α < < 1 is returned;
[0125]
[0126] h is the feature after attention weighted aggregation of the graph neural network; for node Its feature representation h' after weighted aggregation by the attention mechanism is obtained by The characteristics of the neighbor nodes h j And the corresponding attention coefficient α ij Weighted summation is obtained; h' is the node The updated feature representation after considering the importance of neighbor nodes; express Neighbor nodes, α ijis the attention coefficient, W3 is the linearly varying embedding matrix weight, and σ(·) is the activation function.
[0127] Step 5: Fusion the two heterogeneous knowledge graphs to obtain the result of the knowledge graph entity alignment task.
[0128] In step 5, specifically:
[0129] Use graph neural networks to continuously predict tail nodes, and minimize L by continuously reducing the loss function to learn the relationship within the model;
[0130] For a specific relation triple (h, r, t) ∈ G, the optimization goal is as follows:
[0131]
[0132] Where D refers to the training set in the data set, and the triple (h h ,r,h t ) is the optimization objective of the minimization process of L, that is, minimizing the cumulative sum error;
[0133] The above formula defines a fitting process based on the evaluation index. Its purpose is to obtain better results during training. The specific steps are as follows:
[0134] λ(x)=λ1MR+λ2MRR+λ3HIST@n
[0135] For a graph neural network, it needs to be weighted by the indicators MR, MRR and HIST@n mentioned above. Each individual model only needs to fit L, but for the training set D * To perform verification or multi-model interactive training, the above formula needs to be considered.
[0136] where λ i It represents the weight of the relevant indicators, 0<λ i <1, and ∑λ i =1; each λ is a pre-set hyperparameter that needs to be adjusted through training. Its role is to act on multiple graph neural networks to obtain multiple graph neural networks with different performances, including:
[0137] (λ1(x)Gnn1,λ2(x)Gnn2,λ3(x)Gnn3,...λ4(x)Gnn4)×τβ i,j
[0138] Use the weight coefficients set in the above formula to act on multiple graph neural networks. During the training process of each graph neural network, there is a λ i(x) corresponds to it, and will be similar to the graph structure with the balance coefficient τ i,j For λ i (x) Perform cross multiplication operations, so that after a period of training, some graph neural network models with different scores will be obtained. Some processing is done on the models, including:
[0139] Worst(Gnn k )=σ(ω1Best(Gnn k )+ω2Worst(Gnn k )+ρ)
[0140] Among them, σ(·) is the activation function, ρ is the hyperparameter in the training process; ω1, ω2 are two interval hyperparameters, which are used to ensure that there will be no non-convergence during the training process, and ω1+ω2=1;
[0141] In this way, the graph neural network with the lowest score is selected, and the attention parameters of the worst graph neural network are adjusted. The idea of adjustment is to select the graph neural network with the highest score and give different parameters to each attention parameter; the attention parameters of the graph neural network with the worst performance are updated, and ω1 acts on the attention parameters of the graph neural network with the best performance and ω2 acts on the attention parameters of the current graph neural network. The sum of these two models is used as the new graph neural network attention parameters for the graph neural network with the lowest current score;
[0142] During the training process, a model is randomly selected and its λ i Make small adjustments:
[0143] Random Selectλ i ,letλ i change.
[0144] This embodiment provides an entity alignment system for a knowledge graph of market subject dishonesty information, which adopts the above-mentioned entity alignment method for a knowledge graph of market subject dishonesty information.
[0145] This embodiment designs a basic framework for entity alignment that integrates structural features and entity name features. Entity name and structural information complement each other, and this basic framework can greatly improve the alignment results of long-tail entities, thereby optimizing the overall alignment effect.
[0146] This embodiment uses a word shift distance model to reorder the pre-order alignment results to fully mine the entity name information and improve the alignment accuracy.
[0147] This embodiment adopts multi-model training to improve the parallel performance of training.
[0148] In order to solve the problem of lack of knowledge graph structure information in real-world datasets, this embodiment combines entity name information that is not affected by entity node degree with structure information to build a basic framework for entity alignment. Based on the previous step, the word shift distance model is used to further mine entity name information, reorder the previous results, and then generate the final alignment results. This model has achieved the best results on the widely used entity alignment dataset.
[0149] The present invention and its embodiments are described schematically above, and the description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by it and designs a structural method and an embodiment similar to the technical solution without creativity without departing from the purpose of the invention, they shall all fall within the protection scope of the present invention.
Claims
1. An entity alignment method for a knowledge graph of dishonest information of market entities, characterized by: The following steps are involved: Step 1, obtain the data of two heterogeneous knowledge graphs; Step 2: Use the pre-trained large language model to obtain the embedding of the text in the knowledge graph; Step 3: Use graph neural networks to learn and model the characteristics of entity relationships and capture the potential correlations and structures within the knowledge graph. Step 4: Calculate and measure the accuracy of the entity alignment task, and use indicators to calculate the accuracy of the relationship between entities; Step 5: Fusion the two heterogeneous knowledge graphs to obtain the result of the knowledge graph entity alignment task.
2. According to claim 1, an entity alignment method for a knowledge graph of dishonest information of market entities is characterized by: In step 1, the data of two heterogeneous knowledge graphs are obtained, the relationship between the two heterogeneous knowledge graphs is processed, and the corresponding data sets are generated after feature engineering, specifically: Where f: is a function that maps the corresponding entity to the entity index and obtains the dictionary of entity indexes about the knowledge graph; Where g: is a function that maps the corresponding relations between corresponding entities to the relation index, and obtains the dictionary of the corresponding relation indexes between entities in the knowledge graph; For entities The method of calculating similarity is to measure by introducing cosine similarity space, specifically: Among them, α i,j is the similarity between entities; From G1, From G2, G1 and G2 are two knowledge graphs to be aligned, G1 = (E1, R1, T1) and G2 = (E2, R2, T2), where E represents the entity, R represents the relationship between entities, and Represents a triple in the knowledge graph, and the known entity pair is represented as For the task of entity alignment in knowledge graphs, we need to consider the similarity between entities and the scores of similar entities in the entire graph structure, specifically: in is used to calculate α i,j The score of the entire graph structure on G2, is used to calculate α i,j The score of the entire graph structure on G1 is calculated by the above formula to obtain a score on the corresponding graph, and the score for calculating the similarity of the graph structure is specifically: where β i,j It calculates all the similarities in the entire graph structure, that is, obtains a global feature.
3. According to claim 2, an entity alignment method for a knowledge graph of dishonest information of market entities is characterized by: In step 2, word embedding is performed on the two heterogeneous knowledge graphs, specifically: The relationship between knowledge graphs is as follows: According to TransE, entities and relations are mapped to the same real plane, and for each triple (e h ,r,e t )∈T calculation provides a scoring function, specifically: f(e h ,r,e t )=||h h +r-h t || L1orL2 where e h ,e t It represents two entities, r represents the entity e h ,e t The relationship between entities; using this method, the calculation of entities can be modeled by calculating the distance between entities; h h and h t They refer to the head node and tail node of the two entities to be aligned, L1 and L2 are as follows: The knowledge graph is embedded with the BERT large language model, including: Where W is the word embedding matrix of the pre-trained large language model generated by the BERT large language model according to the probability model of the above formula; P is a set function formed by the BERT large language word embedding; The word embedding matrix W needs to be fine-tuned through random walks; where d(v (t) ) means v (t) In the figure, N(v (t) ) represents v (t) Neighbor node set; In the above formula, W = v (0) ,...v (L-1) The word embedding matrix generated by the large language model BERT with initialization is fine-tuned on the random walk sequence of the relationship between the edges and nodes on the graph; while v (0) Represents the starting node; by fusing random walk and large language model word embedding, we get the embedding matrix W.
4. The entity alignment method for the knowledge graph of market subject dishonesty information according to claim 3 is characterized by: In step 3, specifically: Apply the loss function based on margin sorting as the optimization target Q of the knowledge graph TransE translation model R : Among them, entity e h and e t The entity representation matrix E after random walk fine-tuning of the large language model word embedding, and the relation r is also the relation representation matrix R after random walk fine-tuning of the large language model word embedding, where γ1,γ2>0 are two hyperparameters, μ1 is a balancing hyperparameter; and e h ',r',e t ' is the set T generated by negative sampling of samples during training, which represents the erroneous triples in the knowledge graph.
5. The entity alignment method for the knowledge graph of market subject dishonesty information according to claim 4 is characterized by: In step 4, the indicators include MRR, MR and HIST@n indicators, specifically: Where G is the triple set G(h,r,t), |G| is the number of triple samples, and i It refers to the link prediction ranking of the i-th triple. The quality of this indicator is judged based on the fact that the larger the MRR score, the better. Where G is the triple set G(h,r,t), |G| is the number of triple samples, and rank i Refers to the link prediction ranking of the i-th triple. The MR indicator is similar to MRR. It is the inverse of MRR. Unlike MRR, the larger the score, the better. For MR, the smaller the score, the better. Hit represents the hit status of the first n predictions, if it is a hit, it is 1, otherwise it is 0; Graph neural networks are used to learn and model the characteristics of relevant entity relationships and their topological results, including: where a is the learned attention parameter vector, W1 and W2 are the learned weight matrices of the large language model fine-tuned by random walk, and α i,j is the similarity between entities, h i 、h j is the edge that brings together i and j, and β i,j is the similarity of the entire graph structure, τ is the balance coefficient, σ(·) is called the activation function, and the LeakyRelu activation function is selected: LeakyRelu=max(0,x)+α·min(0,x) The form of LeakyRelu is that when x ≥ 0, x is returned, and when x < 0, 0 < α < < 1 is returned; h is the feature after attention weighted aggregation of the graph neural network; for node Its feature representation h' after weighted aggregation by the attention mechanism is obtained by The characteristics of the neighbor nodes h j And the corresponding attention coefficient α ij Weighted summation is obtained; h' is the node The updated feature representation after considering the importance of neighbor nodes; express Neighbor nodes, α ij is the attention coefficient, W3 is the linearly varying embedding matrix weight, and σ(·) is the activation function.
6. The entity alignment method for the knowledge graph of market subject dishonesty information according to claim 5 is characterized by: In step 5, specifically: Use graph neural networks to continuously predict tail nodes, and minimize L by continuously reducing the loss function to learn the relationship within the model; For a specific relation triple (h, r, t) ∈ G, the optimization goal is as follows: Where D refers to the training set in the data set, and the triple (h h ,r,h t ) is the optimization objective of the minimization process of L, that is, minimizing the cumulative sum error; The above formula defines a fitting process based on the evaluation index. Its purpose is to obtain better results during training. The specific steps are as follows: λ(x)=λ1MR+λ2MRR+λ3HIST@n where λ i It represents the weight of the relevant indicators, 0<λ i <1, and ∑λ i =1; each λ is a pre-set hyperparameter that needs to be adjusted through training. Its role is to act on multiple graph neural networks to obtain multiple graph neural networks with different performances, including: (λ1(x)Gnn1,λ2(x)Gnn2,λ3(x)Gnn3,...λ4(x)Gnn4)×τβ i,j Use the weight coefficients set in the above formula to act on multiple graph neural networks. During the training process of each graph neural network, there is a λ i (x) corresponds to it, and will be similar to the graph structure with the balance coefficient τ i,j For λ i (x) Perform cross multiplication operations, so that after a period of training, some graph neural network models with different scores will be obtained. Some processing is done on the models, including: Worst(Gnn k )=σ(ω1Best(Gnn k )+ω2Worst(Gnn k )+r) Among them, σ(·) is the activation function, ρ is the hyperparameter in the training process; ω1, ω2 are two interval hyperparameters, which are used to ensure that there will be no non-convergence during the training process, and ω1+ω2=1; In this way, the graph neural network with the lowest score is selected, and the attention parameters of the worst graph neural network are adjusted. The idea of adjustment is to select the graph neural network with the highest score and give different parameters to each attention parameter; the attention parameters of the graph neural network with the worst performance are updated, and ω1 acts on the attention parameters of the graph neural network with the best performance and ω2 acts on the attention parameters of the current graph neural network. The sum of these two models is used as the new graph neural network attention parameters for the graph neural network with the lowest current score; During the training process, a model is randomly selected and its λ i Make small adjustments: Random Select λ i ,let λ i change。 7. An entity alignment system for a knowledge graph of market subject dishonesty information, characterized by: It adopts an entity alignment method for a knowledge graph of dishonest information of market entities as described in any one of claims 1-6.
