Power auditing method, system and equipment based on knowledge graph representation learning

Through the knowledge graph representation learning method, the problems of knowledge graph incompleteness and entity neighborhood size limitation in the field of power audit are solved, wider entity relationship prediction and complex problem processing are achieved, and model flexibility and knowledge in the field of power audit are improved. Graph performance.

CN119202172AInactive Publication Date: 2024-12-27STATE GRID CORPORATION OF CHINA +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411263467.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

There are incompleteness and limited size of the knowledge graph in the existing power audit field, resulting in incomplete information, inefficiency and difficulty in data analysis, making it difficult to accurately cost-effective accounting and complex problem handling.

Method used

Using a method based on knowledge graph representation learning, by constructing and expanding the vector representation of knowledge graph, using link prediction and tensor decomposition representation learning, generate embedded vectors of entities and relationships, combine natural language questions to predict answers, overcome entity neighborhood size Limit and deal with incomplete knowledge graphs.

Benefits of technology

Improves the flexibility and applicability of the power audit field model, enhances the ability to handle complex problems, predicts wider entity relationships without relying on additional data, and improves the performance and scope of application of knowledge graphs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202172A_ABST
    Figure CN119202172A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power auditing method, system and equipment based on knowledge graph representation learning, and the method uses knowledge graph representation learning to answer questions, firstly, the knowledge graph representation learning learns vector representation of a knowledge graph in a representation learning space, then, a question is given, the knowledge graph learning learns vector mapping of the question, and finally, the knowledge graph representation learning is used for answering the questions. According to the method, answers are predicted by combining mapping results, and a system model of the method consists of three modules: a knowledge graph representation learning module, a question representation learning module and an answer selection module. According to the method, the knowledge graph is utilized to represent the learned link prediction attribute, and the problem of incompleteness of the knowledge graph constructed in the electric power auditing field can be relieved under the condition of not using any additional data, so that the reliability of the knowledge graph in the electric power auditing field is improved, the applicability of the knowledge graph constructed in the electric power auditing field can be enhanced, and the reliability of the knowledge graph is improved. Therefore, the working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power system retrieval technology, and specifically to a power audit method, system and device based on knowledge graph representation learning. Background Art

[0002] As power engineering auditing becomes increasingly complex, traditional power auditing methods face problems such as incomplete information, low efficiency, and difficulty in data analysis. Therefore, a method that can efficiently, accurately, and comprehensively conduct power engineering auditing is needed. Knowledge graph (KG) is a multi-relational graph consisting of millions of entities and their relationships. As an advanced knowledge representation and processing technology, it is of great significance to improve information management, promote knowledge discovery, and support intelligent applications.

[0003] At present, a variety of knowledge graphs have been constructed in the power industry, and knowledge graph question answering (KGQA) is used to improve the efficiency of auditing and other tasks. However, KGQA systems, especially multi-hop KGQA in the power audit field, still face some challenges.

[0004] First, KGs are usually incomplete and lack many links, which brings additional challenges to KGQA, especially multi-hop KGQA. Second, external text corpora related to multi-hop KGQA in the power audit domain are not always easy to parse and read (e.g., various power industry reports, regulations, and policy documents).

[0005] Therefore, we can summarize the above and know that the existing knowledge graphs in the field of power auditing have the following pain points: (1) The availability of the relevant text corpus used is often limited, which reduces the applicability of these methods in the field of power auditing (for example, it is difficult to match audit compliance checks and difficult to conduct risk assessment). (2) A pre-specified heuristic neighborhood size restriction is imposed, and the correct answer needs to be selected from this restriction, which makes it difficult for the model to select the correct answer, making it difficult to perform accurate cost-effectiveness accounting calculations. Summary of the invention

[0006] The purpose of the present invention is to provide an electric power auditing method, system and device based on knowledge graph representation learning to solve the problems raised in the above background technology.

[0007] To achieve the above object, the present invention provides the following technical solutions: The power audit method based on knowledge graph representation learning includes: Learning Knowledge Graphs in a Representation Learning Space The vector representation of ; Then given a natural language question about power audit , learning problems The vector mapping of , and the mapping results are combined to predict the answer.

[0008] Furthermore, learning knowledge graphs in the representation learning space The vector representation includes constructing a knowledge graph , link prediction, knowledge graph representation learning, and tensor decomposition representation learning.

[0009] Further, construct a knowledge graph Specifically include: Given a set of entities and relationship , knowledge graph is a set of triplets , so that .

[0010] Furthermore, a triple is represented as ,in , and Respectively represent the subject (head entity) and the object (tail) entity, while the relationship ,express and The relationship between.

[0011] Furthermore, in link prediction, link prediction specifically includes: Given an incomplete knowledge graph, through a scoring function , the function For triples Assign a score , Represents a real number, and the level of s is used to verify whether a triple is valid as a new piece of knowledge. Used to evaluate scores for triples.

[0012] Furthermore, in link prediction, knowledge graph representation learning specifically includes: for each entity e, entity ,relation and relationship have: and , Generative Entity Representation Learning and relational representation learning ,in and They are and dimensional vector, and Respectively and The dimensions of these two entity vectors are, represents the spatial dimension where the entity vector e is located, Representing relationship vector The spatial dimension.

[0013] Furthermore, each representation learned has a scoring function , used to give triples Assign a score ,in and t represent the head entity and the tail entity respectively.

[0014] Furthermore, for every correct triple and incorrect triples The allocated score satisfies and , the scoring function is The function of Respectively represent the head entity The embedding vector of The embedding vector of t and the embedding vector of the tail entity t.

[0015] Furthermore, tensor decomposition represents learning to transform the relationship and entities Represents learning to complex space , given , which generates , and define a scoring function : ; ; Such that for all true triples , while for the false triple , represents the real part of a complex number, represents the embedding vector of the head entity h, The embedding vector representing the relationship, is the conjugate transpose of the embedding vector of the tail entity, represents the constituent factors in the cumulative formula, Represents the dimension of the embedding vector.

[0016] Furthermore, given a natural language question about power auditing , learning problems vector mapping, and combining the mapping results to predict the answer including through natural language questions and the subject entity that appears in the question is a set of entities, and the task is to extract an entity , answer this question correctly .

[0017] Furthermore, for all , and all relationships , using the C method to represent learning so that , Represents the embedding vector of the head entity h and the relationship The embedding vector of the tail entity t, complex space ,Entity representation learning is used to learn triplet scoring functions between head entity, question and answer entities.

[0018] Furthermore, natural language problems Represents learning a fixed vector In the process, a feedforward neural network is used to first use the pre-trained language representation model to represent the problem Represents learning into an X-dimensional vector, which is then passed through a fully connected linear layer with a ReLU activation function and finally projected into the complex space middle, Embedding vector representing the natural language question q.

[0019] Furthermore, given a , and the answer entity collection , the problem representation learning is learned as follows: ; ; in is the scoring function, and is the entity representation learning learned in the previous step, Represents entities in the knowledge graph The embedding vector of Represents the knowledge graph The embedding vector of the complement of It means "for all ”, It means "for all The complement of ", fraction Use all candidate answer entities The computation is learned by minimizing the binary cross entropy loss between a function of the score and a target label, which is 1 if the answer is correct and 0 otherwise.

[0020] Furthermore, the head entity ,question With all possible answers Perform scoring and select the entity with the highest score: ; Represents the expected answer calculated from all possible answer entities In, making The entity with the maximum value, Embedding vector of the candidate answer entity.

[0021] Furthermore, the knowledge graph candidate entities are pruned, and the pruning strategy is as follows: Building a scoring function , used to answer the given question Each relationship To rank, For relationship Representation learning, For the problem These words are input into the pre-trained language representation model, and the scoring function is defined as the final output of the last hidden layer of the pre-trained language representation model Relationship Representation learning The sigmoid function of the dot product: ; ; Among all relations, select those with a score greater than 0.5: this is represented as the set , for each candidate entity obtained so far , find the head entity and The relationship on the shortest path between them, this set of relationships is defined as , the relation score of each candidate answer entity Defined as the size of their intersection: ; Use a linear combination of the relation score and the C-method score to find the answer entity: ; in is an adjustable hyperparameter, Representation Issues Head entity The output vector after processing by the pre-trained language representation model The transpose of De novo entity arrive The set of relations contained in the shortest path.

[0022] To achieve the above object, the present invention also provides the following technical solutions: The power audit system based on knowledge graph representation learning includes: The knowledge graph representation learning module is used to learn the vector representation of the knowledge graph in the representation learning space; The problem representation learning module is used to learn the vector mapping of a problem given a problem; The answer selection module is used to combine the mapping results to predict the answer.

[0023] To achieve the above object, the present invention also provides the following technical solutions: A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0024] To achieve the above object, the present invention also provides the following technical solutions: A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any one of the methods described above.

[0025] Compared with the prior art, the present invention has the following beneficial effects: The present invention overcomes the limitation on the size of the entity neighborhood: by utilizing the link prediction attribute learned by representing the knowledge graph, the neighborhood of the entity is effectively expanded. This method allows the model to predict answers by learning the potential relationships between different entities in the field of power auditing without relying on additional data. This means that this method is able to handle a wider range of entity relationships in the field of power auditing, thereby improving the flexibility and applicability of the model. In this way, not only is the ability to handle complex problems in the field of power auditing improved, but its performance on different types of knowledge graphs in the field of power auditing is also enhanced, proving its advancement and practicality in the field of power auditing.

[0026] The potential of knowledge graph representation learning technology in solving the problem of knowledge graph incompleteness is demonstrated: by leveraging the link prediction property of knowledge graph representation learning, the neighborhood scope of entities can be effectively expanded without additional data support, allowing the model to explore and utilize a wider range of inter-entity relationships. This expansion not only enhances the model's ability to understand complex problems in the field of power auditing, but also improves its application scope on diverse and dynamically changing knowledge graphs. In this way, it is possible to better handle problems that may be difficult to solve in traditional power auditing methods due to incomplete knowledge graphs. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 The figure is an overall flow chart of the method of the present invention.

[0028] Figure 2 This is a system model diagram of the method of the present invention.

[0029] Figure 3 It is a diagram of the internal structure of the computer device of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] See also Figures 1 to 3 , the present invention provides a technical solution: Construction of knowledge graph in the field of power auditing: Given a set of entities and relationship , the knowledge graph constructed in the field of power auditing is a set of triplets , so that A triple is represented by ,in , respectively represent the subject and object entities, and the relationship , indicating that they ( and The relationship between a subject and an object). For example, ("power auditor", "perform", "compliance check"), ("power project", "involved", "environmental impact assessment").

[0032] Link prediction scheme: In the knowledge graph of power auditing, link prediction is a technology that uses data in existing knowledge graphs to predict new relationships or links between entities. The knowledge graph representation learning model is implemented through a scoring function. To achieve this, the function is a triple Assign a score , It represents a real number, and the score is used to verify whether a triple is a new piece of knowledge. The ultimate goal of the scoring function is to evaluate the highest possible score for triples that meet the display and the lowest possible score for triples that do not meet the reality.

[0033] Knowledge graph representation learning: For each entity and Relationship, Knowledge Graph Representation Learning (KGE) Model Generation Entity Representation Learning and relational representation learning ,in and They are and dimensional vector. Each representation learning method also has a scoring function , used to give possible triples ,in , assign a score The model is trained so that for every correct triple and incorrect triples , the model assigns scores that satisfy and A scoring function is usually function.

[0034] and Respectively and The dimensions of these two entity vectors represent the spatial complexity of the vectors, i.e., the length of each entity embedding vector. Indicates the spatial dimension of the entity vector.

[0035] For each entity e in the knowledge graph, the model generates a Dimensional vector , used to indicate that entity e is Position in space.

[0036] They respectively represent: the embedding vector of the head entity, which is used to represent the starting entity of the triple in the knowledge graph; the embedding vector of the relationship, which is used to represent the relationship between entities; and the embedding vector of the tail entity, which is used to represent the ending entity of the triple in the knowledge graph.

[0037] Tensor decomposition representation learning: The tensor decomposition method learns relation and entity representations into complex space. Given , which generates , and defines a scoring function:

[0038]

[0039] Such that for all true triples , while for the false triple . represents the real part of a complex number, is the conjugate transpose of the embedding vector of the tail entity t, which is used to define the scoring function to calculate the score of the triple. represents the constituent factors in the cumulative formula, Represents the dimension of the embedding vector, that is, the dimension of the space where the embedding vector of each entity or relation lies.

[0040] Problem Statement: set up and They are knowledge graphs constructed in a certain power audit field. The set of all entities and relations in , represents all available knowledge graph entities. The KGQA problem in the power auditing domain involves, given a natural language question about power auditing and the subject entity that appears in the question , the task is to extract an entity , answer this question correctly .

[0041] Method Overview: This method uses knowledge graph representation learning to answer questions. First, it learns a vector representation of the knowledge graph in the representation learning space. Then, given a triplet of questions to be inferred (e.g., predicting when the next maintenance date for a transformer is), it learns a vector mapping of the question. Finally, it combines these mapping results to predict the answer. Figure 2 As shown, the system model of this method consists of three modules: knowledge graph representation learning module, question representation learning module and answer selection module.

[0042] The function of the knowledge graph representation learning module is to create representation learning for all entities in the knowledge graph. Specifically, in the knowledge graph, for all , and all relationships , using the C method to represent learning so that . Entity representation learning is used to learn the triple scoring function between the head entity (improve the power system), the question (how to improve the energy efficiency of the power system) and the answer entity (adopt smart grid technology). Based on the coverage of the knowledge graph entities in the question-answering training set, the entity representation learning learned here is either kept fixed or allowed to be fine-tuned in subsequent steps. The role of the question representation learning module is to find the representation learning of the question. Specifically, this module converts the natural language question (How to improve the energy efficiency of power systems) representation into a fixed vector. This is done through a feed-forward neural network that first transforms the question into a fixed vector using a pre-trained language representation model. Represents learning into an X-dimensional vector. This vector then passes through a fully connected linear layer with a ReLU activation function and is finally projected into the complex space middle.

[0043] Representing natural language problems Specifically, this module is responsible for converting natural language questions into a complex vector of fixed dimension, which captures the semantic information of the question and is used in subsequent models to associate with entities in the knowledge graph to select the correct answer.

[0044] Given a question (How to improve the energy efficiency of power systems), subject entity , and the answer entity collection , which learns problem representation learning in this way: ; ; in is the scoring function, and It is the entity representation learning learned in the previous step.

[0045] For the questions raised about power audit, the score is to use all candidate answer entities The model is learned by minimizing the binary cross entropy loss between a function of the score and a target label, which is 1 if the answer is correct and 0 otherwise. Label smoothing is performed when the total number of entities is large. Represents entities in the knowledge graph The embedding vector of Represents the knowledge graph The embedding vector of the complement of . It means "for all ”, It means "for all The complement of The role of the answer selection module is to reduce the set of candidate answer entities and select the final answer. Specifically, during the inference phase, the model compares the (head entity, question) pair with all possible answers. For a relatively small knowledge graph, simply select the entity with the highest score: ; Represents the expected answer calculated by the model, which is the expected answer among all possible answer entities In, making The entity for which the function (a scoring function) takes the maximum value. Embedding vector representing the candidate answer entity.

[0046] However, if the knowledge graph is large, pruning candidate entities can significantly improve the performance of this system. The pruning strategy is as follows: Building a scoring function , which solves the given problem Each relationship Ranking. For relationship Representation learning, For the problem The word sequence in is input into the pre-trained language representation model. The scoring function is defined as the final output of the last hidden layer of the pre-trained language representation model Relationship Representation learning The sigmoid function of the dot product: ; ; Among all relations, select those with a score greater than 0.5: this is represented as the set . Representation issues Head entity The output vector after processing by the pre-trained language representation model For each candidate entity obtained so far, , find the head entity and The relationship on the shortest path between . Define this set of relationships as Now, the relation score of each candidate answer entity is defined as the size of their intersection: ; Use a linear combination of the relation score and the C-method score to find the answer entity: ; in is an adjustable hyperparameter, Represents the relation score, which is a score that calculates the degree of match between the candidate answer entity and the given relation set in the question. It is based on the result of the relation matching module and is used to help determine the final answer entity in the answer selection module. Represents the relation score of each candidate answer entity. Represents the head entity arrive The set of relations contained in the shortest path.

[0047] Through this approach, the incompleteness problem of the knowledge graph constructed in the power auditing field can be alleviated without using any additional data. It can also overcome the shortcomings of the limited neighborhood size limitation imposed by the existing multi-hop KGQA method. The knowledge graph in the power auditing field is not only comprehensive and accurate at the time of initial construction, but also able to continue to provide value over time, becoming an important support tool for power auditing work.

[0048] The present invention, (1) proposes a multi-hop knowledge graph question-answering method based on representation learning vector calculation: This method uses the link prediction property of knowledge graph representation learning to alleviate the incompleteness problem of the knowledge graph constructed in the power audit field without using any additional data, that is, the system can infer the potential relationship between entities. By calculating the similarity and correlation between entities to predict the possible links between them, the complex equipment and processes involved in the power audit field are sorted out, helping auditors to more effectively identify problems, assess risks and propose improvement measures.

[0049] (2) We train knowledge graph entity representation learning in the power auditing domain and use them to learn question representation learning. During the evaluation period, it scores all entity pairs (head entity, question) again, and the entity with the highest score is selected as the answer. This can improve the accuracy of the answers obtained by KGQA in the power auditing domain.

[0050] (3) For the first time, knowledge graph representation learning is cleverly applied to the field of power auditing in a multi-hop manner, which is used to have regular question-answering capabilities on conventional incomplete knowledge graphs, especially the relatively sparse knowledge graphs in power auditing scenarios.

[0051] (4) By designing a knowledge graph embedding module, a question embedding module, and an answer selection module related to power auditing, this design enables the system to effectively handle multi-hop question-answering tasks related to power auditing.

[0052] (5) The final answer is selected by combining the question and relationship similarity scores, which enables the system to consider all possible answer candidates more comprehensively, which helps to improve the accuracy of answer selection and conforms to the reality of the complex entity relationships in power audit scenarios.

[0053] The present invention overcomes the limitation on the size of the entity neighborhood: by utilizing the link prediction attribute learned by representing the knowledge graph, the neighborhood of the entity is effectively expanded. This method allows the model to predict answers by learning the potential relationships between different entities in the field of power auditing without relying on additional data. This means that this method is able to handle a wider range of entity relationships in the field of power auditing, thereby improving the flexibility and applicability of the model. In this way, not only is the ability to handle complex problems in the field of power auditing improved, but its performance on different types of knowledge graphs in the field of power auditing is also enhanced, proving its advancement and practicality in the field of power auditing.

[0054] The potential of knowledge graph representation learning technology in solving the problem of knowledge graph incompleteness is demonstrated: by leveraging the link prediction property of knowledge graph representation learning, the neighborhood scope of entities can be effectively expanded without additional data support, allowing the model to explore and utilize a wider range of inter-entity relationships. This expansion not only enhances the model's ability to understand complex problems in the field of power auditing, but also improves its application scope on diverse and dynamically changing knowledge graphs. In this way, it is possible to better handle problems that may be difficult to solve in traditional power auditing methods due to incomplete knowledge graphs.

[0055] The English abbreviations of the present invention are shown in the following table Chinese expression Complete English statement English abbreviations Knowledge Graph Knowledge Graphs KG Knowledge Graph Question Answering Question Answering over Knowledge Graphs QA Natural Language Natural Language NL Knowledge Graph Representation Learning Knowledge Graphs Representing learning KGR like Figure 3 As shown, the power audit equipment based on knowledge graph representation learning can adopt various types of computing devices such as desktop computers, notebooks, PDAs and cloud servers. This device is composed of multiple components such as processors and memories, but is not limited to these and may include other components or different combinations. The device examples provided here are for illustrative purposes only and are not restrictive.

[0056] The processor can be various types of devices, such as CPU, DSP, ASIC, FPGA, etc., and can also include programmable logic devices, discrete gates, transistor logic devices and discrete hardware components, etc. The memory is used to store computer programs and modules. The processor runs or executes the computer program modules stored in the memory and calls the data stored in the memory, thereby realizing various functions of power auditing based on knowledge graph representation learning.

[0057] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0058] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the power audit method based on knowledge graph representation learning.

[0059] If the power audit method based on knowledge graph representation learning is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device.

[0060] Based on this understanding, the present invention implements all or part of the processes in the above-mentioned power audit method based on knowledge graph representation learning, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of the above-mentioned power audit method based on knowledge graph representation learning can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or preset intermediate form, etc.

[0061] Computer-readable storage media may refer to any entity or device that can carry computer program code, including recording media, USB flash drives, mobile hard drives, disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), software distribution media, etc.

[0062] It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electrical carrier signals and telecommunication signals.

[0063] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. The power audit method based on knowledge graph representation learning is characterized by: include: Learning knowledge graphs in the representation learning space The vector representation of ; Then given the natural language question of power audit , learning problems The vector mapping of , and the mapping results are combined to predict the answer.

2. The method according to claim 1, characterized in that Learning Knowledge Graphs in a Representation Learning Space The vector representation includes constructing a knowledge graph , link prediction, knowledge graph representation learning, and tensor decomposition representation learning.

3. The method according to claim 2, characterized in that Building a knowledge graph Specifically include: Given a set of entities and relationship , knowledge graph is a set of triplets , so that .

4. The method according to claim 3, characterized in that A triple is represented by ,in , and Represent the head entity and the tail entity respectively, and the relationship ,express and The relationship between.

5. The method according to claim 3, characterized in that Link prediction specifically includes: Given an incomplete knowledge graph , through a scoring function ,Should For triples Assign a score , Represents a real number, and the level of s is used to verify whether a triple is valid as a new piece of knowledge. Used to evaluate scores for triples.

6. The method according to claim 2, characterized in that In link prediction, knowledge graph representation learning specifically includes: for each entity e, entity ,relation and relationship have: and , Generative Entity Representation Learning and relational representation learning ,in and They are and dimensional vector, and Respectively and The dimensions of these two entity vectors are, represents the spatial dimension where the entity vector e is located, Representing relationship vector The spatial dimension.

7. The method according to claim 6, characterized in that Each representation learned has a scoring function , used to give triples Assign a score ,in and t represent the head entity and the tail entity respectively.

8. The method according to claim 7, characterized in that For every correct triple and incorrect triples The assigned score satisfies and , the scoring function is The function of Respectively represent the head entity The embedding vector of The embedding vector of and the embedding vector of the tail entity t.

9. The method according to claim 2, characterized in that Tensor decomposition represents learning to transform relations and entities Represents learning to complex space , given ,generate , and define a scoring function : ; ; So that for all true , and for the false , represents the real part of a complex number, represents the embedding vector of the head entity, The embedding vector representing the relationship, is the conjugate transpose of the embedding vector of the tail entity t, represents the constituent factors in the cumulative formula, Represents the dimension of the embedding vector.

10. The method according to claim 1, characterized in that Then given the natural language question of power audit , learning problems vector mapping, combining the mapping results to predict the answer including through natural language questions and the subject entity that appears in the question is a set of entities, and the task is to extract an entity , answer this question correctly .

11. The method according to any one of claims 3 to 9, characterized in that For all , and all relationships , using the C method to represent learning so that , Represents the embedding vector of the head entity and the relationship The embedding vector of the tail entity t, complex space ,Entity representation learning is used to learn triplet scoring functions between head entity, question and answer entities.

12. The method according to claim 10, characterized in that Natural language questions Represents learning a fixed vector In the process, a feedforward neural network is used to first use the pre-trained language representation model to represent the problem Represents learning into an X-dimensional vector, which is then passed through a fully connected linear layer with a ReLU activation function and finally projected into the complex space , the embedding vector of q.

13. The method according to claim 12, characterized in that Given a , and the answer entity collection , the problem representation learning is learned as follows: ; ; in is the scoring function, and is the entity representation learning learned in the previous step, Represents entities in the knowledge graph The embedding vector of Represents the knowledge graph The embedding vector of the complement of It means "for all ”, It means "for all The complement of ", fraction Use all candidate answer entities The computation is learned by minimizing the binary cross entropy loss between a function of the score and a target label, which is 1 if the answer is correct and 0 otherwise.

14. The method according to claim 13, characterized in that Head Entity ,question With all possible answers Perform scoring and select the entity with the highest score: ; Represents the expected answer calculated from all possible answer entities In, making The entity with the maximum value, Embedding vector representing the candidate answer entity.

15. The method according to claim 14, characterized in that Prune the knowledge graph candidate entities. The pruning strategy is as follows: Building a scoring function , used to answer the given question Each relationship To rank, For relationship Representation learning, For the problem The word sequence in is input into the pre-trained language representation model, and the scoring function is defined as the final output of the last hidden layer of the pre-trained language representation model. Relationship Representation learning The sigmoid function of the dot product: ; ; Among all relations, select those with a score greater than 0.5: represented as the set , for each candidate entity obtained so far , find the head entity and The relationship on the shortest path between them, this set of relationships is defined as , the relation score of each candidate answer entity Defined as the size of their intersection: ; Use a linear combination of the relation score and the C-method score to find the answer entity: ; in is a hyperparameter, Representation Issues Head entity The output vector after processing by the pre-trained language representation model Transpose, De novo entity arrive The set of relations contained in the shortest path.

16. The power audit system based on knowledge graph representation learning is characterized by: include: Knowledge graph representation learning module, used to learn knowledge graphs in the representation learning space The vector representation of ; Question representation learning module, which is then used to give natural language questions of power audit , learning problems Vector mapping of ; The answer selection module is used to combine the mapping results to predict the answer.

17. The system of claim 16, wherein: Learning Knowledge Graphs in a Representation Learning Space The vector representation includes constructing a knowledge graph , link prediction, knowledge graph representation learning, and tensor decomposition representation learning.

18. The system of claim 17, wherein: Building a knowledge graph Specifically include: Given a set of entities and relationship , knowledge graph is a set of triplets , so that .

19. The system of claim 18, wherein: A triple is represented by ,in , and Represent the head entity and the tail entity respectively, and the relationship ,express and The relationship between.

20. The system of claim 18, wherein: Link prediction specifically includes: Given an incomplete knowledge graph , through a scoring function ,Should For triples Assign a score , Represents a real number, and the level of s is used to verify whether a triple is valid as a new piece of knowledge. Used to evaluate scores for triples.

21. The system of claim 17, wherein: In link prediction, knowledge graph representation learning specifically includes: for each entity e, entity ,relation and relationship have: and , Generative Entity Representation Learning and relationship represents learning, where and They are and dimensional vector, and Respectively and The dimensions of these two entity vectors are, represents the spatial dimension where the entity vector e is located, Representing relationship vector The spatial dimension.

22. The system of claim 21, wherein: Each representation learned has a scoring function , used to give triples Assign a score ,in and t represent the head entity and the tail entity respectively.

23. The system of claim 22, wherein: For every correct triple and incorrect triples The assigned score satisfies and , the scoring function is The function of Respectively represent the head entity The embedding vector of The embedding vector of and the embedding vector of the tail entity t.

24. The system of claim 17, wherein: Tensor decomposition represents learning to transform relations and entities Represents learning to complex space , given ,generate , and define a scoring function : ; ; So that for all true , and for the false , represents the real part of a complex number, Represents the header entity The embedding vector of The embedding vector representing the relationship, is the conjugate transpose of the embedding vector of the tail entity, represents the constituent factors in the cumulative formula, Represents the dimension of the embedding vector.

25. The system of claim 16, wherein: Then given the natural language question of power audit , learning problems vector mapping, combining the mapping results to predict the answer including through natural language questions and the subject entity that appears in the question is a set of entities, and the task is to extract an entity , answer this question correctly .

26. The system according to any one of claims 18 to 24, characterized in that For all , and all relationships , using the C method to represent learning so that , Represents the embedding vector of the head entity and the relationship The embedding vector of the tail entity t, complex space ,Entity representation learning is used to learn triplet scoring functions between head entity, question and answer entities.

27. The system of claim 25, wherein: Natural language questions Represents learning a fixed vector In the process, a feedforward neural network is used to first use the pre-trained language representation model to represent the problem Represents learning into an X-dimensional vector, which is then passed through a fully connected linear layer with a ReLU activation function and finally projected into the complex space middle, The embedding vector representing the natural language question q.

28. The system of claim 27, wherein: Given a , and the answer entity collection , the problem representation learning is learned as follows: ; ; in is the scoring function, and is the entity representation learning learned in the previous step, Represents entities in the knowledge graph The embedding vector of Represents the knowledge graph The embedding vector of the complement of It means "for all ”, It means "for all The complement of ", fraction Use all candidate answer entities The computation is learned by minimizing the binary cross entropy loss between a function of the score and a target label, which is 1 if the answer is correct and 0 otherwise.

29. The system of claim 28, wherein: Head Entity ,question With all possible answers Perform scoring and select the entity with the highest score: ; Represents the expected answer calculated from all possible answer entities In, making The entity with the maximum value, Embedding vector representing the candidate answer entity.

30. The system of claim 29, wherein: Prune the knowledge graph candidate entities. The pruning strategy is as follows: Building a scoring function , used to answer the given question Each relationship To rank, For relationship Representation learning, For the problem The word sequence in is input into the pre-trained language representation model, and the scoring function is defined as the final output of the last hidden layer of the pre-trained language representation model. Relationship Representation learning The sigmoid function of the dot product: ; ; Among all relations, select those with a score greater than 0.5: represented as the set , for each candidate entity obtained so far , find the head entity and The relationship on the shortest path between them, this set of relationships is defined as , the relation score of each candidate answer entity Defined as the size of their intersection: ; Use a linear combination of the relation score and the C-method score to find the answer entity: ; in is a hyperparameter, Representation Issues Head entity The output vector after processing by the pre-trained language representation model Transpose, De novo entity arrive The set of relations contained in the shortest path.

31. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 15 when executing the computer program.

32. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 15 are implemented.

Citation Information

Patent Citations

  • Knowledge graph question and answer method and system based on neighbor interaction network

    CN114077659A

  • Complex question multi-hop intelligent question answering method based on knowledge graph representation learning

    CN115757715A

  • Question answering method and system based on knowledge graph

    CN117370511A

  • Practical training knowledge graph completion method and system based on structure and text joint representation

    CN117725224A

  • Inference method and device for multi-hop question and answer of knowledge graph and storage medium

    CN118503366A