Power grid equipment-based domain knowledge graph updating method and system
Patent Information
- Application Number
- CN202311438171.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-10-31
AI Technical Summary
[0004]发明人发现,上述的作业场景在电网行业工作中非常常见,而且会引发两个主要问题:(1)电网工作人员在查阅资料时要耗费大量精力和时间,可能会导致无法及时应对电网设备发生的紧急情况;(2)电网工作人员在开展运检工作时,高度依赖个人经验,而每个工作人员的工作经验存在较大差异,这意味着依赖个人经验无法保证运检工作的质量和效率
[0040] 1. This invention innovatively constructs a large-scale knowledge graph dataset in the field of power grid equipment. This dataset is based on text data extraction from the power grid equipment domain, including 1079 fault cases, 3995 standard documents, 15093 literature articles, 2629 encyclopedia entries, 37965 professional terminology explanations, 23222 news articles, and 13685 inspection reports, totaling 97687 texts. Based on this text data, this invention combines various triplet extraction methods, including rule matching, OCR recognition, BiLSTM-CRF named entity recognition model, relation extraction model based on remote supervision and multi-instance learning, open-domain zero-shot knowledge graph completion model, manual annotation, and manual classification. A total of 33512 entities in the power grid equipment domain are extracted, divided into 14 major categories, and 86412 relations in the power grid equipment domain are extracted, divided into 12 major categories. This dataset has broad coverage and high professional level, providing strong data support for text recommendation, intelligent question answering, and other services in the power grid equipment domain.
Smart Images

Figure CN117574898B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power data processing technology, and in particular to a method and system for updating a domain knowledge graph based on power grid equipment. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] As the core of the power system, the condition and safety of power grid equipment are of paramount importance. However, most components of power grid equipment have a limited lifespan, and damage and malfunctions are inevitable during operation. This necessitates condition assessment, maintenance, testing, and repair by power grid maintenance workers. Because many factors can cause abnormal conditions in power grid equipment, power grid personnel often need to consult extensive materials and study beforehand, combining this knowledge with their personal experience to operate the equipment.
[0004] The inventors found that the above-mentioned work scenarios are very common in the power grid industry and will cause two major problems: (1) Power grid staff have to spend a lot of energy and time when looking up information, which may lead to the inability to respond to emergencies of power grid equipment in a timely manner; (2) Power grid staff rely heavily on personal experience when carrying out operation and maintenance work, and the work experience of each staff member varies greatly, which means that relying on personal experience cannot guarantee the quality and efficiency of operation and maintenance work. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method and system for updating a domain knowledge graph based on power grid equipment. It constructs a knowledge graph for the power grid equipment domain based on massive amounts of data related to power grid equipment, enabling data updates, version management, and visualization of the knowledge graph. Furthermore, based on the knowledge reasoning capabilities of the knowledge graph, it achieves functions such as knowledge graph hierarchical classification, related literature recommendation, and a global search engine, providing intelligent support for power grid workers in their operation and maintenance work.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a method for updating a domain knowledge graph based on power grid equipment.
[0008] A method for updating a domain knowledge graph based on power grid equipment includes the following steps:
[0009] By combining the acquired unstructured text data, a knowledge graph is constructed by extracting domain triples of power grid equipment using a generative named entity recognition algorithm based on MRA and an entity linking algorithm oriented towards domain knowledge graphs.
[0010] For new relations that have not appeared in the knowledge graph, the text description of the new relation is input into the relation embedding generator, which generates relation embeddings. The knowledge graph is then completed and updated based on the obtained relation embeddings.
[0011] Treating named entity recognition as a sequence generation task, this paper proposes a generative entity annotation method to address flat, nested, and discontinuous entities encountered in named entity recognition. In the encoding module, an attention mechanism based on the relevance between the referent and the label is proposed and integrated into the attention of the Encoder-Decoder part of the Transformer model. This allows the encoding to fully combine prior knowledge of the context and the label, rather than being limited to the entity itself. In the decoding module, a pointer network is used to control whether the currently generated word comes from the input sequence or from a predefined vocabulary through hyperparameters.
[0012] To address the ambiguity of entity references in power grid texts, this invention divides entity linking into two sub-tasks: candidate entity generation and candidate entity ranking. The candidate entity ranking module based on graph convolution dynamically learns the word embeddings of reference terms appearing in the text using BiLSTM, learns candidate entity representations in the knowledge graph using graph convolution, and finally learns deep semantic knowledge between the entity reference context and the candidate entity context using a BERT pre-trained model. Semantic similarity is obtained through the Softmax function, and the candidate entity set is ranked according to semantic similarity. The candidate entity with the highest similarity score is selected as the target candidate entity.
[0013] As a further limitation of the first aspect of the present invention, for each entity in the knowledge graph, an entity classification, an entity description, and an entity version are set; for each relation in the knowledge graph, a relation classification, a relation description, and a relation version are set.
[0014] The knowledge graph is dynamically updated incrementally using dynamically updated power grid equipment domain data and version numbers of entities and relationships, with version management and rollback control implemented during the dynamic incremental update process.
[0015] As a further limitation of the first aspect of the invention, version management and rollback control include:
[0016] Each time new triple data is added to the knowledge graph, it is considered a dynamic upgrade of the knowledge graph. After each upgrade, the knowledge graph will obtain a globally unique version number.
[0017] Before the knowledge graph upgrade task begins, the version upgrade service first writes an operation log to the change log. The operation log contains all information related to the new version, marking the end of the data log of the previous version of the knowledge graph and the beginning of the data log of the new version of the knowledge graph.
[0018] After the operation log is successfully written, the corresponding executor is called to perform the data update operation. The data update of the knowledge graph is regarded as adding, deleting, modifying and querying certain triples. After each modification to a triple is completed, a data log is written to the change log to describe the specific operation performed on the triple.
[0019] When a user needs to roll back for some reason, they need to specify a knowledge graph version number to roll back to. The version rollback service extracts the change log of the corresponding version, merges the data update operations in the log, and retrieves the new version data log after the specified rollback version.
[0020] A temporary reverse operation log is generated for the change log. The reverse operation log is then input into the version upgrade service to execute the corresponding reverse operation, thereby rolling back the version. After a successful rollback, a new version number will still be generated.
[0021] As a further limitation of the first aspect of the present invention, a Knowledge Graph Completion Based on Text Knowledge Transformation and Alignment (TKTA) model is constructed. This model can predict new relations in the knowledge graph based on the textual description of the relations. Based on the textual description of the new relations, TKTA can generate the embedding of the relations in the knowledge graph, thereby completing the knowledge graph completion task in the open domain. A network feature extractor extracts entity features, relation features, and topological features contained in the n-step network, and fuses the entity features, relation features, and topological features into the final feature vector of relation r, including:
[0022] Suppose there are x triples containing relation r in the knowledge graph. Finally, an n-step network of x relations r will be constructed. For each n-step network, three feature extractors are used to extract the feature information in the n-step network. The three feature extractors are entity feature extractor, relation feature extractor and topology feature extractor.
[0023] The entity feature extractor is used to extract the semantic information of all entities contained in the n-step network, the relation feature extractor is used to extract the semantic information of all relations contained in the n-step network, and the topology feature extractor is used to extract the semantic information contained in the topology of the n-step network. After extracting features, the three feature extractors will generate feature vectors containing the corresponding feature information. The three feature vectors are fused to output a final feature vector with relation r.
[0024] The above processing is performed on x n-step networks of relation r in the knowledge graph to obtain x embedding vectors of relation r. By calculating the average value of the x embedding vectors, the final vector representation of relation r in the knowledge graph is obtained.
[0025] As a further limitation of the first aspect of the present invention, the input of the entity feature extractor is an n-step network of relation r, and the output is the entity feature vector of the n-step network of relation r, including:
[0026] All entities are obtained from the n-step network of relation r. Based on all the extracted entities, the entities in the n-step network of relation r are downsampled. The downsampled entities are sequentially encoded. The vectors of each entity are concatenated and compressed to obtain the final vector representation of the entity features of relation r.
[0027] As a further limitation of the first aspect of the present invention, the relation feature extractor first extracts all n-step relations in the n-step network, and then encodes all n-step relations through a knowledge graph embedding model to obtain their embedding vectors respectively;
[0028] Random downsampling is performed on all relations extracted from the n-step network of relation r. After obtaining the feature vector of each relation through downsampling, the feature vectors are concatenated and compressed through a linear layer to obtain the feature vector of the relation in the n-step network of relation r.
[0029] The topology feature extractor performs entity anonymization on the received n-step network, removing the semantic information of the entities themselves and replacing all entities with the same anonymous entity. It then downsamples the network structure, starting with the neighbor entity pairs of relation r, and performs a random walk in the n-step network of r. After the random walk, an anonymous subgraph of the n-step network is obtained. The anonymized network topology is then input into a graph neural network to extract structural features, and the output is a feature vector. After obtaining the topology feature vectors of all n-step networks of r, they are concatenated and compressed through a linear network layer to finally obtain the topology feature vector of r.
[0030] As a further limitation of the first aspect of the present invention, a dynamically updated knowledge graph is used as the first-level knowledge graph. For each article in the text knowledge base, a knowledge graph analysis is first performed on it to construct a small knowledge graph related to this text as the second-level knowledge graph. The second-level knowledge graph is regarded as a subset of the first-level knowledge graph.
[0031] After constructing a secondary knowledge graph for each text, it is visualized, allowing users to understand the main content of the current text from the visualized secondary knowledge graph.
[0032] Based on a two-level knowledge graph, we perform correlation analysis on all texts in the text knowledge base and calculate the text similarity between the two-level knowledge graphs corresponding to each pair of texts.
[0033] Secondly, the present invention provides a domain knowledge graph update system based on power grid equipment.
[0034] A domain knowledge graph update system based on power grid equipment includes:
[0035] The knowledge graph construction module is configured to: combine the acquired unstructured text data, and extract fact triples related to the power grid equipment domain from the unstructured text based on template matching, named entity recognition, entity relationship extraction, and entity linking technologies to construct a knowledge graph; the system provides global search and category search functions; and the knowledge graph query function can be used to retrieve knowledge graph information and query secondary knowledge graph information of power grid equipment text.
[0036] The knowledge graph update module is configured to: add, delete, and modify data in the knowledge graph through the knowledge graph editing function; view detailed information of each knowledge graph data change task for version control and perform operations such as rollback, deletion, and retry; for new relationships that have not appeared in the knowledge graph, input the text description of the new relationship into the relationship embedding generator, the relationship embedding generator generates relationship embeddings, and the knowledge graph is completed and updated based on the obtained relationship embeddings.
[0037] Thirdly, the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the domain knowledge graph update method based on power grid equipment as described in the first aspect of the present invention.
[0038] Fourthly, the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the domain knowledge graph update method based on power grid equipment as described in the first aspect of the present invention.
[0039] Compared with the prior art, the beneficial effects of the present invention are:
[0040] 1. This invention innovatively constructs a large-scale knowledge graph dataset in the field of power grid equipment. This dataset is based on text data extraction from the power grid equipment domain, including 1079 fault cases, 3995 standard documents, 15093 literature articles, 2629 encyclopedia entries, 37965 professional terminology explanations, 23222 news articles, and 13685 inspection reports, totaling 97687 texts. Based on this text data, this invention combines various triplet extraction methods, including rule matching, OCR recognition, BiLSTM-CRF named entity recognition model, relation extraction model based on remote supervision and multi-instance learning, open-domain zero-shot knowledge graph completion model, manual annotation, and manual classification. A total of 33512 entities in the power grid equipment domain are extracted, divided into 14 major categories, and 86412 relations in the power grid equipment domain are extracted, divided into 12 major categories. This dataset has broad coverage and high professional level, providing strong data support for text recommendation, intelligent question answering, and other services in the power grid equipment domain.
[0041] 2. This invention innovatively proposes a unified method for named entity recognition in the power grid field. The most prominent characteristic of power grid defect case reports is the presence of numerous nested and discontinuous entities. For example, the entity "circuit breaker live-line detection" contains a nested "circuit breaker" entity, while "ultrasonic and UHF partial discharge detection" should be identified as two separate entities: "ultrasonic partial discharge detection" and "UHF partial discharge detection." Existing named entity recognition models typically design different recognition methods for ordinary, nested, or discontinuous entities. Furthermore, traditional BIOES annotation methods cannot annotate nested and discontinuous entities in text. To address this, this invention employs a generative annotation method to annotate complex entity types appearing in text, proposing an attention mechanism based on the relevance between the denotation and the label, and integrating it into the Encoder-Decoder structure. By controlling whether the generated vocabulary comes from the original input text or the label list through pointers, a full search of the vocabulary is avoided, thus improving decoding efficiency. This method can accurately identify flat, nested, and discontinuous professional entities in power grid text.
[0042] 3. This invention innovatively proposes an entity linking method for knowledge graphs in the power grid domain. Addressing the ambiguity of entity references in power grid texts, this invention divides entity linking into two sub-tasks: candidate entity generation and candidate entity ranking. It proposes a candidate entity generation algorithm based on encyclopedia and other domain data, and a candidate entity ranking algorithm based on graph convolution. Specifically, the candidate entity ranking module based on graph convolution utilizes BiLSTM to dynamically learn the word embeddings of reference terms appearing in the text, uses graph convolution to learn the representations of candidate entities in the knowledge graph, and finally uses a BERT pre-trained model to learn deep semantic knowledge between the entity reference context and the candidate entity context. Semantic similarity is obtained through the Softmax function, and the candidate entity set is ranked according to semantic similarity, selecting the candidate entity with the highest similarity score as the target candidate entity. This method can effectively mine the context of references in the text and the context of candidate entities in the knowledge graph by utilizing external knowledge bases, and then find the target candidate entity using semantic similarity.
[0043] 4. This invention innovatively proposes a dynamic update method for knowledge graphs in the field of power grid equipment. To facilitate the updating of data in the knowledge graph, while increasing the data scale and ensuring the timeliness of knowledge, it is necessary to design a mechanism for managing knowledge graph data change events. Therefore, this invention designs a dynamic update method for knowledge graphs. Based on this method, when knowledge graph data changes, the system selects a pair of data from six knowledge graph upgrade executors for updating, while simultaneously recording operation logs and data logs. After the upgrade is completed, a new knowledge graph version number is generated. Based on the version number mechanism, users can view detailed information for each knowledge graph data change task and perform operations such as rollback, deletion, and retry. For each entity in the knowledge graph, information such as entity classification, entity description, and entity version will be set. Entity classification determines the type of the entity, entity description explains the meaning of the entity itself, and entity version controls the timeliness of the entity by recording a timestamp. For each relation in the knowledge graph, label information such as relation classification, relation description, and relation version will also be set, with meanings similar to the entity's label information. In addition, the knowledge graph is dynamically updated incrementally by using dynamically updated data on power grid equipment and version numbers of entities and relationships. During the update, version management and rollback mechanisms are implemented through dynamic upgrade technology, and various upgrade mechanisms are achieved by setting up multiple upgrade executors.
[0044] 5. This invention innovatively proposes an open-domain zero-shot knowledge graph completion model, TKTA. The triples extracted from texts in the power grid equipment domain suffer from insufficient knowledge, leading to missing links in the knowledge graph—that is, relationships exist between some entities but have not been discovered. To address this problem, this invention, based on the knowledge reasoning capabilities of the knowledge graph itself and the idea of generative adversarial learning, designs an open-domain zero-shot knowledge graph completion model that can complete new relationships without requiring a large amount of labeled domain training data. This model can extract feature information from the n-step neighbor network of each entity for relationship prediction. For a relation r in the knowledge graph, firstly, an n-step network is constructed around it, denoted as N. r This network is then fed into the relation feature extractor; the relation feature extractor will extract N... r The entity features included, N r The relational features included and N r The model first extracts the topological features of the relation r; then it merges these three features into the final feature vector of relation r. This method enhances the context capture capability of the knowledge graph completion model, and in experiments on knowledge graph completion tasks, this model outperforms many advanced models in the industry.
[0045] 6. This invention innovatively proposes a knowledge graph hierarchical mechanism. This mechanism classifies the knowledge graph, treating the entire power grid equipment domain knowledge graph as a first-level knowledge graph. Each piece of text in the power grid equipment domain is mapped to a subgraph of the first-level knowledge graph, called a second-level knowledge graph. Then, based on graph feature extraction, graph similarity calculation, and other methods, the relationships between multiple second-level knowledge graphs in the first-level knowledge graph are analyzed to obtain the connections between multi-source heterogeneous texts in the knowledge base, thereby improving the management efficiency of the power grid equipment knowledge graph and domain texts.
[0046] Additional advantages of the invention will be highlighted in the following description, and some advantages will become more apparent in further explanation or will become apparent in practical application of the invention. Attached Figure Description
[0047] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0048] Figure 1 This is an overall schematic diagram of the domain knowledge graph update method based on power grid equipment provided in Embodiment 1 of the present invention;
[0049] Figure 2 This is a schematic diagram of the dynamic upgrade process of the knowledge graph provided in Embodiment 1 of the present invention;
[0050] Figure 3 This is a schematic diagram of the knowledge graph dynamic upgrade mechanism architecture provided in Embodiment 1 of the present invention;
[0051] Figure 4 This is a schematic diagram of the knowledge graph dynamic upgrade mechanism provided in Embodiment 1 of the present invention;
[0052] Figure 5 This is a schematic diagram of the TKTA training process provided in Embodiment 1 of the present invention;
[0053] Figure 6 This is a schematic diagram of the overall design of the model provided in Embodiment 1 of the present invention;
[0054] Figure 7 This is a schematic diagram of the feature extractor network structure provided in Embodiment 1 of the present invention;
[0055] Figure 8 This is the front-end homepage of the knowledge graph system based on power grid equipment provided in Embodiment 1 of the present invention. Detailed Implementation
[0056] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0057] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0058] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0059] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0060] Example 1:
[0061] Embodiment 1 of the present invention provides a method for updating a domain knowledge graph based on power grid equipment, comprising the following processes:
[0062] S1: Combine the acquired unstructured text data to construct a knowledge graph based on the triples in the power grid equipment domain;
[0063] S2: For new relations that have not appeared in the knowledge graph, input the text description of the new relation into the relation embedding generator. The relation embedding generator generates relation embeddings, and the knowledge graph is completed and updated based on the obtained relation embeddings.
[0064] The techniques involved in the method described in this embodiment include:
[0065] (1) Named Entity Recognition Technology
[0066] Named entity recognition (NAME) is a key technology in natural language processing (NLP) with wide applications across multiple fields, including knowledge graphs, text recommendation, intelligent question answering, and machine translation. It forms the foundation for many NLP tasks. The core of NAME recognition is to identify words that refer to people or things in unstructured or semi-structured natural language text. However, in power grid equipment operation and maintenance scenarios, defect case reports manually written by maintenance personnel are mostly unstructured text data. Their inconsistent formats lead to long manual review times, and the inherent knowledge cannot be directly utilized. Furthermore, defect case reports are characterized by high professionalism, complex semantics, and weak descriptive standardization, posing significant challenges to constructing knowledge graphs from these reports. The most prominent feature of power grid defect case reports is the presence of numerous nested and discontinuous entities. For example, the entity "circuit breaker live-line detection" may contain a nested "circuit breaker" entity, while "ultrasonic and UHF partial discharge detection" should be identified as two separate entities: "ultrasonic partial discharge detection" and "UHF partial discharge detection." Existing NAME recognition models typically design different recognition methods for ordinary, nested, or discontinuous entities. Meanwhile, the traditional BIOES annotation method cannot annotate nested and discontinuous entities in text.
[0067] To represent nested and discontinuous entity types in the original sentence, this invention employs a generative entity annotation method. Given a sentence of length n, S = s1, s2, ..., s... n , where s i To represent the i-th character in a sentence, this invention uses G = [g1, g2, ..., g...]. l If ] represents the label of an entity, then the target sequence will be Y = [s 11 e 11 , ..., s 1j e 1j ,t1,...,s i1 e i1 , ..., s ik e ik , t i ], where s and e are the start and end indices of the entity fragment, respectively, and t represents the entity category.
[0068] Since an entity contains one (ordinary and nested entities) or multiple (discontinuous entity) fragments, each entity can be represented as [s]. i1 e i1 , ..., s ij e ij , t i ], where t i For the index of entity tags, the end index of each segment in the entity must be greater than the start index. This invention uses G = [g1, g2, ..., g...]. l ] represents the tag name of the entity, such as "equipment", "part", "defect", etc., where l is the number of entity tags. Therefore, in order to distinguish whether the decoded word is an entity tag or a type tag, t is restricted. i ∈(n, n+l).
[0069] A query statement was constructed for each entity label, and the statement in the input text was concatenated with the query statement to form the input sequence. A QA (QuestionAnswer) model was trained on a named entity recognition dataset to generate relevance scores between the referents and the query statement. Given a sentence containing n tokens and a query statement containing m tokens, the model generates a probability s∈(0,1) for each token to be the start index and a probability e∈(0,1) for each token to be the end index. The relevance of each token to the query statement is calculated using formula (1):
[0070]
[0071] Where r∈(0,1).
[0072] This invention proposes a MentionRelevanceAttention (MRA) mechanism to incorporate token-level MentionRelevance scores into the Transformer decoder, generating an entity sequence with a maximum degree of t given an input sentence with n tokens. This represents the output of the l-th Transform encoder. Let represent the output of the self-attention layer in the l-th Transformer decoder, then the Encoder-Decoder Attention... It can be calculated using the following formula:
[0073]
[0074] Among them, W Q and It's weight. This is the relevance score between the referent and the query statement. Since the original referent relevance score is an n-dimensional vector, it is repeated t times to generate a t×n attention matrix. The MRA is applied to all the decoder layers of the Transformer to capture characters in the input sentence that are related to the entity label. Then, the generated words are limited to the set consisting of the input sentence and the label through the pointer generation mechanism.
[0075] The input sequence is fed into the BART encoder to obtain word vector representations. The referentials of the sentence and the attention scores related to the labels are generated by the MRA model. The decoder uses a pointer mechanism to generate the indexes of the original sentence and labels. The overall structure consists of two parts: the encoder and the decoder.
[0076] In this invention, a label-description statement Q is appended to the end of the input sentence X to form the input sequence. Each word x i (1≤i≤n+m+3) will all be embedded by a word. and a position embedding This is represented by the Encoder Embedding layer, which encodes the input sequence into a vector H. e The formula is as follows:
[0077]
[0078] in, d is the hidden layer dimension.
[0079] The generation process calculates the conditional probability of the new token based on the decoded words and the encoder input. The decoder obtains the index probability distribution P at each step. t =P(y t |X, Y<t), however, since Y<t contains pointers and label indices, it cannot be directly input into the Decoder.
[0080]
[0081] Transform each y in this way t After that, hidden layer vectors It can be obtained through the following formula:
[0082]
[0083] Then, the index probability distribution P is implemented through a pointer generator network. t This is because it allows copying words from an input sequence via pointers, or generating words from a fixed list of labels. A hyperparameter is defined here. To determine whether the generated new token comes from the list of tags or is copied from the input sequence, the following probability distribution is obtained:
[0084] G d =TokenEmbed(G) (6)
[0085]
[0086]
[0087] Here, TokenEmbed is an embedding shared between the encoder and decoder. [·;·] indicates a join operation performed on the first dimension. The dot product is represented by a negative log-likelihood loss during the training phase and an autoregressive approach is used to generate the target sequence during inference.
[0088] (2) Entity Relationship Extraction Techniques
[0089] Relation extraction refers to extracting the relationships between entity pairs based on named entities, combining the entity's own information with the contextual semantics. Relation extraction is a key subtask in knowledge extraction and is an important factor affecting the quality of knowledge graphs.
[0090] The relation extraction task can be described as being given a target entity pair head (j) , tail (j) , and the corresponding sentence s (j) ={x1, x2, ..., x n The goal is to learn a supervised model y = f(s) to predict the relations between target entity pairs, where y ∈ {Y1, Y2, ..., Y}. mDistant supervised learning is a type of enhanced supervised learning that learns triple knowledge from existing remote knowledge bases to automate and efficiently annotate natural language text. This annotated data then forms the basis for training a knowledge graph model, enabling triple extraction from large-scale text datasets. This remotely supervised knowledge extraction method effectively reduces the human and time costs associated with data annotation in traditional supervised learning. However, remote supervision also introduces uncertainty into the knowledge extraction task. While the annotated triples are predetermined, natural language text with a head entity `h` and a tail entity `t` may not describe the relation `r`. Therefore, the aforementioned annotation method based on remote supervision introduces noise into the dataset. In summary, current relation extraction techniques based on the idea of remote supervision have two main research focuses: First, the model needs to learn triple knowledge from remote knowledge bases to predict and extract relations from text. Second, since remote supervision introduces noisy data with mislabeled labels, the model needs to be designed to minimize the impact of this noise on the training of the relation extraction model.
[0091] The first research point can be addressed by designing a remote supervised learning model, while the second research point can be addressed by reducing noise interference on the remote supervised model through multi-instance learning. To reduce the impact of mislabeling during the training of remote supervised models, Riedel et al. designed a multi-instance learning method based on bag labeling. This method defines a dataset called a "bag," which contains multiple sentences, each containing a specific entity pair. The relation corresponding to this entity pair is set as the label of the "bag." Through this design, the target data for relation extraction tasks is transformed from a single natural language sentence into a set of multiple natural language sentences containing the same entity pair, i.e., a "bag." Unlike traditional remote supervised methods, for multi-instance learning based on bag labeling, the labeling result of a bag is considered correct only if at least one entity pair in any constructed bag correctly corresponds to the bag's label. This definition method imposes fewer constraints on relation expression, allowing the trained model to tolerate some noisy data and reducing the negative impact of mislabeling. In multi-instance learning for relation extraction tasks, a bag is created for each fact triple, and all natural language text samples of this triple are placed into this bag. The number of triples in the knowledge base is consistent with the number of bags constructed. That is, given a remote knowledge base KB (Knowledge Base), and (h i r j , t i)∈KB, where h i For the head entity, t i For the tail entity, r j This is a relational class. Given a set of samples X = {B1, B2, ..., B...} k}, where B i ={x i 1,x i 2, ..., x i m|(h i r j , t i The goal is to learn a model y = f(X) that can predict a given package B. i Relationships. Based on the above-mentioned idea of multiple instance learning, Zheng et al. proposed combining the feature representation capabilities of neural networks with relation extraction methods based on remote supervision. This invention studies a relation extraction method that combines Piece-Wise-CNN (PCNN) with the idea of multiple instance learning. PCNN has certain advantages in extracting entity relationships from natural language due to the use of segmented pooling in its model structure. Currently, a large number of studies on remotely supervised relation extraction are based on PCNN. The overall model structure of PCNN can be divided into four layers: vector encoding layer, convolutional layer, pooling layer, and softmax layer.
[0092] ① The role of the vector encoding layer is to extract features from the input text sequence and construct a vector representation of the sentence. The vectors in a sentence consist of two types of embeddings: word embeddings and position embeddings. Concatenating these two embeddings forms the sentence embedding. For word embeddings, they are typically pre-trained using skip-grams. For position embeddings, position embeddings are used to represent the relative displacements of each word in the sentence to two entities. That is:
[0093] d = d w +d p *2 (9)
[0094] Where d represents the total dimension of the vectors representing individual words in the sentence, d w d represents the dimension of the word vector. p This represents the dimension of the position vector. Combining word embeddings and position embeddings, the sentence vector can be represented as:
[0095]
[0096] Where 's' represents the sentence length, i.e., the number of words.
[0097] ② The input to the convolutional layer is a sentence vector. For a sentence of length s, padding of length w-1 is applied to the beginning and end. Then the output of the convolutional kernel ω is:
[0098]
[0099] If n convolution kernels are used, the output of the convolution operation is:
[0100] C = {c1, ..., c} n}, c ij =w i q j-w+1;j , 1≤i≤n (12)
[0101] ③ Pooling layers are used to extract key features. The output dimension of the convolutional layer is... This shows that the output dimension is related to the sentence length. However, to facilitate the application of its features to downstream tasks, the output of the convolutional layer must be independent of the sequence length. To address this issue, pooling operations are typically used during feature extraction, aiming to retain only the main features in each feature map and discard some secondary features. However, the common single max pooling method cannot simultaneously obtain the features of the first and last entities. To compensate for this deficiency of single max pooling, PCNN uses a piecewise max pooling method, where the output c of each convolutional kernel... i Divided into 3 parts by two entities, the piecewise max pooling outputs a vector of length 3, i.e.:
[0102] p i ={p i1 p i2 p i3}, p ij =max(c ij ), 1≤i≤n, 1≤j≤3 (13)
[0103] After all convolutional kernels have completed segmented pooling, the model concatenates the pooling results of each kernel to obtain the concatenated vector p. 1:n The output after passing through the nonlinear function is:
[0104]
[0105] ④ The Softmax layer is responsible for mapping the output of the pooling layer to class scores:
[0106]
[0107] This invention proposes to use a multi-instance learning method based on remote supervision to mine the relationships between entities from massive amounts of text in the field of power grid equipment.
[0108] (3) Entity linking technology
[0109] Entity linking (EL) has always been a subtask in knowledge graph construction. It involves mapping entity references identified from natural language text to corresponding entities in a knowledge graph. Entity references refer to the different expressions of an entity in text, such as full names, aliases, and abbreviations, which may represent different entities in different contexts and thus have a certain degree of ambiguity. Entities, on the other hand, are objectively existing things in the real world and are the basic elements constituting a knowledge graph. Different entities have different relationships, and these entities themselves are unambiguous. Therefore, the entity linking task is needed to map entity references identified from unstructured text to corresponding entities in a structured knowledge base or knowledge graph.
[0110] Traditional entity linking models focus too much on the contextual relationships of entity references in the original text, neglecting their association with the knowledge base, resulting in unsatisfactory entity linking performance. With the application and implementation of deep learning in natural language processing, many researchers use deep learning to learn vector representations of entity references and candidate entities, then determine the entity linking results based on vector similarity calculation methods such as Euclidean distance. Unlike previous work, this invention constructs a candidate entity set based on an encyclopedia knowledge base, combined with external auxiliary materials such as power grid terminology standards and Sogou's power-related vocabulary. In the ranking module, not only are the contextual relationships of entity references in the original text considered, but also the neighbor information of candidate entities in the knowledge graph is fully utilized for matching and calculating similarity scores, thereby improving the accuracy of entity linking.
[0111] The knowledge graph-based entity linking model for the power grid domain consists of three parts: ① Named entity recognition module, which adopts the generative named entity unified framework proposed in Research Point 1 to identify all entity references mentioned in the case report; ② Candidate entity generation module: Based on the existing knowledge graph, combined with Wikidata and power grid terminology specifications, it constructs a set of candidate entities for entity references identified from the text; ③ Ranking module: It studies the entity embedding representation of the knowledge graph, calculates the similarity between the candidate entities and the references through the text features of the candidate entities, ranks the candidate entities, and thus finds the target entity.
[0112] (4) Knowledge graph relationship completion technology
[0113] Knowledge graph relation completion refers to predicting missing relations in triples after the knowledge graph has been constructed, thus making the knowledge graph more complete. The basic data unit of a knowledge graph is the triple. For example, (France, Capital, Paris) is a fact triple, where the head entity is "France," the tail entity is "Paris," and the relationship between the head and tail entities is "Capital." For ease of representation, a standard triple can be denoted as (h, r, t), where h represents the head entity, t represents the tail entity, and r represents the relationship between the head and tail entities. In real-world scenarios, the scale of knowledge is often dynamically expanding. Therefore, the entities and relations in a knowledge graph cannot cover all factual knowledge, necessitating continuous supplementation with new knowledge to make it more complete. Knowledge graph relation completion is one of the important ways to improve a knowledge graph. The following section will introduce the overall process and specific technologies used in knowledge graph completion.
[0114] To complete knowledge graph relationships, the first step is to appropriately represent the entities and relationships within the knowledge graph, facilitating model analysis and computation. This process is called Knowledge Graph Embedding (KGE). KGE transforms textual triples into low-dimensional vectors in a vector space. Methods for KGE can be broadly categorized into manual and learning-based approaches. Learning-based methods, also known as knowledge representation learning, automatically extract KGE embeddings from data using machine learning algorithms. This approach can learn suitable features based on the specific task, but it is best suited for domains with continuous and low-level features. Currently, the most common knowledge representation learning method is deep learning-based KGE embedding, which constructs higher-level semantic features suitable for the task based on lower-level features. After KGE embedding, missing relationships can be predicted based on the vector representation of the knowledge graph.
[0115] (4-1) Knowledge Graph Embedding Technology
[0116] Knowledge graph embedding refers to expressing the semantics of entities and relationships in a knowledge base using embeddings, and it forms the basis for knowledge graph completion. Commonly used knowledge graph embedding models can be categorized into translation models, bilinear models, and neural network models. The design principles of these embedding models are explained in detail below.
[0117] ① The translation model is the simplest knowledge graph embedding model. It treats the relationship between entity pairs as a translation process between the head entity and the tail entity. TransE is the most common translation model. TransE assumes that h + r ≈ t, that is, r is the translation relationship between the head and tail entities, and defines the scoring function as follows:
[0118]
[0119] The goal of model optimization is to minimize the scoring function. TransE can easily and clearly solve 1-1 class relationships, but it cannot handle 1-N, N-1, and NN relationships well. For example, two triples form a 1-2 relationship. If the head entity h of two triples is the same as the relationship r, then in the vector space of the TransE model, the low-dimensional vectors of the tail entities t1 and t2 of the two triples will be the same, which is obviously unreasonable.
[0120] (2) Bilinear models calculate the credibility of latent semantics of entities and relations in vector space, including models such as RESCAL, DisMult, and ComplEx. RESCAL is the simplest bilinear model, while the latter two have made certain improvements on it. RESCAL represents relations using a full-rank matrix and defines the scoring function as:
[0121] f r (h, t) = h T M r t (17)
[0122] In the RESCAL embedding model, the head and tail entities are linked to relations through a full-rank matrix. By expressing relational semantics based on matrices, the model can uncover the latent semantic information of triples, improving semantic expressive power. However, this method also has some drawbacks. The RESCAL model structure is relatively simple with few parameters, often leading to overfitting. As the number of relations increases, the dimension of the full-rank matrix also increases, introducing high computational costs for embedding calculations. Therefore, this embedding method is rarely used in production scenarios.
[0123] Based on the aforementioned shortcomings of RESCAL, DisMult has made improvements from the perspective of model design, and its loss function is:
[0124] f r (h, t) = h T dia g(M r )t (18)
[0125] It is evident that the relation matrix in DisMult has been replaced with a diagonal matrix. However, due to the simplification of the model structure during the improvement of RESCAL by DisMult, the model's relational expressive power has been weakened to some extent. The improved model can express symmetric relations better, but it cannot express other types of relations.
[0126] Addressing the aforementioned shortcomings of DisMult, ComplEx utilizes complex vectors to model knowledge graph embeddings, leveraging complex space to enhance their relational representation capabilities. Its scoring function is:
[0127]
[0128] The head entity h and the tail entity t are represented by complex vectors. Let t denote the conjugate complex number, and Re(·) denotes obtaining the real part of the complex number. Through this knowledge graph embedding model design in complex space, ComplEx can simultaneously solve the problem of expressing multiple relations, greatly making up for the shortcomings of DiaMult.
[0129] (3) The neural network model is a model that applies neural networks to solve the knowledge graph completion problem after the development and rise of neural networks. ConvE is the most typical neural network knowledge graph embedding model.
[0130] The ConvE model structure is very simple. For a triple, it uses two identical two-dimensional vectors to represent the head entity and the relation, respectively. The two vectors are then concatenated and fed into a convolutional layer to extract features. Afterward, a hidden layer extracts the interaction information between the head entity and the relation. The output is multiplied by the entity matrix to calculate the credibility of the triple. The scoring function during ConvE model training is as follows:
[0131]
[0132] Let w represent a two-dimensional vector, w represent the convolution kernel, and W represent a matrix. The ConvE model itself isn't particularly novel; it's simply one of the earlier methods to model KGE using convolutional neural networks.
[0133] This invention designs a new knowledge graph relationship embedding model based on the above three knowledge graph embedding methods, and compares and analyzes the effect of this model with the above three traditional embedding models in the open domain zero-shot knowledge graph completion task.
[0134] (4-2) Knowledge Graph Relationship Prediction Technology
[0135] Most current knowledge graph relationship prediction methods are designed based on the characteristics of a specific domain. While the models built using this approach perform well in individual domains, their generalization ability is poor; a knowledge graph relationship prediction model from one domain cannot be applied to other domains. Inspired by the work of BERT (Devlin et al., 2018) and MoCo (He et al., 2020), Qiu et al. proposed the Graph Contrastive Coding (GCC) graph neural network pre-training framework. This framework is used for pre-training graph neural networks, enabling the learning of general graph topological features and the acquisition of intrinsic transferable graph structure information using contrastive learning methods.
[0136] Traditional graph representation learning primarily references skip-gram word representation learning methods in NLP, such as DeepWalk, LINE, node2Vec, and metapath2vec. These methods mainly model the neighborhood similarity of nodes. Specifically, nodes that are close to each other in the network are considered similar by the model. Furthermore, the representations obtained by these methods often lack generality and are limited to the specific network used for training. In contrast, GCC proposed by Qiu et al. focuses on structural similarity, aiming for two locally structurally similar nodes to have similar representations, and hoping that the learned representations can be transferred to different networks, possessing generality.
[0137] GCC employs a contrastive learning framework. Its basic idea is that, for a given entity, positive examples should be as close to the entity as possible in the embedding space, while negative examples should be as far away from the entity as possible in the embedding space. In contrastive learning, given a query representation q, for a candidate set of K+1 representations k0, k1, k2, ..., k... K , which includes positive example k + The goal is to optimize the loss function:
[0138]
[0139] Where q and k are samples x q and sample x kIn GCC's low-dimensional representation, each sample is defined as a subgraph generated by sampling the r-order neighbor network of a specific entity in the knowledge graph. After sampling the neighbor network of a certain entity to obtain a pair of positive and negative examples, features can be extracted from the positive and negative example graphs by a graph encoder, and comparative learning of the model can be carried out. GCC can choose any graph neural network as the encoder, the most common approach is to use Graph Isomorphism Network (GIN) as the encoder.
[0140] GCC can be applied to many downstream graph learning tasks. In this invention, we draw on the pre-training and feature extraction ideas of GCC and design and implement a knowledge graph relationship prediction method based on the similarity of knowledge graph topology structure.
[0141] To address the problems existing in the prior art, the knowledge graph system for power grid equipment designed in this invention adds a knowledge graph as its core to provide auxiliary support functions for power grid workers. From an operational perspective, firstly, the system needs to be able to automatically complete the data preparation work for the knowledge graph in the power grid equipment domain and continuously and automatically update the text data; secondly, the system needs to be able to automatically complete the knowledge graph construction work and achieve knowledge graph completion based on deep learning algorithms; thirdly, the system needs to provide knowledge graph version control functions, so as to update the data through graph upgrades and rollbacks; fourthly, the system needs to provide visual management functions for domain text and knowledge graphs to improve data management efficiency; fifthly, the system needs to realize functions such as relevant text recommendation and knowledge graph hierarchical classification based on the knowledge reasoning capabilities provided by the knowledge graph.
[0142] Specifically, such as Figure 1 As shown, the process includes the following:
[0143] (1) Data related to the power grid equipment field is obtained from the Internet through Python-based web crawling technology. If there are non-text data such as PDF files and images, the text is extracted from them through optical character recognition (OCR) technology, and finally an unstructured text dataset is formed.
[0144] (2) Data preprocessing is performed using Python data processing tools. First, data with errors, outdated information, or incorrect formatting is excluded through data review. Second, data with high knowledge quality and meeting the requirements for knowledge graph construction is selected through data filtering. Finally, data integration is used to unify data from different sources and with different structures, forming a standardized dataset.
[0145] (3) By designing a rule matching template based on the domain characteristics of power grid equipment related data, and combining named entity recognition and entity relationship extraction technologies, fact triples of the power grid equipment domain are extracted from text data as the knowledge source of the domain knowledge graph;
[0146] (4) Determine the task type. There are two types of tasks: knowledge graph construction and knowledge graph update.
[0147] (5) Construct a knowledge graph of the power grid equipment domain based on the triplet, and persistently store it through the Neo4j graph database based on the Neo4j API in JAVA;
[0148] (6) Based on the PyTorch deep learning framework, a knowledge graph embedding model is trained on the knowledge graph of the power grid equipment domain, laying the foundation for the knowledge graph completion task;
[0149] (7) To address the issue of missing relationships in knowledge graphs, based on the semantics of knowledge graph embedding and combined with zero-shot learning technology, missing relationships are filled in, making the knowledge graph information in the field of power grid equipment more comprehensive.
[0150] (8) By setting a timed task, that is, generating a notification signal every certain period of time, or by manually initiating a synchronization task, the knowledge graph update task can be further triggered.
[0151] (9) Incrementally and dynamically update the knowledge in the knowledge graph by using the version numbers of entities and relations;
[0152] (10) Implement visual management of knowledge graphs based on development frameworks such as Springboot and Vue.
[0153] This invention constructs a dynamic knowledge graph based on triples in the power grid equipment domain. While general domain knowledge graphs are relatively mature, they lack sufficient coverage of professional knowledge in the power grid equipment field, and the depth of professional knowledge involved is limited, failing to meet the needs of operation and maintenance work in the power grid equipment field. Therefore, there is an urgent need to construct a knowledge graph for the power grid equipment domain that includes professional knowledge.
[0154] After transforming multi-source, heterogeneous power grid equipment data into triples through data preprocessing, a knowledge graph for the power grid equipment domain can be constructed based on this, enabling the understanding and utilization of industry expertise contained in textual data. Furthermore, due to the time-sensitive and rapidly evolving nature of power grid equipment data, dynamic maintenance is necessary after the knowledge graph is constructed. This involves continuously updating existing data, adding new data, and removing outdated and invalid data to achieve dynamic upgrades of the knowledge graph. This invention achieves this function by designing a dynamic knowledge graph upgrade mechanism, such as... Figure 2 As shown.
[0155] The knowledge graph dynamic upgrade mechanism will extract fact triples related to the power grid equipment domain from unstructured text based on template matching, named entity recognition, and entity relationship extraction technologies.
[0156] For each entity in the knowledge graph, information such as entity category, entity description, and entity version will be set. Entity category is used to determine the type of the entity, entity description is used to explain the meaning of the entity itself, and entity version controls the timeliness of the entity by recording a timestamp for the entity.
[0157] For each relation in the knowledge graph, it will also be assigned labels such as relation category, relation description, and relation version, with meanings similar to those of entity labels.
[0158] Furthermore, the knowledge graph is dynamically updated incrementally using dynamically updated data on power grid equipment and version numbers of entities and relationships. During updates, version management and rollback mechanisms are implemented through dynamic upgrade technology, and various upgrade mechanisms are achieved by setting up multiple upgrade executors.
[0159] The architecture of the knowledge graph dynamic upgrade mechanism is as follows: Figure 3 As shown, this mechanism is mainly designed based on two key technologies: version control technology and knowledge update technology.
[0160] Version control technology is used to manage multiple versions of knowledge graphs and implement a rollback mechanism for graph databases. Each operation of adding new triple data to the knowledge graph can be regarded as a dynamic upgrade of the knowledge graph. After each upgrade, the knowledge graph obtains a globally unique version number. The change log designed in this invention is the core of the version control technology implementation. It contains two types of log information: operation logs and data logs. These two types of logs are explained below.
[0161] Before the knowledge graph upgrade task begins, the version upgrade service writes an operation log to the change log. This operation log contains all information related to the new version, including the current time, current version, updated data type, upgrade task triggering method, executor type, data volume, and operator. It marks the end of the data log for the previous version of the knowledge graph and the beginning of the data log for the new version. After the operation log is successfully written, the system calls the corresponding executor to perform the data update operation. Since a knowledge graph is essentially a collection of multiple triples, updating the knowledge graph data can be viewed as performing add, delete, modify, and query operations on certain triples. After each modification to a triple is completed, the system writes a data log to the change log to describe the specific operation performed on the triple. Based on the change log, the version control technology of this invention provides a version rollback service. When a user needs to roll back due to certain reasons (such as accidental operation), they only need to specify a knowledge graph version number to be rolled back. The version rollback service will extract the change log of the corresponding version and analyze it. It mainly merges the data update operations in the log and retrieves the new version data log after the specified version to be rolled back to prevent modifications to historical versions from affecting subsequent versions.
[0162] For example, in version v0.1, entities A, B, and C were added, and in the latest version v0.2, relationship ArB was added. If you want to roll back the data in v0.1, you can delete entity C, but you cannot delete A and B, because deleting A and B will affect the data changes in subsequent version v0.2.
[0163] After analysis, a temporary reverse operation log is generated from the change log. This reverse operation log is then input into the version upgrade service to execute the corresponding reverse operation, thereby achieving version rollback. The version rollback service essentially performs a dynamic knowledge graph upgrade through the reverse operation log; therefore, a new version number will still be generated after a successful rollback. Figure 4 As shown.
[0164] This invention constructs a Knowledge Graph Completion Based on Text Knowledge Transformation and Alignment (TKTA) model, which can predict new relations in a knowledge graph based on the textual descriptions of those relations. Based on the textual descriptions of the new relations, TKTA can generate the embeddings of those relations in the knowledge graph, thus completing the knowledge graph completion task in the open domain. Experimental results show that TKTA achieves excellent performance in the open domain relation prediction task of knowledge graphs.
[0165] TKTA training process as follows: Figure 5 As shown, for the existing relation "president_of_country" in the knowledge graph, we first need to obtain a text description of the relation from a dictionary, encyclopedia, or search engine, and input this text description into a Knowledge Converter (KC) to obtain a feature vector v1 for the relation. Then, entity features and topological features are extracted from the n-step network of the relation in the knowledge graph, and these two types of features are fused to obtain another feature vector v2 for the relation. By adjusting the network parameters of KC, we make v1 approximate v2. The final KC can serve as an encoder for the relation. This encoder can generate a feature vector containing relation semantics based on the natural language text description of the relation, and use this vector to complete the knowledge graph in the embedding space.
[0166] like Figure 6 As shown, for a relation r in a knowledge graph, we first construct an n-step network centered on it, denoted as N. r This network is then fed into the relation feature extractor. The relation feature extractor will extract N... r The entity features included, N r The relational features included and N r The model then integrates the topological features of relation r. These three features are then fused into a final feature vector for relation r. On the other hand, the model first obtains descriptive text about relation r, which may come from dictionary or encyclopedia entries. This textual description of relation r is provided to the relation embedding generator. The relation embedding generator generates a relation vector representing the features of relation r based on the input text description. Subsequently, TKTA extracts the relation feature from N... r The embedded vector v1 of relation r extracted from the relation feature extractor and the embedded vector v2 of relation embedded by the relation embedding generator based on the text description of the relation are input together into the relation embedding discriminator. The role of the relation embedding discriminator is to perform binary classification on the input vectors, distinguishing between the two classes of vectors. The relation embedding discriminator will attempt to mark the vector v1 generated by the relation feature extractor as true and the vector v2 generated by the relation embedding generator as false.
[0167] During training, we first fix the parameters of the relation embedding generator, treating it as a fixed model, and train the relation embedding discriminator. For each relation r, we obtain two embedding vectors. One embedding vector v1 comes from the relation feature extractor, whose feature information comes from the relation feature information contained in the n-step network of relations in the knowledge graph. The other embedding vector v2 comes from the relation embedding generator, whose feature information comes from the long text description of the relation. We treat the relation vector v1 generated by the relation feature extractor as a true relation vector, and the vector v2 generated by the relation embedding generator as a fake relation vector forged by the generator.
[0168] The essence of a relation embedding discriminator is a binary classifier that needs to distinguish between two source vectors.
[0169] When the feature vector of a relation reaches the relation embedding discriminator, it must determine whether the input is a true relation vector or a false relation vector. As we complete one round of training of the relation embedding discriminator, its performance improves; that is, its ability to distinguish between true and false relation vectors is enhanced.
[0170] At this point, we fix the parameters of the relation embedding discriminator, treating it as a fixed model, and train the relation embedding generator. The input to the relation embedding generator is a long textual description of the relation, which may come from an encyclopedia definition or dictionary. The main task of the relation embedding generator is to generate relation embeddings that are as realistic as possible based on the textual description of the relation. Here, "realistic relation embeddings" means those that can successfully fool the relation embedding discriminator, causing it to mistakenly believe that the vectors generated by the relation embedding generator were produced by the relation feature extractor. After one round of training, the relation embedding generator's ability to generate relation embeddings is improved; that is, the relation embeddings generated by the relation embedding generator have a higher probability of successfully deceiving the relation embedding discriminator, causing it to misclassify the relation embeddings as real vectors generated by the relation feature extractor.
[0171] Before reaching Nash equilibrium, the model undergoes multiple rounds of training. In each round, the neural network parameters of the relation embedding generator are first fixed, and the relation embedding discriminator is trained. Then, the neural network parameters of the relation embedding discriminator are fixed, and the relation embedding generator is trained again. In this way, the model achieves adversarial learning between the relation embedding generator and the relation embedding discriminator. After multiple rounds of training, the adversarial learning between the relation embedding generator and the relation embedding discriminator eventually reaches Nash equilibrium. At this point, the relation embeddings generated by the relation embedding generator based on the textual description of the relation are highly realistic. The relation embedding discriminator achieves 50% accuracy in distinguishing whether the input relation embedding is generated by the relation embedding generator based on the textual description of the relation or by the relation feature extractor based on the features of the N-Step network of relations in the knowledge graph.
[0172] Once training is complete, for new relations that have never appeared in the knowledge graph before, we can input the textual description of the relation into the relation embedding generator, which will generate a very realistic relation embedding. Using this relation embedding, we can complete the knowledge graph completion task for new relations.
[0173] The input to a network feature extractor is a relation, and the output is a vector representation containing the features of that relation. The overall structure of the network feature extractor is as follows: Figure 7 As shown, after inputting a relation into the knowledge graph, it first finds all occurrences of this relation in the knowledge graph and constructs an n-step network for this relation. Assuming there are x triples containing relation r in the knowledge graph, we will ultimately construct an n-step network for x relations r. For each n-step network, we use three feature extractors to extract feature information. These three feature extractors are an entity feature extractor, a relation feature extractor, and a topology feature extractor. The entity feature extractor extracts the semantic information of all entities contained in the n-step network. The relation feature extractor extracts the semantic information of all relations contained in the n-step network. The topology feature extractor extracts the semantic information contained in the topology of the n-step network. After extracting features, these three feature extractors generate feature vectors containing the corresponding feature information. Then, we input these three feature vectors into the N-Step Network Fix Encoder. The N-Step Network Fix Encoder fuses the feature information extracted by the three feature extractors and outputs a final feature vector for relation r.
[0174] In training the three feature extractors above, we employed a contrastive learning approach. For all n-step networks with the same relation in the knowledge graph, we extracted features and made them as close as possible in the vector space. Since different n-step networks expressing the same relation convey the same semantics, their semantics in the vector space should also be as similar as possible. For n-step networks with different relations, we extracted features and made them as far apart as possible in the vector space. Since n-step networks expressing different relations convey different semantics, their semantic differences in the vector space should also be maximized as much as possible.
[0175] In this way, we obtain the feature vector of an n-step network for relation r. By performing the above processing on x n-step networks for relation r in the knowledge graph, we can obtain x embedding vectors for relation r. By calculating the average of these x embedding vectors, we can obtain the final vector representation of relation r in the knowledge graph.
[0176] The following explains the three feature extractors:
[0177] (a) Entity Feature Extractor: The input to the entity feature extractor is an n-step network N of relation r. r The output is the entity feature vector of the n-step network of relation r. First, the entity feature extractor obtains all entities from the n-step network of relation r. Second, based on all entities extracted in the previous step, the entity feature extractor downsamples the entities in the n-step network of relation r, selecting a certain proportion of entities. In this invention, the downsampling rate used during training is 0.8. The reason for downsampling is to randomly remove some entities each time to avoid certain individual entities having too much influence on the result. Third, the downsampled entities are sequentially encoded. Here, we borrow classic knowledge graph embedding models such as TransE and DistMul to obtain the vector representation of the entities. Fourth, the vectors of the obtained entities are concatenated and compressed to obtain the final vector representation of the entity features of relation r.
[0178] (b) Relation Feature Extractor: After inputting the n-step network of relation r, the relation feature extractor first extracts all other relations in the n-step network. These n-step relations are then encoded using a knowledge graph embedding model to obtain their embedding vectors. Since the dataset may be small during training, some relations may always appear in pairs in the training set triples. In this case, the model may incorrectly assume that one relation determines the semantics of another. To avoid this, we randomly downsample all relations extracted from the n-step network of relation r, thereby randomly excluding some relations in each training iteration and improving the model's generalization ability. After obtaining the feature vector of each relation through sampling, we concatenate the batches of feature vectors and compress them through a linear layer. Finally, the feature vector of the relation is obtained in the n-step network of relation r.
[0179] (c) Topology Feature Extractor: The topology feature extractor extracts the semantic information contained in the topological structure of the n-step network of relation r. Upon receiving the N-step network of relation r, the topology feature extractor performs four steps. First, it anonymizes the received n-step network by removing the semantic information of the entities themselves and replacing all entities with the same anonymous entity. This eliminates the influence of the entity's own information on the topological characteristics. Second, it downsamples the network structure. The sampling point method starts with the neighbor pairs of relation r and performs a random walk in the n-step network of r. The restart probability of the random walk determines whether the sampling method is breadth-first or depth-first. In this invention, we set the restart probability of the random walk to 0.7. After the random walk, we obtain the anonymous subgraph of the n-step network. Third, the topology feature extractor inputs the anonymized network topology into the graph neural network, extracts structural features, and outputs a feature vector. The fourth step is to obtain the topological feature vectors of all n-step networks of r, concatenate them, compress them through a linear network layer, and finally obtain the topological feature vector of r.
[0180] In this embodiment, for any relation *r*, we first obtain its textual description through encyclopedia entries or dictionaries. After inputting the textual description of relation *r* into the relation embedding generator, the generator first directly generates embeddings for each word based on a pre-trained bag-of-words model. Then, it extracts each word from the textual description of relation *r* and calculates its TF-IDF value to measure its importance to the entire text. The TF-IDF value of each word is its importance weight in the text. Then, we multiply each word's embedding vector by its TF-IDF weight and sum the results to obtain the text's vector representation. To optimize the generalization ability of the relation embedding generator, we introduce a small amount of noise in two ways. First, we introduce noise through stop words instead of a stop word list when generating word embeddings using the bag-of-words model. Second, we introduce random noise by concatenating the text's vector representation with a normally distributed random vector. Finally, the concatenation result is used as the final generated vector of relation *r*.
[0181] In this embodiment, the goal of the relation embedding discriminator is to perform binary classification on the input embedding vector of relation r. The classification result is either a vector extracted from the knowledge graph by the relation feature extractor (i.e., the real embedding vector) or a vector generated by the relation embedding generator based on the textual description of relation r (i.e., a fake embedding vector). During training, the relation embedding discriminator initially performs poorly, making it difficult to distinguish between real and fake input vectors. During multiple rounds of alternating training between the relation embedding discriminator and the relation embedding generator, the classification accuracy initially increases due to the improved performance of the relation embedding discriminator. As the number of training rounds increases, the fake embedding vectors of r generated by the relation embedding generator become increasingly realistic, and the classification accuracy of the relation embedding discriminator gradually decreases. When the game between the relation embedding generator and the relation embedding discriminator reaches a Nash equilibrium, meaning neither can improve the effect of adversarial training, the classification accuracy of the relation embedding discriminator will stabilize at 50%.
[0182] In this embodiment, for each article in the text knowledge base, a knowledge graph analysis is first performed to construct a small knowledge graph related to this text, called a secondary knowledge graph. The knowledge graph for power grid equipment constructed in this invention is called a primary knowledge graph, and the secondary knowledge graph can be regarded as a subset of the primary knowledge graph. After completing the headphone knowledge graph construction for each text, it also needs to be visualized, so that users can understand the main content involved in the current text from the visualized secondary knowledge graph. Second, based on the secondary knowledge graph, we perform correlation analysis on all texts in the text knowledge base. The specific method is to calculate the text similarity between the secondary knowledge graphs corresponding to each pair of texts. Since the time complexity is O(n²), online calculation will lead to excessive system response time. Therefore, this function should be implemented based on offline calculation technology.
[0183] In this embodiment, the front-end homepage of the invented knowledge graph system based on power grid equipment is as follows: Figure 8 As shown, the interface comprises three main areas and multiple function buttons. The top of the interface features function buttons, allowing users to navigate to specific functions. This area is expandable; new functions can be integrated here as they are added in the future. The bottom of the interface provides global and category search functions, allowing users to perform text searches. The right side of the interface displays current system statistics.
[0184] Example 2:
[0185] Embodiment 2 of the present invention provides a domain knowledge graph update system based on power grid equipment, comprising:
[0186] The knowledge graph construction module is configured to: combine the acquired unstructured text data, and extract fact triples related to the power grid equipment domain from the unstructured text based on template matching, named entity recognition, entity relationship extraction, and entity linking technologies to construct a knowledge graph; the system provides global search and category search functions; and the knowledge graph query function can be used to retrieve and query the secondary knowledge graph information of power grid equipment text.
[0187] The knowledge graph update module is configured to: add, delete, and modify data in the knowledge graph through the knowledge graph editing function; view detailed information of each knowledge graph data change task for version control and perform operations such as rollback, deletion, and retry; for new relationships that have not appeared in the knowledge graph, input the text description of the new relationship into the relationship embedding generator, the relationship embedding generator generates relationship embeddings, and the knowledge graph is completed and updated based on the obtained relationship embeddings.
[0188] The training of the relation embedding generator includes:
[0189] An n-step network is constructed with any relation r in the knowledge graph as the center. The relation feature extractor extracts the entity features, relation features and topological features contained in the n-step network, and integrates the entity features, relation features and topological features into the final feature vector of relation r.
[0190] Obtain the descriptive text of relation r, and the relation embedding generator generates the relation feature vector of relation r based on the descriptive text of relation r;
[0191] Based on the final feature vectors of multiple relations, the relation feature vectors, and the relation embedding discriminator, the parameters of the relation embedding generator are first fixed, and the relation embedding discriminator is trained. Then, the parameters of the relation embedding discriminator are fixed, and the relation embedding generator is trained. After reaching Nash equilibrium, the trained relation embedding generator is obtained.
[0192] The working method of the system is the same as that provided in Embodiment 1, and will not be repeated here.
[0193] Example 3:
[0194] Embodiment 3 of the present invention provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the steps in the domain knowledge graph update method based on power grid equipment as described in Embodiment 1 of the present invention.
[0195] Example 4:
[0196] Embodiment 4 of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the domain knowledge graph update method based on power grid equipment as described in Embodiment 1 of the present invention.
[0197] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for updating a domain knowledge graph based on power grid equipment, characterized in that, Includes the following processes: Based on the acquired unstructured text data, a knowledge graph is constructed according to the triples in the power grid equipment domain; For new relations that have not appeared in the knowledge graph, the text description of the new relation is input into the relation embedding generator, which generates relation embeddings. The knowledge graph is then completed and updated based on the obtained relation embeddings. The training of the relation embedding generator includes: constructing an n-step network centered on any relation r in the knowledge graph; extracting entity features, relation features, and topological features from the n-step network using a network feature extractor; and fusing the entity features, relation features, and topological features into the final feature vector of relation r, including: Assuming the knowledge graph contains Containment Relationship The triples will eventually construct an n-step network of x relations r. For each n-step network, three feature extractors are used to extract the feature information in the n-step network. The three feature extractors are entity feature extractor, relation feature extractor and topology feature extractor. The entity feature extractor is used to extract the semantic information of all entities contained in the n-step network, the relation feature extractor is used to extract the semantic information of all relations contained in the n-step network, and the topology feature extractor is used to extract the semantic information contained in the topology of the n-step network. After extracting features, the three feature extractors will generate feature vectors containing the corresponding feature information. The three feature vectors are fused to output a final feature vector with relation r. Relationships in knowledge graphs The above processing is performed on x n-step networks to obtain x relations. The embedding vectors of x are used to calculate the average value of the embedding vectors to obtain the relationships in the knowledge graph. The final vector representation; The descriptive text of relation r is obtained, and the relation embedding generator is based on the relation. Descriptive text generation relationship The relation feature vectors are obtained by first fixing the parameters of the relation embedding generator and training the relation embedding discriminator based on the final feature vectors of multiple relations, the relation feature vectors, and the relation embedding discriminator. Then, the parameters of the relation embedding discriminator are fixed and the relation embedding generator is trained. After reaching Nash equilibrium, the trained relation embedding generator is obtained.
2. The domain knowledge graph update method based on power grid equipment as described in claim 1, characterized in that, By combining the acquired unstructured text data, a knowledge graph is constructed by extracting domain triples of power grid equipment using a generative named entity recognition algorithm based on MRA and an entity linking algorithm oriented towards domain knowledge graphs. The named entity recognition task is treated as a sequence generation task. For flat, nested and discontinuous entities that appear in named entity recognition, a generative entity annotation method is executed. During encoding, an attention mechanism based on the relevance between the referent and the label is adopted and integrated into the attention of the Encoder-Decoder part of the Transformer model. During decoding, a pointer network is used, and hyperparameters are used to control whether the currently generated word comes from the input sequence or from a predefined vocabulary. The entity linking is divided into two sub-tasks: candidate entity generation and candidate entity ranking. In the candidate entity ranking based on graph convolution, BiLSTM is used to dynamically learn the word embeddings of referents appearing in the text, and graph convolution is used to learn the representation of candidate entities in the knowledge graph. We use the BERT pre-trained model to learn deep semantic knowledge between the entity referential context and the candidate entity context, obtain semantic similarity through the Softmax function, sort the candidate entity set according to semantic similarity, and select the candidate entity with the highest similarity score as the target candidate entity. For each entity in the knowledge graph, set the entity category, entity description, and entity version; for each relation in the knowledge graph, set the relation category, relation description, and relation version. The knowledge graph is dynamically updated incrementally using dynamically updated power grid equipment domain data and version numbers of entities and relationships, with version management and rollback control implemented during the dynamic incremental update process.
3. The domain knowledge graph update method based on power grid equipment as described in claim 2, characterized in that, Version management and rollback control, including: Each time new triple data is added to the knowledge graph, it is considered a dynamic upgrade of the knowledge graph. After each upgrade, the knowledge graph will obtain a globally unique version number. Before the knowledge graph upgrade task begins, the version upgrade service first writes an operation log to the change log. The operation log contains all information related to the new version, marking the end of the data log of the previous version of the knowledge graph and the beginning of the data log of the new version of the knowledge graph. After the operation log is successfully written, the corresponding executor is called to perform the data update operation. The data update of the knowledge graph is regarded as adding, deleting, modifying and querying certain triples. After each modification to a triple is completed, a data log is written to the change log to describe the specific operation performed on the triple. When a user needs to roll back for some reason, they need to specify a knowledge graph version number to roll back to. The version rollback service extracts the change log of the corresponding version, merges the data update operations in the log, and retrieves the new version data log after the specified rollback version. A temporary reverse operation log is generated for the change log. The reverse operation log is then input into the version upgrade service to execute the corresponding reverse operation, thereby rolling back the version. After a successful rollback, a new version number will still be generated.
4. The domain knowledge graph update method based on power grid equipment as described in claim 1, characterized in that, The entity feature extractor takes an n-step network of relation r as input and outputs a relation r. The entity feature vectors of the n-step network include: From the relationship All entities are obtained from the n-step network of relation r. Based on the extracted entities, the entities in the n-step network of relation r are downsampled. The downsampled entities are then sequentially encoded. The vectors of the obtained entities are concatenated and compressed to obtain the relation. The final vector representation of entity features.
5. The domain knowledge graph update method based on power grid equipment as described in claim 1, characterized in that, The relation feature extractor first extracts all n-step relations in the n-step network, and then encodes all n-step relations through a knowledge graph embedding model to obtain their embedding vectors respectively; Random downsampling is performed on all relations extracted from the n-step network of relation r. After obtaining the feature vector of each relation through downsampling, the feature vectors are concatenated and compressed through a linear layer to obtain the feature vector of the relation in the n-step network of relation r. The topology feature extractor performs entity anonymization on the received n-step network, removing the semantic information of the entities themselves and replacing all entities with the same anonymous entity; it then downsamples the network structure, starting with the neighbor entity pairs of relation r, and... A random walk is performed on the n-step network. After the random walk, an anonymous subgraph of the n-step network is obtained. The anonymized network topology is then input into a graph neural network to extract structural features, and the output is a feature vector. After obtaining the topological feature vectors of all n-step networks, they are concatenated and compressed through a linear network layer to obtain the final result. The topological feature vector.
6. The domain knowledge graph update method based on power grid equipment as described in claim 2, characterized in that, Using a dynamically updated knowledge graph as the first-level knowledge graph, for each article in the text knowledge base, a knowledge graph analysis is first performed on it to construct a small knowledge graph related to this text as the second-level knowledge graph. The second-level knowledge graph is regarded as a subset of the first-level knowledge graph. After constructing a secondary knowledge graph for each text, it is visualized, allowing users to understand the main content of the current text from the visualized secondary knowledge graph. Based on a two-level knowledge graph, we perform correlation analysis on all texts in the text knowledge base and calculate the text similarity between the two-level knowledge graphs corresponding to each pair of texts.
7. A domain knowledge graph update system based on power grid equipment, characterized in that, include: The knowledge graph construction module is configured to: combine the acquired unstructured text data and construct a knowledge graph based on the triples of the power grid equipment domain; The knowledge graph update module is configured to: for new relations that have not appeared in the knowledge graph, input the text description of the new relation into the relation embedding generator, generate relation embeddings, and update the knowledge graph based on the obtained relation embeddings; The training of the relation embedding generator includes: An n-step network is constructed centered on any relation r in the knowledge graph. A network feature extractor extracts entity features, relation features, and topological features from the n-step network. These features are then fused into a final feature vector for relation r, including: Assuming the knowledge graph contains Containment Relationship The triples will eventually construct an n-step network of x relations r. For each n-step network, three feature extractors are used to extract the feature information in the n-step network. The three feature extractors are entity feature extractor, relation feature extractor and topology feature extractor. The entity feature extractor is used to extract the semantic information of all entities contained in the n-step network, the relation feature extractor is used to extract the semantic information of all relations contained in the n-step network, and the topology feature extractor is used to extract the semantic information contained in the topology of the n-step network. After extracting features, the three feature extractors will generate feature vectors containing the corresponding feature information. The three feature vectors are fused to output a final feature vector with relation r. Relationships in knowledge graphs The above processing is performed on x n-step networks to obtain x relations. The embedding vectors of x are used to calculate the average value of the embedding vectors to obtain the relationships in the knowledge graph. The final vector representation; The descriptive text of relation r is obtained, and the relation embedding generator is based on the relation. Descriptive text generation relationship The relational feature vector; Based on the final feature vectors of multiple relations, the relation feature vectors, and the relation embedding discriminator, the parameters of the relation embedding generator are first fixed, and the relation embedding discriminator is trained. Then, the parameters of the relation embedding discriminator are fixed, and the relation embedding generator is trained. After reaching Nash equilibrium, the trained relation embedding generator is obtained.
8. The domain knowledge graph update system based on power grid equipment as described in claim 7, characterized in that, By combining the acquired unstructured text data, a knowledge graph is constructed by extracting domain triples of power grid equipment using a generative named entity recognition algorithm based on MRA and an entity linking algorithm oriented towards domain knowledge graphs. The named entity recognition task is treated as a sequence generation task. For flat, nested and discontinuous entities that appear in named entity recognition, a generative entity annotation method is executed. During encoding, an attention mechanism based on the relevance between the referent and the label is adopted and integrated into the attention of the Encoder-Decoder part of the Transformer model. During decoding, a pointer network is used, and hyperparameters are used to control whether the currently generated word comes from the input sequence or from a predefined vocabulary. The entity linking is divided into two sub-tasks: candidate entity generation and candidate entity ranking. In the candidate entity ranking based on graph convolution, BiLSTM is used to dynamically learn the word embeddings of referents appearing in the text, and graph convolution is used to learn the representation of candidate entities in the knowledge graph. We use the BERT pre-trained model to learn deep semantic knowledge between the entity referential context and the candidate entity context, obtain semantic similarity through the Softmax function, sort the candidate entity set according to semantic similarity, and select the candidate entity with the highest similarity score as the target candidate entity. For each entity in the knowledge graph, set the entity category, entity description, and entity version; for each relation in the knowledge graph, set the relation category, relation description, and relation version. The knowledge graph is dynamically updated incrementally using dynamically updated power grid equipment domain data and version numbers of entities and relationships, with version management and rollback control implemented during the dynamic incremental update process.
9. The domain knowledge graph update system based on power grid equipment as described in claim 8, characterized in that, Version management and rollback control, including: Each time new triple data is added to the knowledge graph, it is considered a dynamic upgrade of the knowledge graph. After each upgrade, the knowledge graph will obtain a globally unique version number. Before the knowledge graph upgrade task begins, the version upgrade service first writes an operation log to the change log. The operation log contains all information related to the new version, marking the end of the data log of the previous version of the knowledge graph and the beginning of the data log of the new version of the knowledge graph. After the operation log is successfully written, the corresponding executor is called to perform the data update operation. The data update of the knowledge graph is regarded as adding, deleting, modifying and querying certain triples. After each modification to a triple is completed, a data log is written to the change log to describe the specific operation performed on the triple. When a user needs to roll back for some reason, they need to specify a knowledge graph version number to roll back to. The version rollback service extracts the change log of the corresponding version, merges the data update operations in the log, and retrieves the new version data log after the specified rollback version. A temporary reverse operation log is generated for the change log. The reverse operation log is then input into the version upgrade service to execute the corresponding reverse operation, thereby rolling back the version. After a successful rollback, a new version number will still be generated.
10. The domain knowledge graph update system based on power grid equipment as described in claim 7, characterized in that, The entity feature extractor takes an n-step network of relation r as input and outputs a relation r. The entity feature vectors of the n-step network include: From the relationship All entities are obtained from the n-step network of relation r. Based on the extracted entities, the entities in the n-step network of relation r are downsampled. The downsampled entities are then sequentially encoded. The vectors of the obtained entities are concatenated and compressed to obtain the relation. The final vector representation of entity features.
11. The domain knowledge graph update system based on power grid equipment as described in claim 7, characterized in that, The relation feature extractor first extracts all n-step relations in the n-step network, and then encodes all n-step relations through a knowledge graph embedding model to obtain their embedding vectors respectively; Random downsampling is performed on all relations extracted from the n-step network of relation r. After obtaining the feature vector of each relation through downsampling, the feature vectors are concatenated and compressed through a linear layer to obtain the feature vector of the relation in the n-step network of relation r. The topology feature extractor performs entity anonymization on the received n-step network, removing the semantic information of the entities themselves and replacing all entities with the same anonymous entity; it then downsamples the network structure, starting with the neighbor entity pairs of relation r, and... A random walk is performed on the n-step network. After the random walk, an anonymous subgraph of the n-step network is obtained. The anonymized network topology is then input into a graph neural network to extract structural features, and the output is a feature vector. After obtaining the topological feature vectors of all n-step networks, they are concatenated and compressed through a linear network layer to obtain the final result. The topological feature vector.
12. The domain knowledge graph update system based on power grid equipment as described in claim 8, characterized in that, Using a dynamically updated knowledge graph as the first-level knowledge graph, for each article in the text knowledge base, a knowledge graph analysis is first performed on it to construct a small knowledge graph related to this text as the second-level knowledge graph. The second-level knowledge graph is regarded as a subset of the first-level knowledge graph. After constructing a secondary knowledge graph for each text, it is visualized, allowing users to understand the main content of the current text from the visualized secondary knowledge graph. Based on a two-level knowledge graph, we perform correlation analysis on all texts in the text knowledge base and calculate the text similarity between the two-level knowledge graphs corresponding to each pair of texts.
13. A computer-readable storage medium having a program stored thereon, characterized in that, When executed by a processor, the program implements the steps in the domain knowledge graph update method based on power grid equipment as described in any one of claims 1-6.
14. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the domain knowledge graph update method based on power grid equipment as described in any one of claims 1-6.
Citation Information
Patent Citations
Method and device for updating knowledge graph and related equipment
CN116303516A