CN-115905495-B - Attention-based power equipment standard question-answering method, system and storage medium
Abstract
The invention discloses a power equipment standard question-answering method and system based on attention and a storage medium, and belongs to the technical field of power equipment standard question-answering. Because the standard files of the power equipment are large in number and large in version, real-time inquiry is difficult in the production management process, and question and answer efficiency is affected. According to the attention-based power equipment standard question-answering method, the required answer description context is obtained by constructing the retriever model, the reader model and the coarse-fine granularity retrieval graph structure, so that the problems caused by large number and multiple versions of power equipment standard files can be effectively relieved, the question-answering efficiency is improved, and popularization and use are facilitated. Meanwhile, the invention merges the attention mechanism, processes the answer description context and the question description information to obtain the prediction result of the answer span, completes the standard question and answer of the power equipment based on attention, can improve the accuracy of answer extraction, and has scientific, reasonable and practical scheme and good user experience.
Inventors
- LIN JIAJUN
- JIN LINGFENG
- LI FEIRAN
- YU BING
- Lin Jiefan
- LI CHEN
- ZHENG YIMING
- DING HUI
- YANG NING
- LIU HUIZHI
- CHEN MIN
- ZHAN JIANGYANG
- YANG ZHI
Assignees
- 国网浙江省电力有限公司电力科学研究院
- 善智互联(北京)网络科技有限公司
- 国网浙江省电力有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20221223
Claims (8)
- 1. A power equipment standard question-answering method based on attention is characterized in that, Acquiring given problem description information; Processing the question description information through a pre-constructed retriever model to obtain a required answer description context; the method for processing the problem description information by the retriever model is as follows: identifying and retrieving the main body name and judging the problem type according to the problem description information; searching a graph structure through pre-established coarse and fine granularity, positioning to a core standard document according to the name of a searching main body, and taking a plurality of standard documents in the queried fluctuation range as answer supplementary documents; Combining the core standard document and the answer supplement document to obtain a candidate document set; carrying out problem classification and discrimination based on the problem type to obtain the category to which the problem description information belongs; locating to the required answer description context according to the category to which the question description information belongs and the candidate document set; processing the answer description context and the question description information by utilizing a pre-constructed reader model and fusing an attention mechanism to obtain a prediction result of answer span; The reader model processes the answer description context C and the question description information, and the method for obtaining the answer span prediction result is as follows: Encoding the answer description context C and the question description information through a pre-training language model to obtain a context vector representation E C and a question description information vector representation E Q which take Chinese characters as units; fusing the obtained context vector representation E C with the problem description information vector representation E Q to obtain a fused vector representation; Then, the fusion vector is passed through BILSTM layers to obtain hidden layer vector of the context feature and the question description information of the comprehensive answer; Then, the hidden layer vector is input into the Attention layer Attention, so that after the name of the electric power equipment of the main subject of the problem is removed, object content information comprising the problem is obtained, vector representation conforming to the object content in answer context is used, and Attention weight score is calculated; the problem description information is subjected to position masking MASK by using zero vector when passing through the attention layer, so that the answer span can be predicted conveniently; Updating the vector representation in the answer context representation according to the calculated attention weight score to obtain updated vector representation HA, wherein the vector representation HA does not comprise the subject and object contents of the problem; processing the vector representation HA through two independent activating functions Sigmoid, and respectively predicting the starting position and the ending position of the correct answer; and according to the prediction result of the answer span, completing the attention-based power equipment standard question and answer.
- 2. An attention-based power plant standard question-answering method according to claim 1, wherein, The method for identifying the retrieval subject name is as follows: for given problem description information Q, vector space coding is carried out through a pre-training language model to obtain a vectorized representation in units of characters, and the expression is as follows: E Q =Encoder([w 1 ,w 2 ,…,w n ]) Wherein E Q is a vectorized representation, w i is the ith character; And extracting context characteristics from the obtained vectorized representation E Q through a bidirectional long-short-time memory neural network layer to obtain a sequence characteristic representation H Q , wherein the expression is as follows: H Q =BILSTM([e 1 ,e 2 ,…,e n ]) wherein e i is the i-th context feature vectorized representation; then, the feature representation H Q is input to a conditional random field layer for sequence decoding to obtain a complete retrieval device body name N Q included in the problem description information Q, and the expression is as follows: P NQ =CRF(H Q ) and the output of the CRF layer of the conditional random field is marked by using a BIO marking mode to output a sequence, and marking contents are retrieval main body information, wherein B represents a retrieval equipment main body content starting position, I represents a retrieval equipment main body content middle position, and O represents the rest contents in the problem description information Q.
- 3. An attention-based power plant standard question-answering method according to claim 1, wherein, The method for distinguishing the problem type is as follows: The vectorization representation E Q of the problem description information is input into a plurality of independent full connection layers FC for feature extraction and vector space mapping, and then classification and discrimination are carried out through an activation function softMax layer, so that the class T Q of the problem description information is obtained, and the expression is as follows: T Q =SoftMax(FC(E Q )) the manner of calculation of the activation function SoftMax layer is as follows: Wherein i is the output value of the ith node, and K is the number of output nodes, namely the number of classified categories.
- 4. An attention-based power plant standard question-answering method according to claim 1, wherein, The method of obtaining the answer description context C is as follows: In order to process the characteristics of the mutual application of the standard files of the power equipment, a coarse granularity retrieval graph structure is provided with a coarse granularity retrieval graph unit and a fine granularity graph structure; the coarse granularity retrieval graph unit is used for forming a graph structure of the candidate document set according to the reference relation, The expression of the graph structure is as follows: G L ={N;L}; The relation among nodes, which represents the quotation relation among the power equipment standards, and the type is based on the relation; For the graph structure G L = { N; L }, dividing the fine-granularity graph structure into different types of description nodes N 'according to the description content of the fine-granularity graph structure G F ={G L ; N' }; According to the retrieval subject name and in combination with the graph structure G L = { N, L }, rapidly positioning to a core standard document by adopting a maximum matching method, and supplementing the document by taking all the standard documents in the queried one-hop as answers to finally obtain a candidate document set D C ; The candidate document set D C at least comprises a core standard document and a plurality of candidate supplementary documents, and the expression is as follows: according to the question description information type T Q and the candidate document set D C , and the fine granularity graph structure G F ={G L , N' quickly locates to the required answer description context C.
- 5. An attention-based power plant standard question-answering method according to claim 1, wherein, The hidden layer vector is calculated as follows: Wherein E CQ is a fusion vector representation; the calculation formula of the weight score is as follows: wherein A S is a set comprising characters of the object content, A S C is its complement, e i is a vector representation of character units, a ij is a weight score, Is a vector representation multiplied by the weight score.
- 6. An attention-based power plant standard question-answering method as claimed in claim 5, wherein, The calculation formula of the start position is as follows: p 1 =Sigmoid(K 1 H A +b 1 ) the calculation formula of the end position is as follows: p 2 =Sigmoid(K 2 H A +b 2 ); Wherein p 1 ,p 2 is the start and end position, k i and b i are the super parameters, and H A is the input vector updated by weight calculation.
- 7. An attention-based power equipment standard question-answering system is characterized in that, Applying an attention-based power equipment standard question answering method according to any one of claims 1-6, comprising a question acquisition module, a retriever module, and a reader module; the problem acquisition module is used for obtaining given problem description information; the retriever module is used for processing the question description information to obtain a required answer description context C; the reader module is used for fusing an attention mechanism, processing the answer description context C and the problem description information and obtaining a prediction result of answer span; and according to the prediction result of the answer span, completing the attention-based power equipment standard question and answer.
- 8. A computer-readable storage medium comprising, A computer program stored thereon, which when executed by a processor, implements an attention-based power device standard question-answering method according to any one of claims 1 to 6.
Description
Attention-based power equipment standard question-answering method, system and storage medium Technical Field The invention relates to a power equipment standard question-answering method and system based on attention and a storage medium, belonging to the technical field of power equipment standard question-answering. Background Under the background of the national 'double-carbon' target and the enterprise digital transformation, the national grid company aims to promote the advanced fusion of the traditional grid industry and the digital technology, and the 'digital new foundation' is greatly developed to build the modern equipment management system of the national grid company. The standard text of the power equipment is used as an important data resource, and is a key means and an important acceptance condition for ensuring the standard construction of the digital field operation. As the standard file of the power equipment is used as an unstructured question-answering information source, the method has the complexity difficulties of large quantity, multiple versions and cross-reference of contents, so that real-time inquiry is difficult in the production management process, question-answering efficiency is affected, and popularization and use are not facilitated. Further, due to the diversity and complexity of the Chinese expression form, multiple description modes may exist in the same standard question, so that the accuracy of answer extraction is low, and if repeated manual questions and answers are performed, a large amount of manpower and material resources are consumed, and the user experience is poor. Disclosure of Invention Aiming at the defects of the prior art, the invention aims to provide the power equipment standard question-answering method based on attention, which is used for processing the question description information to obtain the required answer description context by constructing a retriever model and a reader model, effectively relieving the questions caused by large number, multiple versions and cross-reference content of the power equipment standard files, improving question-answering efficiency and facilitating popularization and use, and simultaneously integrating an attention mechanism to process the answer description context and the question description information to obtain the prediction result of answer span, so as to complete the power equipment standard question-answering based on attention, improve the accuracy of answer extraction, and has the advantages of scientific, reasonable and feasible scheme and good user experience. Aiming at the defects of the prior art, the second purpose of the invention is to provide the power equipment standard question-answering system based on attention, which is scientific, reasonable, practical and good in user experience, by arranging the question acquisition module, the retriever module and the reader module to process the question description information to obtain the needed answer description context C, can effectively relieve the questions caused by large number of standard files, multiple versions and cross-reference of the content of the power equipment, improves question-answering efficiency, is beneficial to popularization and use, and can improve the accuracy of answer extraction. Aiming at the defects of the prior art, the third purpose of the invention is to provide the power equipment standard question-answering method, system and storage medium based on attention, which can effectively relieve the problems caused by large number, multiple versions and cross-reference of content of the power equipment standard files, improve question-answering efficiency, facilitate popularization and use, improve the accuracy of answer extraction, and have scientific, reasonable and practical scheme and good user experience. In order to achieve one of the above objects, a first technical solution of the present invention is: an attention-based power equipment standard question-answering method, Acquiring given problem description information; Processing the question description information through a pre-constructed retriever model to obtain a required answer description context; processing the answer description context and the question description information by utilizing a pre-constructed reader model and fusing an attention mechanism to obtain a prediction result of answer span; and according to the prediction result of the answer span, completing the attention-based power equipment standard question and answer. Through continuous exploration and experiments, the invention processes the question description information by constructing the retriever model and the reader model to obtain the needed answer description context, can effectively relieve the questions caused by large number, multiple versions and cross-reference of the content of the standard files of the power equipment, improves the question-answering efficiency, and i