Power system knowledge question-answering system based on GPT model
Through the GPT model-based power system knowledge question and answer system, the problem of inefficient traditional knowledge acquisition methods is solved, automated and intelligent knowledge acquisition is achieved, and the grid operation efficiency and employee work efficiency are improved.
Patent Information
- Application Number
- CN202411444984.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2024-12-27
AI Technical Summary
The traditional method of obtaining knowledge of power systems is inefficient, which poses a learning disability especially for new employees, making it difficult to meet the needs of power grid companies to quickly acquire professional knowledge in operation management and maintenance work.
A power system knowledge question and answer system based on GPT model was designed. Through components such as question reception, answer output module, model training module, etc., the GPT model and advanced data processing technology are used to realize automated and intelligent knowledge question and answer services. The system collects and preprocesses massive power system knowledge, trains GPT models to match and generate answers, and provides instant and accurate technical support.
It improves the efficiency of power grid operation, reduces the work burden of employees, significantly improves work efficiency, and provides grid enterprises with an efficient professional knowledge acquisition solution.
Smart Images

Figure CN119202197A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of language processing technology, and in particular to a power system knowledge question and answer system based on a GPT model. Background Art
[0002] Within the broad operational framework of the contemporary power system, multiple key links such as transmission, substation, distribution, and marketing contain highly complex and diverse professional knowledge systems. In their daily operation, management, and maintenance work, power grid companies frequently face the challenge of solving various technical problems, including efficient operation and maintenance of power equipment, accurate location and elimination of faults, skilled operation of complex systems within power grid companies, and smooth execution of business processes. In the traditional working model, employees rely on the company's internal document database to obtain this professional knowledge by manually searching relevant literature. However, it is obvious that this traditional way of acquiring knowledge is not only inefficient, but also poses a considerable learning obstacle for new employees who lack rich experience.
[0003] In view of this, it has become a top priority to provide power grid company employees with an efficient, convenient and easy-to-understand solution for acquiring professional knowledge.
[0004] The above information is presented as background information only to assist with understanding the present disclosure and no determination or admission is made as to whether any of the above may be used as prior art with respect to the present disclosure. Summary of the invention
[0005] The present invention provides a power system knowledge question and answer system based on the GPT model to solve the problems existing in the prior art.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A power system knowledge question-answering system based on a GPT model, the system comprising:
[0008] A question receiving module is used to receive questions from users;
[0009] The answer output module is used to match the corresponding answer according to the user's question based on the trained GPT model and output it.
[0010] Furthermore, in the power system knowledge question-answering system based on the GPT model, the system further includes:
[0011] Model training module, used to train the GPT model.
[0012] Furthermore, in the power system knowledge question-answering system based on the GPT model, the model training module includes:
[0013] A question-answer knowledge base, used to store question-answer pair data related to the power system, wherein the question-answer pair data includes questions and corresponding answers;
[0014] The model training submodule is used to input the question-answer pair data into the GPT model to train the GPT model.
[0015] Furthermore, in the power system knowledge question-answering system based on the GPT model, the model training module also includes:
[0016] The data preprocessing submodule is used to preprocess the question-answer pair data to convert questions and answers in natural language into a format suitable for GPT model training.
[0017] Furthermore, in the power system knowledge question-answering system based on the GPT model, the question-answering knowledge base includes:
[0018] A knowledge collection unit, used to collect knowledge related to the power system;
[0019] Knowledge classification unit, used to classify knowledge according to its source;
[0020] The question-answer pair compilation unit is used to compile corresponding questions for facts expressed in declarative sentences to form question-answer pair data.
[0021] Furthermore, in the power system knowledge question-answering system based on the GPT model, the source of the power system-related knowledge includes at least one of the following:
[0022] Historical operation and maintenance records;
[0023] Equipment manuals and technical documentation;
[0024] Standards, specifications and industry regulations;
[0025] The company's internal management regulations, business process documents, and information system operation manuals;
[0026] Customer service records.
[0027] Furthermore, in the power system knowledge question-answering system based on the GPT model, the data preprocessing submodule includes:
[0028] A data reading unit, used to read question-answer pair data from the question-answer knowledge base;
[0029] A data cleaning and format conversion unit is used to clean the input question-answer pair data, remove special characters and redundant blank characters, and convert the question-answer pair data into a chain data structure for storage;
[0030] A data enhancement unit is used to use the existing power system professional synonym library to perform synonym replacement on the question-answer pair data to generate more question-answer pair data;
[0031] The word segmentation unit is used to convert the question-answer pair data into a token sequence, add specific separators and terminators according to the characteristics of the GPT model, and then format it into a binary file for the GPT model to read.
[0032] Furthermore, in the power system knowledge question-answering system based on the GPT model, the model training submodule includes:
[0033] Model reading unit, used to read the GPT model to be trained;
[0034] A parameter configuration unit, used to read input hyperparameters, including a learning rate, a batch size, and a number of training rounds;
[0035] The model fine-tuning unit is used to use batch processing and concurrent reading technology to simultaneously read multiple training data and group a specific amount of data into a batch; use the AdamW optimizer to update model parameters; use a linear learning rate warm-up strategy to dynamically adjust parameters; use gradient accumulation technology to read the same batch of training data in multiple times, and use the accumulated loss of the same batch to update model parameters to reduce the memory usage during training; regularly save the intermediate state of the model so that after the training is completed, a certain intermediate state model with the best effect can be selected to prevent overfitting;
[0036] The model verification unit is used to use a portion of the data of the question-answer knowledge base as a verification set during the training process to evaluate the performance of the model. When the accuracy of the model on the verification set does not decrease in multiple rounds of training, the training is automatically stopped to prevent overfitting.
[0037] Furthermore, in the power system knowledge question-answering system based on the GPT model, the question receiving module includes:
[0038] A question receiving unit, used for receiving questions described by users in natural language;
[0039] The question classification unit is used to determine the category of the question based on the keywords in the received question and classify it.
[0040] Furthermore, in the power system knowledge question-answering system based on the GPT model, the answer output module includes
[0041] A question matching unit, used to match the user's question with the questions in the knowledge question and answer database using a cosine similarity algorithm;
[0042] The model answering unit is used to segment the user's question when the user's question is not successfully matched, and then input the segmented question into the trained GPT model, and the GPT model generates an answer;
[0043] The answer output unit is used to output the answer corresponding to the question when the user's question is successfully matched; and to output the answer generated by the GPT model.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] The present invention provides a power system knowledge question and answer system based on the GPT model. By collecting a large amount of power system-related knowledge and using the GPT model and advanced data processing technology, it realizes automated and intelligent power system knowledge question and answer services, thereby improving the efficiency of power grid operation, providing timely and accurate technical support for employees, reducing workload and improving work efficiency.
[0046] The present invention has other features and advantages, which will be apparent from or will be described in detail in the accompanying drawings and the following detailed description incorporated herein, which together serve to explain the specific principles of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 It is a functional module diagram of a power system knowledge question and answer system based on a GPT model provided by an embodiment of the present invention;
[0049] Figure 2 is a schematic diagram of functional modules of a model training module provided in an embodiment of the present invention;
[0050] Figure 3 is a schematic diagram of functional modules of a question-and-answer knowledge base provided by an embodiment of the present invention;
[0051] Figure 4 is a functional module schematic diagram of a data preprocessing submodule provided in an embodiment of the present invention;
[0052] Figure 5 is a functional module schematic diagram of a model training submodule provided in an embodiment of the present invention;
[0053] Figure 6 is a functional module schematic diagram of a question receiving module provided by an embodiment of the present invention;
[0054] Figure 7 It is a functional module diagram of the answer output module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to explain in detail the possible application scenarios, technical principles, specific schemes that can be implemented, and the purposes and effects that can be achieved, the following is a detailed description of the specific embodiments listed in conjunction with the accompanying drawings. The embodiments described herein are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0056] Reference to "embodiment" herein means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or association with other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the various technical features mentioned in the embodiments can be combined in any way to form a corresponding implementable technical solution.
[0057] Unless otherwise defined, the technical terms used in this document have the same meanings as those generally understood by those skilled in the art to which this application belongs; the use of relevant terms in this document is only for describing specific embodiments and is not intended to limit this application.
[0058] In the description of this application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that three relationships may exist, for example, A and / or B, which means: A exists, B exists, and A and B exist at the same time. In addition, the character " / " in this article generally indicates that the objects before and after are in an "or" logical relationship.
[0059] In the present application, terms such as “first” and “second” are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship of quantity, priority or sequence between these entities or operations.
[0060] Without further limitations, in this application, the words "include", "comprises", "has" or other similar expressions used in the sentences are intended to cover non-exclusive inclusion. These expressions do not exclude the presence of additional elements in the process, method or product including the elements, so that the process, method or product including a series of elements may include not only those limited elements, but also other elements not explicitly listed, or also include elements inherent to such process, method or product.
[0061] In this application, expressions such as "greater than", "less than", "exceed" and the like are understood to exclude the number itself; expressions such as "above", "below", "within" and the like are understood to include the number itself. In addition, in the description of the embodiments of this application, "multiple" means more than two (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups", "multiple times", etc., unless otherwise clearly and specifically limited.
[0062] In the description of the embodiments of the present application, space-related expressions used, such as "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicate the orientation or position relationship based on the orientation or position relationship shown in the specific embodiments or drawings, and are only for the convenience of describing the specific embodiments of the present application or facilitating the reader's understanding, and do not indicate or imply that the referred device or component must have a specific position, a specific orientation, or be constructed or operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
[0063] Unless otherwise expressly specified or limited, in the description of the embodiments of the present application, the terms such as "install", "connect", "connect", "fix", "set", etc. used should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integrated setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. For technicians in the technical field to which the present application belongs, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0064] Embodiment 1
[0065] In view of the defects of the above-mentioned prior art, the applicant, based on many years of rich practical experience and professional knowledge in this field, and in conjunction with the application of theory, actively conducts research and innovation in the hope of creating a technology that can solve the defects of the prior art. After continuous research and design, and after repeated trial production and improvement, the present invention with real practical value was finally created.
[0066] Please refer to Figure 1 The embodiment of the present invention provides a power system knowledge question-answering system based on a GPT model, the system comprising:
[0067] The question receiving module is used to receive user questions. As the starting point of the entire question-answering process, this module ensures accurate reception and immediate delivery of user questions.
[0068] The answer output module is used to match the corresponding answers according to the user's questions based on the trained GPT model, and output them, thereby achieving timely and effective solutions to the questions.
[0069] It should be noted that during the development process of the embodiment of the present invention, a large amount of knowledge resources in the field of power systems were widely collected and integrated. By introducing the GPT model, a cutting-edge artificial intelligence technology, combined with advanced data processing and analysis methods, a knowledge question and answer service platform for power systems with a high degree of automation and outstanding intelligence was successfully created. The establishment of this platform not only significantly improves the overall efficiency of power grid operations, but also provides instant and accurate technical support and answer services for power grid staff, effectively reducing their workload and further promoting a leap-forward improvement in work efficiency. In summary, the embodiments of the present invention have demonstrated important practical value and application prospects in promoting the intelligent construction of power systems and optimizing power grid operation and maintenance management.
[0070] In one implementation of this embodiment, the system further includes:
[0071] Model training module, used to train the GPT model.
[0072] It should be noted that this module is responsible for the in-depth training and optimization of the GPT model. It aims to continuously improve the GPT model's understanding ability, matching accuracy and answer quality by introducing more extensive and accurate power system-related knowledge data and combining advanced machine learning algorithms and training strategies. Through the continuous work of this module, the system can ensure that the GPT model always maintains its efficient and accurate knowledge question-and-answer capabilities, and provide users with better quality and more reliable power system knowledge services. This innovative design not only enhances the adaptability and flexibility of the system, but also lays a solid foundation for the long-term stable operation and continuous optimization of the power system knowledge question-and-answer system.
[0073] Please refer to Figure 2 In one implementation of this embodiment, the model training module includes:
[0074] The question-answer knowledge base is used to store question-answer pairs related to the power system, which include questions and corresponding answers. These question-answer pairs are carefully selected to cover a wide range of knowledge points in the field of power systems. Each pair of data consists of a specific question and its corresponding precise answer. The establishment of the question-answer knowledge base provides rich and accurate learning materials for model training, ensuring that the GPT model can master the basic framework and detailed points of power system knowledge.
[0075] The model training submodule is used to input the question-answer pair data into the GPT model to train the GPT model. Specifically, it is responsible for inputting the question-answer pair data into the GPT model one by one, and continuously optimizing the GPT model's ability to understand and answer power system issues through complex processes such as iterative training and parameter adjustment. The operation of the model training submodule not only enhances the GPT model's deep mining and precise matching of power system knowledge, but also significantly improves its response efficiency and accuracy when facing complex and changing problems.
[0076] In summary, through the close collaboration between the question-and-answer knowledge base and the model training submodule, the model training module in this embodiment successfully builds an efficient and intelligent GPT model training system, providing strong technical support and guarantee for the continuous optimization and performance improvement of the power system knowledge question-and-answer system.
[0077] Please refer again Figure 2 In one implementation of this embodiment, the model training module further includes:
[0078] The data preprocessing submodule is used to preprocess the question-answer pair data to convert questions and answers in natural language into a format suitable for GPT model training.
[0079] It should be noted that the main responsibility of this module is to preprocess the question-answer data stored in the question-answer knowledge base. Since the original data in the question-answer knowledge base usually exists in the form of natural language, and the GPT model needs to receive data input in a specific format during the training process, the data preprocessing submodule is responsible for converting questions and answers in natural language into a format that the GPT model can understand and process. This process may involve multiple complex steps such as text cleaning, word segmentation, encoding, and serialization, aiming to ensure that the data input to the GPT model is both accurate and efficient, thereby effectively improving the effect and efficiency of model training.
[0080] Through the fine operation of the data preprocessing submodule, the question-answering data can be accurately converted into a format suitable for GPT model training, laying a solid foundation for subsequent model training. This innovative design not only enhances the flexibility and adaptability of the model training module, but also further improves the intelligence level of the power system knowledge question-answering system, providing users with better quality and more efficient knowledge question-answering services.
[0081] Please refer to Figure 3 In one implementation of this embodiment, the question-answer knowledge base includes:
[0082] The knowledge collection unit is used to collect knowledge related to the power system. In one implementation of this embodiment, the source of the knowledge related to the power system includes at least one of the following:
[0083] Historical operation and maintenance records: Extract common technical problems and corresponding solutions from the historical operation and maintenance records of power grid companies, such as transmission line fault handling records, transformer maintenance logs, etc.
[0084] Equipment manuals and technical documents: Collect operation manuals, technical specifications, maintenance guides and other documents of various types of power equipment, and extract information such as equipment parameters, operation procedures, maintenance methods, etc.
[0085] Standards and industry regulations: national standards, industry standards or local regulations for the power industry. These documents contain many standardized operating procedures and technical requirements;
[0086] The company's internal management regulations, business process documents, and information system operation manuals;
[0087] Customer service records: Collect common problems and their solutions from the customer service department of power grid companies, including electricity fee inquiry and payment, business expansion process, troubleshooting, and other marketing and power distribution professional issues.
[0088] Knowledge classification unit, used to classify knowledge according to its source;
[0089] It should be noted that this unit classifies knowledge according to its source documents, and the classification categories are consistent with the business divisions within the power grid company, such as power transmission, substation, distribution, marketing, safety supervision, etc. Usually, the categories of knowledge source documents are fixed, such as the manual of substation equipment belongs to the substation category, and the management specifications of the safety supervision domain belong to the safety supervision category. The categories of source documents are mainly entered manually.
[0090] The question-answer pair compilation unit is used to compile corresponding questions for facts expressed in declarative sentences to form question-answer pair data.
[0091] It should be noted that the format of the questions is mainly "How to...?" or "What are the steps of...?", and they are mainly compiled manually. Since the compilation of questions does not rely on power system professional technology, they can be handled by non-power professionals.
[0092] It is understandable that the construction of the Q&A knowledge base is not a one-time job, but a process of continuous maintenance and optimization. It mainly includes the following mechanisms: (1) User feedback mechanism: After the Q&A system is running, the answers to new questions are supplemented or inaccurate or outdated answers are corrected based on user feedback. (2) Regular updates: With the emergence of new technologies and new equipment in the power industry, as well as the internal management specifications and business processes of the power grid, the knowledge base needs to regularly add new information or delete outdated information.
[0093] Please refer to Figure 4 In one implementation of this embodiment, the data preprocessing submodule includes:
[0094] A data reading unit, used to read question-answer pair data from the question-answer knowledge base;
[0095] A data cleaning and format conversion unit is used to clean the input question-answer pair data, remove special characters and redundant blank characters, and convert the question-answer pair data into a chain data structure for storage;
[0096] The data enhancement unit is used to use the existing professional synonym library of the power system (such as circuit breaker-load switch, knife switch-disconnector, etc.) to perform synonym replacement on the question-answer pair data to generate more question-answer pair data;
[0097] The word segmentation unit is used to convert the question-answer pair data into a token sequence, add specific separators and terminators according to the characteristics of the GPT model, and then format it into a binary file for the GPT model to read.
[0098] It should be noted that in the GPT model, all input text needs to be converted into token form. This unit uses a predefined dictionary and a pre-trained word segmenter to convert the original text into a token sequence.
[0099] Please refer to Figure 5 In one implementation of this embodiment, the model training submodule includes:
[0100] Model reading unit, used to read the GPT model to be trained;
[0101] It should be noted that the embodiment of the present invention selects the open source Chinese GPT-2 pre-trained model as the basic model, which has good performance in generating natural language text. Since the technical architecture of the embodiment of the present invention is not targeted at the currently selected pre-trained model, it has sufficient flexibility, and other models can be selected according to actual needs during subsequent iterations and updates.
[0102] The parameter configuration unit is used to read the input hyperparameters, including the learning rate, batch size, and number of training rounds.
[0103] It should be noted that all hyperparameters will be manually adjusted based on factors such as training data, model structure, and model scale to ensure the best training results.
[0104] The model fine-tuning unit is used to use batch processing and concurrent reading technology to simultaneously read multiple training data and group a specific amount of data into a batch; use the AdamW optimizer to update model parameters; use a linear learning rate warm-up strategy to dynamically adjust parameters; use gradient accumulation technology to read the same batch of training data in multiple times, and use the accumulated loss of the same batch to update model parameters to reduce the memory usage during training, so that devices with insufficient video memory can also support large-batch training; regularly save the intermediate state of the model so that after training, the best intermediate state model can be selected to prevent overfitting.
[0105] The model verification unit is used to use a portion of the data of the question-answer knowledge base as a verification set during the training process to evaluate the performance of the model. When the accuracy of the model on the verification set does not decrease in multiple rounds of training, the training is automatically stopped to prevent overfitting.
[0106] Please refer to Figure 6 In one implementation of this embodiment, the question receiving module includes:
[0107] A question receiving unit, used for receiving questions described by users in natural language;
[0108] The question classification unit is used to determine the category of the question based on the keywords in the received question and classify it.
[0109] Please refer to Figure 7 In one implementation of this embodiment, the answer output module includes
[0110] The question matching unit is used to match the user's question with the questions in the knowledge question and answer database using a cosine similarity algorithm.
[0111] It should be noted that the cosine similarity algorithm can be used to calculate the similarity between two strings, and the result is between 0 and 1. The closer to 1, the more similar the two strings are. The system calculates the similarity between all questions in the question-and-answer database and the current question. If the highest similarity is higher than the preset threshold, the system will directly return the standard answer corresponding to the most similar question without performing inference on the GPT model.
[0112] The model answering unit is used to segment the user's question when the user's question is not successfully matched, and then input the segmented question into the trained GPT model, and the GPT model generates an answer.
[0113] It should be noted that if a sufficiently similar question is not matched, the system will use a tokenizer (the same tokenizer used in preprocessing) to tokenize the question described in natural language, and then input the tokenized question into the pre-trained GPT-2 model, which will generate an answer and optimize the generation quality through "top-k" and "nucleus sampling" technologies. The generated answer will be reversely tokenized and encoded and converted into human-readable natural language.
[0114] The answer output unit is used to output the answer corresponding to the question when the user's question is successfully matched; and to output the answer generated by the GPT model.
[0115] It should be noted that the system will combine the generated answer, the field of the question and other necessary prompts in a predefined format into a complete and fluent reply and return it to the user, and record the question asked by the user as context information for the user's next question, in order to optimize the quality of the answer.
[0116] Although the terms such as GPT, preprocessing, and training are used more frequently in this application, the possibility of using other terms is not excluded. These terms are used only to more conveniently describe and explain the essence of the present invention; interpreting them as any additional restrictions is contrary to the spirit of the present invention.
[0117] An embodiment of the present invention provides a power system knowledge question and answer system based on the GPT model. By collecting a large amount of power system-related knowledge and using the GPT model and advanced data processing technology, it realizes automated and intelligent power system knowledge question and answer services, thereby improving the efficiency of power grid operation, providing timely and accurate technical support for employees, reducing workload and improving work efficiency.
[0118] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of this application, this does not limit the scope of patent protection of this application. All technical solutions generated by replacing or modifying equivalent structures or equivalent processes based on the essential concept of this application using the contents recorded in the specification and drawings of this application, as well as directly or indirectly implementing the technical solutions of the above embodiments in other related technical fields, are included in the scope of patent protection of this application.
Claims
1. A power system knowledge question-answering system based on the GPT model, characterized in that: The system comprises: A question receiving module is used to receive questions from users; The answer output module is used to match the corresponding answer according to the user's question based on the trained GPT model and output it.
2. The power system knowledge question-answering system based on the GPT model according to claim 1 is characterized in that: The system further comprises: Model training module, used to train the GPT model.
3. The power system knowledge question and answer system based on the GPT model according to claim 2 is characterized in that: The model training module includes: A question-answer knowledge base, used to store question-answer pair data related to the power system, wherein the question-answer pair data includes questions and corresponding answers; The model training submodule is used to input the question-answer pair data into the GPT model to train the GPT model.
4. The power system knowledge question-answering system based on the GPT model according to claim 3 is characterized in that: The model training module also includes: The data preprocessing submodule is used to preprocess the question-answer pair data to convert questions and answers in natural language into a format suitable for GPT model training.
5. The power system knowledge question-answering system based on the GPT model according to claim 3 is characterized in that: The question-answering knowledge base includes: A knowledge collection unit, used to collect knowledge related to the power system; Knowledge classification unit, used to classify knowledge according to its source; The question-answer pair compilation unit is used to compile corresponding questions for facts expressed in declarative sentences to form question-answer pair data.
6. The power system knowledge question and answer system based on the GPT model according to claim 5 is characterized in that: The source of the power system related knowledge includes at least one of the following: Historical operation and maintenance records; Equipment manuals and technical documentation; Standards, specifications and industry regulations; The company's internal management regulations, business process documents, and information system operation manuals; Customer service records.
7. The power system knowledge question-answering system based on the GPT model according to claim 4 is characterized in that: The data preprocessing submodule includes: A data reading unit, used to read question-answer pair data from the question-answer knowledge base; A data cleaning and format conversion unit is used to clean the input question-answer pair data, remove special characters and redundant blank characters, and convert the question-answer pair data into a chain data structure for storage; A data enhancement unit is used to use the existing power system professional synonym library to perform synonym replacement on the question-answer pair data to generate more question-answer pair data; The word segmentation unit is used to convert the question-answer pair data into a token sequence, add specific separators and terminators according to the characteristics of the GPT model, and then format it into a binary file for the GPT model to read.
8. The power system knowledge question and answer system based on the GPT model according to claim 3 is characterized in that: The model training submodule includes: Model reading unit, used to read the GPT model to be trained; A parameter configuration unit, used to read input hyperparameters, including a learning rate, a batch size, and a number of training rounds; The model fine-tuning unit is used to use batch processing and concurrent reading technology to simultaneously read multiple training data and group a specific amount of data into a batch; use the AdamW optimizer to update model parameters; use a linear learning rate warm-up strategy to dynamically adjust parameters; use gradient accumulation technology to read the same batch of training data in multiple times, and use the accumulated loss of the same batch to update model parameters to reduce the memory usage during training; regularly save the intermediate state of the model so that after the training is completed, a certain intermediate state model with the best effect can be selected to prevent overfitting; The model verification unit is used to use a portion of the data of the question-answer knowledge base as a verification set during the training process to evaluate the performance of the model. When the accuracy of the model on the verification set does not decrease in multiple rounds of training, the training is automatically stopped to prevent overfitting.
9. The power system knowledge question and answer system based on the GPT model according to claim 1, characterized in that: The question receiving module comprises: A question receiving unit, used for receiving questions described by users in natural language; The question classification unit is used to determine the category of the question based on the keywords in the received question and classify it.
10. The power system knowledge question-answering system based on the GPT model according to claim 1, characterized in that: The answer output module includes A question matching unit, used to match the user's question with the questions in the knowledge question and answer database using a cosine similarity algorithm; The model answering unit is used to segment the user's question when the user's question is not successfully matched, and then input the segmented question into the trained GPT model, and the GPT model generates an answer; The answer output unit is used to output the answer corresponding to the question when the user's question is successfully matched; And, output the answer generated by the GPT model.
Citation Information
Patent Citations
Electric power professional knowledge intelligent question answering system construction method based on large language model
CN117609421A
Enhanced retrieval user question and answer method and device, computer equipment and storage medium
CN118132732A
Intelligent customer service question and answer method based on large language model technology
CN118364084A
Cited By
Power grid energy storage question and answer method and system based on knowledge graph
CN120067271A
