CN116739003A - Intelligent question-answering implementation method and device for power grid management, electronic equipment and storage medium - Google Patents

Intelligent question-answering implementation method and device for power grid management, electronic equipment and storage medium Download PDF

Info

Publication number
CN116739003A
CN116739003A CN202310645856.3A CN202310645856A CN116739003A CN 116739003 A CN116739003 A CN 116739003A CN 202310645856 A CN202310645856 A CN 202310645856A CN 116739003 A CN116739003 A CN 116739003A
Authority
CN
China
Prior art keywords
answer
question
power grid
answers
grid management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310645856.3A
Other languages
Chinese (zh)
Inventor
梁寿愚
何宇斌
李映辰
张坤
吴小刚
李文朝
胡荣
周华锋
江伟
顾慧杰
符秋稼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Southern Power Grid Co Ltd
Original Assignee
China Southern Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Southern Power Grid Co Ltd filed Critical China Southern Power Grid Co Ltd
Priority to CN202310645856.3A priority Critical patent/CN116739003A/en
Publication of CN116739003A publication Critical patent/CN116739003A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The application provides a method, a device, electronic equipment and a storage medium for realizing intelligent question and answer of power grid management, which relate to the technical field of natural language processing, and comprise the following steps: obtaining a to-be-answered question, extracting keywords from the to-be-answered question to obtain a first keyword combination, and extracting a semantic vector of the first keyword combination as a question vector based on a trained semantic extraction model; matching at least one candidate answer in an answer library based on the question vector, wherein a plurality of preset answers are stored in the answer library, each preset answer is a second keyword combination comprising a plurality of keywords, each preset answer is predetermined based on a power grid management document, and the power grid management document comprises priori knowledge of power grid management; and expanding the candidate answers based on the candidate answers and the questions to be answered to obtain expanded answers, and outputting the expanded answers. The application can realize automatic and efficient answer of the power grid management questions.

Description

Intelligent question-answering implementation method and device for power grid management, electronic equipment and storage medium
Technical Field
The application relates to the technical field of natural language processing, in particular to a method and a device for realizing intelligent question and answer of power grid management, electronic equipment and a storage medium.
Background
Grid management aims to enable a grid to run safely and stably, and involves a plurality of aspects, such as acquiring grid operation data, determining a maintenance scheme for grid faults, and the like. In the prior art, grid management often determines management measures corresponding to management problems by manually searching related management manuals, for example, when grid operation data needs to be acquired, an operation manual needs to be searched to determine a corresponding data management system and a use instruction of the data management system, and when a maintenance scheme of grid faults needs to be determined, a maintenance manual needs to be searched to determine a corresponding maintenance scheme. This method of finding a manual is inefficient.
Disclosure of Invention
The application provides a method, a device, electronic equipment and a storage medium for realizing intelligent question answering of power grid management, which are used for solving the defect that a management manual needs to be searched in the prior art and realizing automatic and efficient answer of power grid management questions.
The application provides a method for realizing intelligent question and answer of power grid management, which comprises the following steps:
obtaining a to-be-answered question, extracting keywords from the to-be-answered question to obtain a first keyword combination, and extracting a semantic vector of the first keyword combination as a question vector based on a trained semantic extraction model;
matching at least one candidate answer in an answer library based on the question vector, wherein a plurality of preset answers are stored in the answer library, each preset answer is a second keyword combination comprising a plurality of keywords, each preset answer is predetermined based on a power grid management document, and the power grid management document comprises priori knowledge of power grid management;
and expanding the candidate answers based on the candidate answers and the questions to be answered to obtain expanded answers, and outputting the expanded answers.
According to the method for realizing the intelligent question and answer of the power grid management provided by the application, the keyword extraction is carried out on the questions to be answered to obtain a first keyword combination, and the method comprises the following steps:
performing word segmentation processing on the questions to be answered to obtain sentence word segmentation of each sentence;
and extracting keywords based on the information entropy of each sentence word segmentation to obtain the first keyword combination.
According to the method for realizing the intelligent question and answer of the power grid management, which is provided by the application, at least one candidate answer is matched in an answer library based on the question vector, and the method comprises the following steps:
calculating the similarity of the question vector and the answer vector corresponding to each preset answer in the answer library;
acquiring the first N preset answers with highest similarity as candidate answers, wherein N is a positive integer;
the answer vectors corresponding to the preset answers of the answer library are obtained after semantic extraction is performed based on the semantic extraction model.
According to the method for realizing the intelligent question and answer of the power grid management, before the keyword extraction of the questions to be answered, the method comprises the following steps:
extracting the content of the text in the power grid management document to obtain a template power grid management problem and a template answer corresponding to the template power grid management problem;
and extracting keywords from each template answer to obtain each preset answer in the answer library.
According to the intelligent question-answering implementation method for power grid management, the semantic extraction model is obtained based on training of multiple sets of training data, each set of training data comprises a sample first keyword combination and the preset answer corresponding to the sample first keyword combination, and the sample first keyword combination is obtained by extracting keywords from the template power grid management problem.
According to the method for realizing the intelligent question and answer of the power grid management, which is provided by the application, the training process of the semantic extraction model comprises the following steps:
constructing a target training pair, wherein the target training pair comprises the sample first keyword combination and the preset answer, and the sample first keyword combination and the preset answer in the target training pair come from or are not from the same group of training data;
respectively inputting the sample first keyword combination and the preset answer in the target training pair to the semantic extraction model to obtain a sample question vector and a sample answer vector which are respectively output by the semantic extraction model;
acquiring a first similarity between the sample question vector and the sample answer vector;
determining training loss according to the first similarity and the second similarity, wherein the second similarity reflects the matching degree between the sample first keyword combination included in the target training pair and the preset answer;
updating parameters of the semantic extraction model based on the training loss.
According to the method for implementing the intelligent question and answer for power grid management provided by the application, the candidate answers are expanded based on the candidate answers and the questions to be answered to obtain expanded answers, and the method comprises the following steps:
determining a target sample first keyword combination from the sample first keyword combinations according to the first keyword combinations corresponding to the questions to be answered;
acquiring the template answer corresponding to the first keyword combination of the target sample;
and inputting the candidate answers and the template answers corresponding to the target sample first keyword combination into a trained sentence expansion model, and obtaining the expansion answers output by the sentence expansion model.
The application also provides a device for realizing the intelligent question and answer of the power grid management, which comprises the following steps:
the system comprises a question acquisition module, a question extraction module and a question extraction module, wherein the question acquisition module is used for acquiring a question to be answered, extracting keywords of the question to be answered to obtain a first keyword combination, and extracting semantic vectors of the first keyword combination based on a trained semantic extraction model to serve as question vectors;
the answer acquisition module is used for matching at least one candidate answer in an answer library based on the question vector, a plurality of preset answers are stored in the answer library, each preset answer is a second keyword combination comprising a plurality of keywords, each preset answer is predetermined based on a power grid management document, and the power grid management document comprises prior knowledge of power grid management;
and the answer expansion module is used for expanding the candidate answers based on the candidate answers and the questions to be answered to obtain expanded answers and outputting the expanded answers.
The application also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the intelligent question-answering implementation method of the power grid management when executing the program.
The application also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a grid management intelligent question-answering implementation method as described in any one of the above.
According to the power grid management intelligent question-answering implementation method, the device, the electronic equipment and the storage medium, preset answers of questions possibly existing in a power grid management process are established in advance through priori knowledge in a power grid management document, the preset answers are stored in an answer library in a keyword combination mode, after the questions to be answered are obtained, the questions to be answered are processed into first keyword combinations, semantic vectors of the first keyword combinations are extracted as question vectors based on a semantic extraction model, matching is conducted in an answer library based on the question vectors, at least one candidate answer is obtained, after the candidate answer is determined, the candidate answer is expanded, expanded answers are obtained and output, sentences are processed into keywords in the matching process, semantic vector extraction and matching are conducted, matching efficiency can be improved, the candidate answers are expanded, the candidate answers in the keyword combination mode can be expanded into sentences suitable for practical application, and automatic and efficient answer of the power grid management questions is achieved.
Drawings
In order to more clearly illustrate the application or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for implementing intelligent question-answering of power grid management;
fig. 2 is a schematic structural diagram of the intelligent question-answering implementation device for power grid management provided by the application;
fig. 3 is a schematic structural diagram of an electronic device provided by the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Grid management aims to enable a grid to run safely and stably, and involves a plurality of aspects, such as acquiring grid operation data, determining a maintenance scheme for grid faults, and the like. In the prior art, grid management often determines management measures corresponding to management problems by manually searching related management manuals, for example, when grid operation data needs to be acquired, an operation manual needs to be searched to determine a corresponding data management system and a use instruction of the data management system, and when a maintenance scheme of grid faults needs to be determined, a maintenance manual needs to be searched to determine a corresponding maintenance scheme. This method of finding a manual is inefficient.
In order to solve the defects that answers corresponding to management problems are needed to be determined through manual searching of a manual in the prior art and efficiency is low, the application provides a method, a device, electronic equipment and a storage medium for realizing intelligent question and answer of power grid management, and aims to realize automatic and efficient question and answer of the power grid management problems without manual searching of the manual.
The method for implementing the intelligent question-answering of the power grid management is described below with reference to fig. 1, and as shown in fig. 1, the method provided by the application comprises the following steps:
s110, acquiring a question to be answered, extracting keywords of the question to be answered to obtain a first keyword combination, and extracting semantic vectors of the first keyword combination based on a trained semantic extraction model to serve as question vectors.
The questions to be answered may be questions input by a manager through a keyboard, voice and the like, and keyword extraction is performed on the questions to be answered to obtain a first keyword combination, including:
and performing word segmentation processing on the questions to be answered to obtain sentence word segmentation, and extracting keywords based on the information entropy of the sentence word segmentation to obtain the first keyword combination.
Some words which have no or little semantics, such as connective words, intonation words and the like, may exist in the questions to be answered, and the words are removed, so that only the keywords in the questions to be answered are extracted, and the efficiency of extracting the semantic vectors can be improved.
S120, at least one candidate answer is matched in an answer library based on the question vector, a plurality of preset answers are stored in the answer library, each preset answer is a second keyword combination comprising a plurality of keywords, each preset answer is predetermined based on a power grid management document, and the power grid management document comprises prior knowledge of power grid management.
Each preset answer in the answer library is predetermined based on a power grid management document comprising a priori knowledge of power grid management, that is, the power grid management document comprises a plurality of power grid management questions and answers corresponding to the power grid management questions.
Before the keyword extraction is carried out on the questions to be answered, the method provided by the application comprises the following steps:
extracting the content of the text in the power grid management document to obtain a template power grid management problem and a template answer corresponding to the template power grid management problem;
and extracting keywords from each template answer to obtain each preset answer in the answer library.
The matching at least one candidate answer in the answer base based on the question vector comprises the following steps:
calculating the similarity of the question vector and the answer vector corresponding to each preset answer in the answer library;
acquiring the first N preset answers with highest similarity as candidate answers, wherein N is a positive integer;
the answer vectors corresponding to the preset answers of the answer library are obtained after semantic extraction is performed based on the semantic extraction model.
The answer vector corresponding to each preset answer in the answer library is also extracted by the trained semantic extraction model, specifically, the semantic extraction model is obtained by training based on multiple sets of training data, each set of training data comprises a sample first keyword combination and the preset answer corresponding to the sample first keyword combination, and the sample first keyword combination is obtained by extracting keywords from the template power grid management problem.
In the method provided by the application, based on the question vector, a plurality of candidate answers can be matched in the answer library, namely N is larger than 1, so that the fault tolerance of the answer provided by the application for the question to be answered can be improved, and the correct answer which is matched with the question to be answered is prevented from being missed.
After the training of the semantic extraction model is completed, each preset answer in the answer library can be input into the semantic extraction model in advance, the answer vector corresponding to each preset answer is obtained and stored, and the answer vector corresponding to each preset answer does not need to be calculated once every time intelligent question-answering is performed.
The training process of the semantic extraction model comprises the following steps:
constructing a target training pair, wherein the target training pair comprises the sample first keyword combination and the preset answer, and the sample first keyword combination and the preset answer in the target training pair come from or are not from the same group of training data;
respectively inputting the sample first keyword combination and the preset answer in the target training pair to the semantic extraction model to obtain a sample question vector and a sample answer vector which are respectively output by the semantic extraction model;
acquiring a first similarity between the sample question vector and the sample answer vector;
determining training loss according to the first similarity and the second similarity, wherein the second similarity reflects the matching degree between the sample first keyword combination included in the target training pair and the preset answer;
updating parameters of the semantic extraction model based on the training loss.
When the sample first keyword combination and the preset answer in the target training pair are from the same set of training data, the second similarity may be set to 1, and when the sample first keyword combination and the preset answer in the target training pair are not from the same set of training data, the second similarity may be set to 0, so that after the corresponding questions and answers are input to the semantic extraction model, the semantic extraction model may output more similar semantic vectors, and the non-corresponding questions and answers may output dissimilar semantic vectors when the non-corresponding questions and answers are input to the semantic extraction model, so that accuracy of the candidate answers obtained according to the question vector matching may be ensured.
The application provides a method for realizing intelligent question and answer of power grid management, which further comprises the following steps:
s130, expanding the candidate answers based on the candidate answers and the questions to be answered to obtain expanded answers, and outputting the expanded answers.
In the previous step, in order to facilitate the extraction and matching of the semantic vector, the keyword extraction processing is performed on the questions and the answers, the matched candidate answers are also keyword combinations, and the candidate answers are directly provided for the manager without conforming to the daily language habit, so that the readability is not high. In order to improve the readability of the provided answers, in the method provided by the application, after the candidate answers are obtained, the candidate answers are further expanded to obtain expanded answers, and the expanded answers are complete sentences, so that sentences with strong readability are provided for management staff, daily language habits are met, and user experience is improved.
Specifically, the expanding the candidate answer based on the candidate answer and the question to be answered to obtain an expanded answer includes:
determining a target sample first keyword combination from the sample first keyword combinations according to the first keyword combinations corresponding to the questions to be answered;
acquiring the template answer corresponding to the first keyword combination of the target sample;
and inputting the candidate answers and the template answers corresponding to the target sample first keyword combination into a trained sentence expansion model, and obtaining the expansion answers output by the sentence expansion model.
Although the template answers corresponding to the first keyword combinations corresponding to the questions to be answered are stored in the power grid management document, in the application, the template answers are not directly used as expansion results of the candidate answers, because the template answers in the power grid management document are often harder and are more similar to the questions with different semantic expressions, the corresponding template answers are fixed, that is, even though the questions are different, the same template answers are provided, so that users have the feeling of 'answer is generated by AI', and the feeling of daily actual conversations is lacked. In order to realize the sense of realism of question and answer, after the template answer corresponding to the question to be answered is determined, the template answer is not directly spoken to a user, but is used as a guide to expand the candidate answers so as to obtain diversified sentences, and one of the sentences is randomly selected as the expansion answer. That is, the obtaining the extended answer output by the sentence extension model includes:
acquiring a plurality of sentences output by the sentence expansion model;
and randomly selecting one of the sentences as the expansion answer corresponding to the candidate answer.
The objective of the sentence expansion model is to output diverse sentences, and the sentences are consistent with the semantics of the inputted template answers. To achieve this goal, the training process of the sentence expansion model includes:
determining a target training data set, wherein the target training data set comprises sample candidate answers and sample template answers;
inputting the target training data set into the sentence expansion model to obtain a plurality of sample expansion answers output by the sentence expansion model;
respectively inputting the plurality of sample expansion answers into the semantic extraction model to obtain semantic vectors of the sample expansion answers output by the semantic extraction model;
inputting the sample template answers into the semantic extraction model, and obtaining semantic vectors of the sample template answers output by the semantic model;
determining a first penalty based on the semantic vector of each of the sample expanded answers and the semantic vector of the sample template answer;
determining a second loss based on sentence edit distances between each sample expansion answer and the sample template answers, respectively;
determining a target training loss from the first loss and the second loss;
and updating parameters of the statement expansion model according to the target training loss.
Specifically, the closer the semantic vector of each sample expanded answer and the semantic vector of the sample template answer are, the smaller the first loss is, and the larger the sentence edit distance between each sample expanded answer and the sample template answer is, the smaller the second loss is. The sentence edit distance reflects the difference in the expression mode, the difference between semantic vectors reflects the similarity degree of semantics, and the target training loss is determined according to the first loss and the second loss so as to update the parameters of the sentence expansion model, so that the sentence expansion model can output a plurality of sentences with diversified expression modes and consistent semantics.
In summary, the method for implementing the intelligent question-answer for power grid management provided by the application pre-establishes preset answers to questions possibly existing in the power grid management process through priori knowledge in the power grid management document, the preset answers are stored in an answer library in a keyword combination mode, after the questions to be answered are acquired, the questions to be answered are processed into a first keyword combination, semantic vectors of the first keyword combination are extracted as question vectors based on a semantic extraction model, at least one candidate answer is obtained by matching the question vectors in an answer library, after the candidate answer is determined, the candidate answer is expanded to obtain an expanded answer, the expanded answer is output, sentences are processed into keywords in the matching process, then the semantic vectors are extracted and matched, the matching efficiency can be improved, the candidate answer in the keyword combination mode is expanded to be sentences suitable for practical application, and automatic and efficient answer of the power grid management questions is realized.
The power grid management intelligent question-answering device provided by the application is described below, and the power grid management intelligent question-answering device described below and the power grid management intelligent question-answering method described above can be referred to correspondingly. As shown in fig. 2, the intelligent question-answering device for power grid management provided by the application comprises:
the question obtaining module 210 is configured to obtain a question to be answered, extract keywords from the question to be answered, obtain a first keyword combination, and extract a semantic vector of the first keyword combination as a question vector based on a trained semantic extraction model;
an answer obtaining module 220, configured to match at least one candidate answer in an answer library based on the question vector, where a plurality of preset answers are stored in the answer library, each preset answer is a second keyword combination including a plurality of keywords, each preset answer is predetermined based on a power grid management document, and the power grid management document includes a priori knowledge of power grid management;
and the answer expansion module 230 is configured to expand the candidate answer based on the candidate answer and the question to be answered, obtain an expanded answer, and output the expanded answer.
Fig. 3 illustrates a physical schematic diagram of an electronic device, as shown in fig. 3, where the electronic device may include: processor 310, communication interface (Communications Interface) 320, memory 330 and communication bus 340, wherein processor 310, communication interface 320, memory 330 accomplish communication with each other through communication bus 340. Processor 310 may invoke logic instructions in memory 330 to perform a grid management intelligent question-answer implementation method comprising: obtaining a to-be-answered question, extracting keywords from the to-be-answered question to obtain a first keyword combination, and extracting a semantic vector of the first keyword combination as a question vector based on a trained semantic extraction model;
matching at least one candidate answer in an answer library based on the question vector, wherein a plurality of preset answers are stored in the answer library, each preset answer is a second keyword combination comprising a plurality of keywords, each preset answer is predetermined based on a power grid management document, and the power grid management document comprises priori knowledge of power grid management;
and expanding the candidate answers based on the candidate answers and the questions to be answered to obtain expanded answers, and outputting the expanded answers.
Further, the logic instructions in the memory 330 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present application also provides a computer program product, where the computer program product includes a computer program, where the computer program can be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer can execute the method for implementing the intelligent question-answer for power grid management provided by the above methods, and the method includes: obtaining a to-be-answered question, extracting keywords from the to-be-answered question to obtain a first keyword combination, and extracting a semantic vector of the first keyword combination as a question vector based on a trained semantic extraction model;
matching at least one candidate answer in an answer library based on the question vector, wherein a plurality of preset answers are stored in the answer library, each preset answer is a second keyword combination comprising a plurality of keywords, each preset answer is predetermined based on a power grid management document, and the power grid management document comprises priori knowledge of power grid management;
and expanding the candidate answers based on the candidate answers and the questions to be answered to obtain expanded answers, and outputting the expanded answers.
In still another aspect, the present application further provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, is implemented to perform the method for implementing the intelligent question-answering for grid management provided by the above methods, the method comprising: obtaining a to-be-answered question, extracting keywords from the to-be-answered question to obtain a first keyword combination, and extracting a semantic vector of the first keyword combination as a question vector based on a trained semantic extraction model;
matching at least one candidate answer in an answer library based on the question vector, wherein a plurality of preset answers are stored in the answer library, each preset answer is a second keyword combination comprising a plurality of keywords, each preset answer is predetermined based on a power grid management document, and the power grid management document comprises priori knowledge of power grid management;
and expanding the candidate answers based on the candidate answers and the questions to be answered to obtain expanded answers, and outputting the expanded answers.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present application without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. The intelligent question-answering implementation method for power grid management is characterized by comprising the following steps of:
obtaining a to-be-answered question, extracting keywords from the to-be-answered question to obtain a first keyword combination, and extracting a semantic vector of the first keyword combination as a question vector based on a trained semantic extraction model;
matching at least one candidate answer in an answer library based on the question vector, wherein a plurality of preset answers are stored in the answer library, each preset answer is a second keyword combination comprising a plurality of keywords, each preset answer is predetermined based on a power grid management document, and the power grid management document comprises priori knowledge of power grid management;
and expanding the candidate answers based on the candidate answers and the questions to be answered to obtain expanded answers, and outputting the expanded answers.
2. The method for implementing the intelligent question-answering for power grid management according to claim 1, wherein the extracting the keywords of the questions to be answered to obtain a first keyword combination includes:
performing word segmentation processing on the questions to be answered to obtain sentence word segmentation of each sentence;
and extracting keywords based on the information entropy of each sentence word segmentation to obtain the first keyword combination.
3. The method for implementing the intelligent question-answering for power grid management according to claim 1, wherein the matching at least one candidate answer in an answer library based on the question vector includes:
calculating the similarity of the question vector and the answer vector corresponding to each preset answer in the answer library;
acquiring the first N preset answers with highest similarity as candidate answers, wherein N is a positive integer;
the answer vectors corresponding to the preset answers of the answer library are obtained after semantic extraction is performed based on the semantic extraction model.
4. The method for implementing the intelligent question-answering for power grid management according to claim 1, wherein before the keyword extraction of the questions to be answered, the method comprises:
extracting the content of the text in the power grid management document to obtain a template power grid management problem and a template answer corresponding to the template power grid management problem;
and extracting keywords from each template answer to obtain each preset answer in the answer library.
5. The method for implementing the intelligent question-answering for power grid management according to claim 4, wherein the semantic extraction model is trained based on a plurality of sets of training data, each set of training data includes a sample first keyword combination and the preset answer corresponding to the sample first keyword combination, and the sample first keyword combination is obtained by extracting keywords from the template power grid management problem.
6. The method for implementing the intelligent question-answering for power grid management according to claim 5, wherein the training process of the semantic extraction model includes:
constructing a target training pair, wherein the target training pair comprises the sample first keyword combination and the preset answer, and the sample first keyword combination and the preset answer in the target training pair come from or are not from the same group of training data;
respectively inputting the sample first keyword combination and the preset answer in the target training pair to the semantic extraction model to obtain a sample question vector and a sample answer vector which are respectively output by the semantic extraction model;
acquiring a first similarity between the sample question vector and the sample answer vector;
determining training loss according to the first similarity and the second similarity, wherein the second similarity reflects the matching degree between the sample first keyword combination included in the target training pair and the preset answer;
updating parameters of the semantic extraction model based on the training loss.
7. The method for implementing the intelligent question-answering for power grid management according to claim 5, wherein the expanding the candidate answers based on the candidate answers and the questions to be answered to obtain expanded answers includes:
determining a target sample first keyword combination from the sample first keyword combinations according to the first keyword combinations corresponding to the questions to be answered;
acquiring the template answer corresponding to the first keyword combination of the target sample;
and inputting the candidate answers and the template answers corresponding to the target sample first keyword combination into a trained sentence expansion model, and obtaining the expansion answers output by the sentence expansion model.
8. The utility model provides a power grid management intelligence question and answer realizing device which characterized in that includes:
the system comprises a question acquisition module, a question extraction module and a question extraction module, wherein the question acquisition module is used for acquiring a question to be answered, extracting keywords of the question to be answered to obtain a first keyword combination, and extracting semantic vectors of the first keyword combination based on a trained semantic extraction model to serve as question vectors;
the answer acquisition module is used for matching at least one candidate answer in an answer library based on the question vector, a plurality of preset answers are stored in the answer library, each preset answer is a second keyword combination comprising a plurality of keywords, each preset answer is predetermined based on a power grid management document, and the power grid management document comprises prior knowledge of power grid management;
and the answer expansion module is used for expanding the candidate answers based on the candidate answers and the questions to be answered to obtain expanded answers and outputting the expanded answers.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the grid management intelligent question-answering implementation method according to any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a grid management intelligent question-answering implementation method according to any one of claims 1 to 7.
CN202310645856.3A 2023-06-01 2023-06-01 Intelligent question-answering implementation method and device for power grid management, electronic equipment and storage medium Pending CN116739003A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310645856.3A CN116739003A (en) 2023-06-01 2023-06-01 Intelligent question-answering implementation method and device for power grid management, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310645856.3A CN116739003A (en) 2023-06-01 2023-06-01 Intelligent question-answering implementation method and device for power grid management, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116739003A true CN116739003A (en) 2023-09-12

Family

ID=87912587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310645856.3A Pending CN116739003A (en) 2023-06-01 2023-06-01 Intelligent question-answering implementation method and device for power grid management, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116739003A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007157006A (en) * 2005-12-08 2007-06-21 National Institute Of Information & Communication Technology Question-answer device, question-answer method and question-answer program
JP2007164462A (en) * 2005-12-13 2007-06-28 Fuji Xerox Co Ltd Question answering system, question answering method and question answering program
CN107729468A (en) * 2017-10-12 2018-02-23 华中科技大学 Answer extracting method and system based on deep learning
CN109033305A (en) * 2018-07-16 2018-12-18 深圳前海微众银行股份有限公司 Question answering method, equipment and computer readable storage medium
CN109325132A (en) * 2018-12-11 2019-02-12 平安科技(深圳)有限公司 Expertise recommended method, device, computer equipment and storage medium
CN110647614A (en) * 2019-08-01 2020-01-03 平安科技(深圳)有限公司 Intelligent question and answer method, device, medium and electronic equipment
CN112765306A (en) * 2020-12-30 2021-05-07 金蝶软件(中国)有限公司 Intelligent question answering method and device, computer equipment and storage medium
CN114003706A (en) * 2021-07-13 2022-02-01 北京金山数字娱乐科技有限公司 Keyword combination generation model training method and device
CN114417863A (en) * 2021-07-13 2022-04-29 北京金山数字娱乐科技有限公司 Word weight generation model training method and device and word weight generation method and device
CN115422334A (en) * 2022-08-26 2022-12-02 网易(杭州)网络有限公司 Information processing method, device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007157006A (en) * 2005-12-08 2007-06-21 National Institute Of Information & Communication Technology Question-answer device, question-answer method and question-answer program
JP2007164462A (en) * 2005-12-13 2007-06-28 Fuji Xerox Co Ltd Question answering system, question answering method and question answering program
CN107729468A (en) * 2017-10-12 2018-02-23 华中科技大学 Answer extracting method and system based on deep learning
CN109033305A (en) * 2018-07-16 2018-12-18 深圳前海微众银行股份有限公司 Question answering method, equipment and computer readable storage medium
CN109325132A (en) * 2018-12-11 2019-02-12 平安科技(深圳)有限公司 Expertise recommended method, device, computer equipment and storage medium
CN110647614A (en) * 2019-08-01 2020-01-03 平安科技(深圳)有限公司 Intelligent question and answer method, device, medium and electronic equipment
CN112765306A (en) * 2020-12-30 2021-05-07 金蝶软件(中国)有限公司 Intelligent question answering method and device, computer equipment and storage medium
CN114003706A (en) * 2021-07-13 2022-02-01 北京金山数字娱乐科技有限公司 Keyword combination generation model training method and device
CN114417863A (en) * 2021-07-13 2022-04-29 北京金山数字娱乐科技有限公司 Word weight generation model training method and device and word weight generation method and device
CN115422334A (en) * 2022-08-26 2022-12-02 网易(杭州)网络有限公司 Information processing method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111309889B (en) Method and device for text processing
CN108287820B (en) Text representation generation method and device
CN113962315B (en) Model pre-training method, device, equipment, storage medium and program product
CN105868179B (en) A kind of intelligent answer method and device
CN106649742A (en) Database maintenance method and device
CN112487139A (en) Text-based automatic question setting method and device and computer equipment
CN116737908A (en) Knowledge question-answering method, device, equipment and storage medium
CN108595427B (en) Subjective question scoring method and device, readable storage medium and electronic equipment
CN111027292A (en) Method and system for generating limited sampling text sequence
CN115345177A (en) Intention recognition model training method and dialogue method and device
CN105631032B (en) Question and answer Knowledge Base, the apparatus and system recommended based on abstract semantics
CN113486160B (en) Dialogue method and system based on cross-language knowledge
CN116739003A (en) Intelligent question-answering implementation method and device for power grid management, electronic equipment and storage medium
CN114997164A (en) Text generation method and device
CN113886521A (en) Text relation automatic labeling method based on similar vocabulary
CN115905500B (en) Question-answer pair data generation method and device
CN112860983A (en) Learning content pushing method, system, equipment and readable storage medium
CN114942980B (en) Method and device for determining text matching
CN110232193B (en) Structured text translation method and device
CN116089589B (en) Question generation method and device
CN115188381B (en) Voice recognition result optimization method and device based on click ordering
CN112783324B (en) Man-machine interaction method and device and computer storage medium
CN117807198A (en) Response information acquisition method, large language model training method and device
CN109241539B (en) Updating method of machine learning artificial intelligence translation database
CN117828057A (en) Knowledge question-answering method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination