Knowledge graph representation learning method and system based on text graph enhancement

By constructing text graphs and using graph convolution networks to fusion knowledge graph structure semantics and text description content semantics, the problem that knowledge graph representation learning methods in the prior art is difficult to integrate triple structures and external auxiliary information, and more efficient knowledge graph embedding and knowledge inference performance are achieved.

CN114580638BActive Publication Date: 2025-03-18Chinese People's Liberation Army Cyberspace Force Information Engineering University
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210133500.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-14
Publication Date
2025-03-18
Estimated Expiration
2042-02-14

AI Technical Summary

Technical Problem

The existing knowledge graph representation learning methods are difficult to fully integrate triplet structure and external auxiliary information at the semantic level. Especially when dealing with knowledge graphs of huge scale, there are problems of triplet missing or errors, and the model performance is limited.

Method used

By constructing a text graph, the content semantic information of entity text description is extended into the knowledge graph, and the graph convolution network is used to realize the propagation and joint representation between the knowledge graph structure semantics and the content semantics of text description content, thereby improving the vector representation accuracy and expression ability of entities and relationships.

Benefits of technology

It realizes the improvement of entity and relational vector representation in the process of knowledge graph embedding, enhances the knowledge reasoning performance, and is easy to apply in actual industry fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114580638B_ABST
    Figure CN114580638B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of knowledge graph technology, and particularly relates to a knowledge graph representation learning method and system based on text graph enhancement, which extracts named entities by analyzing and processing the knowledge graph entity text description, and constructs a two-layer heterogeneous text graph formed by sentence layer nodes and text entity layer nodes; establishes a connection between text graph entities and knowledge graph entities and obtains an enhanced knowledge graph, and then processes to obtain node initialization representation; uses a graph convolutional neural network to perform semantic propagation between entities, and obtains an entity text representation that integrates text content semantics and triple structure semantics; combines the entity text representation with the entity structure representation that only considers triples, and updates and optimizes through negative samples and loss functions. The present invention can better integrate the entity text content semantics into the knowledge graph, effectively alleviate the sparsity problem of the knowledge graph, and improve the expressiveness of knowledge graph representation learning, and also has good applicability in the case of few samples or zero samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of knowledge graph technology, and in particular relates to a knowledge graph representation learning method and system based on text graph enhancement. Background Art

[0002] The origin of knowledge graph can be traced back to the 1950s. In 2012, Google formally proposed the concept of knowledge graph and used it in search engines, greatly improving its performance. With the rapid development of artificial intelligence and supported by technologies such as big data, the Internet of Things, and natural language processing, knowledge graphs have played an important role in promoting various social industries such as security, finance, justice, transportation, science and technology, and medical care. They are also often used as one of the core supporting technologies in the fields of intelligent question answering and recommendation systems. Therefore, it is of great practical significance to carry out research on knowledge graph-related technologies. With the rapid expansion of data and information, knowledge graph technology faces many problems in knowledge acquisition, representation, fusion and application. Especially for large-scale knowledge graphs, there are often problems such as missing triples (missing links) or errors. It is costly and inefficient to solve such problems manually. Knowledge reasoning refers to the use of existing entities and relationships in knowledge graphs to mine or complete missing and implicit knowledge. At the same time, it can also optimize possible errors or conflicts. Therefore, it is of great theoretical value and practical significance to carry out research on knowledge reasoning technologies and methods.

[0003] Existing knowledge graph reasoning technologies and methods can be roughly divided into two aspects: rule-based reasoning and learning-based reasoning. In terms of learning-based reasoning, it is mainly to use appropriate knowledge graph representation learning methods to map entities and relationships into low-dimensional dense vectors, and then predict the relationship between different vectors through specific algorithms, which roughly includes pure structure-based reasoning, structure-based and text description-based reasoning, and reasoning with reference to external information. Structure-based reasoning often only considers triple information when representing vectors, and simply models entities and relationships. For complex relationships and situations where triples are unevenly distributed and sparse, the vector expression ability and model performance are relatively limited. In order to solve this problem, various methods have tried to introduce external auxiliary information such as categories, time, and images into the model, which has improved the expression ability of the vector to a certain extent. Compared with auxiliary information such as categories, time, and images, text usually has richer semantic information. Therefore, models that combine text information are an important direction for current and future research on knowledge graph representation learning. However, such models often use independent encoding when combining text information, which makes it difficult to better integrate the semantics of triple structure and the content semantics of auxiliary information such as text, so the model performance needs to be further improved. Summary of the invention

[0004] To this end, the present invention provides a knowledge graph representation learning method and system based on text graph enhancement, which expands the content semantic information of entity text description into the knowledge graph through text graph, and realizes the propagation and joint representation between the knowledge graph structure semantics and the text description content semantics through graph convolutional network, thereby achieving full integration of the two, improving the vector representation accuracy and expression ability of entities and relationships in the knowledge graph embedding process and the knowledge reasoning performance, and facilitating the application of knowledge graph reasoning in actual industry fields.

[0005] According to the design scheme provided by the present invention, a knowledge graph representation learning method based on text graph enhancement includes the following contents:

[0006] For the original knowledge graph containing entity text description information, identify and extract the named entities in the original knowledge graph text description information, and build a text graph of entity description based on the entity layer and sentence layer;

[0007] The original knowledge graph is expanded by establishing connections between entity nodes in the text graph and entity nodes in the original knowledge graph, the expanded original knowledge graph is used as the enhanced knowledge graph, and each node in the enhanced knowledge graph is initialized with a vector representation;

[0008] For the enhanced knowledge graph with initial representation, nodes with different types of adjacency relationships are aggregated into entities through semantic propagation and aggregation in the graph convolutional network according to the types of adjacency relationships between nodes, and entity text representation that integrates structure and content semantics is obtained;

[0009] Obtain entity joint representation by combining entity text representation and entity structure representation in the original knowledge graph triple relationship;

[0010] Negative samples are constructed based on a self-adversarial negative sampling strategy. The loss function is set and negative samples are used to train and optimize each entity with a relationship in the entity joint representation to obtain a knowledge graph representation learning model. This knowledge graph representation learning model is used to vectorize the entities and relationships in the target input.

[0011] As a knowledge graph representation learning method based on text graph enhancement of the present invention, further, in the identification and extraction of named entities in the original knowledge graph, first, the entity text description information in the original knowledge graph is analyzed and processed, and the analysis and processing process at least includes: word segmentation and part-of-speech discrimination of the text description; then, the named entities are identified and extracted from the analysis and processing, and the category of each named entity is determined according to the identification results.

[0012] As a knowledge graph representation learning method based on text graph enhancement of the present invention, further, in a text graph for constructing entity description based on the entity layer and the sentence layer, first, the identified named entities and the sentences in which they are located are taken as different types of nodes to construct entity layer nodes and sentence layer nodes; then, connections are established between the named entity nodes and the sentence nodes in which they are located, between the named entities appearing in the same sentence, and between sentence nodes with contextual relationships.

[0013] As a knowledge graph representation learning method based on text graph enhancement of the present invention, further, in the initialization representation of each node in the enhanced knowledge graph, first, a connection is established between the text entity node in the text graph and the corresponding entity in the original knowledge graph from which it comes. If the text entity appears in the text descriptions of multiple different entities in the original knowledge graph, a connection is established between the text entity and each corresponding entity in the original knowledge graph. The connection type is distinguished according to the text entity category to obtain an enhanced knowledge graph; then, a pre-trained model for generating a text vector and vector representation dimension parameters are set, and the text entity nodes, sentence nodes in the text graph and entity nodes in the original knowledge graph are respectively input as pre-trained model inputs, and the pre-trained model is used to obtain the initialization vector representation corresponding to the input.

[0014] As a knowledge graph representation learning method based on text graph enhancement of the present invention, further, in the entity text representation, for the enhanced knowledge graph represented by the initialization vector, with the entity to be represented as the center and the relationship path length as the distance, the graph convolutional network model and the weighted aggregation method are used to aggregate the sentence nodes, text entity nodes and entity nodes whose distances from the entity to be represented meet the set conditions in turn and pass them to the entity to be represented, and corresponding weight parameters are set for different relationships.

[0015] As the knowledge graph representation learning method based on text graph enhancement of the present invention, further, the operation formula of aggregation transfer is expressed as follows: Among them, N i,r is the set of neighbor nodes of node i under relation r, c i,r 、c i,R Represents the relationship set N R , neighbor node set N i,r The size of is the weight parameter corresponding to the relation r, is the weight parameter corresponding to the node itself, represents the vector representation of node i in the l-th layer graph convolutional network model, and σ represents the activation function.

[0016] As a knowledge graph representation learning method based on text graph enhancement of the present invention, further, in obtaining the entity joint representation, for the entity text representation obtained in the enhanced knowledge graph and the entity structure representation obtained in the original knowledge graph, corresponding weight parameters are set for different entities and entity representation dimensions, and the weight parameters are used as gate vectors to perform weighted summation of the entity text representation and the entity structure representation dimension by dimension to obtain the entity joint representation.

[0017] As the knowledge graph representation learning method based on text graph enhancement of the present invention, further, the dimension-by-dimension weighted summation process is expressed as follows: e = σ(g e )⊙e s +(1-σ(g e ))⊙e d , where ⊙ represents the bitwise multiplication of elements, σ ​​is the activation function, and g e Represents the gate weight vector associated with entity e.

[0018] As the knowledge graph representation learning method based on text graph enhancement of the present invention, further, in the training optimization, the negative samples are constructed by setting the sampling rate, and the loss function is used Perform training optimization, where γ is the boundary hyperparameter, σ is the activation function, f(h,t) is the score of all triple positive samples, (h i ′,r,t i ′) is the i-th negative sample, p(h′ i ,r,t′ i ) is the sampling probability of the i-th negative sample obtained according to the sampling rate, f(h′ i ,t′ i ) is the negative sample score of the sampled triplet, and n is the number of negative samples.

[0019] Furthermore, the present invention also provides a knowledge graph representation learning system based on text graph enhancement, comprising: a construction module, an enhancement module, a joint module and an optimization module, wherein:

[0020] A construction module is used to identify and extract named entities in the text description information of the original knowledge graph containing entity text description information, and to construct a text graph of entity description based on the entity layer and sentence layer;

[0021] An enhancement module, used to expand the original knowledge graph by establishing connections between entity nodes in the text graph and entity nodes in the original knowledge graph, using the expanded original knowledge graph as the enhanced knowledge graph, and initializing vector representations for each node in the enhanced knowledge graph;

[0022] The joint module is used to enhance the knowledge graph of the initial representation. According to the type of adjacency relationship between nodes, nodes with different types of adjacency relationships are aggregated into entities through semantic propagation and aggregation in the graph convolutional network to obtain entity text representation that integrates structure and content semantics; the entity joint representation is obtained by combining the entity text representation with the entity structure representation in the triple relationship of the original knowledge graph;

[0023] The optimization module is used to construct negative samples based on a self-adversarial negative sampling strategy, set a loss function, and use negative samples to train and optimize each entity with a relationship in the entity joint representation to obtain a knowledge graph representation learning model, and use the knowledge graph representation learning model to vectorize the entities and relationships in the target input.

[0024] Beneficial effects of the present invention:

[0025] 1. The present invention adopts named entity recognition, two-layer heterogeneous graph construction, etc. to obtain the text graph of knowledge graph entity description information, and expands it to the original knowledge graph. The obtained enhanced knowledge graph can simultaneously contain the text content semantics and the relational structure semantics of the original graph, thereby better supporting subsequent knowledge graph representation learning and knowledge reasoning.

[0026] 2. Based on the enhanced knowledge graph initialization representation, the present invention adopts graph models such as graph convolutional networks to represent entity nodes, which can realize the semantic propagation between text content semantics and relationship structure semantics. The obtained entity representation can better integrate the content semantics and structural semantics of knowledge graph entities, thereby making the knowledge graph representation learning have better semantic expression ability.

[0027] 3. The present invention adopts a gate mechanism to combine the entity text representation obtained by the enhanced graph with the entity representation obtained by the original knowledge graph. Setting different parameters for different representation dimensions can achieve more fine-grained fusion. At the same time, the self-adversarial negative sample construction strategy better guarantees the quality of the training data set. These make the trained and optimized model have better performance, that is, better knowledge graph representation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a schematic diagram of the process of the knowledge graph representation learning method based on text graph enhancement in the embodiment;

[0029] Figure 2 This is a schematic diagram of the overall framework of knowledge graph representation learning in the embodiment;

[0030] Figure 3 It is a schematic diagram of constructing a multi-layer heterogeneous text graph of entity description information in the embodiment;

[0031] Figure 4This is a schematic diagram of enhancing the knowledge graph construction and entity joint representation in the embodiment;

[0032] Figure 5 Schematic diagram of the modularization of the knowledge graph representation learning system in the embodiment. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of the present invention clearer and more understandable, the present invention is further described in detail below in conjunction with the accompanying drawings and technical solutions.

[0034] Considering the high accuracy and reliability requirements of knowledge graph representation learning and reasoning methods in real research and field applications, but the problem that existing knowledge graph representation learning methods are difficult to fully integrate triple structure and external auxiliary information at the semantic level, this embodiment of the present invention provides a knowledge graph representation learning method based on text graph enhancement, see Figure 1 As shown, it contains the following contents:

[0035] S101, for an original knowledge graph containing entity text description information, identifying and extracting named entities in the original knowledge graph text description information, and constructing a text graph of entity description based on the entity layer and sentence layer;

[0036] S102, expanding the original knowledge graph by establishing a connection between the entity nodes in the text graph and the entity nodes in the original knowledge graph, using the expanded original knowledge graph as an enhanced knowledge graph, and initializing a vector representation for each node in the enhanced knowledge graph;

[0037] S103, for the enhanced knowledge graph of the initialization representation, according to the type of adjacency relationship between nodes, nodes with different types of adjacency relationships are aggregated into entities through semantic propagation and aggregation in the graph convolutional network to obtain entity text representation that integrates structure and content semantics;

[0038] S104, obtaining entity joint representation by combining entity text representation and entity structure representation in the original knowledge graph triple relationship;

[0039] S105. Construct negative samples based on a self-adversarial negative sampling strategy, set a loss function and use negative samples to train and optimize each entity that has a relationship in the entity joint representation to obtain a knowledge graph representation learning model, and use the knowledge graph representation learning model to perform vector representation of entities and relationships in the target input.

[0040] See also Figure 2The framework shown in the figure expands the content semantic information of entity text description into the knowledge graph by means of text graph, and at the same time integrates the propagation and joint representation between the knowledge graph structure semantics and the text description content semantics through the graph convolutional network, thereby achieving the full integration of the two and improving the expressive power of entity vector representation and knowledge reasoning performance; it can better integrate the entity text content semantics into the knowledge graph, effectively alleviate the sparsity problem of the knowledge graph, and improve the expressive power of knowledge graph representation learning. At the same time, it also has better applicability in the case of few or zero samples.

[0041] See also Figure 3 As shown, a suitable method is used to identify named entities from the text description information corresponding to the knowledge graph entity, and a text graph for obtaining entity description is constructed based on a multi-layer heterogeneous representation method. For the knowledge graph entity containing text description information, a suitable method is selected from the Jieba tool, the conditional random field (CRF) algorithm, the BERT model or the Transformer architecture, etc., to perform word segmentation, part-of-speech discrimination and other analysis and processing on the entity text description. On this basis, the named entities contained therein are extracted and identified, which are called "text entities", and then the categories of each text entity are determined according to the recognition results, such as their categories can be described in the manner shown in Table 1;

[0042] Table 1. Classification of named entities

[0043] type describe PERSON figure NORP Nationality, religion, etc. FAC Buildings, roads, etc. ORG Companies, institutions, etc. GPE Country, city, etc. LOC Mountains, water bodies, etc. PRODUCT Goods, transportation, food, etc. EVENT Famous battles, sports events, etc. WORK_OF_ART Title of book, song, etc. LAW law LANGUAGE language

[0044] On the basis of named entity recognition, the identified text entities and sentences contained in the text description are respectively regarded as different types of nodes to construct entity layer nodes and sentence layer nodes. On this basis, connections are established between different nodes, and all connections are undirected. Among them, for nodes between different levels, a connection is established between the text entity node and the node of the sentence where the text entity is located. For nodes in the same level, if two text entities appear in the same sentence, that is, they have a co-occurrence relationship, then a connection is established between the two text entity nodes. If the two sentences are in a contextual relationship in the text description, then a connection is established between the two sentence nodes. After the above processing, a two-layer heterogeneous "text graph" of entity text description information can be obtained.

[0045] like Figure 4As shown, based on the constructed heterogeneous text graph, by establishing the connection between its text entity nodes and the entity nodes in the original knowledge graph, the expanded enhanced knowledge graph is obtained. On this basis, a suitable pre-training model is used to give the initialization representation of each node of the enhanced knowledge graph. Specifically, it may involve the following contents: according to the text entity recognition result, a connection is established between the text entity node in the text graph and the corresponding entity node in the original knowledge graph, that is, if the text entity node in the text graph comes from the text description of an entity in the original knowledge graph, then a connection is established between the text entity node and the text entity. If a text entity appears in the text descriptions of multiple different entities, then a connection is established between the text entity and each of the entities, that is, a one-to-many connection is established, and its connection type is distinguished according to the text entity category, for example, if the text entity type is "PERSON", then "PERSON" is marked on the connection. The connection between the newly established text graph text entity and the original knowledge graph entity is called "enhanced connection", and the new graph obtained after the connection is established is called "enhanced knowledge graph". For the constructed enhanced knowledge graph, select a suitable pre-trained model, such as BERT, RoBERTa, GPT-3, T5, etc., set appropriate vector representation dimension parameters, and on this basis, take the text entity nodes, sentence nodes in the text graph, and entity nodes in the original graph as input, calculate the output of the pre-trained model, and use it as the initial distributed vector representation of each node of the enhanced knowledge graph.

[0046] As a knowledge graph representation learning method based on text graph enhancement in an embodiment of the present invention, further, in obtaining the entity text representation, for the enhanced knowledge graph represented by the initialization vector, with the entity to be represented as the center and the relationship path length as the distance, suitable graph convolutional networks, graph attention mechanisms and other models and weighted aggregation methods that can be used for graph data analysis can be selected to aggregate sentence nodes, text entity nodes and entity nodes whose distances from the entity to be represented meet the set conditions in turn and pass them to the entity to be represented, and corresponding weight parameters are set for different relationships.

[0047] Taking the graph convolutional network model RGCN as an example, for the entity to be represented, different weight parameters are set according to the adjacency relationship types between text entity nodes and text sentence nodes, between text entity nodes, between text entity nodes and original graph entity nodes, and between original graph entity nodes, and transformation and aggregation operations are performed in the direction of the entity to be represented. The expression is as follows:

[0048]

[0049] Among them, N i,r YesN i,R The set of neighbor nodes of node i under relationship r. i,r、c i,R are normalization constants, representing the relation set N R , neighbor node set N i,r The size of is the weight parameter corresponding to the relation r, is the weight parameter corresponding to the node itself, represents the vector representation of node i in the lth layer of the RGCN network model, and σ represents the activation function. Through the above operations, the node representations of different types of adjacency relationships are aggregated into entities, and then the entity text representation that integrates structure and content semantics is obtained to achieve semantic propagation between the original graph entity containing relationship structure semantics and the text entity containing text content semantics.

[0050] Furthermore, in obtaining the joint entity representation, corresponding weight parameters are set for different entities and entity representation dimensions for the entity text representation obtained in the enhanced knowledge graph and the entity structure representation obtained in the original knowledge graph. The weight parameters are used as gate vectors to perform weighted summation of the entity text representation and the entity structure representation dimension by dimension to obtain the joint entity representation.

[0051] The gate mechanism is used to jointly represent the entity text representation with the traditional entity structure representation that only considers the triple relationship of the original knowledge graph. Figure 4 As shown in the figure, the general process may include the following contents: Considering only the entity structure representation of the original triple relationship, the specific method is: for the original knowledge graph before expansion and enhancement, select the appropriate knowledge graph representation learning method that only considers the triple relationship structure, such as the typical TransE, TransR, TransD, RotatE, QuatE, ConvE and other representation learning models, to obtain the entity structure representation of the original knowledge graph. Entity joint representation based on the gate mechanism, the specific method is: for the entity text representation h obtained from the enhanced knowledge graph d and the entity structure representation h obtained from the original knowledge graph s , for different entities and different dimensions of entity representation, different weight parameters are set respectively, which are used as gate vectors to perform weighted summation of the text representation and structure representation of the entity dimension by dimension, and then obtain the entity joint representation based on the gate mechanism. The calculation expression is as follows:

[0052] e=σ(g e )⊙e s +(1-σ(g e ))⊙e d

[0053] Among them, ⊙ represents the bitwise multiplication of elements, σ ​​is the Sigmoid function, and g e Represents the gate weight vector associated with entity e, which is used to constrain the structure representation e in e sand text representation d Specific gravity. g e Adopt and s Initialize in the same way, and dynamically adjust during training. After training, it will not be changed. Thus, the representation of the head entity h, the relationship r, and the tail entity t is as follows:

[0054] h=σ(g e )⊙h s +(1-σ(g e ))⊙h d

[0055] r=r d

[0056] t=σ(g e )⊙t s +(1-σ(g e ))⊙t d

[0057] During the training optimization process, a self-adversarial negative sampling strategy is adopted to construct high-quality negative samples for model training and parameter optimization. Different possible negative samples can be sampled according to the following probabilities:

[0058]

[0059] Where α is the sampling rate, f r (h′ j ,t′ j ) is the score of the sampled triplet negative sample, which is calculated according to the confidence score function of the knowledge representation learning method selected in step 401. On this basis, a suitable loss function is further constructed as follows:

[0060]

[0061] Among them, γ is the boundary hyperparameter, σ is the Sigmoid function, f(h,t) is the score of all triple positive samples, (h′ i ,r,t′ i ) is the i-th negative sample, p(h′ i ,r,t′ i ) is the sampling probability of the i-th negative sample obtained according to the sampling rate, f(h′ i ,t′ i ) is the negative sample score of the sampled triplet, and n is the number of negative samples. By searching and setting appropriate hyperparameters, including learning rate, parameter optimization algorithm, vector representation dimension, boundary hyperparameters, sampling rate, etc., the model is trained and optimized with the goal of minimizing the loss function to obtain entity representation with better expressive ability.

[0062] Further, based on the above method, see Figure 5 As shown, the embodiment of the present invention also provides a knowledge graph representation learning system based on text graph enhancement, comprising: a construction module, an enhancement module, a joint module and an optimization module, wherein:

[0063] A construction module is used to identify and extract named entities in the text description information of the original knowledge graph containing entity text description information, and to construct a text graph of entity description based on the entity layer and sentence layer;

[0064] An enhancement module, used to expand the original knowledge graph by establishing connections between entity nodes in the text graph and entity nodes in the original knowledge graph, using the expanded original knowledge graph as the enhanced knowledge graph, and initializing vector representations for each node in the enhanced knowledge graph;

[0065] The joint module is used to enhance the knowledge graph of the initial representation. According to the type of adjacency relationship between nodes, nodes with different types of adjacency relationships are aggregated into entities through semantic propagation and aggregation in the graph convolutional network to obtain entity text representation that integrates structure and content semantics; the entity joint representation is obtained by combining the entity text representation with the entity structure representation in the triple relationship of the original knowledge graph;

[0066] The optimization module is used to construct negative samples based on a self-adversarial negative sampling strategy, set a loss function, and use negative samples to train and optimize each entity with a relationship in the entity joint representation to obtain a knowledge graph representation learning model, and use the knowledge graph representation learning model to vectorize the entities and relationships in the target input.

[0067] Unless otherwise specifically stated, the relative steps, numerical expressions and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present invention.

[0068] Based on the above method and / or system, an embodiment of the present invention also provides a server, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the above method.

[0069] Based on the above method and / or system, an embodiment of the present invention further provides a computer-readable medium having a computer program stored thereon, wherein the above method is implemented when the program is executed by a processor.

[0070] In all examples shown and described herein, any specific values ​​should be interpreted as merely exemplary and not as limiting, and thus other examples of the exemplary embodiments may have different values.

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

[0072] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A knowledge graph representation learning method based on text graph enhancement, characterized in that: Contains the following: For the original knowledge graph containing entity text description information, identify and extract the named entities in the original knowledge graph text description information, and build a text graph of entity description based on the entity layer and sentence layer; The original knowledge graph is expanded by establishing a connection between the entity nodes in the text graph and the entity nodes in the original knowledge graph, the expanded original knowledge graph is used as the enhanced knowledge graph, and each node in the enhanced knowledge graph is initialized with a vector representation; wherein, in the initialization representation of each node in the enhanced knowledge graph, first, a connection is established between the text entity nodes in the text graph and the corresponding entities in the original knowledge graph from which they come. If the text entity appears in the text descriptions of multiple different entities in the original knowledge graph, a connection is established between the text entity and each corresponding entity in the original knowledge graph, and the connection type is distinguished according to the text entity category to obtain an enhanced knowledge graph; then, a pre-trained model for generating a text vector and vector representation dimension parameters are set, and the text entity nodes, sentence nodes in the text graph and entity nodes in the original knowledge graph are respectively used as pre-trained model inputs, and the pre-trained model is used to obtain the initialization vector representation corresponding to the input; For the enhanced knowledge graph with initial representation, nodes with different types of adjacency relationships are aggregated into entities through semantic propagation and aggregation in the graph convolutional network according to the types of adjacency relationships between nodes, and entity text representation that integrates structure and content semantics is obtained; Obtain entity joint representation by combining entity text representation and entity structure representation in the original knowledge graph triple relationship; Negative samples are constructed based on the self-adversarial negative sampling strategy. The loss function is set and the negative samples are used to train and optimize the entities with relationships in the entity joint representation to obtain the knowledge graph representation learning model. The knowledge graph representation learning model is used to vectorize the entities and relationships in the target input.

2. The knowledge graph representation learning method based on text graph enhancement according to claim 1 is characterized in that: To identify and extract named entities from the original knowledge graph, first, analyze and process the entity text description information in the original knowledge graph. The analysis and processing process at least includes: word segmentation and part-of-speech discrimination of the text description; then, identify and extract named entities from the analysis and processing, and determine the category of each named entity based on the recognition results.

3. The knowledge graph representation learning method based on text graph enhancement according to claim 1 or 2, characterized in that: In the text graph that constructs entity description based on the entity layer and sentence layer, first, the identified named entities and the sentences they are in are regarded as different types of nodes to construct entity layer nodes and sentence layer nodes; then, connections are established between the named entity nodes and the sentence nodes they are in, between the named entities appearing in the same sentence, and between sentence nodes with contextual relationships.

4. The knowledge graph representation learning method based on text graph enhancement according to claim 1 is characterized in that: In obtaining the textual representation of entities, for the enhanced knowledge graph represented by the initialization vector, with the entity to be represented as the center and the length of the relationship path as the distance, the graph convolutional network model and the weighted aggregation method are used to aggregate the sentence nodes, text entity nodes and entity nodes whose distances from the entity to be represented meet the set conditions in turn and pass them to the entity to be represented, and set corresponding weight parameters for different relationships.

5. The knowledge graph representation learning method based on text graph enhancement according to claim 4 is characterized in that: The operation formula of aggregate transfer is as follows: Among them, N i,r is the set of neighbor nodes of node i under relation r, c i,r 、c i,R Represents the relationship set N R , neighbor node set N i,r The size of is the weight parameter corresponding to the relation r, is the weight parameter corresponding to the node itself, represents the vector representation of node i in the l-th layer graph convolutional network model, and σ represents the activation function.

6. The knowledge graph representation learning method based on text graph enhancement according to claim 1 is characterized in that: In obtaining the joint entity representation, corresponding weight parameters are set for different entities and entity representation dimensions for the entity text representation obtained in the enhanced knowledge graph and the entity structure representation obtained in the original knowledge graph. The weight parameters are used as gate vectors to perform weighted summation of the entity text representation and the entity structure representation dimension by dimension to obtain the joint entity representation.

7. The knowledge graph representation learning method based on text graph enhancement according to claim 6 is characterized in that: The dimension-by-dimension weighted summation process is expressed as follows: e = σ(g e )⊙e s +(1-σ(g e ))⊙e d , where ⊙ represents the bitwise multiplication of elements, σ ​​is the activation function, and g e Represents the gate weight vector associated with entity e.

8. The knowledge graph representation learning method based on text graph enhancement according to claim 1 is characterized in that: In training optimization, negative samples are constructed by setting the sampling rate and using the loss function Perform training optimization, where γ is the boundary hyperparameter, σ is the activation function, f(h,t) is the score of all triple positive samples, (h i ′,r,t i ′) is the i-th negative sample, p(h′ i ,r,t′ i ) is the sampling probability of the i-th negative sample obtained according to the sampling rate, f(h′ i ,t′ i ) is the negative sample score of the sampled triplet, and n is the number of negative samples.

9. A knowledge graph representation learning system based on text graph enhancement, characterized in that: It includes: construction module, enhancement module, joint module and optimization module, among which, A construction module is used to identify and extract named entities in the text description information of the original knowledge graph containing entity text description information, and to construct a text graph of entity description based on the entity layer and sentence layer; An enhancement module is used to expand the original knowledge graph by establishing a connection between the entity nodes in the text graph and the entity nodes in the original knowledge graph, taking the expanded original knowledge graph as the enhanced knowledge graph, and performing an initialization vector representation on each node in the enhanced knowledge graph; wherein, in the initialization representation of each node in the enhanced knowledge graph, first, a connection is established between the text entity nodes in the text graph and the corresponding entities in the original knowledge graph from which they are derived. If the text entity appears in the text descriptions of multiple different entities in the original knowledge graph, then a connection is established between the text entity and each corresponding entity in the original knowledge graph, and the connection type is distinguished according to the text entity category to obtain an enhanced knowledge graph; then, a pre-trained model and vector representation dimension parameters for generating text vectors are set, and the text entity nodes, sentence nodes in the text graph and entity nodes in the original knowledge graph are respectively used as pre-trained model inputs, and the pre-trained model is used to obtain the initialization vector representation corresponding to the input; The joint module is used for the enhanced knowledge graph of the initial representation. According to the type of adjacency relationship between nodes, nodes with different types of adjacency relationships are aggregated into entities through semantic propagation and aggregation in the graph convolutional network to obtain entity text representation containing fusion structure and content semantics; the entity joint representation is obtained by combining the entity text representation and the entity structure representation in the triple relationship of the original knowledge graph; The optimization module is used to construct negative samples based on a self-adversarial negative sampling strategy, set a loss function, and use negative samples to train and optimize each entity with a relationship in the entity joint representation to obtain a knowledge graph representation learning model, and use the knowledge graph representation learning model to vectorize the entities and relationships in the target input.