Power business question answering method and device, terminal equipment and storage medium

By performing vector conversion and similarity calculation on power academic documents, training a power business question-answering model, and using dense retrieval and instruction fine-tuning, we solved the problem of inaccurate answers given by large language models in the power field, and achieved improvements in professionalism and accuracy.

CN120705283AActive Publication Date: 2025-09-26STATE GRID ZHEJIANG ELECTRIC POWER CO LTD

Patent Information

Application Number
CN202511196325.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-09-26
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

The large language model lacks the support of power patent knowledge in the power vertical field, resulting in inaccurate results and hallucinations in the generated power problem answers.

Method used

By obtaining academic documents on the power business, performing vector conversion and question construction, generating text vectors and power business question embedding vectors, calculating similarity to retain the most relevant reference text vectors, training a preset power business question answering model, and using dense retrieval and instruction fine-tuning technology to ensure the professionalism and accuracy of the model output.

Benefits of technology

It improves the professionalism and accuracy of the power business problem-solving model, reduces hallucinations, and improves the reliability of the model output results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705283A_ABST
    Figure CN120705283A_ABST
Patent Text Reader

Abstract

The invention discloses a power business question answering method and device, terminal equipment and a storage medium, and belongs to the technical field of large language models.The method comprises the steps that a user power business question is obtained, and a model input prompt is obtained through construction; inputting the model input prompt into a preset power business question answering model to obtain an answering scheme; wherein a plurality of text vectors and a plurality of power business problem embedding vectors are obtained based on a power business academic document; calculating the similarity between the power business problem and each text vector, and determining a reference text vector; and according to the reference text vector and the power business question embedding vector, performing model training to obtain a preset power business question answering model. Through the implementation of the method and the device, the problem that the generated power question answering result is inaccurate due to the fact that the illusion phenomenon is serious when a general large language model is applied in the power vertical field in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of large language models, and in particular to a method, apparatus, terminal device and storage medium for answering power business questions. Background Art

[0002] Currently, core operations such as power system dispatching, equipment operation and maintenance, and market transactions rely heavily on manually constructed structured rule bases and expert experience models, typically in the form of mathematical programming or expert systems. This construction process faces a significant knowledge representation gap: Massive amounts of unstructured industry specifications and expert experience are difficult to efficiently translate into machine-executable logic. The dynamic environment of the power grid requires rule models to be capable of real-time optimization. Traditional manual coding methods, with their long update cycles (weeks to months), cannot meet the demands of agile decision-making.

[0003] Therefore, existing technologies typically use intelligent technology approaches centered around large language models and deep learning to determine solutions for power business problem solving. However, in practical applications, large language models lack the support of patented knowledge in the power industry, particularly in the power industry, which requires extremely high accuracy and expertise. Consequently, they are susceptible to significant hallucinations (information generated by the model that appears reasonable but is actually false or fabricated), leading to inaccurate answers to power problem questions. Summary of the Invention

[0004] The present invention provides a method, apparatus, terminal device and storage medium for answering power business questions, which can solve the problem that when the large language model in the existing technology is actually applied in the power vertical field with extremely high requirements for knowledge accuracy and professionalism, the hallucination phenomenon is more serious due to the lack of support from power patent knowledge, resulting in inaccurate power problem answering results.

[0005] An embodiment of the present invention provides a method for solving power business problems, comprising: Obtaining the user's electricity business problem, and constructing a model input prompt based on the user's electricity business problem; Input the above model input prompts into the preset power business problem solving model to obtain a solution to the above user power business problem; The training of the above-mentioned preset power business problem-solving model includes: Obtain several academic documents on the power business, perform vector conversion and question construction on the above academic documents on the power business, and obtain several text vectors and several power business question embedding vectors; For each power business question, calculate the similarity between the power business question embedding vector corresponding to the power business question and each text vector, and retain the top K text vectors with the largest similarity as the corresponding reference text vectors; where K is a positive integer; The electric power business question answering model to be trained is trained based on the above-mentioned reference text vector and the corresponding electric power business question embedding vector to obtain the above-mentioned preset electric power business question answering model.

[0006] Furthermore, the above-mentioned electric power business academic documents are vectorized and question constructed to obtain several text vectors and several electric power business question embedding vectors, including: Divide all the above-mentioned power business academic documents to obtain several text blocks; convert all the above-mentioned text blocks into vectors to obtain several text vectors; Input the above text block and the preset question extraction prompt words into the preset large language model to generate several power business questions; All power business problems are encoded to obtain several power business problem embedding vectors.

[0007] Furthermore, all the above-mentioned power business academic documents are divided into several text blocks, including: Convert all the above-mentioned power business academic documents into different formats to generate several initial Markdown documents; Perform data cleaning on all initial Markdown documents to generate target Markdown documents; For each target Markdown document, semantic segmentation is performed to obtain several text blocks.

[0008] Furthermore, all the above text blocks are converted into vectors to obtain several text vectors, including: For each text block, split the text block into a number of subword unit sequences; According to the preset encoder, the above sub-word unit sequence is mapped into a text vector to obtain several text vectors.

[0009] Furthermore, the power business question answering model to be trained is trained based on the reference text vector and the corresponding power business question embedding vector to obtain the preset power business question answering model, including: The text block corresponding to the above reference text vector is used as the reference text; Input the reference text, the power business problem corresponding to the reference text, and the preset decision modeling prompt words into the preset large language model to generate a reference solution; The electric power business problem answering model is trained according to the above reference answering scheme and the corresponding electric power business problem to obtain the above preset electric power business problem answering model.

[0010] Furthermore, the power business problem answering model is trained based on the reference answering solution and the corresponding power business problem to obtain the preset power business problem answering model, including: According to the power business problem corresponding to the reference solution, construct the input prompt of the power business problem solution model; Inputting the above input prompts and the above reference solution into the electric power business problem-solving model to be trained for iterative training until the loss function converges, thereby generating the above preset electric power business problem-solving model; Among them, during each iterative training, the current prediction solution is generated according to the current input prompt; based on the current prediction solution and the corresponding reference solution, the current loss function is calculated, and it is judged whether the current loss function converges; if the current loss function converges, the current power business problem solving model is used as the above-mentioned preset power business problem solving model; otherwise, after adjusting the parameters in the current power business problem solving model, training continues.

[0011] Based on the above method embodiment, the present invention provides a corresponding device embodiment; The present invention provides a device for answering questions about electric power business, comprising: Input prompt building module and solution output module: The input prompt building module is used to obtain the user's power business problem and construct a model input prompt based on the user's power business problem; The above-mentioned solution output module is used to input the above-mentioned model input prompt into the preset power business problem solving model to obtain the solution to the above-mentioned user power business problem; wherein, the training of the above-mentioned preset power business problem solving model includes: obtaining a number of power business academic documents, and performing vector conversion and problem construction on the above-mentioned power business academic documents to obtain a number of text vectors and a number of power business problem embedding vectors; for each power business problem, calculating the similarity between the power business problem embedding vector corresponding to the above-mentioned power business problem and each text vector, and retaining the top K text vectors with the largest similarity as the corresponding reference text vectors; wherein K is a positive integer; according to the above-mentioned reference text vectors and the corresponding power business problem embedding vectors, the power business problem solving model to be trained is trained to obtain the above-mentioned preset power business problem solving model.

[0012] Furthermore, the solution output module includes: Text vector construction unit, power business question generation unit and question encoding unit; The text vector construction unit is used to divide all the above-mentioned power business academic documents into a number of text blocks; and perform vector conversion on all the above-mentioned text blocks to obtain a number of text vectors; The power business question generating unit is configured to input the text block and preset question extraction prompt words into a preset large language model to generate a number of power business questions; The above-mentioned question encoding unit is used to encode all power business questions to obtain a number of power business question embedding vectors.

[0013] Based on the above method embodiment, the present invention provides a corresponding terminal device embodiment; The present invention provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the method for answering power business questions according to any embodiment of the present invention is implemented.

[0014] Based on the above method embodiment, the present invention provides a storage medium embodiment; The present invention provides a storage medium comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the method for answering power business questions according to any embodiment of the present invention is implemented.

[0015] The embodiments of the present invention have the following beneficial effects: The present invention provides a method, apparatus, terminal device and storage medium for answering electric power business questions. The method comprises: obtaining a user's electric power business question, and constructing a model input prompt based on the user's electric power business question; then inputting the model input prompt into a preset electric power business question answering model to obtain a solution to the user's electric power business question; wherein, the training of the preset electric power business question answering model comprises: obtaining a number of electric power business academic documents, and performing vector conversion and question construction on the electric power business academic documents to obtain a number of text vectors and a number of electric power business question embedding vectors; for each electric power business question, calculating the similarity between the electric power business question embedding vector corresponding to the electric power business question and each text vector, and retaining the top K text vectors with the largest similarity as corresponding reference text vectors; wherein K is a positive integer; based on the reference text vector and the corresponding electric power business question embedding vector, the electric power business question answering model to be trained is trained to obtain the preset electric power business question answering model. Therefore, the present invention first generates power business problems and text vectors based on power business academic documents, and determines the text vectors most relevant to the power business problems by calculating the similarity. The reference text vectors obtained by this dense retrieval method constitute the most core power professional knowledge support. Finally, the reference text vectors and the corresponding power business problem embedding vectors obtained in this way are used to train the model. This can make the output results of the model have higher professionalism during training, reduce the model's hallucination phenomenon, and improve the accuracy of the model's output results. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the implementation. Obviously, the drawings described below are only some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0017] Figure 1 The present invention provides a flowchart of a method for solving power business problems according to an embodiment of the present invention.

[0018] Figure 2 This is a RAG power business decision-making flowchart provided by an embodiment of the present invention.

[0019] Figure 3 This is a schematic diagram of a model training process based on instruction fine-tuning provided by an embodiment of the present invention.

[0020] Figure 4 The present invention is a schematic diagram of a device for answering questions about electric power business problems according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.

[0023] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.

[0024] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0025] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.

[0026] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).

[0027] In the description of the embodiments of the present application, unless otherwise expressly specified or limited, technical terms such as "installed," "connected," "connected," and "fixed" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integration; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; internal connections between two components or interactions between two components. Those skilled in the art can understand the specific meanings of the above terms in the embodiments of the present application based on specific circumstances.

[0028] See also Figure 1 In order to solve the problem that the existing large language model in the practical application of the power vertical field, which requires extremely high knowledge accuracy and professionalism, lacks the support of power patent knowledge and has a serious hallucination phenomenon, resulting in inaccurate power problem answering results. An embodiment of the present invention provides a method for answering power business questions, including: Step S101: obtaining a user's electricity business problem, and constructing a model input prompt based on the user's electricity business problem; Specifically, the above-mentioned user power business problems are raised by users and are classic modeling problems in the power field, such as power grid planning, scheduling optimization, and load forecasting. The above-mentioned model input prompts include user power business problems and corresponding prompt words.

[0029] Step S102: inputting the model input prompt into a preset power business problem solving model to obtain a solution to the user's power business problem; Specifically, the above-mentioned preset power business question answering model is a Qwen3 model built based on a large language model.

[0030] The training of the above-mentioned preset power business problem-solving model includes: Obtain several academic documents on the power business, perform vector conversion and question construction on the above academic documents on the power business, and obtain several text vectors and several power business question embedding vectors; Specifically, the aforementioned academic documents on the power industry were obtained through a multi-source, heterogeneous authoritative platform, including the IEEE / IET academic database, the China Institute of Electrical Engineering journal library, the CNKI master's and doctoral dissertation library, and the State Grid technical report system. Literature screening was conducted using a strategy combining subject retrieval and content recommendation. The literature covers 18 classic power industry decision-making problems, including photovoltaic capacity, power system state estimation, load forecasting, power grid economic dispatch, power system flow calculation, power system reliability assessment, power system unit commitment, reactive power optimization, power system stability analysis, power grid planning, demand response optimization, distribution network reconfiguration, distributed generation access planning, power system frequency control, power market trading, power system harmonic analysis, black start, and energy storage system optimal configuration. The resulting academic documents on the power industry were compiled from a collection of e-books, academic journal articles, dissertations, and industry technical standards. Each document focuses on one or more target power industry decision-making problems and their modeling solutions, ensuring the high relevance, authority, and breadth of the collected data. The data sources balance cutting-edge theory with practical engineering applications, covering areas such as classic power system analysis, renewable energy integration, and smart grid control, ensuring the disciplinary integrity and decision-making support value of the original datasets. These data represent the core aspects of power system operation, planning, and control, and are highly complex and specialized.

[0031] For each power business question, calculate the similarity between the power business question embedding vector corresponding to the power business question and each text vector, and retain the top K text vectors with the largest similarity as the corresponding reference text vectors; where K is a positive integer; Specifically, the above similarity is specifically cosine similarity. First, the power business problem is processed through a pre-trained semantic encoder (such as BGE-M3) to convert it into a high-dimensional dense embedding vector (that is, the above power business problem embedding vector). This process is to perform deep semantic representation of the power business problem, abstract its core intention, and be robust to surface changes in vocabulary (such as synonyms and antonyms). Subsequently, the cosine similarity is calculated in the pre-constructed power business vector knowledge base (that is, the power business vector knowledge base composed of all the above text vectors). After calculating the cosine similarity of each text vector, the K text vectors with the largest similarity are retained as reference text vectors. Where K is an adjustable positive integer. Schematically, K can be 3, that is, the top 3 text vectors with the largest similarity are retained. The above similarity is calculated by the following formula: Where, Indicates similarity, Represents the embedding vector of the power business problem, , represents a text vector, .

[0032] Preferably, when calculating the similarity, K-means clustering can be used to first divide all text vectors into semantically related cluster partitions, and an inverted list mapping can be constructed; then, the potential related partitions can be quickly locked through coarse-grained cluster center screening, and then fine-grained cosine similarity calculations can be performed in the local space. Schematically, a nearest neighbor search algorithm is used during retrieval, that is, by calculating the cosine similarity or Euclidean distance between the power business problem to be queried and all cluster centers, the nearest cluster center is taken and the search range is narrowed to the cluster, and then a deep search is performed in the cluster, and the distance between the power business problem and each point in the cluster is calculated, and the K nearest distance points are taken as the query result and as the corresponding reference text vector. This index design provides real-time and accurate knowledge acquisition capabilities, supports large language models to generate decision recommendations with domain credibility, and is an important technical basis for the efficient transformation of general large models into the power vertical field.

[0033] The electric power business question answering model to be trained is trained based on the above-mentioned reference text vector and the corresponding electric power business question embedding vector to obtain the above-mentioned preset electric power business question answering model.

[0034] Specifically, traditional information retrieval methods are represented by sparse retrieval, such as the BM25 algorithm based on keyword matching, which calculates text relevance by counting word frequency and document frequency. Specifically, the query question and document are first segmented using a word segmenter. Then, for a given query question, a sparse retrieval score is calculated, and finally, the corresponding retrieval results are determined based on the sparse retrieval score. The calculation process of the sparse retrieval score is as follows: Where, represents the sparse retrieval score, n represents the total number of documents, Expressive words The inverse document frequency is used to measure the rarity of a word. Indicates the word containing The number of documents, Expressive words In the documentation The frequency of occurrence in and represents the adjustment parameter, The value range is between 1.2 and 2. The value range is around 0.75. Represents a document The document length, Indicates the evaluation length of the document collection.

[0035] Specifically, when using the RAG system to make power business decisions, the RAG system will enhance the model's understanding of the query problem based on the retrieved context. Schematically, the RAG power business decision-making flow chart is as follows: Figure 2 As shown, Figure 2 The process of using sparse retrieval and dense retrieval to generate reference text vectors and generating solutions to corresponding power business problems based on the reference text vectors is shown in the figure.

[0036] Preferably, although the above-mentioned sparse retrieval has high execution efficiency and strong interpretability, it is often unable to cope with the complex and abstract semantic expressions in the power business, and it is difficult to cope with natural language variants such as synonyms, general meanings, and multiple rounds of expressions. In contrast, dense retrieval has stronger semantic understanding capabilities. Its core goal is to efficiently and accurately map the user's query questions expressed in natural language to the most semantically relevant knowledge fragments in the pre-built power business vector knowledge base, and the obtained reference text vectors constitute the core professional knowledge support, which serves as the basis for the subsequent generation of preset power business problem-solving models. Through the dense semantic retrieval mechanism, the framework can accurately understand power business problems and extract effective information from massive professional knowledge.

[0037] In a preferred embodiment, the above-mentioned electric power business academic document is subjected to vector conversion and question construction to obtain a number of text vectors and a number of electric power business question embedding vectors, including: Divide all the above-mentioned power business academic documents to obtain several text blocks; convert all the above-mentioned text blocks into vectors to obtain several text vectors; Input the above text block and the preset question extraction prompt words into the preset large language model to generate several power business questions; Specifically, in order to guide the preset large language model to generate questions that meet the professional standards of the power industry, the present invention adopts prompt word engineering and carefully designs the output template prompt words (that is, the preset question extraction prompt words mentioned above). The template prompt words clearly define that the questions must revolve around the core content of the technical document, avoid universality issues, and force the question description to not contain long paragraphs of formula symbols, and not add any additional text. At the same time, different expressions are used to ask questions, and the questioning methods are more diversified and presented in a specific format. The text block is used as the context input for generating the question, and then combined with the preset question extraction prompt words and the preset large language model, a number of power business questions are finally obtained, and it can be ensured that the generated question set presents significant power field characteristics. Among them, the specific form and content of the preset question extraction prompt words are as follows: Please carefully study the following document and, based on its contents, raise 20 different questions regarding the power sector. The requirements are as follows: 1. The question should be consistent with the content of the copy, preferably a modeling question in the power field.

[0038] 2. The problem description needs to be detailed and precise (note: it must be able to stand alone and not rely on contextual information in the copy), and the expression should be as concise as possible.

[0039] 3. Do not use long paragraphs of formula symbols in the problem description.

[0040] 4. Generate a problem description directly without adding any additional text.

[0041] 5. Use different ways of expression to ask questions, making the questioning more diverse.

[0042] 6. Arrange the generated questions in sequence and let each question occupy a separate line to clearly present each question.

[0043] All power business problems are encoded to obtain several power business problem embedding vectors.

[0044] In this preferred embodiment, a number of text vectors and a number of power business question embedding vectors are obtained by performing vector conversion and question construction on power business academic documents.

[0045] In another preferred embodiment, all the above-mentioned power business academic documents are divided to obtain several text blocks, including: Convert all the above-mentioned power business academic documents into different formats to generate several initial Markdown documents; Specifically, the initial access to academic documents related to the power industry is typically in PDF format. While universal, this format is not conducive to accurate content parsing, structural processing, and subsequent vector embedding. In particular, power industry literature contains vast amounts of complex mathematical formulas, special symbols, charts, and structured text (such as chapters and lists), which places extremely high demands on the accuracy of format conversion tools.

[0046] Specifically, to overcome the above problems, it is necessary to systematically evaluate and select the current mainstream PDF conversion tools. The core dimensions of the evaluation include: mathematical formula parsing accuracy (the core of the power model, such as objective functions and constraint equations, is highly dependent on precise mathematical expressions), text and structural fidelity (it is crucial to retain the original text's chapter structure, lists, emphasis and other semantic information), chart and link processing capabilities (some charts and reference links contain important information), processing efficiency and cost (need to meet the actual needs of large-scale document processing).

[0047] Preferably, based on the above evaluation, and taking full account of the balance between cost, efficiency and accuracy, the present invention innovatively proposes a strategy for format conversion using the Doubao web version and MinerU software in a collaborative and complementary manner. First, all electric power business academic documents are batch converted using MinerU software to generate initial Markdown documents, which are quickly processed and retain the overall structure. Then, for key documents (especially journal articles and important chapters) containing core mathematical models (such as optimization problem statements and power flow equations), as well as documents with obvious problems in the formulas after MinerU conversion, Doubao web version is used for manually assisted refined conversion to ensure high fidelity of core formulas and key texts. Through this rigorous process, the original PDF document can be converted into a unified Markdown format with high fidelity and structure, providing standardized and computable basic data for subsequent data cleaning and knowledge extraction.

[0048] Perform data cleaning on all initial Markdown documents to generate target Markdown documents; Specifically, while the initial Markdown document after conversion has a clear structure, it still contains a large amount of noise information that is irrelevant to model generation, redundant, or even erroneous. This information not only increases the computational burden of subsequent processing but also potentially interferes with retrieval accuracy and model generation quality. Therefore, implementing systematic document cleaning is crucial.

[0049] Specifically, the core principles of cleaning are: retaining the core knowledge elements that support the generation of the preset power business problem-solving model, removing all unnecessary auxiliary, descriptive, or decorative content, and correcting erroneous content information. This invention identifies and specifically cleans the following major noise types: (a) Citations: These typically occupy a significant portion of the paper. Their core value lies in providing theoretical support rather than providing specific knowledge about the model itself. During model generation, the citation list itself typically does not contain information that can be directly used for modeling or solving problems. (b) Author information and personal profile: These are subsidiary attribute information and have nothing to do with the model content; (c) Journal / conference information: such as volume and issue number, page number, publisher, etc., which belongs to the category of metadata and does not affect the model knowledge itself; (d) Acknowledgements: Expressive content, without substantial intellectual value; (e) Headers and footers: usually contain repetitive or decorative elements such as page numbers, journal titles, and chapter titles.

[0050] In addition, the present invention further verifies and corrects the erroneous content of the initial Markdown document manually, including checking whether the problem scenario description is clear, whether the mathematical model (decision variables / objective function / constraint equation) is accurately expressed, whether the key parameter definitions are complete, whether the key points of the solution method are clear, verifying and correcting errors in the formula symbols, completing the range description of key parameters, and unifying the professional terminology of the power field business. After the above rigorous cleaning process, the total amount of documents is the same as the initial one, but the information density of each document is significantly improved, redundant information is greatly reduced, and the content is highly focused on the core professional knowledge that supports the generation of the preset power business problem-solving model, which significantly improves the subsequent retrieval efficiency.

[0051] For each target Markdown document, semantic segmentation is performed to obtain several text blocks.

[0052] Specifically, when performing semantic segmentation, it is necessary to ensure that the resulting text blocks are semantically coherent and that key knowledge units (such as complete mathematical models) are not fragmented. Therefore, the present invention adopts a segmentation strategy based on adaptive multi-granularity segmentation, taking into account both data source characteristics and content structure. For longer power business academic documents (average length greater than 50 pages), such as master's and doctoral dissertations and e-books, logical segmentation is prioritized based on the target Markdown document's chapter heading structure (such as # and ## level headings), ensuring the complete preservation of the problem definition, objective function, and constraints. For shorter documents such as journal articles, conference reports, and other data sources, segmentation is performed using a fixed maximum word count threshold (e.g., a threshold of 5000). If the content of a single document does not exceed the threshold, the entire document is retained. If it does, the document is segmented according to paragraph boundaries to avoid truncation of mathematical formulas or key reasoning steps. In this way, all power business academic documents are adaptively segmented to generate several text blocks, with an average block length of 800–4500 words, effectively balancing information density and readability.

[0053] In this preferred embodiment, several text blocks are obtained by dividing all electric power business academic documents.

[0054] In another preferred embodiment, all the above text blocks are converted into vectors to obtain several text vectors, including: For each text block, split the text block into a number of subword unit sequences; According to the preset encoder, the above sub-word unit sequence is mapped into a text vector to obtain several text vectors.

[0055] Specifically, to further transform text blocks into computable semantic vectors, dense vector embedding technology is used for vector conversion. This paper uses the BGE-M3 embedding model released by the Beijing Zhiyuan Research Institute. This model is compatible with mixed Chinese and English power professional texts, and accurately models the associations between technical terms through a pre-trained deep Transformer architecture. When calculating the text block vector embedding, the text block is split into a sequence of subword units, which are then mapped to a 1024-dimensional normalized vector using the BGE-M3 encoder to ensure the stability of subsequent similarity calculations.

[0056] In this preferred embodiment, a number of text vectors are obtained by performing vector conversion on all text blocks.

[0057] In another preferred embodiment, the power business question answering model to be trained is trained based on the reference text vector and the corresponding power business question embedding vector to obtain the preset power business question answering model, including: The text block corresponding to the above reference text vector is used as the reference text; Input the reference text, the power business problem corresponding to the reference text, and the preset decision modeling prompt words into the preset large language model to generate a reference solution; Specifically, to guide the pre-set large language model to generate answers that meet the standards of the power industry, we use prompt word engineering to carefully design decision modeling prompt words. This pre-set decision modeling prompt word explicitly requires the model to accurately grasp the problem requirements, problem context, and underlying intentions, ensuring the content is complete, accurate, and logically coherent. At the same time, it also rationally selects details and avoids redundancy, ensuring the professional accuracy and engineering practicality of the generated content. The output content must ensure that the text format is clear and easy to read, allowing for direct reference and application. It must also provide operational solutions. The specific format and content are as follows: Please carefully study the references I have provided and answer the questions I will ask based on them. Specific requirements are as follows: 1. Accurately grasp the problem requirements and background, and fully understand the underlying intentions; summarize key points in detail, ensuring that the content is complete, accurate, and logically clear, while avoiding redundancy; use professional terminology and precise expressions, eliminating vague or colloquial language, ensuring rigor and professionalism to meet the needs of professional readers.

[0058] 2. The output content must not contain any XML tags to ensure that the text format is clear and easy to read for direct reference and application.

[0059] 3. Solutions must be actionable, focusing on practical issues and avoiding empty theories. We encourage interdisciplinary thinking, integrating cutting-edge technologies, advanced theories, and innovative methods to enhance the practicality and value of our answers.

[0060] 4. For complex problems, appropriate assumptions, simplified processing methods, and model applicability are added to help readers better understand and apply the model.

[0061] 5. Add detailed comments in the pseudocode section to explain the operation and purpose of each step to help readers understand the implementation process and principles.

[0062] 6. At the end of the answer, briefly summarize the advantages and disadvantages of the model to help users choose and use the model. At the same time, the overall output format includes the problem description, the modeling objective function, the modeling constraints, a list of variables involved in the modeling process, pseudo code for implementing the model, and the advantages and disadvantages of the model. The specific requirements are as follows: Answer each question according to the following format, output in Markdown format, and use LaTeX format for formulas to ensure standard formatting and clear content.

[0063] 1. Problem description: Use scientific and concise language to accurately describe the problem, clarify the core points and research objects, and explain it in combination with actual application scenarios when necessary.

[0064] 2. Modeling objective function: Use latex format to list the objective function, clarify the mathematical expression and its physical meaning or optimization goal (such as minimizing error, maximizing profit, etc.).

[0065] 3. Modeling constraints: List all relevant constraints, including equality constraints, inequality constraints, variable value ranges, etc., and explain the meaning and function of each constraint to ensure the completeness and accuracy of the constraints.

[0066] 4. List of variables involved in the modeling process: Provide a detailed list of variables involved, including information such as variable name, symbol, physical meaning, unit (if any) and value range, to facilitate understanding of the variables in the model and their functions.

[0067] 5. Pseudocode for implementing the model: Write clear and standardized pseudocode that includes the main algorithm steps, data structures, process control, solvers, etc. Ensure that the pseudocode is readable and implementable, and can solve actual problems based on the given solver, making it easy to convert into actual code.

[0068] 6. Briefly summarize the advantages and disadvantages of the model. The electric power business problem answering model is trained according to the above reference answering scheme and the corresponding electric power business problem to obtain the above preset electric power business problem answering model.

[0069] In this preferred embodiment, a corresponding reference solution is generated based on the reference text corresponding to the reference text vector, and then the reference solution is used with the corresponding power business problem for model training to obtain a preset power business problem solving model.

[0070] In another preferred embodiment, the power business problem answering model is trained according to the reference answering solution and the corresponding power business problem to obtain the preset power business problem answering model, including: According to the power business problem corresponding to the reference solution, construct the input prompt of the power business problem solution model; Inputting the above input prompts and the above reference solution into the electric power business problem-solving model to be trained for iterative training until the loss function converges, thereby generating the above preset electric power business problem-solving model; Among them, during each iterative training, the current prediction solution is generated according to the current input prompt; based on the current prediction solution and the corresponding reference solution, the current loss function is calculated, and it is judged whether the current loss function converges; if the current loss function converges, the current power business problem solving model is used as the above-mentioned preset power business problem solving model; otherwise, after adjusting the parameters in the current power business problem solving model, training continues.

[0071] Specifically, the model training process utilizes instruction fine-tuning. By designing a specific instruction dataset, the model undergoes supervised fine-tuning training, enabling it to complete specific tasks according to given instructions. Its core goal is to transform the generalization capabilities of large, general language models into specialized capabilities for specific domains, addressing the mismatch between general models and the needs of specific domains in terms of domain knowledge, task format, and language style. Instruction data is the foundation of instruction fine-tuning, and its quality and design rationality directly impact the effectiveness of fine-tuning.

[0072] Specifically, instruction data typically consists of two parts: an input prompt and an output answer (i.e., the reference solution mentioned above). The input prompt describes the specific task objective, while the output answer represents the correct result that the model should generate. When fine-tuning the model with instructions, the loss function is calculated as follows: Where, represents the loss function, N represents the total number of reference solutions, B represents the batch size, Indicates the Input prompts, Indicates the The predicted solution corresponding to the input prompt, The power business question answering model is based on input prompts The probability of generating the corresponding reference solution.

[0073] Schematic diagram of the model training process based on instruction fine-tuning is as follows Figure 3 As shown, Figure 3 The “LLM” in the figure represents a large language model, which in the embodiment of the present invention refers to a pre-trained basic large language model that participates in the fine-tuning training process after some layers are frozen.

[0074] Preferably, supervised fine-tuning of the model is performed using a carefully constructed dataset of power sector instruction question-answer pairs (i.e., a dataset containing input prompts and corresponding reference solutions). The core goal of this process is to deeply internalize power sector expertise into the model parameters and guide its outputs to precisely align with professional standards. On the one hand, this process effectively infuses power sector expertise. While general-purpose large language models possess broad general knowledge, they often lack understanding of the core concepts, complex equipment parameters, rigorous technical specifications, and safety boundaries unique to power systems. Supervised fine-tuning utilizes a gradient descent mechanism to continuously optimize model parameters using precisely matched instruction-answer pairs, forcing the model to learn and internalize this highly structured domain knowledge. On the other hand, this process significantly suppresses model hallucinations. During the fine-tuning phase, the model is strictly guided to learn the single, or optimal, correct answer to a specific power sector question. This fact-based, strongly constrained learning paradigm greatly reduces the possibility of the model relying on irrelevant patterns or general corpus for free assumptions, prompting it to remain cautious or cite known norms when knowledge boundaries are blurred, rather than generating content that lacks factual basis and is specious, thereby fundamentally alleviating the hallucinatory output for professional scenarios.

[0075] Preferably, after the power business question-solving model is trained, a quantitative evaluation can be performed to measure the improvement of the model training scheme of the present invention over the general large language model. Simultaneously, the DC of the aforementioned dense search is also evaluated. In the numerical experiments of the present invention, Qwen-Plus is used as the external referee large language model, and BGE-M3 is used as the external text embedding model.

[0076] Specifically, the evaluation datasets used for quantitative evaluation are divided into real datasets and synthetic datasets, both in JSON file format. The quantitative evaluation of the SFT system (i.e., the supervised fine-tuning component of this invention) uses real datasets and synthetic datasets, while the quantitative evaluation of the RAG system (i.e., the dense search component of this invention) uses real datasets.

[0077] Specifically, regarding the construction of the real data set, the present invention starts from the problem perspective and performs pre-processing such as format conversion and data cleaning on the 18 questions contained in the external knowledge base of the RAG system. The decision modeling solution for each question is obtained by cleaning and transforming official data sources such as the book "Economic Operation Theory of Power System" and master's and doctoral journal papers, and serves as the standard answer for the corresponding question. In addition, for each question, the present invention obtains the context of the corresponding question from dense retrieval. The large language model enhances the understanding of the power business problem based on the context, and outputs the final decision modeling solution as the model output of the problem. The real data set contains 18 dictionary data, each of which corresponds to an power business problem and contains four fields: query question, context, model output, and standard answer. The quantitative evaluation of the RAG system uses all fields, while the quantitative evaluation of the SFT only uses the query question and standard answer fields. The model output field is regenerated and used by the Qwen3 series model before or after supervised fine-tuning.

[0078] Specifically, the construction of the synthetic dataset is similar to that of the real dataset, consisting of three fields: query questions, standard answers, and model outputs. The difference lies in the query questions. The questions in the real dataset are derived from 18 power business questions collected from the original RAG system knowledge base data. The number of questions in the synthetic dataset is x, randomly selected from these power business questions. The standard answers in the synthetic dataset are generated by DeepSeek V3 using dense search.

[0079] Specifically, retrieval quality is measured in three key areas: the relevance of the context to the query, the relevance of the context to the ground truth, and the relevance of the context to the model output. The main metric for measuring the relevance of context to the query is Context Relevance (CR). Low relevance indicates that the retriever has introduced noise irrelevant to the query. The main metrics for measuring the relevance of context to the ground truth include LLM Context Recall (LCR) and Context Precision (CP). LCR measures whether the retrieved text contains all the information required to generate the ground truth answer. Low recall means that the retriever has omitted key information. CP measures whether the retrieved text is semantically and accurately related to the ground truth answer. Low precision indicates that the retrieved context is poorly semantically related to the ground truth answer, meaning that the context lacks valid information. Metrics for measuring the relevance of context to the model output include Faithfulness (FF) and Factual Correctness (FC). These metrics assess whether the answer generated by the model is based on the retrieved text and whether any fabricated information exacerbates the illusion. Generation quality is primarily measured by the relevance of the model output to the query and the relevance of the model output to the ground truth answer. To determine the relevance of the model output to the query, use the Answer Relevancy (AR) metric to determine whether the answer directly addresses the question and is not irrelevant. To determine the relevance of the model output to the true answer, use the Answer Correctness (AC) and Answer Similarity (AS) metrics to assess the accuracy of the model's answer and its relevance to the standard answer.

[0080] Specifically, in order to measure the improvement of model capabilities after supervised training of the model using instruction fine-tuning, the present invention considers six quantitative indicators: BLEU (Bilingual Evaluation Understudy), METEOR (Metric for Evaluation of Translation with Explicit Ordering), BERT Score, Embedding Score, and F1 Score.

[0081] BLEU was first used in machine translation tasks to evaluate the generation quality of large language models by the n-gram overlap rate between generated text and reference text. The "generated text" in this invention is the model output, and the "reference text" is the standard answer. The calculation formula of the BLEU indicator is shown as follows: Where, express The value of the indicator, It is expressed as a length normalization factor. In order to prevent short texts from having high scores, A represents the length of the phrase. Indicates n-gram accuracy, that is, the accuracy of phrase matching of length a. Represents the weight factor of the a-th phrase.

[0082] Among them, METEOR introduces synonym matching and word order alignment based on BLEU, and and recall Measuring single-word matching and improving semantic sensitivity. The calculation formula is as follows: Where, represents the adjusted mean of precision and recall, represents the harmonic parameter, represents the accuracy, represents the recall rate, express The value of the indicator, Indicates the matching fluency penalty factor.

[0083] BERT Score uses the BERT model to embed word-by-word text between the generated text and the reference text, and calculates word-level text similarity to assess the semantic consistency between the generated text and the reference text. The calculation process is shown in the following formula: Where, Indicates the cosine similarity between the generated text and the reference text. Indicates the cosine similarity between the reference text and the generated text. Indicates the The embedding vector of the generated text, Indicates the embedding vectors of reference texts, Indicates the total length of the generated text, Indicates the total length of the reference text, Indicates the value of the BERT Score indicator.

[0084] Among them, EmbScore converts the generated text and reference text into one-dimensional vectors of fixed dimension size through word embedding models (such as Word2Vec, GloVe and FastText), and then calculates the cosine similarity between the two one-dimensional vectors: Where, Indicates the value of the EmbScore indicator.

[0085] Among them, F1 Score is very common in classification tasks. It is the harmonic mean of precision and recall and is used to measure model performance. It can be seen that F1 Score is essentially a special case of precision and recall when the harmonic parameter is 1. Its calculation process is shown in the following formula: Where, Indicates the value of the F1 Score indicator.

[0086] Specifically, the present invention quantitatively evaluated the generation capabilities of DeepSeek V3 671B before and after accessing the RAG system, as well as the retrieval capabilities of the RAG system, through online API calls. Specifically, when quantitatively evaluating the decision modeling capabilities of DeepSeek V3671B, the present invention sets the context to empty, so that the model output relies entirely on its own parameterized knowledge. Regarding the evaluation of DeepSeek accessing the RAG system, the present invention considers two retrieval methods, sparse and dense. Different retrieval methods will retrieve different contexts, so the output of the final model will also be different. The experimental results are shown in Table 1 below: Table 1 Quantitative evaluation experimental results of RAG on real datasets As can be seen from the table above, after accessing the RAG system, whether sparse or hybrid retrieval is used, there is a significant improvement in the three generation quality indicators of AR, AC, and AS. In addition, the dense retrieval adopted by the present invention is significantly ahead of sparse retrieval in most retrieval indicators (LCR, CP, FC), is on par with the CR indicator, and lags behind only in the FF indicator. It seems that the context obtained by dense retrieval is of higher quality and more relevant to the query question and the standard answer. Considering that the RAG system will enhance the model's understanding of the query question based on the retrieved context, because the model output corresponding to the dense retrieval method is of higher quality, it performs better in the two indicators of AC and AS.

[0087] Schematically, the present invention performs supervised fine-tuning on Qwen3 models of different sizes (0.6B, 1.7B, 4B, and 8B) based on the reference text vector and the corresponding power business question embedding vector. Quantitative evaluation experiments are conducted using real and synthetic datasets before and after supervised fine-tuning. The evaluation results are shown in Tables 2 and 3 below: Table 2 Quantitative evaluation experimental results of SFT on real datasets Table 3 Quantitative evaluation experimental results of SFT on synthetic datasets Specifically, it is not difficult to see that for Qwen3 series models of different sizes, the models after supervised fine-tuning have improved in all quantitative indicators (BLEU, METEOR, BERT Score, Emb Score, F1 Score). This shows that supervised fine-tuning technology can effectively improve the large language model's ability to understand power business problems and its decision-making modeling capabilities in multiple power business scenarios. It achieves efficient distillation from external power domain knowledge bases to model parameters, enabling the model to have considerable power business decision-making modeling capabilities without relying on the RAG system. In addition, supervised fine-tuning frees the model from RAG's lengthy retrieval-enhanced generation framework, effectively solving the problem of low inference efficiency.

[0088] In this preferred embodiment, the electric power business problem answering model is trained according to the reference answering solution and the corresponding electric power business problem to obtain a preset electric power business problem answering model.

[0089] Based on the above method embodiments, the present invention provides corresponding device embodiments.

[0090] like Figure 4 As shown, an embodiment of the present invention provides a device for answering questions about electric power business, including: Input prompt building module and solution output module: The input prompt building module is used to obtain the user's power business problem and construct a model input prompt based on the user's power business problem; The above-mentioned solution output module is used to input the above-mentioned model input prompt into the preset power business problem solving model to obtain the solution to the above-mentioned user power business problem; wherein, the training of the above-mentioned preset power business problem solving model includes: obtaining a number of power business academic documents, and performing vector conversion and problem construction on the above-mentioned power business academic documents to obtain a number of text vectors and a number of power business problem embedding vectors; for each power business problem, calculating the similarity between the power business problem embedding vector corresponding to the above-mentioned power business problem and each text vector, and retaining the top K text vectors with the largest similarity as the corresponding reference text vectors; wherein K is a positive integer; according to the above-mentioned reference text vectors and the corresponding power business problem embedding vectors, the power business problem solving model to be trained is trained to obtain the above-mentioned preset power business problem solving model.

[0091] In another preferred embodiment, the solution output module includes: Text vector construction unit, power business question generation unit and question encoding unit; The text vector construction unit is used to divide all the above-mentioned power business academic documents into a number of text blocks; and perform vector conversion on all the above-mentioned text blocks to obtain a number of text vectors; The power business question generating unit is configured to input the text block and preset question extraction prompt words into a preset large language model to generate a number of power business questions; The above-mentioned question encoding unit is used to encode all power business questions to obtain a number of power business question embedding vectors.

[0092] It should be noted that the device embodiment described above is merely illustrative, wherein the modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiment provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement it without paying any creative work. The above schematic diagram is only an example of a device for solving problems in electric power business, and does not constitute a limitation on a device for solving problems in electric power business, and may include more or fewer components than shown in the figure, or a combination of certain components, or different components.

[0093] Based on the above method embodiment, the present invention provides a corresponding terminal device embodiment.

[0094] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the method for answering power business problems described in any embodiment of the present invention.

[0095] For example, in this embodiment, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the device. The terminal device may be a computing device such as a desktop computer, a notebook computer, a PDA, or a cloud server. The device may include, but is not limited to, a processor and a memory; The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The processor is the control center of the device, connecting the various parts of the device using various interfaces and lines. The memory can be used to store the computer programs and / or modules. The processor implements the various functions of the device by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; in addition, the memory can include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0096] Based on the above method embodiment, the present invention provides a corresponding storage medium embodiment.

[0097] Another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the above-mentioned method for solving power business problems in any embodiment of the present invention.

[0098] In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in source code form, object code form, an executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium.

[0099] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for solving power business problems, characterized in that: include: Obtaining a user's electricity business problem, and constructing a model input prompt based on the user's electricity business problem; Inputting the model input prompt into a preset power business problem solving model to obtain a solution to the user's power business problem; The training of the preset power business problem-solving model includes: Obtaining a number of electric power business academic documents, and performing vector conversion and question construction on the electric power business academic documents to obtain a number of text vectors and a number of electric power business question embedding vectors; For each power business question, calculate the similarity between the power business question embedding vector corresponding to the power business question and each text vector, and retain the top K text vectors with the largest similarity as the corresponding reference text vectors; where K is a positive integer; The electric power business question answering model to be trained is trained according to the reference text vector and the corresponding electric power business question embedding vector to obtain the preset electric power business question answering model.

2. A method for solving power business problems according to claim 1, characterized in that: The electric power business academic document is subjected to vector conversion and question construction to obtain a number of text vectors and a number of electric power business question embedding vectors, including: Dividing all the electric power business academic documents to obtain a number of text blocks; performing vector conversion on all the text blocks to obtain a number of text vectors; Inputting the text block and preset question extraction prompt words into a preset large language model to generate a number of power business questions; All power business problems are encoded to obtain several power business problem embedding vectors.

3. A method for solving power business problems according to claim 2, characterized in that: The above-mentioned electric power business academic documents are divided into several text blocks, including: Convert all the aforementioned power business academic documents into different formats to generate several initial Markdown documents; Perform data cleaning on all initial Markdown documents to generate target Markdown documents; For each target Markdown document, semantic segmentation is performed to obtain several text blocks.

4. A method for solving power business problems according to claim 3, characterized in that: The vector conversion is performed on all the text blocks to obtain a number of text vectors, including: For each text block, split the text block into a plurality of subword unit sequences; According to a preset encoder, the sub-word unit sequence is mapped into a text vector to obtain a plurality of text vectors.

5. A method for solving power business problems according to claim 4, characterized in that: The step of training the electric power business question answering model to be trained based on the reference text vector and the corresponding electric power business question embedding vector to obtain the preset electric power business question answering model includes: Using the text block corresponding to the reference text vector as the reference text; Inputting the reference text, the electric power business problem corresponding to the reference text, and the preset decision modeling prompt words into the preset large language model to generate a reference solution; The electric power business problem answering model is trained according to the reference answering solution and the corresponding electric power business problem to obtain the preset electric power business problem answering model.

6. A method for solving power business problems according to claim 5, characterized in that: The step of training the electric power business problem answering model according to the reference answering solution and the corresponding electric power business problem to obtain the preset electric power business problem answering model includes: Constructing an input prompt for the power business problem-solving model according to the power business problem corresponding to the reference solution; Inputting the input prompt and the reference solution into the electric power business problem solving model to be trained for iterative training until the loss function converges, thereby generating the preset electric power business problem solving model; Among them, during each iterative training, the current prediction solution is generated according to the current input prompt; based on the current prediction solution and the corresponding reference solution, the current loss function is calculated, and it is judged whether the current loss function converges; if the current loss function converges, the current power business problem solving model is used as the preset power business problem solving model; otherwise, after adjusting the parameters in the current power business problem solving model, training continues.

7. A device for answering questions about electric power business, characterized in that: include: Input prompt building module and solution output module: The input prompt construction module is used to obtain the user's power business problem and construct a model input prompt based on the user's power business problem; The solution output module is used to input the model input prompt into a preset power business problem solving model to obtain a solution to the user's power business problem; wherein, the training of the preset power business problem solving model includes: obtaining a number of power business academic documents, and performing vector conversion and problem construction on the power business academic documents to obtain a number of text vectors and a number of power business problem embedding vectors; for each power business problem, calculating the similarity between the power business problem embedding vector corresponding to the power business problem and each text vector, and retaining the top K text vectors with the largest similarity as corresponding reference text vectors; wherein K is a positive integer; based on the reference text vector and the corresponding power business problem embedding vector, the power business problem solving model to be trained is trained to obtain the preset power business problem solving model.

8. The device for answering questions about electric power business according to claim 7, characterized in that: The solution output module includes: Text vector construction unit, power business question generation unit and question encoding unit; The text vector construction unit is used to divide all the electric power business academic documents to obtain a number of text blocks; and perform vector conversion on all the text blocks to obtain a number of text vectors; The power business question generating unit is configured to input the text block and preset question extraction prompt words into a preset large language model to generate a plurality of power business questions; The question encoding unit is used to encode all power business questions to obtain a number of power business question embedding vectors.

9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for solving power business problems according to any one of claims 1 to 6 is implemented.

10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is executed, the device where the storage medium is located is controlled to execute the method for solving power business problems according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Vector knowledge base-based large-model question-answer dialogue method and system and storage medium

    CN118484526A

  • Power document intelligent question and answer method and system based on large language model

    CN119577082A

  • Information interpretation method and device, equipment, storage medium and program product

    CN119719270A

  • Method and device for constructing warehouse management intelligent customer service based on local LLM

    CN119884326A

  • Text generation method and apparatus, storage medium, computer device, and program product

    US20250181837A1

Cited By

  • Power dispatching method and system based on vertical large language model

    CN122047555A