Power inspection robot question and answer method based on implicit time perception

By adopting the knowledge graph question-and-answer method based on implicit time perception in the field of power inspection, using graph convolution networks and timing knowledge graphs, the problem that traditional question-and-answer systems cannot handle dynamic time information is solved, and a more efficient and accurate question-and-answer effect is achieved.

CN119721247AInactive Publication Date: 2025-03-28ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411800045.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional knowledge graph Q&A cannot effectively process dynamic time information and timing knowledge in the field of power inspection, resulting in low answer accuracy and low response efficiency.

Method used

Using an implicit time perception method, the implicit time information in the natural language problem of power patrol is mined through graph convolution networks, and the semantics of the problem are enriched by the power system timing knowledge graph, and semantic matching and reasoning are performed to obtain answers.

Benefits of technology

It improves the accuracy and efficiency of power inspection questions and answers, and can effectively process multi-grained time information and comprehensively consider implicit time information and semantic information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721247A_ABST
    Figure CN119721247A_ABST
Patent Text Reader

Abstract

An implicit time perception-based power inspection robot question and answer method comprises the following steps of: firstly, fully mining implicit time information contained in a time constraint condition in a power inspection natural language question; secondly, embedding semantics enriching power inspection natural language problems by using a power system time sequence knowledge graph; and finally, fusing the entity and the timestamp to obtain comprehensive embedding of the power inspection natural language question, and reasoning an answer to the power inspection natural language question by calculating scores of the entity and the timestamp. According to the method, the implicit time information of the power inspection natural language problem is considered, the semantics of the natural language problem is enriched by using the power system knowledge graph, the problem answering accuracy is high, and the effect is good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of knowledge graph question answering, and in particular to a question answering method for an electric power inspection robot based on implicit time perception. Background Art

[0002] The traditional manual inspection method has high labor intensity, low efficiency and limited coverage, and can no longer meet the needs of efficient and safe operation of modern power systems. To solve this problem, power inspection robots have gradually become an important part of power system operation and maintenance. However, with the increasing complexity of inspection tasks, how to efficiently process power system inspection data and answer complex questions raised by inspectors has become a key issue that intelligent inspection robots need to solve. Knowledge graph question-answering technology can provide inspectors with accurate and efficient analysis capabilities, helping them to quickly complete the inspection of power equipment.

[0003] Traditional knowledge graph question answering uses static knowledge graphs as knowledge bases to answer natural language questions, ignoring the dynamic relationship between entities. In the actual power system inspection process, there are high requirements for timeliness, and the power system information is often constantly changing, which involves reasoning about time series knowledge. Traditional knowledge graph question answering cannot perform effective reasoning due to the lack of a processing mechanism for dynamic knowledge. These problems greatly limit the application of knowledge graph question answering in the field of power inspection, and cannot effectively assist inspectors in performing functions such as power system information analysis and decision-making.

[0004] Therefore, temporal knowledge graphs have become a powerful tool for knowledge question answering by adding a time dimension to traditional knowledge graphs. There are already methods for temporal knowledge graph question answering, such as methods based on time constraint decomposition and methods based on temporal knowledge graph representation. The method based on time constraint decomposition is less efficient when processing temporal knowledge graphs with time ranges. The method based on temporal knowledge graph representation has limitations in the perception of implicit time information and the reasoning ability of time constraints. Summary of the invention

[0005] In order to overcome the shortcomings of current power inspection robots such as low accuracy in answering questions and low response efficiency, this paper proposes an accurate and efficient power inspection robot question-answering method based on implicit time perception, which uses a graph convolutional network to mine the implicit time information in inspection questions and infers the relevant information in the inspection questions through semantic matching.

[0006] The technical solution adopted by the present invention to solve the technical problem is:

[0007] A power inspection robot question-answering method based on implicit time perception first fully mines the implicit time information contained in the time constraints in the natural language questions of power inspection. Then, the semantics of the natural language questions of power inspection are enriched by embedding the power system time series knowledge graph. Finally, the two are fused to obtain the comprehensive embedding of the natural language questions of power inspection. The answers to the natural language questions of power inspection are inferred by calculating the scores of entities and timestamps.

[0008] Further, the method comprises the following steps:

[0009] Step 1: A power system time series knowledge graph is represented as TKG(E,R,T,F), where E = {e1,…e i ,…,e N} represents the entity set of generators, transformers, transmission lines and inspection personnel in the power system, R = {r1,…r i ,,r M} represents the set of relationships between entities, T = {t1,…t i ,…,t M} represents a timestamp set, F represents a fact set; the four-tuple (h, r, b, t) ∈ F represents a fact, h, b ∈ E represent the head entity and the tail entity respectively, r ∈ R represents the relationship between them, and t ∈ T is the timestamp associated with the relationship;

[0010] Step 2: Use the TComplEx algorithm to obtain the embedding of the power system time series knowledge graph TKG, where the D-dimensional head entity embedding, relationship embedding, tail entity embedding and timestamp embedding corresponding to any quadruple (h, r, b, t) are respectively

[0011] Step 3: A natural language question about power inspection is expressed as q text , use regular expressions to obtain multi-granularity time information in the problem,

[0012]

[0013] The pre-trained named entity recognition model is used to extract the power inspection problem entity set Δ={ε1,…ε j ,…,ε U};

[0014] Step 4: Select any problem entity ε from the power inspection problem entity set Δ j , calculate its relationship with any entity e in the entity set E i The similarity score of

[0015]

[0016] in and Entity e i and ε j The length of the text, For entity e i and entity ε j The maximum matching length of ; traverse the problem entity set Δ and the entity set E, calculate the similarity scores of all entities between the two sets, and select the entity e with the highest similarity score i As a subject entity;

[0017] Step 5: For the natural language question q text Extract the monthly granularity time information m from the multi-granularity time information τ and extract all the daily granularity timestamps d1, d2, ..., d P and the corresponding TKG embedding Where P is the corresponding number of days of the monthly granularity time, and the corresponding daily granularity time information matrix is ​​constructed

[0018] Step 6: Select T at random d The gth vector in Calculate the position information of its j-th dimension,

[0019]

[0020] exist Add the corresponding position embedding to get Traverse T d All vectors in T are embedded by adding the corresponding positions. d '; Calculate the corresponding monthly granularity time embedding,

[0021]

[0022] Among them, Trasnfomer is the information fusion layer, and the final monthly granularity time embedding

[0023] Step 7: For the natural language question of power inspection q text Extract the annual granularity time information y from the multi-granularity time information τ and extract all the monthly granularity timestamps m1, m2, ..., m Q and the corresponding embedding Where Q is the number of months corresponding to the annual granularity time, and the corresponding monthly granularity time matrix is ​​constructed

[0024] Step 8. Select T arbitrarily m The gth vector in Calculate the position information of its j-th dimension,

[0025]

[0026] exist Add the corresponding position embedding to get Traverse T m All vectors in T are embedded by adding the corresponding positions. m '; Calculate the corresponding annual granularity time embedding,

[0027]

[0028] Final year granularity time embedding Then the multi-granularity time embedding in the natural language problem of power inspection is expressed as:

[0029]

[0030] Step 9: Use the pre-trained language model RoBERTa to convert the power inspection natural language question into text Convert to semantic matrix Q R =[q RCLS ,q R1 ,q R2 ,...,q RH ], where Q R is a D×H dimensional embedding matrix, q RCLS is the global semantic representation of the natural language question of power inspection, H is the number of tokens in the question, and token is the basic unit of text segmentation;

[0031] Step 10: Use TKG embedding to replace the semantic matrix Q R The natural language problem entity embedding of power inspection is obtained E =[q ECLS ,q E1 ,q E2 ,...,q EH ],in,

[0032]

[0033] W E is a D×D dimensional learnable matrix;

[0034] Step 11: Representing Time Fusion into matrix Q E Get Q T =[q TCLS ,q T1 ,q T2 ,...,q TH ],in,

[0035]

[0036] Q T Fusion

[0037]

[0038] Then the semantic representation of the natural language question of power inspection is q s =q CLS ;

[0039] Step 12: Calculate the natural language problem representation q of power inspection RCLS k attention score matrices,

[0040]

[0041] Among them, D head =D robert / K is the dimension of single-head self-attention, D robert is the dimension of RoBERTa, K is the number of multi-head self-attention heads, and W qe,k and W qe,q D roberta ×D head dimensional learnable matrix;

[0042] Step 13: Calculate the implicit time embedding of the natural language question of power inspection.

[0043]

[0044] Among them, LightGCN is a lightweight graph convolutional network.

[0045]

[0046] Step 14: Calculate the comprehensive embedding of the natural language questions of power inspection.

[0047] q=x×q t +(1-x)×q s ;

[0048] Among them, x is a trainable matrix;

[0049] x=sigmoid(W e [q s ;q t ]);

[0050] Step 15: Arbitrarily select entity e from entity set E i , calculate the score of this entity,

[0051]

[0052] Where s and o are the subject entity and object entity of the natural language problem of power inspection, respectively.e is a D×D dimensional learnable matrix,

[0053]

[0054] Traverse the entire entity set and calculate the scores of all entities;

[0055] Step 16: Randomly select a timestamp t from the timestamp set T i , calculate the score of this timestamp,

[0056]

[0057] W t is a D×D dimensional learnable matrix; traverse the entire timestamp set and calculate the scores of all timestamps;

[0058] Step 17: Calculate the cross entropy loss function.

[0059] L predict =-∑ i y i log(y i ');

[0060] in,

[0061] y i '=softmax(φ ent (·)||φ time (·));

[0062] Among them, y i Represents the question label, which is a One-Hot vector, and || is a concatenation operation;

[0063] Step 18: Repeat steps 3 to 17. predict When the loss is less than the specified minimum value, the calculation ends;

[0064] Step 19: For natural language questions about power inspection, select the entity or timestamp with the highest score in the power system time series knowledge graph as the answer.

[0065] The technical concept of the present invention is as follows: In the knowledge question and answer of power inspection, the implicit time information contained in the time constraints in the natural language questions of power inspection is fully explored, and the semantics of the natural language questions of power inspection are enriched by using the information in the power system time series knowledge graph, so as to improve the accuracy of the question and answer of power inspection.

[0066] The beneficial effects of the present invention are: being able to process multi-granularity time information in natural language questions of power inspection, comprehensively considering implicit time information and semantic information of natural language questions of power inspection, and improving the applicability and accuracy of question answering. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 It is a flowchart of the question-answering method of the power inspection robot based on implicit time perception; DETAILED DESCRIPTION

[0068] The present invention is further described below in conjunction with the accompanying drawings.

[0069] Reference Figure 1 , a question-answering method for a power inspection robot based on implicit time perception, comprising the following steps:

[0070] Step 1: A power system time series knowledge graph is represented as TKG(E,R,T,F), where E = {e1,…e i ,…,e N} represents the entity set of generators, transformers, transmission lines and inspection personnel in the power system, R = {r1,…r i ,…,r M} represents the set of relationships between entities, T = {t1,…t i ,…,t M} represents a timestamp set, F represents a fact set; the four-tuple (h, r, b, t) ∈ F represents a fact, h, b ∈ E represent the head entity and the tail entity respectively, r ∈ R represents the relationship between them, and t ∈ T is the timestamp associated with the relationship;

[0071] Step 2: Use the TComplEx algorithm to obtain the embedding of the power system time series knowledge graph TKG, where the D-dimensional head entity embedding, relationship embedding, tail entity embedding and timestamp embedding corresponding to any quadruple (h, r, b, t) are respectively

[0072] Step 3: A natural language question about power inspection is expressed as q text , use regular expressions to obtain multi-granularity time information in the problem,

[0073]

[0074] The pre-trained named entity recognition model is used to extract the power inspection problem entity set Δ={ε1,…ε j ,…,ε U};

[0075] Step 4: Select any problem entity ε from the power inspection problem entity set Δ j , calculate its relationship with any entity e in the entity set E i The similarity score of

[0076]

[0077] in and Entity e i and ε j The length of the text, For entity e i and entity ε j The maximum matching length of ; traverse the problem entity set Δ and the entity set E, calculate the similarity scores of all entities between the two sets, and select the entity e with the highest similarity score i As a subject entity;

[0078] Step 5: For the natural language question q text Extract the monthly granularity time information m from the multi-granularity time information τ and extract all the daily granularity timestamps d1, d2, …, d P and the corresponding TKG embedding Where P is the corresponding number of days of the monthly granularity time, and the corresponding daily granularity time information matrix is ​​constructed

[0079] Step 6: Select T at random d The gth vector in Calculate the position information of its j-th dimension,

[0080]

[0081] exist Add the corresponding position embedding to get Traverse T d All vectors in T are embedded by adding the corresponding positions. d '; Calculate the corresponding monthly granularity time embedding,

[0082]

[0083] Among them, Trasnfomer is the information fusion layer, and the final monthly granularity time embedding

[0084] Step 7: For the natural language question of power inspection q text Extract the annual granularity time information y from the multi-granularity time information τ and extract all the monthly granularity timestamps m1, m2, ..., m Q and the corresponding embedding Where Q is the number of months corresponding to the annual granularity time, and the corresponding monthly granularity time matrix is ​​constructed

[0085] Step 8. Select T arbitrarily m The gth vector in Calculate the position information of its j-th dimension,

[0086]

[0087] exist Add the corresponding position embedding to get Traverse T m All vectors in T are embedded by adding the corresponding positions. m '; Calculate the corresponding annual granularity time embedding,

[0088]

[0089] Final year granularity time embedding Then the multi-granularity time embedding in the natural language problem of power inspection is expressed as:

[0090]

[0091] Step 9: Use the pre-trained language model RoBERTa to convert the power inspection natural language question into text Convert to semantic matrix Q R =[q RCLS ,q R1 ,q R2 ,...,q RH ], where Q R is a D×H dimensional embedding matrix, q RCLS is the global semantic representation of the natural language question of power inspection, H is the number of tokens in the question, and token is the basic unit of text segmentation;

[0092] Step 10: Use TKG embedding to replace the semantic matrix Q R The natural language problem entity embedding of power inspection is obtained E =[q ECLS ,q E1 ,q E2 ,...,q EH ],in,

[0093]

[0094] W E is a D×D dimensional learnable matrix;

[0095] Step 11: Representing Time Fusion into matrix Q E Get Q T =[q TCLS ,q T1 ,q T2 ,...,q TH ],in,

[0096]

[0097] Q T Fusion

[0098]

[0099] Then the semantic representation of the natural language question of power inspection is q s =q CLS ;

[0100] Step 12: Calculate the natural language problem representation q of power inspection RCLS k attention score matrices,

[0101]

[0102] Among them, D head =D robert / K is the dimension of single-head self-attention, D robert is the dimension of RoBERTa, K is the number of multi-head self-attention heads, and W qe,k and W qe,q D roberta ×D head dimensional learnable matrix;

[0103] Step 13: Calculate the implicit time embedding of the natural language question of power inspection.

[0104]

[0105] Among them, LightGCN is a lightweight graph convolutional network.

[0106]

[0107] Step 14: Calculate the comprehensive embedding of the natural language questions of power inspection.

[0108] q=x×q t +(1-x)×q s ;

[0109] Among them, x is a trainable matrix;

[0110] x=sigmoid(W e [q s ;q t ]);

[0111] Step 15: Arbitrarily select entity e from entity set E i , calculate the score of this entity,

[0112]

[0113] Where s and o are the subject entity and object entity of the natural language problem of power inspection, respectively.e is a D×D dimensional learnable matrix,

[0114]

[0115] Traverse the entire entity set and calculate the scores of all entities;

[0116] Step 16: Randomly select a timestamp t from the timestamp set T i , calculate the score of this timestamp,

[0117]

[0118] W t is a D×D dimensional learnable matrix; traverse the entire timestamp set and calculate the scores of all timestamps;

[0119] Step 17: Calculate the cross entropy loss function.

[0120] L predict =-∑ i y i log(y i ');

[0121] in,

[0122] y i '=softmax(φ ent (·)||φ time (·));

[0123] Among them, y i Represents the question label, which is a One-Hot vector, and || is a concatenation operation;

[0124] Step 18: Repeat steps 3 to 17. predict When the loss is less than the specified minimum value, the calculation ends;

[0125] Step 19: For natural language questions about power inspection, select the entity or timestamp with the highest score in the power system time series knowledge graph as the answer.

[0126] In this embodiment, for the natural language question of power inspection "On November 1, 2024, a fault was found in the high-voltage transmission line during strong winds. What is the most likely cause?", the time information November 1, 2024 and the question entity high-voltage transmission line in the question are extracted, the implicit time information in the question is mined and the power system time series knowledge graph information is used to enrich the semantics of the question, and the entity or timestamp with the highest score is selected from the power system time series knowledge graph to infer that the answer to the question is a single-phase grounding fault.

[0127] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept and are for illustrative purposes only. The protection scope of the present invention should not be considered to be limited to the specific forms described in this embodiment, and the protection scope of the present invention also extends to equivalent technical means that can be thought of by ordinary technicians in this field based on the inventive concept.

Claims

1. A question-answering method for a power inspection robot based on implicit time perception, characterized in that: Firstly, the implicit time information contained in the time constraints in the natural language problems of power inspection is fully mined; then, the semantics of the natural language problems of power inspection are enriched by embedding the power system time series knowledge graph; finally, the two are fused to obtain the comprehensive embedding of the natural language problems of power inspection, and the answers to the natural language problems of power inspection are inferred by calculating the scores of entities and timestamps.

2. The power inspection robot question-answering method based on implicit time perception according to claim 1, characterized in that: The method comprises the following steps: Step 1: A power system time series knowledge graph is represented as TKG(E,R,T,F), where E = {e1,…e i ,…,e N } represents the entity set of generators, transformers, transmission lines and inspection personnel in the power system, R = {r1,…r i ,…,r M } represents the set of relationships between entities, T = {t1,…t i ,…,t M } represents a timestamp set, F represents a fact set; the four-tuple (h, r, b, t) ∈ F represents a fact, h, b ∈ E represent the head entity and the tail entity respectively, r ∈ R represents the relationship between them, and t ∈ T is the timestamp associated with the relationship; Step 2: Use the TComplEx algorithm to obtain the embedding of the power system time series knowledge graph TKG, where the D-dimensional head entity embedding, relationship embedding, tail entity embedding and timestamp embedding corresponding to any quadruple (h, r, b, t) are respectively Step 3: A natural language question about power inspection is expressed as q text , use regular expressions to obtain multi-granularity time information in the problem, The pre-trained named entity recognition model is used to extract the power inspection problem entity set Δ={ε1,…ε j ,…,ε U }; Step 4: Select any problem entity ε from the power inspection problem entity set Δ j , calculate its relationship with any entity e in the entity set E i The similarity score of in and Entity e i and ε j The length of the text, For entity e i and entity ε j The maximum matching length of ; traverse the problem entity set Δ and the entity set E, calculate the similarity scores of all entities between the two sets, and select the entity e with the highest similarity score i As a subject entity; Step 5: For the natural language question q text Extract the monthly granularity time information m from the multi-granularity time information τ and extract all the daily granularity timestamps d1, d2, ..., d P and the corresponding TKG embedding Where P is the number of days corresponding to the monthly granularity time, and the corresponding daily granularity time information matrix is ​​constructed Step 6: Select T at random d The gth vector in Calculate the position information of its j-th dimension, exist Add the corresponding position embedding to get Traverse T d All vectors in T are embedded by adding the corresponding positions. d '; Calculate the corresponding monthly granularity time embedding, Among them, Trasnfomer is the information fusion layer, and the final monthly granularity time embedding Step 7: For the natural language question of power inspection q text Extract the annual granularity time information y from the multi-granularity time information τ and extract all the monthly granularity timestamps m1, m2, ..., m Q and the corresponding embedding Where Q is the number of months corresponding to the annual granularity time, and the corresponding monthly granularity time matrix is ​​constructed Step 8. Select T arbitrarily m The gth vector in Calculate the position information of its j-th dimension, exist Add the corresponding position embedding to get Traverse T m All vectors in T are embedded by adding the corresponding positions. m '; Calculate the corresponding annual granularity time embedding, Final year granularity time embedding Then the multi-granularity time embedding in the natural language problem of power inspection is expressed as: Step 9: Use the pre-trained language model RoBERTa to convert the power inspection natural language question into text Convert to semantic matrix Q R =[q RCLS ,q R1 ,q R2 ,...,q RH ], where Q R is a D×H dimensional embedding matrix, q RCLS is the global semantic representation of the natural language question of power inspection, H is the number of tokens in the question, and token is the basic unit of text segmentation; Step 10: Use TKG embedding to replace the semantic matrix Q R The natural language problem entity embedding of power inspection is obtained E =[q ECLS ,q E1 ,q E2 ,...,q EH ],in, W E is a D×D dimensional learnable matrix; Step 11: Representing Time Fusion into matrix Q E Get Q T =[q TCLS ,q T1 ,q T2 ,…,q TH ],in, Q T Fusion Then the semantic representation of the natural language question of power inspection is q s =q CLS ; Step 12: Calculate the natural language problem representation q of power inspection RCLS k attention score matrices, Among them, D head =D robert / K is the dimension of single-head self-attention, D robert is the dimension of RoBERTa, K is the number of multi-head self-attention heads, and W qe,k and W qe,q D roberta ×D head dimensional learnable matrix; Step 13: Calculate the implicit time embedding of the natural language question of power inspection. Among them, LightGCN is a lightweight graph convolutional network. Step 14: Calculate the comprehensive embedding of the natural language questions of power inspection. q=x×q t +(1-x)×q s ; Among them, x is a trainable matrix; x=sigmoid(W e [q s ;q t ]); Step 15: Arbitrarily select entity e from entity set E i , calculate the score of this entity, Where s and o are the subject entity and object entity of the natural language problem of power inspection, respectively. e is a D×D dimensional learnable matrix, Traverse the entire entity set and calculate the scores of all entities; Step 16: Randomly select a timestamp t from the timestamp set T i , calculate the score of this timestamp, W t is a D×D dimensional learnable matrix; traverse the entire timestamp set and calculate the scores of all timestamps; Step 17: Calculate the cross entropy loss function. L predict =-∑ i and i log(y i '); in, y i '=softmax(φ ent (·)||φ time (·)); Among them, y i Represents the question label, which is a One-Hot vector, and || is a concatenation operation; Step 18: Repeat steps 3 to 17. predict When the loss is less than the specified minimum value, the calculation ends; Step 19: For natural language questions about power inspection, select the entity or timestamp with the highest score in the power system time series knowledge graph as the answer.