Electric power problem reply method, system and equipment based on multi-dimensional data and medium
By using multi-dimensional data processing in the power scheduling system, identifying the problem types and querying the corresponding knowledge base or database, the problems of slow update speed and low extraction efficiency of power knowledge are solved, and the combination with power system data is realized, providing fast, Accurate Q&A service.
Patent Information
- Application Number
- CN202411340064.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-10
AI Technical Summary
The existing intelligent power scheduling question and answer system has problems such as low knowledge update speed and frequency, low knowledge extraction efficiency, and the question answer content cannot be combined with the power system operation data.
Using a multi-dimensional data-based method, the power knowledge problems are divided into text knowledge categories, data knowledge categories or mixed knowledge categories through problem type identification, and the power knowledge vector database is used to query the power knowledge vector database or structured query the power operation database, combining natural language processing and Large language model provides fast and accurate Q&A services.
It realizes rapid acquisition of power knowledge and operating data, provides friendly natural language Q&A interaction methods, and improves the accuracy of question answers and the level of support for power system knowledge.
Smart Images

Figure CN119293167A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology for electric power dispatching, and in particular to a method, system, device and medium for answering electric power questions based on multidimensional data. Background Art
[0002] The power dispatching center is a typical information-intensive and knowledge-intensive complex decision-making and control center. In order to ensure the safe and stable operation of the power system, each department in the power grid dispatching and control center at all levels needs to process a large amount of documents and data, including dispatching regulations, power grid models, and operating data. The data of power dispatching knowledge is huge in scale, from many sources, in a scattered format, and updated frequently, making it difficult for power dispatching operators to fully accumulate, learn, and utilize this data knowledge. As the scale and complexity of the power system continue to expand, the demand for power operators to easily and accurately obtain power knowledge data has increased dramatically.
[0003] In order to help power operators quickly and accurately acquire power knowledge, an intelligent question-and-answer system for power dispatching was built. The intelligent question-and-answer system for power dispatching needs to have the ability to quickly respond to multi-dimensional power data knowledge and adapt to the real-time massive growth of power system data knowledge. At the same time, it is also necessary to provide a convenient and friendly question-and-answer interaction method based on the usage habits of different operators. Finally, it is also necessary to meet the requirements of the power field for the accuracy of knowledge questions and answers and improve the knowledge support level of the power system.
[0004] At present, the common forms and existing problems of intelligent question-answering systems for power grid dispatching are as follows:
[0005] (1) The frequently asked questions (FAQ) system for electric power is to build an intelligent FAQ knowledge base by classifying and organizing commonly used knowledge materials, and then obtain answers to questions through keywords or similar searches. Since the construction of the FAQ knowledge base requires business experts to collect common questions, accurate questions and answers can only be performed after the preset questions are successfully matched. The speed and frequency of question and answer knowledge updates are low, the question and answer interaction is not friendly and convenient, and the accuracy of question answers is low.
[0006] (2) The intelligent question-answering system based on the power knowledge graph uses natural language processing technology to extract power knowledge and build a knowledge base in the power field. It performs automatic knowledge path reasoning through question approximation queries to achieve knowledge question answering. Since extracting domain knowledge and maintaining knowledge graphs require a lot of manpower, the maintenance cost of traditional intelligent question-answering systems based on knowledge graphs is high, and the extraction and updating of knowledge is time-consuming and laborious. In addition, most power questions are related to the operating data of the power system itself. Traditional intelligent question-answering systems can only give knowledge-based answers and cannot be combined with the operating data of the power system itself. Summary of the invention
[0007] Purpose of the invention: The present invention provides a method, system, device and medium for answering electricity questions based on multidimensional data, aiming to solve the technical problems existing in the prior art, namely, low speed and frequency of electricity knowledge update, low efficiency of electricity knowledge extraction, and the inability to combine the answer content with the operating data of the power system itself.
[0008] Technical solution: The present invention provides a method for answering power questions based on multidimensional data, including: identifying the type of the received power knowledge questions, and dividing the power knowledge questions into text knowledge questions, data knowledge questions or mixed knowledge questions; if the power knowledge questions are text knowledge questions or mixed knowledge questions, obtaining the semantic vector of the power knowledge questions, querying the power knowledge text in the power knowledge vector library according to the similarity of the semantic vectors, and using the power knowledge text obtained by the query as the retrieval result; the method for constructing the power knowledge vector library includes: obtaining multiple types of power files including power knowledge, extracting the power knowledge therein, and storing the power knowledge in the power knowledge vector library; if the power knowledge questions are data knowledge questions or mixed knowledge questions, obtaining the corresponding structured query statement according to the power knowledge questions, querying the power data information in the power operation database through the structured query statement, and using the power data information obtained by the query as the retrieval result; the method for constructing the power operation database includes: obtaining the operation data of the power system, and storing the operation data in the power operation database; the operation data is structured data; according to the retrieval result obtained by the query, determining the answer to the power knowledge question and outputting it.
[0009] Specifically, if the storage format of the power file is a directly parsable format, the text or table information in the power file is obtained, wherein the title and body in the text are identified and segmented, and the table information is identified and segmented after being merged, and both are stored in the markup language format; if the storage format of the power file is a picture format, the pixel information of the power file is obtained, the layout recognition and character recognition are performed on the content of the power file, the text or table information of the power file is obtained, the title and body in the text are identified and segmented, the table information is identified and segmented, and both are stored in the markup language format.
[0010] Specifically, for text, the title and body are roughly divided, and the end punctuation marks in the body are used as separators to divide the body into multiple text blocks. Adjacent text blocks are merged one by one until the number of characters in the merged text block is closest to the maximum recognition character limit; for table information, if the number of characters in a single table does not exceed the maximum recognition character limit, the content in the table is stored as a text block. If the number of characters in a single table exceeds the maximum recognition character limit, the content in each cell in the table is used as a text block, and adjacent text blocks are merged one by one in row order until the number of characters in the merged text block is closest to the maximum recognition character limit.
[0011] Specifically, the text block is converted into a semantic vector through a natural language vector conversion model, and the semantic vector and the corresponding text block are stored in the power knowledge vector library.
[0012] Specifically, the power knowledge questions are input into the trained NL2SQL model, and the corresponding structured query statements are output; the training process of the NL2SQL model includes: using a pre-trained text generation model, combining training data including power system operation data and corresponding structured query statements, and training the NL2SQL model.
[0013] Specifically, an electricity problem intention recognition model is used to identify the problem type of electricity knowledge problems; the training process of the electricity problem intention recognition model includes: using a pre-trained BERT model, combined with training data including electricity knowledge problems and corresponding problem types, to train the electricity problem intention recognition model.
[0014] Specifically, the power question and the search results are concatenated to obtain a prompt text, the prompt text is input into the large language model, and the answer of the large language model is obtained and output.
[0015] The present invention also provides a method system for answering electric power questions based on multidimensional data, comprising: an electric power question intention recognition unit, an electric power knowledge retrieval unit and an electric power knowledge answer output unit, wherein: the electric power question intention recognition unit is used to identify the type of question received for the electric power knowledge question, and classify the electric power knowledge question into a text knowledge question, a data knowledge question or a mixed knowledge question; the electric power knowledge retrieval unit is used to obtain a semantic vector of the electric power knowledge question if the electric power knowledge question is a text knowledge question or a mixed knowledge question, query the electric power knowledge text in the electric power knowledge vector library according to the similarity of the semantic vector, and use the queried electric power knowledge text as the retrieval result; the electric power knowledge vector library The construction method includes: obtaining multiple types of power files including power knowledge, extracting the power knowledge therein, and storing the power knowledge in a power knowledge vector library; if the power knowledge question is a data knowledge question or a mixed knowledge question, obtaining a corresponding structured query statement according to the power knowledge question, querying power data information in a power operation database through the structured query statement, and using the queried power data information as a retrieval result; the construction method of the power operation database includes: obtaining the operation data of the power system, and storing the operation data in the power operation database; the operation data is structured data; the power knowledge answer output unit is used to determine and output the answer to the power knowledge question based on the retrieval result obtained by the query.
[0016] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the computer program is executed by the processor, any one of the methods for answering power problems based on multidimensional data provided by the present invention is executed.
[0017] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods for answering electric power problems based on multidimensional data provided by the present invention are implemented.
[0018] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: it can quickly acquire power knowledge and power operation data, provide a friendly natural language question-and-answer interaction method, and the answers to the questions given can be combined with the power operation data. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram of the steps of the method for answering electric power questions based on multi-dimensional data provided by the present invention;
[0020] Figure 2 A schematic diagram of the process of identifying the content of image documents provided by the present invention. DETAILED DESCRIPTION
[0021] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0022] See also Figure 1 , which is a schematic diagram of the steps of the power problem answering method based on multi-dimensional data provided by the present invention.
[0023] In the embodiment of the present invention, the type of the received electric power knowledge question is identified, and the electric power knowledge question is divided into a text knowledge question, a data knowledge question or a mixed knowledge question.
[0024] In specific implementation, text knowledge questions refer to questions whose answers are completely derived from power knowledge documents; data knowledge questions refer to questions whose answers are completely derived from the operating data of the power grid system; and mixed knowledge questions refer to questions whose answers are derived from both power knowledge documents and operating data.
[0025] In the specific implementation, based on the different sources of the answers, electricity knowledge questions are divided into three categories to facilitate the subsequent retrieval of knowledge from the corresponding database, which can improve the retrieval efficiency and accuracy at the same time.
[0026] In an embodiment of the present invention, an electricity problem intention recognition model is used to identify the problem type of electricity knowledge problems; the training process of the electricity problem intention recognition model includes: using a pre-trained BERT model, combined with training data including electricity knowledge problems and corresponding problem types (labels), to train the electricity problem intention recognition model.
[0027] In specific implementation, the BERT (Bidirectional Encoder Representations from Transformers) model is a natural language processing model that introduces a bidirectional training mechanism, which enables the model to understand the meaning of words in context and has a faster training speed than RNN (recurrent neural network) and LSTM (long short-term memory network) models. Through the application of the BERT model, it is possible to better identify from power knowledge questions whether the source of the answer is the power knowledge document or the operation data of the power grid system, or both.
[0028] In an embodiment of the present invention, if the electricity knowledge question is a text knowledge question or a mixed knowledge question, the semantic vector of the electricity knowledge question is obtained, and the electricity knowledge text is queried in the electricity knowledge vector library according to the similarity of the semantic vector, and the electricity knowledge text obtained by the query is used as the retrieval result.
[0029] In an embodiment of the present invention, if the electricity knowledge question is a data knowledge question or a mixed knowledge question, a corresponding structured query statement is obtained according to the electricity knowledge question, and electricity data information is queried in the power operation database through the structured query statement, and the electricity data information obtained by the query is used as the retrieval result.
[0030] In an embodiment of the present invention, the method for constructing the power knowledge vector library includes: acquiring multiple types of power files including power knowledge, extracting the power knowledge therein, and storing the power knowledge in the power knowledge vector library.
[0031] In an embodiment of the present invention, the method for constructing the power operation database includes: acquiring operation data of the power system, and storing the operation data in the power operation database; the operation data is structured data.
[0032] In the specific implementation, if the power knowledge question is a text knowledge question, query and search are only performed in the power knowledge vector library. If the power knowledge question is a data knowledge question, query and search are only performed in the power operation database. If the power knowledge question is a mixed knowledge question, it is necessary to search in both the power knowledge vector library and the power operation database at the same time. The search results obtained from the two databases can be processed and output later.
[0033] In an embodiment of the present invention, during the construction of the power knowledge vector library, if the storage format of the power file is a directly parsable format, the text or table information in the power file is obtained, wherein the title and body in the text are identified and segmented, and the table information is identified and segmented after being merged, and both are stored in a markup language format; if the storage format of the power file is a picture format, the pixel information of the power file is obtained, the layout recognition and character recognition are performed on the content of the power file, the text or table information of the power file is obtained, the title and body in the text are identified and segmented, the table information is identified and segmented, and both are stored in a markup language format.
[0034] In a specific implementation, a directly parseable format refers to a document file represented by formats such as doc, docx, xlsx, and pptx, in which the characters can be directly parsed and stored in a parseable format such as xml. For the text and table information in this type of file document, as long as the document content is parsed through its document encoding format, the text and table information in the original document can be obtained. In order to facilitate the storage and use of text and table information, it can be marked and saved in markdown format. For text, its title and body information can be automatically identified based on its outline level and title keywords. For complex tables, the cell contents can be merged and then copied and split, and then saved in a standard table format.
[0035] In the specific implementation, the image format refers to a file that stores text information in the form of an image, represented by formats such as pdf, ofd and png, and the characters therein cannot be directly recognized. For the text, table and graphic information in this type of text document, the commonly used format documents in the power field such as ceb and ofd can be converted to pdf format first, and then the page pixel information of each page of the document can be obtained. With titles, paragraphs, tables, and table cells as labels, the image content layout recognition model is constructed by using the Yolo model, and the model is used to perform content recognition on the original page pixel information. The pixel coordinate information of the title, paragraph, table and table cell contained in the page is output through the model. Then, the text information inside the pixels of different layout areas is identified by the optical character recognition (OCR) model, so that the text and table information in the image format document can be obtained, and formatted and converted into markdown format for storage.
[0036] In specific implementation, Markdown is a lightweight markup language that can write documents in an easy-to-read and easy-to-write plain text format, and then convert it into structured HTML (Hypertext Markup Language). It also supports other output formats such as PDF and EPUB.
[0037] In an embodiment of the present invention, for text, the title and the main text are roughly divided, the end punctuation marks in the main text are used as separators, the main text is finely divided into multiple text blocks, and adjacent text blocks are merged one by one until the number of characters in the merged text block is closest to the maximum recognition character limit; for table information, if the number of characters in a single table does not exceed the maximum recognition character limit, the content in the table is stored as a text block, if the number of characters in a single table exceeds the maximum recognition character limit, the content in each cell in the table is used as a text block, and adjacent text blocks are merged one by one in row order until the number of characters in the merged text block is closest to the maximum recognition character limit.
[0038] In the specific implementation, since the Embedding model is usually used as a natural language vector conversion model to convert natural language into vectors, and the commonly used Embedding model generally limits the input text length to 512 words (maximum recognition character limit), the text and table information stored in the power knowledge vector library needs to be divided into content blocks.
[0039] See also Figure 2 , which is a flow chart of the picture document content recognition provided by the present invention.
[0040] In the specific implementation, for the content segmentation of the text, the markdown file converted from the original document is identified, and the file content is roughly segmented according to the different forms of text such as title, paragraph and body. Then, the sentence-ending punctuation marks such as period, semicolon, ellipsis, exclamation mark, etc. in the body content are used as separators to further segment the body text into multiple minimum text blocks. According to the maximum vectorized text block character limit, adjacent titles and minimum text blocks are merged (merged in accordance with the reading order, that is, merged from left to right and from top to bottom in sequence) until they are closest to the maximum recognition character limit (if another adjacent text block is merged, the number of characters will exceed the maximum recognition character limit), forming the final segmented text block.
[0041] In a specific implementation, for the content segmentation of the table, if the number of characters in a single table meets the maximum recognition character limit, the entire table is used as a text block; if not, it is split according to table rows, and adjacent table rows are merged (merged in accordance with the reading order, that is, from left to right and from top to bottom in sequence) until it is closest to the maximum recognition character limit (if one more adjacent cell is merged, the number of characters will exceed the maximum recognition character limit) to form the final segmented text block.
[0042] In the embodiment of the present invention, during the process of storing power knowledge in the power knowledge vector library, the text block is converted into a semantic vector through a natural language vector conversion model, and the semantic vector and the corresponding text block are stored in the power knowledge vector library.
[0043] In the specific implementation, the Embedding model is used as a natural language vector conversion model. This is a type of model pre-trained in massive texts. The model can convert the input text into a high-dimensional vector form. The texts with similar semantics are closer in the vector space, and vice versa. The semantic vector of the text block is obtained by inputting the segmented text block content into the Embedding model, and then the original file information and text block location information (text block information) are supplemented for the text block. The semantic vector is combined with the text block information and stored in the power knowledge vector library. The semantic vector is used as an index to achieve approximate retrieval of related text knowledge information through the semantic vector.
[0044] In the specific implementation, the retrieval process in the power knowledge vector library is to use the Embedding model to obtain the semantic vector of the problem, and obtain the similarity between different text blocks and power problems by calculating the Euclidean distance between different vectors in the vector library, so as to retrieve one or more most relevant power knowledge text blocks as the retrieval results.
[0045] In the specific implementation, when constructing the power operation database, the structured power system operation data is stored in the power operation database. Structured data refers to data with a clear and predefined organizational form. These data usually follow a fixed table form or framework, the data has corresponding labels, and the data is associated with each other. Structured data is easy to query through SQL statements.
[0046] In the embodiment of the present invention, the corresponding structured query statement is obtained according to the electricity knowledge question, which can be input into the trained NL2SQL model to output the corresponding structured query statement (SQL statement).
[0047] In the embodiment of the present invention, the training process of the NL2SQL model includes: using a pre-trained text generation model, combining training data including power system operation data and corresponding structured query statements, to train the NL2SQL model.
[0048] In practice, a pre-trained text generation model refers to a type of machine learning model that is first pre-trained on a large amount of unlabeled text data and then fine-tuned for a specific task. This type of model captures the statistical laws and semantic information of language from a large corpus through unsupervised learning, thereby obtaining a general language representation capability. Pre-trained models can significantly improve the performance of downstream tasks, especially when data is limited.
[0049] In the specific implementation, the training data (power operation data query data set) used as the NL2SQL model is mainly divided into two parts. One part is to annotate the table of power operation data. The information annotation needs to explain the main purpose of the table, the Chinese explanation of each field in the table, and the common data query problems related to the table. By vectorizing and storing this information, the table structure related to the problem can be similarly queried for different power operation data query problems. On the other hand, business experts are required to collect common questions about power operation data and write corresponding SQL statements according to the problem situation. By combining the problem with the description information of the table structure related to the problem as the model input and SQL as the model output, a power operation data query data set is constructed.
[0050] In a specific implementation, during the retrieval process in the power operation database, natural language can be directly output to the NL2SQL model. The NL2SQL model outputs SQL query statements corresponding to power problems. Since the data in the power operation database is stored in a structured manner, the corresponding data can be directly obtained through SQL query statements and used as retrieval results.
[0051] In the implementation of the present invention, the answer to the electricity knowledge question is determined and outputted based on the search results obtained by the query.
[0052] In a specific implementation, the power question and the search results are concatenated to obtain a prompt text, which is input into a large language model to obtain and output a reply from the large language model.
[0053] In the specific implementation, based on the knowledge text blocks retrieved from the power knowledge vector library and the relevant data retrieved from the power operation data, the text block content and the search results are merged in markdown format, combined with actual power problems and the knowledge question and answer prompt template to generate prompt text information. Based on the large language model, the prompt text information is input to obtain the answer to the power knowledge question.
[0054] In specific implementation, since the search results have not been sorted and summarized, the answers to the questions will be cumbersome and non-intuitive, and it will still take some time for operators to read and understand. Therefore, with the help of a large language model (such as AI), the content of the prompt text information can be refined and summarized based on the prompt text information, and the refined and summarized content can be used as the answer to the power question, further improving the accuracy of the answer result.
[0055] The present invention also provides a method system for answering electric power questions based on multidimensional data, comprising: an electric power question intention recognition unit, an electric power knowledge retrieval unit and an electric power knowledge answer output unit, wherein: the electric power question intention recognition unit is used to identify the type of question received for the electric power knowledge question, and classify the electric power knowledge question into a text knowledge question, a data knowledge question or a mixed knowledge question; the electric power knowledge retrieval unit is used to obtain a semantic vector of the electric power knowledge question if the electric power knowledge question is a text knowledge question or a mixed knowledge question, query the electric power knowledge text in the electric power knowledge vector library according to the similarity of the semantic vector, and use the queried electric power knowledge text as the retrieval result; the electric power knowledge vector library The construction method includes: obtaining multiple types of power files including power knowledge, extracting the power knowledge therein, and storing the power knowledge in a power knowledge vector library; if the power knowledge question is a data knowledge question or a mixed knowledge question, obtaining a corresponding structured query statement according to the power knowledge question, querying power data information in a power operation database through the structured query statement, and using the queried power data information as a retrieval result; the construction method of the power operation database includes: obtaining the operation data of the power system, and storing the operation data in the power operation database; the operation data is structured data; the power knowledge answer output unit is used to determine and output the answer to the power knowledge question based on the retrieval result obtained by the query.
[0056] In an embodiment of the present invention, the power knowledge retrieval unit is used to obtain text or table information in the power file if the storage format of the power file is a directly parsable format, wherein the title and body in the text are identified and segmented, the table information is identified and segmented after being merged, and both are stored in a markup language format; if the storage format of the power file is a picture format, the pixel information of the power file is obtained, the layout recognition and character recognition are performed on the content of the power file, the text or table information of the power file is obtained, the title and body in the text are identified and segmented, the table information is identified and segmented, and both are stored in a markup language format.
[0057] In an embodiment of the present invention, the power knowledge retrieval unit is used to roughly divide the title and the text into multiple text blocks with the end punctuation marks in the text as separators, and merge adjacent text blocks one by one until the number of characters in the merged text block is closest to the maximum recognition character limit; for table information, if the number of characters in a single table does not exceed the maximum recognition character limit, the content in the table is stored as a text block, and if the number of characters in a single table exceeds the maximum recognition character limit, the content in each cell in the table is used as a text block, and the adjacent text blocks are merged one by one in row order until the number of characters in the merged text block is closest to the maximum recognition character limit.
[0058] In the embodiment of the present invention, the power knowledge retrieval unit is used to convert the text block into a semantic vector through the Embedding model, and store the semantic vector and the corresponding text block in the power knowledge vector library.
[0059] In an embodiment of the present invention, the power knowledge retrieval unit is used to input power knowledge questions into a trained NL2SQL model and output corresponding structured query statements; the training process of the NL2SQL model includes: using a pre-trained text generation model, combined with training data including power system operation data and corresponding structured query statements, to train the NL2SQL model.
[0060] In an embodiment of the present invention, the power problem intention identification unit is used to identify the problem type of power knowledge problems using a power problem intention identification model; the training process of the power problem intention identification model includes: using a pre-trained BERT model, combined with training data including power knowledge problems and corresponding problem types, to train the power problem intention identification model.
[0061] In an embodiment of the present invention, the power knowledge answer output unit is used to splice the power question and the search result to obtain a prompt text, input the prompt text into the large language model, obtain the answer of the large language model and output it.
[0062] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the computer program is executed by the processor, any one of the methods for answering power problems based on multidimensional data provided by the present invention is executed.
[0063] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods for answering electric power problems based on multidimensional data provided by the present invention are implemented.
[0064] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0065] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0066] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0067] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.
Claims
1. A method for answering power questions based on multidimensional data, characterized in that: include: Identify the type of the received power knowledge questions and classify the power knowledge questions into text knowledge questions, data knowledge questions or mixed knowledge questions; If the power knowledge question is a text knowledge question or a mixed knowledge question, a semantic vector of the power knowledge question is obtained, and the power knowledge text is searched in the power knowledge vector library according to the similarity of the semantic vector, and the power knowledge text obtained by the search is used as the search result; The method for constructing the electric power knowledge vector library comprises: obtaining multiple types of electric power files including electric power knowledge, extracting the electric power knowledge therein, and storing the electric power knowledge in the electric power knowledge vector library; If the power knowledge question is a data knowledge question or a mixed knowledge question, a corresponding structured query statement is obtained according to the power knowledge question, power data information is queried in the power operation database through the structured query statement, and the power data information obtained by the query is used as a retrieval result; the method for constructing the power operation database includes: obtaining the operation data of the power system, and storing the operation data in the power operation database; the operation data is structured data; Based on the search results obtained from the query, the answers to the electricity knowledge questions are determined and output.
2. The method for answering electric power questions based on multidimensional data according to claim 1, characterized in that: The acquiring of multiple types of power files including power knowledge and extracting the power knowledge therein includes: If the storage format of the power file is a directly parseable format, obtain text or table information in the power file, wherein the title and body in the text are identified and segmented, and the table information is identified and segmented after being merged, and both are stored in a markup language format; If the storage format of the power file is a picture format, obtain the pixel information of the power file, perform layout recognition and character recognition on the content of the power file, obtain the text or table information of the power file, recognize and segment the title and body of the text, recognize and segment the table information, and store them all in a markup language format.
3. The method for answering electric power questions based on multidimensional data according to claim 2, characterized in that: The identifying and segmenting of the title and the body of the text, and the identifying and segmenting of the table information after merging, include: For text, the title and body are roughly divided, and the body is finely divided into multiple text blocks using the end punctuation marks in the body as separators. Adjacent text blocks are merged one by one until the number of characters in the merged text block is closest to the maximum recognition character limit. For table information, if the number of characters in a single table does not exceed the maximum recognition character limit, the content in the table is stored as a text block. If the number of characters in a single table exceeds the maximum recognition character limit, the content in each cell in the table is used as a text block, and adjacent text blocks are merged one by one in row order until the number of characters in the merged text block is closest to the maximum recognition character limit.
4. The method for answering electric power questions based on multidimensional data according to claim 1, characterized in that: The step of storing the electric power knowledge in the electric power knowledge vector library includes: The text blocks are converted into semantic vectors through the natural language vector conversion model, and the semantic vectors and the corresponding text blocks are stored in the power knowledge vector library.
5. The method for answering electric power questions based on multidimensional data according to claim 4, characterized in that: The method of obtaining a corresponding structured query statement according to the power knowledge question includes: Inputting power knowledge questions into the trained NL2SQL model, and outputting corresponding structured query statements; the training process of the NL2SQL model includes: using a pre-trained text generation model, combining training data including power system operation data and corresponding structured query statements, and training the NL2SQL model.
6. The method for answering electric power questions based on multidimensional data according to claim 1, characterized in that: The step of identifying the type of the received power knowledge questions includes: An electricity problem intention recognition model is used to identify the problem type of electricity knowledge problems; the training process of the electricity problem intention recognition model includes: using a pre-trained BERT model, combined with training data including electricity knowledge problems and corresponding problem types, to train the electricity problem intention recognition model.
7. The method for answering electric power questions based on multidimensional data according to claim 1, characterized in that: The step of determining and outputting answers to the power knowledge questions based on the search results obtained from the query includes: The power question and the search results are concatenated to obtain a prompt text, which is input into the large language model to obtain and output the answer of the large language model.
8. A method system for answering power questions based on multidimensional data, characterized in that: include: Power question intention recognition unit, power knowledge retrieval unit and power knowledge answer output unit, where: The power question intention identification unit is used to identify the type of the received power knowledge question and classify the power knowledge question into a text knowledge question, a data knowledge question or a mixed knowledge question; The electric power knowledge retrieval unit is used to obtain the semantic vector of the electric power knowledge problem if the electric power knowledge problem is a text knowledge problem or a mixed knowledge problem, query the electric power knowledge text in the electric power knowledge vector library according to the similarity of the semantic vector, and use the electric power knowledge text obtained by the query as the retrieval result; the method for constructing the electric power knowledge vector library includes: obtaining multiple types of electric power files including electric power knowledge, extracting the electric power knowledge therein, and storing the electric power knowledge in the electric power knowledge vector library; if the electric power knowledge problem is a data knowledge problem or a mixed knowledge problem, obtaining the corresponding structured query statement according to the electric power knowledge problem, querying the electric power data information in the electric power operation database through the structured query statement, and using the electric power data information obtained by the query as the retrieval result; the method for constructing the electric power operation database includes: obtaining the operation data of the electric power system, and storing the operation data in the electric power operation database; the operation data is structured data; The power knowledge answer output unit is used to determine and output the answer to the power knowledge question based on the search results obtained by the query.
9. An electronic device, characterized in that: It comprises a memory and a processor, wherein a computer program executable by the processor is stored in the memory, and when the computer program is executed by the processor, the method for answering electric power problems based on multidimensional data as described in any one of claims 1 to 7 is executed.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for answering electric power problems based on multi-dimensional data are implemented as claimed in any one of claims 1 to 7.