Super-relation knowledge graph representation method and system based on dynamic fusion of structure and text information

By using technologies such as graph convolution neural networks and pre-trained language models in hyperrelational knowledge graphs, dynamically fusion of structures and text information is solved, and the problem of failing to effectively utilize text information in existing methods is generated, and richer entities and Relational representation improves the representation quality and model performance of the knowledge graph.

CN119323248AActive Publication Date: 2025-01-17HARBIN ENG UNIV

Patent Information

Application Number
CN202411358418.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-17
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

The existing hyperrelational knowledge graph representation method fails to effectively utilize the rich text information in the graph, resulting in insufficient representation of entity with limited structural knowledge.

Method used

Using graph convolutional neural networks, pre-trained language models and Transformer technologies, combined with comparative learning, dynamically fuses the structure and text information in the hyperrelational knowledge graph to generate richer entity and relationship representations.

Benefits of technology

By fully integrating structure and text knowledge, the quality of representation of entities and relationships is improved, the problem of insufficient entity representation in existing methods is solved, and the training efficiency and performance of the model is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323248A_ABST
    Figure CN119323248A_ABST
Patent Text Reader

Abstract

The invention discloses a super-relation mapping knowledge domain representation method and system based on dynamic fusion of structure and text information, and belongs to the technical field of mapping knowledge domain representation. The problem that rich text information in a super-relation knowledge graph is not considered in an existing super-relation knowledge graph representation method is solved. According to the method, a graph convolutional neural network, soft cue word fine tuning, a pre-training language model, Transform, comparative learning and other technologies are used to construct a super-relation knowledge graph representation method based on dynamic fusion of structure and text information. The method can enhance the representation of entities and relationships in the atlas. In addition, the efficiency problem of the negative samples in the training process is fully considered, the negative sampling method based on comparative learning is provided, and the training efficiency and the model prediction effect are improved. The method is suitable for a knowledge graph representation technology in the field of knowledge graph completion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of knowledge graph representation, and specifically relates to a hyper-relational knowledge graph representation method and system based on dynamic fusion of structure and text information. Background Art

[0002] In recent years, artificial intelligence technology has made major breakthroughs in machine translation, search engines, face recognition, autonomous driving and other fields, profoundly changing human social life. The generation of massive data provides a solid foundation for the vigorous development of artificial intelligence technology. Although massive data contains rich knowledge, most of the data exists in unstructured form, which makes it difficult for humans to understand and apply massive knowledge, and also brings huge challenges to the efficient analysis and processing of computers. In order to obtain a large amount of knowledge that is convenient for computers to process, knowledge graphs came into being. Knowledge graphs are structured semantic knowledge bases that store a large number of facts. These facts are composed of triples (head entity, relationship, tail entity). Among them, entities can be places, people, organizations, etc., and entities are connected to each other through relationships, and finally form a heterogeneous directed graph. At present, a large number of representative knowledge graphs have emerged, such as YAGO, Freebase, Wikidata and other knowledge graphs, in which the number of triples can reach billions.

[0003] However, even though a large number of facts have been stored in the existing knowledge graph, there are still a large number of missing facts due to the incompleteness of the knowledge source and the inadequacy of knowledge extraction technology. For example, in the knowledge graph Freebase, about 93.8% of the person entities lack birthplace information, and 78.5% of the person entities lack nationality information. Knowledge graph completion aims to infer missing facts through existing facts, so the field of knowledge graph completion has received more extensive attention. With the rapid development of machine learning technology, knowledge graph representation learning has become an effective method for knowledge graph completion tasks. This method represents entities and relations in the graph as low-dimensional dense vectors, and uses a scoring function to evaluate the validity of facts. With the continuous deepening of research, the field of knowledge graph representation learning has been further refined, and representation learning based on hyper-relational knowledge graphs has also emerged. Hyper-relational knowledge graphs allow the addition of several "relation-entity" pairs to traditional triple facts to eliminate ambiguity and enhance the validity of facts. The traditional triples are called main triples, and the additional "relation-entity" key-value pairs are called qualifiers.

[0004] The m-TransH model proposed in 2016 combines relations in relations and qualifiers to obtain abstract relations, and then projects the entities onto the relational hyperplane. The NaLP model proposed in 2019 regards super-relational facts as a set of key-value pairs, encodes the key-value pairs using a convolutional neural network, and then uses a multi-layer perceptron to measure the compatibility between keys and values. The HINGE model proposed in 2020 first represents super-relational facts in the form of main triples and qualifiers, and uses a convolutional neural network to measure the validity of the main triples and its compatibility with each qualifier to obtain the validity of the facts. The StarE model proposed in 2020 uses a message passing network (CompGCN) as an encoder to obtain an embedded representation of entities and relations, which is then fed into the Transformer decoder to obtain the validity of the facts. The Hy-Transformer model proposed in 2021 replaces the CompGCN encoder in the StarE model with layer normalization and dropout modules to achieve better prediction performance. The model ShrinkE proposed in 2023 models the main triple as a spatial span from a point to a box, and the qualifier as a geometric contraction of the box, thereby reducing the set of possible answers and effectively simulating the reasoning pattern in the graph.

[0005] Since none of the above models consider the rich text information in the hyper-relational knowledge graph, which can be used to enrich the representation of entities and relations in the graph, the above models cannot produce effective representations for entities with limited structural knowledge. Summary of the invention

[0006] The purpose of this invention is to address the shortcomings of existing hyper-relational knowledge graph representation methods, namely, they do not take into account the rich text information in the hyper-relational knowledge graph. By using graph convolutional neural networks, pre-trained language models, Transformer and contrastive learning technologies, the structure and text knowledge in the hyper-relational knowledge graph are fully integrated to generate richer representations of entities and relationships. A hyper-relational knowledge graph representation method based on the dynamic fusion of structure and text information is designed.

[0007] To achieve the above object, the present invention provides the following solutions:

[0008] The present invention provides a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information, and the hyper-relational knowledge graph representation method comprises the following steps:

[0009] Step 1: Obtain a hyper-relational knowledge graph dataset, preprocess the dataset, and divide it into a training set and a test set;

[0010] Step 2: Construct a hyper-relational knowledge graph representation model based on the dynamic fusion of structure and text information;

[0011] Step 3: Use the training set data divided in step 1 to train the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information constructed in step 2;

[0012] Step 4: Use the test set data divided in step 1 to perform link prediction on the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information trained in step 3 to obtain the predicted entity results.

[0013] Furthermore, in another preferred embodiment, the above step 1 is specifically as follows:

[0014] Step 1.1: Obtain a hyper-relational data set. For each hyper-relational fact, the present invention adds its inverse relational fact to the data set;

[0015] Step 1.2: Obtain text description information of all entities and relations in the hyperrelational dataset;

[0016] Step 1.3: Divide the dataset into training set and test set.

[0017] Furthermore, in another preferred embodiment, the above step 2 is specifically as follows:

[0018] Step 2.1: Use graph convolutional neural network to obtain embedded representations of entities and relations;

[0019] Step 2.2: Pass the embedding representation of entities and relations through a multi-layer perceptron to obtain the embedding representation of structural soft prompt words;

[0020] Step 2.3: Use structural soft hint words to fine-tune and fully integrate the structure and text information of entities and relations in the hyper-relational knowledge graph to enrich the representation of entities and relations;

[0021] Step 2.4: Input the representation of entities and relations into the traditional knowledge graph embedding model ConvE model to obtain entity prediction results;

[0022] Step 2.5: Take the correct entity in the prediction result as the positive sample and other entities as the negative sample, and use the InfoNCE Loss loss function to reduce the representation deviation between the predicted entity and the correct entity.

[0023] Furthermore, in another preferred embodiment, the above step 3 is specifically as follows:

[0024] Step 3.1: Input the training set data divided in step 1 into the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information constructed in step 2 to obtain entity prediction results;

[0025] Step 3.2: Input the entity prediction result obtained in step 3.1 into the cross entropy loss function;

[0026] Step 3.3: Minimize the joint loss function that includes the cross entropy loss function and the InfoNCE Loss loss function in step 2.5 to train the model.

[0027] Furthermore, in another preferred embodiment, the above step 4 is specifically as follows:

[0028] Step 4.1: Input the training set data divided in step 1 into the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information constructed in step 2;

[0029] Step 4.2: Get entity prediction results.

[0030] The hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information described in the present invention can be fully implemented by computer software. Therefore, correspondingly, the present invention also provides a hyper-relational knowledge graph representation system based on dynamic fusion of structure and text information, and the system includes:

[0031] A storage device for obtaining a hyper-relational knowledge graph dataset, preprocessing the dataset, and dividing it into a training set and a test set;

[0032] A storage device for obtaining embedded representations of entities and relations using a graph convolutional neural network;

[0033] A storage device for constructing a hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information;

[0034] A storage device for training a hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information using training set data;

[0035] A storage device for performing link prediction on a trained hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information using test set data to obtain predicted entity results.

[0036] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for representing a hyper-relational knowledge graph based on dynamic fusion of structure and text information as described above is executed.

[0037] The present invention also provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes any one of the above-mentioned hyper-relational knowledge graph representation methods based on dynamic fusion of structure and text information.

[0038] The beneficial effects of the present invention are:

[0039] 1. To solve the shortcomings of the existing hyper-relational knowledge graph representation method, that is, it does not take into account the problem of rich text information in the hyper-relational knowledge graph. The present invention provides a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information, by using a pre-trained language model to encode the text information of entities and relationships, and at the same time, in order to avoid the problem of overfitting of the pre-trained language model to the text information, the present invention uses a graph convolutional neural network to extract the structural knowledge in the graph, and uses the structural knowledge to generate structural soft prompt words, which are input into the pre-trained language model together with the text information of entities and relationships to fully integrate the structure and text knowledge of the model, and finally obtain a richer entity and relationship representation.

[0040] Furthermore, compared with the prior art, the present invention has the beneficial effect of proposing a method that fully integrates the structural and textual knowledge in the hyper-relational knowledge graph, thereby generating richer embedded representations of entities and relationships. In addition, the present invention also fully considers the efficiency of negative sample sampling during training, and proposes a negative sampling method based on contrastive learning, which improves training efficiency and model performance.

[0041] The present invention is applicable to knowledge graph representation technology in the field of knowledge graph completion. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 It is a flow chart of the hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information described in the present invention;

[0044] Figure 2 It is a model diagram of the structural aggregation coding module described in the present invention;

[0045] Figure 3 It is a model diagram of the hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information described in the present invention. DETAILED DESCRIPTION

[0046] The specific embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

[0047] Implementation method 1, see Figure 1 This embodiment describes a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information, which is used to solve the shortcomings of existing hyper-relational knowledge graph representation methods, namely, the problem of rich text information in the hyper-relational knowledge graph is not taken into account. By using graph convolutional neural networks, pre-trained language models, Transformer and contrastive learning technologies, the structure and text knowledge in the hyper-relational knowledge graph are fully integrated to generate richer representations of entities and relationships. The hyper-relational knowledge graph representation method includes the following steps:

[0048] like Figure 1 As shown:

[0049] Step 1: Obtain a hyper-relational knowledge graph dataset, preprocess the dataset, and divide it into a training set and a test set;

[0050] Step 2: Construct a hyper-relational knowledge graph representation model based on the dynamic fusion of structure and text information;

[0051] Step 3: Use the training set data divided in step 1 to train the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information constructed in step 2;

[0052] Step 4: Use the test set data divided in step 1 to perform link prediction on the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information trained in step 3 to obtain the predicted entity results.

[0053] This embodiment provides a hyper-relational knowledge graph representation method based on dynamic fusion of structural and textual information. A pre-trained language model is used to encode textual information of entities and relationships. At the same time, in order to avoid the overfitting problem of the pre-trained language model on textual information, the present invention uses a graph convolutional neural network to extract structural knowledge in the graph, and uses the structural knowledge to generate structural soft prompt words, which are input into the pre-trained language model together with the textual information of entities and relationships to fully integrate the structural and textual knowledge of the model, and finally obtain richer entity and relationship representations.

[0054] Implementation method 2: This implementation method is to illustrate step 1 in the hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information described in implementation method 1 by way of example;

[0055] Step 1: Obtain a hyper-relational knowledge graph dataset, preprocess the dataset, and divide it into a training set and a test set;

[0056] The specific steps include:

[0057] Step 1.1: Obtain a hyper-relational data set. For each hyper-relational fact, this implementation adds its inverse relational fact to the data set.

[0058] Step 1.2: Obtain text description information of all entities and relations in the hyperrelational dataset;

[0059] Step 1.3: Divide the dataset into training set and test set.

[0060] Implementation method three, see Figure 2 This embodiment is described. This embodiment is to illustrate step 2 in the hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information described in the first embodiment by way of example;

[0061] Step 2: Construct a hyper-relational knowledge graph representation model based on the dynamic fusion of structure and text information;

[0062] The specific steps include:

[0063] Step 2.1: Use graph convolutional neural network to obtain embedded representations of entities and relations;

[0064] First, the embedding representations of entities and relations in the hyper-relational knowledge graph are randomly initialized, and then the embedding representation of the qualifier is obtained by fusing the representations of all entities and relations in the qualifier of the hyper-relational fact:

[0065]

[0066] Among them, h q represents the embedding representation of all qualifiers corresponding to the hyperrelational fact, h qv It is the entity representation in the qualifier, h qr is the relational representation in the qualifier, where W Q is a shared weight, Q iurv Represents the set of all qualifiers of the current super-relational fact. Then, the relational representation and qualifier representation of the main triple in the super-relational fact are weighted to obtain the aggregate relational representation:

[0067] h rq =αh r +(1-α)h q

[0068] Among them, h rqIndicates the relationship after aggregation of qualifiers. rq By expressing the relation h r and qualifiers indicate h q To prevent α from being set as a hyperparameter, this implementation sets α as a learnable parameter, which controls the ratio of the relationship information itself to the qualifier information in the relationship update. Finally, the node's own representation is fused with the aggregated relationship representation to obtain the node's representation, and the node's neighbor node representation is obtained. The graph convolutional neural network is used to fuse the neighbor node representations, update the target node's representation, and update the relationship representation:

[0069]

[0070] Among them, N(v) represents the set of neighbor nodes of node v, W λ(r) It is related to the direction of the edge (relationship), and corresponds to three shared parameter matrices: input edge, output edge, and self edge. Input edge means that information can flow in both directions, not just along the direction of the edge, but also in the opposite direction. Self edge means that each node should also have an edge from itself to itself, so that when the node aggregates the information of its neighboring nodes, its original state can be retained. Figure 2 The structured aggregation encoding module shown enhances the representation of relations by incorporating multiple additional qualifier representations. Furthermore, the method has no restrictions on the order of the input and the number of qualifiers.

[0071] Step 2.2: Pass the embedding representation of entities and relations through a multi-layer perceptron to obtain the embedding representation of structural soft prompt words;

[0072] In order to make the structural soft prompt words contain the structural knowledge in the hyper-relational knowledge graph, the representation of entities and relations obtained in the previous step is input into the multi-layer perceptron:

[0073] S=W out ·(σ(W in ·x))

[0074] Among them, W in and W out represents the parameter matrix in the multilayer perceptron, σ represents the nonlinear activation function, and the embedding representation of the structural soft prompt word is represented by S. Get the output of the multilayer perceptron and use this output as the embedding representation S of the structural soft prompt word. Then evenly distribute S to the first position of the input of the L-layer Transformer layer in the pre-trained language model:

[0075] S = distribute(F(E e ,E r ))

[0076] Where, distribute() means to evenly distribute the structural soft hint S to the first position of the input of the L-layer Transformer layer in the pre-trained language model, E e The embedding representation of the entity, E r Embedding representations that represent relations.

[0077] Step 2.3: Use structural soft hint words to fine-tune and fully integrate the structure and text information of entities and relations in the hyper-relational knowledge graph to enrich the representation of entities and relations;

[0078] The structural soft prompt words are a set of trainable vector sequences, which are added to the input header of the pre-trained language model with frozen parameters. Inputting the structural soft prompt words together with the text description information of each element of the super-relational fact into the pre-trained language model with frozen parameters can effectively avoid the problem of overfitting of text information caused by fine-tuning the pre-trained language model. This embodiment first organizes the structural soft prompt words and the text description information of each element in the super-relational fact into a sequence as the input of the pre-trained language model. S trainable vector sequences are added before the input of each layer of the Transformer. This embodiment defines the j-th layer structural soft prompt as The hidden state of the i-th position in the j-th layer is defined as follows:

[0079]

[0080] Among them, w i is the word embedding vector in the input, and Trans() is the forward function of the Transformer model, which acts on the entire sequence. Then the self-attention mechanism of the Transformer model in the pre-trained language model is used to fuse the structure and textual knowledge of the hyper-relational knowledge graph. During the training process, the parameters of the pre-trained language model remain unchanged, and only the embedding representation of the structural soft hint words is updated. During the Trans() process, the structural knowledge and semantic knowledge in the graph are fully integrated. Initially, the structural soft hint words only contain the structural knowledge in the hyper-relational knowledge graph. However, with the application of the self-attention mechanism in the Transformer, the structural soft hint words continuously integrate semantic knowledge from the textual information. Ultimately, the structural soft hints contain not only structural knowledge but also semantic knowledge.

[0081] Step 2.4: Input the representation of entities and relations into the traditional knowledge graph embedding model ConvE model to obtain entity prediction results;

[0082] This implementation uses the hidden state of the structural soft prompt words in the output of the last layer of Transformer as the representation of entities and relationships, and then inputs the representation of entities and relationships into the traditional knowledge graph embedding model ConvE model to obtain the scoring results of all entities, and the entity with the highest score is used as the result of entity prediction. In the ConvE model, the vectors of the head entity and relationship are stacked and then organized into a two-dimensional tensor, which is convolved using a two-dimensional convolution kernel to obtain a feature vector, which is then projected into a space of the same dimension as the entity and relationship representation through a fully connected layer, and matched with the representation of the candidate target entity in the inner product layer.

[0083] Step 2.5: Take the correct entity in the prediction result as the positive sample and other entities as the negative sample, and use the InfoNCE Loss function to reduce the representation deviation between the predicted entity and the correct entity;

[0084] This implementation method uses the predicted entity of a sample in the same batch as an anchor point, its corresponding correct entity as a positive sample, and the head entity and predicted entity of other samples in the same batch as negative samples; then uses InfoNCE Loss as part of the joint loss function to reduce the representation deviation between the predicted entity and the correct entity.

[0085] This implementation uses the InfoNCE loss function:

[0086]

[0087] Where |N| represents the batch size, with a total of |N| head entities and |N-1| predicted entities as negative samples. γ>0 encourages the model to increase the score of the correct facts (h, r, t, Q). The temperature coefficient τ allows the model to adjust the relative importance of negative samples. A smaller τ makes the loss function more focused on hard negative samples, but increases the risk of overfitting label noise. In order to avoid setting τ as a hyperparameter, this implementation will Set as learnable parameters.

[0088] In order to make the structural soft prompt words contain the structural knowledge in the hyper-relational knowledge graph, this implementation mode inputs the representation of entities and relations into a multi-layer perceptron, obtains the output of the multi-layer perceptron, and uses the output as the embedded representation of the structural soft prompt words.

[0089] In order to effectively avoid the problem of overfitting text information caused by fine-tuning the pre-trained language model, this embodiment inputs the structural soft prompt words and the text description information of each element of the super-relation fact into the pre-trained language model with frozen parameters.

[0090] Implementation method 4: This implementation method is to illustrate step 3 in the hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information described in implementation method 3 by way of example;

[0091] Step 3: Construct a hyper-relational knowledge graph representation model based on the dynamic fusion of structure and text information;

[0092] The specific steps include:

[0093] Step 3.1: Input the training set data divided in step 1 into the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information constructed in step 2 to obtain entity prediction results;

[0094] Step 3.2: Input the entity prediction result obtained in step 3.1 into the cross entropy loss function;

[0095] Step 3.3: Minimize the joint loss function that includes the cross entropy loss function and the InfoNCE Loss loss function in step 2.5 to train the model.

[0096] In this implementation, the loss function is designed as a joint loss function:

[0097] L=L ConvE +L EIBS

[0098] Among them, L ConvE is the loss function of the ConvE model, namely the cross entropy loss function:

[0099]

[0100] Where p is the probability distribution of the predicted entity in the set of all entities, and y is the label, which is 1 if it is the correct answer and 0 otherwise. However, since the one-hot label restricts each prediction task to a single answer, which may not be the case in practice, this embodiment uses label smoothing to alleviate this limitation. This strategy enables this embodiment to narrow the representation gap between the predicted entity and the correct entity, while widening the representation gap with other entities.

[0101] By continuously optimizing the loss function, all parameters of the model are updated.

[0102] Implementation mode 5: This implementation mode is to illustrate step 4 in the hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information described in implementation mode 1 by way of example;

[0103] Step 4: Use the test set data divided in step 1 to perform link prediction on the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information trained in step 3 to obtain the predicted entity results.

[0104] The specific steps include:

[0105] Step 4.1: Input the training set data divided in step 1 into the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information constructed in step 2;

[0106] Step 4.2: Get entity prediction results.

[0107] Implementation Method 6: See Figure 3 This embodiment is described. This embodiment provides a system for implementing a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information described in Embodiment 1. The system includes:

[0108] A storage device for obtaining a hyper-relational knowledge graph dataset, preprocessing the dataset, and dividing it into a training set and a test set;

[0109] A storage device for obtaining embedded representations of entities and relations using a graph convolutional neural network;

[0110] A storage device for constructing a hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information;

[0111] A storage device for training a hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information using training set data;

[0112] A storage device for performing link prediction on a trained hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information using test set data to obtain predicted entity results.

[0113] Implementation method seven: This implementation method provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information as described in any one of implementation methods one to five is executed.

[0114] Implementation 8. This implementation provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information as described in any one of Implementation 1 to Implementation 5.

[0115] A computer device or system is provided in this embodiment. The hardware device in this part is a general model and is not shown in the form of a diagram. The system includes a processor and a memory, wherein the processor and the memory can be connected via a bus or other means. The memory is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, and corresponding program instructions / modules. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, so as to realize the hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information in the above method embodiment.

[0116] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, an intranet, a mobile communication network, and combinations thereof.

[0117] One or more modules are stored in the memory, and when the processor executes, the method steps in the embodiment are executed. In this way, the purpose of the invention can be achieved through the method, device and process of the present invention. The specific details of the above-mentioned computer device can be understood by referring to the corresponding related descriptions and effects in the embodiment, and will not be repeated here.

[0118] Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0119] The above description is only the implementation mode of the present invention and is not limited to the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the claims of the present invention.

Claims

1. A hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information, characterized in that: The method is: Step 1: Obtain a hyper-relational knowledge graph dataset, preprocess the dataset, and divide it into a training set and a test set; Step 2: Construct a hyper-relational knowledge graph representation model based on the dynamic fusion of structure and text information; Step 3: Use the training set data divided in step 1 to train the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information constructed in step 2; Step 4: Use the test set data divided in step 1 to perform link prediction on the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information trained in step 3 to obtain the predicted entity results.

2. According to claim 1, a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information is characterized in that: Step 1 is as follows: Step 1.1: Get a hyper-relational dataset, and for each hyper-relational fact, add its inverse relational fact to the dataset; Step 1.2: Obtain text description information of all entities and relations in the hyperrelational dataset; Step 1.3: Divide the dataset into training set and test set.

3. According to claim 1, a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information is characterized in that: Step 2 is as follows: Step 2.1: Use graph convolutional neural network to obtain embedded representations of entities and relations; Step 2.2: Pass the embedding representation of entities and relations through a multi-layer perceptron to obtain the embedding representation of structural soft prompt words; Step 2.3: Use structural soft hint words to fine-tune and fully integrate the structure and text information of entities and relations in the hyper-relational knowledge graph to enrich the representation of entities and relations; Step 2.4: Input the representation of entities and relations into the traditional knowledge graph embedding model ConvE model to obtain entity prediction results; Step 2.5: Take the correct entities in the prediction results as positive samples and other entities as negative samples, and use the InfoNCELoss loss function to reduce the representation deviation between the predicted entities and the correct entities.

4. According to claim 3, a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information is characterized in that: Step 3 is as follows: Step 3.1: Input the training set data divided in step 1 into the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information constructed in step 2 to obtain entity prediction results; Step 3.2: Input the entity prediction result obtained in step 3.1 into the cross entropy loss function; Step 3.3: Minimize the joint loss function that includes the cross entropy loss function and the InfoNCE Loss loss function in step 2.5 to train the model.

5. According to claim 1, a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information is characterized in that: Step 4 is as follows: Step 4.1: Input the training set data divided in step 1 into the hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information constructed in step 2; Step 4.2: Get entity prediction results.

6. A hyper-relational knowledge graph representation system based on dynamic fusion of structure and text information, characterized in that: The system includes: A storage device for obtaining a hyper-relational knowledge graph dataset, preprocessing the dataset, and dividing it into a training set and a test set; A storage device for obtaining embedded representations of entities and relations using a graph convolutional neural network; A storage device for constructing a hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information; A storage device for training a hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information using training set data; A storage device for performing link prediction on a trained hyper-relational knowledge graph representation model based on dynamic fusion of structure and text information using test set data to obtain predicted entity results.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information as described in any one of claims 1 to 5.

8. A computer device, characterized in that: The device includes a memory and a processor, wherein the memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes a hyper-relational knowledge graph representation method based on dynamic fusion of structure and text information as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Knowledge graph embedding method based on graph convolution contrast learning and XLNet

    CN115936115A

  • Multi-modal knowledge graph establishment method and application

    CN117131933A

  • Traffic event knowledge graph construction method based on multilayer semantic graph convolutional neural network

    CN117312577A

  • Common disease knowledge graph link prediction method fusing entity description

    CN117371525A

  • Independent embedding-based super-relation knowledge graph link prediction method and system

    CN118469002A

Cited By

  • Embedded representation method for tin smelting process flow super-relation knowledge graph

    CN120470134A