A power service problem solving method and device, a terminal device, and a storage medium
By performing vector transformation and dense retrieval on academic documents related to the power industry, a problem-solving model for power business issues was trained. This solved the problem of inaccurate results from large language models in the power field, and improved both professionalism and accuracy.
Patent Information
- Application Number
- CN202511196325.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-08-26
AI Technical Summary
The lack of power patent knowledge support in the power vertical field of large language models leads to serious illusion phenomena and inaccurate solutions.
By acquiring academic documents related to the power industry, performing vector transformation and question construction, text vectors and power industry question embedding vectors are generated. Dense retrieval is used to retain the reference text vectors with the highest similarity, and a power industry question-solving model is trained. Combined with dense semantic retrieval and instruction fine-tuning, the professionalism and accuracy of the model output are ensured.
It improves the professionalism and accuracy of the problem-solving model for power business, reduces illusions, and meets the knowledge needs of the power sector.
Smart Images

Figure CN120705283B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of large language model, and particularly relates to a power business problem solving method and device, a terminal equipment and a storage medium. BACKGROUND
[0002] The current dispatching operation, equipment operation and maintenance and market transaction of the power system highly depend on the structured rule base and expert experience model constructed by artificial, which usually exists in the form of mathematical programming or expert system. The construction process faces a significant knowledge representation gap: it is difficult to efficiently convert the massive unstructured industry specifications and expert experience into machine executable logic, and the dynamic environment of the power grid requires the rule model to have real-time optimization capability. The traditional manual coding method has a long update cycle (several weeks to several months), which cannot meet the agile decision-making demand.
[0003] Therefore, the intelligent technology path with large language model and deep learning as the core is usually used to determine the scheme of power business problem decision in the prior art. However, the large language model lacks the support of power patent knowledge in actual application, especially in the power vertical field with extremely high requirements for knowledge accuracy and professionalism, so the hallucination phenomenon (referring to the generation of seemingly reasonable but actually incorrect or fabricated information) is more serious, and the problem of inaccurate power problem solving result exists. SUMMARY
[0004] The present application provides a power business problem solving method, device, terminal equipment and storage medium, which can solve the problem that the large language model in the prior art lacks the support of power patent knowledge in actual application in the power vertical field with extremely high requirements for knowledge accuracy and professionalism, the hallucination phenomenon is more serious, and the generated power problem solving result is inaccurate.
[0005] An embodiment of the present application provides a power business problem solving method, comprising:
[0006] Obtaining a user power business problem, and constructing a model input prompt according to the user power business problem;
[0007] Inputting the model input prompt into a preset power business problem solving model to obtain a solution scheme of the user power business problem;
[0008] The training of the preset power business problem solving model comprises:
[0009] Obtaining a plurality of power business academic documents, and performing vector conversion and problem construction on the power business academic documents to obtain a plurality of text vectors and a plurality of power business problem embedding vectors;
[0010] For each power service problem, the similarity between the power service problem embedding vector corresponding to the power service problem and each text vector is calculated, and the top K text vectors with the largest similarity are retained as the corresponding reference text vectors; wherein K is a positive integer;
[0011] According to the above reference text vector and the corresponding power service problem embedding vector, the power service problem solving model to be trained is trained to obtain the above preset power service problem solving model.
[0012] Further, the above vector conversion and problem construction of the power service academic document obtain a plurality of text vectors and a plurality of power service problem embedding vectors, including:
[0013] All the above power service academic documents are divided to obtain a plurality of text blocks; all the above text blocks are vector converted to obtain a plurality of text vectors;
[0014] The above text blocks and the preset problem extraction prompt words are input into the preset large language model to generate a plurality of power service problems;
[0015] All the power service problems are encoded to obtain a plurality of power service problem embedding vectors.
[0016] Further, the above division of all the above power service academic documents obtains a plurality of text blocks, including:
[0017] All the above power service academic documents are format converted to generate a plurality of initial Markdown documents;
[0018] All the initial Markdown documents are data cleaned to generate target Markdown documents;
[0019] For each target Markdown document, semantic segmentation is performed to obtain a plurality of text blocks.
[0020] Further, the above vector conversion of all the above text blocks obtains a plurality of text vectors, including:
[0021] For each text block, the text block is split into a plurality of sub-word unit sequences;
[0022] According to the preset encoder, the above sub-word unit sequence is mapped to a text vector to obtain a plurality of text vectors.
[0023] Further, the above training of the power service problem solving model to be trained according to the above reference text vector and the corresponding power service problem embedding vector obtains the above preset power service problem solving model, including:
[0024] The text block corresponding to the reference text vector is taken as the reference text;
[0025] The reference text, the power business problem corresponding to the reference text, and the preset decision modeling prompt word are input into the preset large language model to generate a reference solution scheme;
[0026] The power business problem solution model is trained according to the reference solution scheme and the corresponding power business problem, and the preset power business problem solution model is obtained.
[0027] Further, the power business problem solution model is trained according to the reference solution scheme and the corresponding power business problem, and the preset power business problem solution model is obtained, including:
[0028] According to the power business problem corresponding to the reference solution scheme, an input prompt of the power business problem solution model is constructed;
[0029] The input prompt and the reference solution scheme are input into the power business problem solution model to be trained for iterative training until the loss function converges, and the preset power business problem solution model is generated;
[0030] In each iteration training, a current prediction solution scheme is generated according to the current input prompt; a current loss function is calculated according to the current prediction solution scheme and the corresponding reference solution scheme, and it is judged whether the current loss function converges; if the current loss function converges, the current power business problem solution model is taken as the preset power business problem solution model; otherwise, the parameters in the current power business problem solution model are adjusted, and the training is continued.
[0031] On the basis of the method embodiment, the application correspondingly provides a device embodiment;
[0032] The application provides a power business problem solution device, which comprises:
[0033] An input prompt construction module and a solution scheme output module are provided:
[0034] The input prompt construction module is used for acquiring a user power business problem and constructing a model input prompt according to the user power business problem;
[0035] The solution scheme output module is configured to input the model input prompt into a preset power service question solution model to obtain a solution scheme for the power service question of the user.
[0036] Further, the solution scheme output module comprises:
[0037] a text vector construction unit, a power service question generation unit, and a question coding unit.
[0038] The text vector construction unit is configured to divide all the power service academic documents to obtain a plurality of text blocks, and convert all the text blocks into a plurality of text vectors.
[0039] The power service question generation unit is configured to input the text blocks and a preset question extraction prompt word into a preset large language model to generate a plurality of power service questions.
[0040] The question coding unit is configured to code all the power service questions to obtain a plurality of power service question embedding vectors.
[0041] On the basis of the method embodiment, the application correspondingly provides a terminal device embodiment.
[0042] The application provides a terminal device, which comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the power service question solution method according to any one of the embodiments of the application when executing the computer program.
[0043] On the basis of the method embodiment, the application correspondingly provides a storage medium embodiment.
[0044] The application provides a storage medium, which comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the power service question solution method according to any one of the embodiments of the application when executing the computer program.
[0045] Embodiments of the present application have the following beneficial effects:
[0046] The application provides an electric power service problem solving method and device, a terminal equipment and a storage medium. The method comprises the following steps: obtaining an electric power service problem of a user, and constructing a model input prompt according to the electric power service problem of the user; then inputting the model input prompt into a preset electric power service problem solving model to obtain a solution scheme of the electric power service problem of the user; wherein the training of the preset electric power service problem solving model comprises the following steps: obtaining a plurality of electric power service academic documents, and performing vector conversion and problem construction on the electric power service academic documents to obtain a plurality of text vectors and a plurality of electric power service problem embedding vectors; for each electric power service problem, calculating the similarity between the electric power service problem embedding vector corresponding to the electric power service problem and each text vector, and retaining the first K text vectors with the maximum similarity as corresponding reference text vectors; wherein K is a positive integer; and training the electric power service problem solving model to be trained according to the reference text vectors and the corresponding electric power service problem embedding vectors to obtain the preset electric power service problem solving model. Therefore, the application firstly generates electric power service problems and text vectors based on electric power service academic documents, and determines the text vectors most relevant to the electric power service problems by calculating the similarity, the reference text vectors obtained by the dense retrieval method constitute the most core electric power professional knowledge support, and finally the reference text vectors obtained by the method and the corresponding electric power service problem embedding vectors are used for model training, so that the output result of the model has high professionalism during the training, the illusion phenomenon of the model is reduced, and the accuracy of the output result of the model is improved. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0048] Figure 1 is a flowchart of an electric power service problem solving method provided by an embodiment of the present application.
[0049] Figure 2 is a RAG electric power service decision flowchart provided by an embodiment of the present application.
[0050] Figure 3 is a model training process diagram based on instruction fine-tuning provided by an embodiment of the present application.
[0051] Figure 4is a structural schematic diagram of an electric power service problem solving device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0052] For the purpose of making the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as would be understood by one of ordinary skill in the art to which this application belongs; the terminology used in the specification herein is for the purpose of describing the particular embodiments only and is not intended to be limiting of the application; the use of the terms "including," "comprising," "having" and "with" in the specification and claims herein, as well as similar terms, are used in their open, non-limiting sense unless otherwise noted.
[0054] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.
[0055] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, or necessarily alternatives to other embodiments. It will be explicitly and implicitly appreciated by a person of ordinary skill in the art that the embodiments described herein can be combined with other embodiments.
[0056] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in the present application generally represents an "or" relationship between the front and rear associated objects.
[0057] In the description of the embodiments of the present application, the term "a plurality of" refers to two or more (including two), and similarly, "a plurality of groups" refers to two or more groups (including two groups), and "a plurality of pieces" refers to two or more pieces (including two pieces).
[0058] In the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the technical terms "mounting", "connection", "connecting", "fixing" and the like should be understood in a broad sense, for example, can be fixedly connected, or can be detachably connected, or can be integrated; can be mechanically connected, or can be electrically connected; can be directly connected, or can be indirectly connected through an intermediate medium; can be internal communication of two elements or interaction relationship between two elements. For those skilled in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0059] Referring to Figure 1 To solve the problem that the existing large language model has a serious illusion phenomenon when it is applied to the power vertical field which has high requirements on knowledge accuracy and professionalism, and thus the generated power problem solving result is inaccurate, an embodiment of the present application provides a power business problem solving method, which comprises:
[0060] Step S101: obtaining a user power business problem, and constructing a model input prompt according to the user power business problem;
[0061] Specifically, the user power business problem is a classical modeling problem proposed by a user in the power field, for example, problems such as power grid planning, dispatching optimization and load forecasting, and the model input prompt comprises the user power business problem and corresponding prompt words.
[0062] Step S102: inputting the model input prompt into a preset power business problem solving model to obtain a solution scheme of the user power business problem;
[0063] Specifically, the preset power business problem solving model is a Qwen3 model constructed based on a large language model.
[0064] The training of the preset power business problem solving model comprises:
[0065] Obtaining a plurality of power business academic documents, and performing vector conversion and problem construction on the power business academic documents to obtain a plurality of text vectors and a plurality of power business problem embedding vectors;
[0066] Specifically, the acquisition of the academic document of the power business can rely on a multi-source heterogeneous authoritative platform, including an IEEE / IET academic database, a journal library of the Chinese Electrical Engineering Society, a CNKI master's and doctoral thesis library, and a State Grid technical report system. Literature screening is performed through a strategy combining topic retrieval and content recommendation. The screening includes 18 types of classic decision-making problems of power business, such as photovoltaic capacity, power system state estimation, load forecasting, power grid economic dispatch, power system flow calculation, power system reliability evaluation, power system unit commitment, reactive power optimization, power system stability analysis, power grid planning, demand response optimization, distribution network reconfiguration, distributed power supply access planning, power system frequency control, power market transaction, power system harmonic analysis, black start, and optimal configuration of energy storage system. Finally, several electronic books, academic journal papers, degree papers, and industry technical standard documents are collected to form the academic document of the power business. Each document focuses on one or more target power business decision-making problems and their modeling solutions, ensuring the high relevance, authority, and coverage of the collected data. The data sources cover both theoretical frontier and engineering practicality, including classic power system analysis, renewable energy integration, and smart grid control, ensuring the subject integrity and decision support value of the original data set. These data represent the core links of power system operation, planning, and control, with high complexity and professionalism.
[0067] For each power business problem, the similarity between the power business problem embedding vector corresponding to the power business problem and each text vector is calculated, and the top K text vectors with the largest similarity are retained as the corresponding reference text vectors; wherein K is a positive integer;
[0068] Specifically, the similarity is a cosine similarity. First, the power business problem is processed by a pre-trained semantic encoder (such as BGE-M3) to convert it into a high-dimensional dense embedding vector (i.e., the power business problem embedding vector), which is to represent the core intent of the power business problem in depth and is robust to surface changes of words (such as synonyms and near synonyms). Subsequently, in the pre-constructed power business vector knowledge base (i.e., the power business vector knowledge base composed of all text vectors), the cosine similarity is calculated. After calculating the cosine similarity of each text vector, the top K text vectors with the largest similarity are retained as the reference text vectors. K is a positive integer that can be adjusted. For example, K can be 3, that is, the top 3 text vectors with the largest similarity are retained. The similarity is calculated by the following formula:
[0069]
[0070] In the formula, denotes the similarity, a power business problem embedding vector, , a text vector, .
[0071] Preferably, in the calculation of the similarity, all text vectors can also be divided into semantically associated cluster partitions using K-means clustering before the similarity is calculated, and an inverted list mapping is constructed; then, potential relevant partitions are quickly locked by coarse-grained cluster center screening, and fine-grained cosine similarity calculation is performed in the local space. Illustratively, the nearest neighbor search algorithm is used in 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 reduced to the cluster, and then a depth search is performed in the cluster, 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 capability, supports large language model to generate decision-making suggestions with domain credibility, and is an important technical basis for efficient transformation of general large models to power vertical fields.
[0072] According to the above 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 above pre-set power business problem solving model.
[0073] Specifically, traditional information retrieval methods are represented by sparse retrieval, such as the BM25 algorithm based on keyword matching, which calculates text relevance for retrieval by counting word frequency and document frequency. Specifically, first, the query problem and the document are segmented using a segmenter, then for a given query problem, sparse retrieval scores are calculated, and finally the corresponding retrieval results are determined based on the sparse retrieval scores. The calculation process of the sparse retrieval score is as follows:
[0074]
[0075]
[0076] In the formula, denotes the sparse retrieval score, n denotes the total number of documents, denotes the inverse document frequency of the word , which measures the rarity of the word, denotes the number of documents containing the word , denotes the frequency of the word in the document , and denote adjustment parameters, the value range of The value range of the ratio is about 0.75, The document length of the document The document length of the document The evaluation length of the document set.
[0077] Specifically, when making power business decisions using the RAG system, the RAG system enhances the model's own understanding of the query question based on the retrieved context. Illustratively, the RAG power business decision flowchart is shown in Figure 2 Figure 2 The sparse retrieval and dense retrieval are used to generate reference text vectors, and the corresponding solutions to the power business questions are generated based on the reference text vectors.
[0078] Preferably, although the above-mentioned sparse retrieval has high execution efficiency and strong interpretability, it is often difficult to deal with complex and abstract semantic expressions in power business, and it is difficult to cope with natural language variants such as synonymy, generality, and multi-round expression. In contrast, dense retrieval has stronger semantic understanding ability, and its core goal is to efficiently and accurately map the query question expressed in natural language by the user to the most relevant knowledge fragment in the pre-constructed power business vector knowledge base, and the reference text vector obtained constitutes the core professional knowledge support, which is the basis for subsequent preset power business question answer model generation. Through the dense semantic retrieval mechanism, the framework can accurately understand the power business question and extract effective information from massive professional knowledge.
[0079] In a preferred embodiment, the above-mentioned vector conversion of the above-mentioned power business academic documents and question construction obtain a plurality of text vectors and a plurality of power business question embedding vectors, including:
[0080] All of the above-mentioned power business academic documents are divided to obtain a plurality of text blocks; all of the above-mentioned text blocks are vector converted to obtain a plurality of text vectors;
[0081] The above-mentioned text blocks and preset question extraction prompts are input into a preset large language model to generate a plurality of power business questions;
[0082] Specifically, to guide the preset large language model to generate questions conforming to the power professional specifications, the application adopts prompt word engineering, and carefully designs output template prompt words (i.e. the above-mentioned preset question extraction prompt words). The template prompt word clearly limits the question to revolve around the core content of the technical document, avoids general questions, requires that no long formula symbols appear in the question description, and no additional text is added, while using different expression methods to ask questions, making the questioning method more diversified, and presenting in a specific format. The text block is input as the context of the generated question, combined with the preset question extraction prompt word and the preset large language model, and finally a number of power business questions are obtained, and it can be ensured that the generated question set presents significant power field characteristics. The specific form and content of the preset question extraction prompt word are as follows:
[0083] "Please carefully read the relevant content of the text provided below, and based on the relevant content of the text, propose 20 different power field questions, with the following requirements:
[0084] 1. The question is consistent with the content of the text, preferably a power field modeling question.
[0085] 2. The question description needs to be detailed and accurate (note: it must be able to stand alone, without relying on the context information of the text), and the expression should be as concise as possible.
[0086] 3. Do not appear in long formula symbols in the question description.
[0087] 4. Directly generate the question description, without adding any additional text.
[0088] 5. Use different expression methods to ask questions, making the questioning method more diversified.
[0089] 6. Arrange the generated questions in order, with each question occupying a separate line, to clearly present each question.".
[0090] Encode all power business questions to obtain a number of power business question embedding vectors.
[0091] In this preferred embodiment, by vector conversion and question construction of the power business academic documents, a number of text vectors and a number of power business question embedding vectors are obtained.
[0092] In another preferred embodiment, the above-mentioned division of all the above-mentioned power business academic documents obtains a number of text blocks, including:
[0093] Convert all the above-mentioned power business academic documents to generate a number of initial Markdown documents;
[0094] Specifically, the initially acquired power business academic documents are generally in PDF format, which is common but not conducive to accurate parsing, structured processing and subsequent vector embedding of the content. In particular, the power field literature contains a large amount of complex mathematical formulas, special symbols, charts and structured text (such as chapters, lists), which puts high demands on the accuracy of the format conversion tool.
[0095] 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 the objective function, the constraint equation, which highly depends on the accurate mathematical expression), text and structure fidelity (it is crucial to retain the chapter structure, list, emphasis and other semantic information of the original text), chart and link processing capability (some charts and reference links contain important information), processing efficiency and cost (it needs to meet the actual needs of large-scale document processing).
[0096] Preferably, based on the above evaluation and taking into full consideration of the balance between cost, efficiency and accuracy, the present application innovatively proposes a strategy of using the Bean Bag web version and the MinerU software to complement each other for format conversion. First, use the MinerU software to batch convert all power business academic documents to generate initial Markdown documents, quickly process and retain the overall structure. Then, for key documents containing core mathematical models (such as optimization problem representation, power flow equations) (especially journal papers and important chapters), and documents with obvious formula problems after MinerU conversion, use the Bean Bag web version for manual assisted fine conversion to ensure high fidelity of core formulas and key texts. Through this rigorous process, the original PDF documents can be converted into unified Markdown format with high fidelity and structure, providing standardized and computable basic data for subsequent data cleaning and knowledge extraction.
[0097] cleaning the data of all initial Markdown documents to generate target Markdown documents;
[0098] Specifically, although the converted initial Markdown documents have clear structure, they still contain a large amount of noise information that is not directly related to model generation, redundant or even incorrect. These information not only increases the computational burden of subsequent processing, but also may interfere with the accuracy of retrieval and the quality of model generation. Therefore, it is crucial to implement systematic document cleaning.
[0099] Specifically, the core principle of cleaning is to retain the core knowledge elements that support the generation of pre-set power business problem solving models, remove all unnecessary auxiliary, descriptive or decorative content, and correct incorrect content information. The present application identifies and cleans the following main noise types:
[0100] (a) Literature citation: usually occupies a large amount of space, the core value lies in providing theoretical source support, rather than specific knowledge of the model itself. In the model generation process, the reference list itself usually does not contain information that can be directly used for modeling or solving;
[0101] (b) Author information and personal profile: belongs to the attribute information, which is irrelevant to the content of the model;
[0102] (c) Journal / conference information: such as volume number, page number, publisher, etc. belongs to the category of metadata, which does not affect the knowledge of the model itself;
[0103] (d) Acknowledgments: expressive content, no substantive knowledge value;
[0104] (e) Head and foot: usually contains page numbers, journal names, chapter names, and other repetitive or decorative elements.
[0105] In addition, the present application further checks and corrects the error content of the initial Markdown document in an artificial manner, including checking whether the problem scenario description is clear, whether the mathematical model (decision variable / objective function / constraint equation) is accurately expressed, whether the definition of key parameters is complete, whether the key points of the solving method are clear, checking and correcting the formula symbol error, completing the range of key parameters, and unifying the professional terms of the power field. After the above strict cleaning process, the total amount of documents is the same as the initial, but the information density of each document is significantly improved, the redundant information is greatly reduced, and the content is highly focused on the core professional knowledge supporting the generation of the preset power business problem solving model, which significantly improves the subsequent retrieval efficiency.
[0106] For each target Markdown document, semantic segmentation is performed to obtain a plurality of text blocks.
[0107] Specifically, when performing semantic segmentation, it is necessary to ensure that the obtained text blocks are semantically coherent, and key knowledge units (such as complete mathematical models) are not fragmented. Therefore, the present application adopts a division strategy based on adaptive multi-granularity cutting, taking into account the characteristics of the data source and the content structure. For long academic documents of power business (average length greater than 50 pages) such as master's and doctoral dissertations, electronic books, etc., preferentially perform logical cutting according to the chapter title structure (such as #, ## headings) of the target Markdown document, ensuring the complete retention of problem definition, objective function, and constraint conditions; for short documents such as journal papers, conference reports, and other data sources, use a fixed maximum word threshold (for example, threshold of 5000) for cutting, if the single document content does not exceed the limit, retain the whole, if it exceeds the limit, divide according to the paragraph boundary, avoiding truncating mathematical formulas or key reasoning steps. In this way, after adaptive cutting, all power business academic documents generate several text blocks, with an average cutting length of 800-4500 words, effectively balancing information density and readability.
[0108] In this preferred embodiment, by dividing all power business academic documents, several text blocks are obtained.
[0109] In another preferred embodiment, the above-mentioned vector conversion of all the above-mentioned text blocks obtains several text vectors, including:
[0110] For each text block, the text block is split into several sub-word unit sequences;
[0111] According to the preset encoder, the sub-word unit sequence is mapped to a text vector, obtaining several text vectors.
[0112] Specifically, to further convert the text block into a computable semantic vector, a dense vector embedding technology is used for vector conversion. The present application uses the BGE-M3 embedding model published by Beijing Zhiyuan Research Institute, which can be compatible with power professional texts mixed with Chinese and English, and at the same time accurately model the relationship between technical terms through pre-training deep Transformer architecture. When calculating the text block vector embedding, the text block is split into sub-word unit sequences, which are mapped to 1024-dimensional normalized vectors by the BGE-M3 encoder, ensuring the stability of subsequent similarity calculation.
[0113] In this preferred embodiment, by vector converting all text blocks, several text vectors are obtained.
[0114] In another preferred embodiment, the above-mentioned training of the power business problem solving model to be trained according to the reference text vector and the corresponding power business problem embedding vector obtains the preset power business problem solving model, including:
[0115] The text block corresponding to the above reference text vector is taken as the reference text;
[0116] The above reference text, the power business problem corresponding to the above reference text, and the preset decision modeling prompt word are input into the above preset large language model to generate a reference solution scheme;
[0117] Specifically, to guide the preset large language model to generate answers that meet the specifications of the power industry, a prompt word engineering is adopted to carefully design the decision modeling prompt word. The preset decision modeling prompt word clearly requires the model to accurately grasp the problem requirements, problem background and potential intent, ensuring that the content is complete, accurate and logically coherent, while reasonably selecting details to avoid redundancy, ensuring the professional accuracy and engineering practicality of the generated content. Among them, the output content needs to ensure that the text format is clear and easy to read, facilitating direct reference and application, while providing an operational solution. The specific form and content are as follows:
[0118] "Please carefully study the reference text I have provided, and answer the questions I will ask based on it. The specific requirements are as follows:
[0119] 1. Accurately grasp the problem requirements and problem background, fully understand the potential intent; summarize the key points in detail to ensure that the content is complete, accurate and logically clear, while avoiding redundancy; use professional terms and precise expressions to eliminate ambiguous or colloquial language, ensuring rigor and professionalism to meet the needs of professional readers.
[0120] 2. The output content must not contain any XML tags to ensure that the text format is clear and easy to read, facilitating direct reference and application.
[0121] 3. The solution needs to be operational, focusing on practical problems and avoiding empty theories. Encourage interdisciplinary thinking, combining cutting-edge technology, advanced theories and innovative methods to enhance the practicality and value of the answers.
[0122] 4. For complex problems, appropriately add assumptions, simplify processing methods, and model application scope to help readers better understand and apply the model.
[0123] 5. Add detailed comments to the pseudo-code section to explain the operation and purpose of each step, helping readers understand the implementation process and principles.
[0124] 6. At the end of the answer, briefly summarize the advantages and disadvantages of the model to help users choose and use the model."
[0125] At the same time, the overall output format includes problem description, objective function of modeling, constraint conditions of modeling, list of variables involved in the modeling process, pseudo-code for implementing the model, advantages and disadvantages of the model, etc. The specific requirements are as follows:
[0126] "Answer each question in the following format, output in Markdown, and use LaTeX for formulas. Ensure the format is correct and the content is clear.
[0127] 1. Question Description: Accurately describe the problem using scientific and concise language, clearly state the core points and research objects, and if necessary, explain in the context of practical application.
[0128] 2. Objective Function of Modeling: List the objective function using LaTeX format, clearly state the mathematical expression and its physical meaning or optimization goal (such as minimizing error, maximizing revenue, etc.).
[0129] 3. Constraints of Modeling: List all relevant constraints, including equality constraints, inequality constraints, variable value ranges, etc., and explain the meaning and role of each constraint to ensure the completeness and accuracy of the constraints.
[0130] 4. List of variables involved in the modeling process: Provide a detailed list of variables involved, including variable names, symbols, physical meanings, units (if any), and value ranges, to facilitate understanding of the variables in the model and their roles.
[0131] 5. Pseudocode for implementing the model: Write clear and standardized pseudocode, including main algorithm steps, data structures, flow control, solvers, etc., to ensure the pseudocode is readable and implementable, and can be used to solve actual problems according to the given solver, facilitating the conversion to actual code.
[0132] 6. Brief summary of the advantages and disadvantages of the model."
[0133] According to the above reference solution scheme and the corresponding power business problem, the power business problem solving model is trained to obtain the above preset power business problem solving model.
[0134] In this preferred embodiment, based on the reference text vector corresponding to the reference text, the corresponding reference solution scheme is generated, and then the reference solution scheme and the corresponding power business problem are used for model training to obtain the preset power business problem solving model.
[0135] In another preferred embodiment, the above training of the power business problem solving model according to the above reference solution scheme and the corresponding power business problem obtains the above preset power business problem solving model, which includes:
[0136] According to the power business problem corresponding to the above reference solution scheme, the input prompt of the above power business problem solving model is constructed;
[0137] The above input prompts and the above reference solutions are input into the power business problem-solving model to be trained for iterative training until the loss function converges, thereby generating the above preset power business problem-solving model.
[0138] In each iteration of training, a current predicted solution is generated based on the current input prompts; the current loss function is calculated based on the current predicted solution and the corresponding reference solution, and it is determined whether the current loss function has converged; if the current loss function has converged, the current power business problem-solving model is used as the aforementioned preset power business problem-solving model; otherwise, the parameters in the current power business problem-solving model are adjusted, and training continues.
[0139] Specifically, the model training process employs 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 objective is to transform the generalization ability of a general-purpose language model into specialized capabilities specific to vertical domains, addressing the mismatch between general-purpose models and the needs of vertical 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 affect the fine-tuning effect.
[0140] Specifically, instruction data typically consists of two parts: input prompts and output responses (i.e., the reference solution scheme mentioned above). The input prompts describe the specific task objective, while the output responses are the correct results the model should generate. The calculation process of the loss function during fine-tuning of the model using instructions is shown in the following formula:
[0141]
[0142] In the formula, Let N represent the loss function, N represent the total number of reference solutions, and B represent the batch size. Indicates the first One input prompt, Indicates the first The predicted solution corresponding to each input prompt. The power business problem-solving model is based on input prompts. The probability of generating a corresponding reference solution.
[0143] An illustrative diagram illustrating the model training process based on instruction fine-tuning is shown below. Figure 3 As shown, Figure 3 In this invention, "LLM" stands for Large Language Model, and in this embodiment, it refers to a pre-trained basic large language model that participates in the fine-tuning training process after partial layer freezing.
[0144] Preferably, the model is supervised fine-tuned with a carefully constructed instruction question-answer pair dataset (i.e. a dataset containing input prompts and corresponding reference answers). The core objective of this process is to internalize the professional knowledge in the power field into the model parameters and guide the output to align with professional specifications. On the one hand, this process can effectively inject professional knowledge in the power field. Although general large language models have extensive general knowledge, they often lack understanding of core concepts specific to power systems, complex equipment parameters, rigorous technical specifications, and safety boundaries. Supervised fine-tuning uses gradient descent mechanism to continuously optimize model parameters through precisely matched instruction-answer pairs, forcing the model to learn and internalize these highly structured domain knowledge. On the other hand, this process can significantly suppress the model hallucination phenomenon. During the fine-tuning phase, the model is strictly guided to learn the unique or optimal correct answer corresponding to a specific power professional problem. This fact-based strong constraint learning paradigm greatly reduces the model's reliance on irrelevant patterns or general corpus for free speculation, prompting it to remain cautious or refer to known specifications when knowledge boundaries are ambiguous, rather than generating content lacking factual basis and seemingly plausible. This alleviates hallucination output for professional scenarios from the root.
[0145] Preferably, after the training of the power business problem solving model is completed, in order to measure the improvement of the model training scheme of the application to the general large language model, quantitative evaluation can be performed. At the same time, the aforementioned direct retrieval of the dense retrieval is also evaluated. In the numerical experiments of the application, the external judge large language model uses Qwen-Plus, and the external text embedding model uses BGE-M3.
[0146] Specifically, the evaluation dataset for quantitative evaluation is divided into real dataset and synthetic dataset, both in json file format. The quantitative evaluation of SFT (i.e. the supervised fine-tuning part) in the application uses real dataset and synthetic dataset, and the quantitative evaluation of RAG system (i.e. the dense retrieval part in the application) uses real dataset.
[0147] Specifically, regarding the construction of the real data set, the present application carries out format conversion and data cleaning and other preprocessing on the 18 questions contained in the external knowledge base of the RAG system from the perspective of the problem. The decision modeling scheme of each question is obtained by cleaning and converting from official data sources such as books on economic operation theory of power systems, master and doctoral journal papers, and is used as the standard answer to the corresponding question. In addition, for each question, the present application obtains the context of the corresponding question from dense retrieval, and the large language model enhances the understanding of the power business question based on the context, and outputs the final decision modeling scheme as the model output of the question. The real data set contains 18 dictionary data, each corresponding to a power business question, containing four fields: query question, context, model output, and standard answer. The quantitative evaluation of the RAG system uses all fields, the quantitative evaluation of the SFT only uses the query question and the standard answer two fields, and the model output field is regenerated by the Qwen3 series model before or after supervised fine-tuning.
[0148] Specifically, the construction of the synthetic data set is similar to that of the real data set, containing three fields of query question, standard answer, and model output, with the difference being in the query question. The questions in the real data set are derived from the 18 power business questions determined by the original RAG system knowledge base data collection, and the questions in the synthetic data set are randomly selected from the above power business questions, with the number being x. The standard answer in the synthetic data set is generated by DeepSeek V3 with the help of dense retrieval.
[0149] Specifically, the measurement of retrieval quality mainly includes three aspects: the relevance of context and query question, the relevance of context and true answer, and the relevance of context and model output. Among them, the indicators for measuring the relevance of context and query question mainly include Context Relevance (CR), and low relevance indicates that the retriever introduces noise irrelevant to the query question. The indicators for measuring the relevance of context and true answer mainly include LLM Context Recall (LCR) and Context Precision (CP). LCR measures whether the retrieved text contains all the information needed to generate a true answer, and low recall rate means that the retriever misses key information. CP measures whether the retrieved text is semantically related and accurate to the true answer, and low accuracy indicates that the retrieved context is not semantically related to the true answer, i.e. the context has no effective information. The relevance indicators of context and model output include Faithfulness (FF) and Factual Correctness (FC), which measure whether the model-generated answer is based on the retrieved text and whether there is false information leading to the deepening of the illusion phenomenon. The generation quality is mainly measured by the relevance of model output and query question, and the relevance of model output and true answer. Regarding the relevance of model output and query question, the Answer Relevancy (AR) indicator can be used to determine whether the answer effectively responds to the question or not. Regarding the relevance of model output and true answer, the Answer Correctness (AC) and Answer Similarity (AS) indicators can be used to evaluate whether the model answer is accurate and related to the standard answer.
[0150] Specifically, in order to measure the improvement of model capability after supervised training of the model by using the instruction fine-tuning, the present application considers six quantitative indicators, including BLEU (Bilingual Evaluation Understudy), METEOR (Metric for Evaluation of Translation with Explicit Ordering), BERT Score, Emb Score, and F1 Score.
[0151] Among them, BLEU was first used in machine translation tasks to evaluate the generation quality of large language models by calculating the n-gram overlap rate between generated text and reference text. The "generated text" of the present application is the model output, and the "reference text" is the standard answer. The calculation formula of the BLEU indicator is as follows:
[0152]
[0153] wherein, denotes the value of the indicator, denotes the length normalization factor, A denotes the length of the phrase, in order to prevent the score of short text from being too high, denotes the n-gram precision, that is, the matching precision of the phrase with length a, denotes the weight factor of the a-th phrase.
[0154] wherein, METEOR introduces synonym matching and word sequence alignment on the basis of BLEU, and measures the single word matching through precision and recall , and improves semantic sensitivity, and the calculation formula is as follows:
[0155]
[0156]
[0157] wherein, denotes the harmonic mean of precision and recall, denotes the harmonic parameter, denotes the precision, denotes the recall, denotes the value of the indicator, denotes the matching fluency penalty factor.
[0158] wherein, BERT Score utilizes the BERT model to do word-by-word text embedding on the generated text and the reference text, calculates the text similarity at the word level, and evaluates the semantic consistency of the generated text and the reference text. The calculation process is as follows:
[0159]
[0160]
[0161]
[0162] wherein, denotes the cosine similarity of the generated text and the reference text, denotes the cosine similarity of the reference text and the generated text, denotes the embedding vector of the a-th generated text, denotes the embedding vector of the a-th reference text, denotes the embedding vector of the a-th generated text, denotes the embedding vector of the a-th reference text, denotes the total length of the generated text, denotes the total length of the reference text, denotes the value of the BERT Score indicator.
[0163] wherein EmbScore converts the generated text and the reference text into one-dimensional vectors of fixed dimension size through a word embedding model (such as Word2Vec, GloVe and FastText), and then calculates the cosine similarity between the two one-dimensional vectors:
[0164]
[0165] wherein, denotes the value of the EmbScore indicator.
[0166] wherein, F1 Score is very common in classification tasks, and is the harmonic mean of precision and recall, used to measure the performance of the model, and it can be seen that F1 Score is essentially a special case of precision and recall when the harmonic parameter is 1. The calculation process is as shown in the following formula:
[0167]
[0168]
[0169] wherein, denotes the value of the F1 Score indicator.
[0170] Specifically, the present application quantitatively evaluates the generation ability of DeepSeek V3 671B before and after accessing the RAG system, and the retrieval ability of the RAG system through online API calls. Specifically, when quantitatively evaluating the decision modeling ability of DeepSeek V3 671B, the present application sets the context to be empty, so that the model output relies entirely on its own parameterized knowledge. Regarding the evaluation of DeepSeek accessing the RAG system, the present application considers two retrieval modes of sparse and dense, different retrieval modes will retrieve different contexts, so the output of the final model will also be different. The experimental results are shown in Table 1 as follows:
[0171] Table 1 Quantitative evaluation experimental results of RAG on real data set
[0172]
[0173] As can be seen from the above table, after accessing the RAG system, whether sparse retrieval or mixed retrieval is used, there is a significant improvement in the AR, AC, and AS three generation quality indicators. In addition, the dense retrieval adopted by the present application is significantly ahead of the sparse retrieval in most retrieval indicators (LCR, CP, FC), is flat in the CR indicator, and is only slightly behind in the FF indicator, indicating that the context obtained by the dense retrieval is of higher quality and has stronger relevance 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 quality corresponding to the dense retrieval method is higher, the AC and AS indicators perform better.
[0174] Illustratively, the present application performs supervised fine-tuning on the Qwen3 model of different sizes (0.6B, 1.7B, 4B, 8B) based on the reference text vector and the corresponding power business question embedding vector, and performs quantitative evaluation experiments on real data sets and synthetic data sets before and after supervised fine-tuning, and the evaluation results are shown in Tables 2 and 3 as follows:
[0175] Table 2 Quantitative evaluation experiment results of SFT on real data sets
[0176]
[0177] Table 3 Quantitative evaluation experiment results of SFT on synthetic data sets
[0178]
[0179] Specifically, it is not difficult to see that for Qwen3 series models of different sizes, the model after supervised fine-tuning has improved in all quantitative indicators (BLEU, METEOR, BERT Score, Emb Score, F1 Score), indicating that the supervised fine-tuning technology can effectively improve the understanding ability of large language models for power business questions and the decision modeling ability in multiple power business scenarios, achieving efficient distillation of external power domain knowledge base to model parameters, so that the model can have considerable power business decision modeling ability without relying on the RAG system. In addition, supervised fine-tuning enables the model to get rid of the lengthy retrieval and enhancement generation framework of RAG, effectively solving the problem of low inference efficiency.
[0180] In this preferred embodiment, the power business question answering model is trained according to the reference answer scheme and the corresponding power business question, and a preset power business question answering model is obtained.
[0181] On the basis of the above-mentioned method embodiment, the present application correspondingly provides a device embodiment.
[0182] As Figure 4As shown, an embodiment of the present application provides a power service problem solving device, comprising:
[0183] An input prompt construction module and a solution output module:
[0184] The input prompt construction module is configured to obtain a user power service problem and construct a model input prompt based on the user power service problem.
[0185] The solution output module is configured to input the model input prompt into a preset power service problem solving model to obtain a solution to the user power service problem. The training of the preset power service problem solving model includes: obtaining a plurality of power service academic documents, and performing vector conversion and problem construction on the power service academic documents to obtain a plurality of text vectors and a plurality of power service problem embedding vectors; for each power service problem, calculating the similarity between the power service problem embedding vector corresponding to the power service problem and each text vector, and retaining the top K text vectors with the highest similarity as the corresponding reference text vector; wherein K is a positive integer; and training the power service problem solving model to be trained according to the reference text vector and the corresponding power service problem embedding vector to obtain the preset power service problem solving model.
[0186] In another preferred embodiment, the solution output module comprises:
[0187] A text vector construction unit, a power service problem generation unit, and a problem encoding unit.
[0188] The text vector construction unit is configured to divide all the power service academic documents to obtain a plurality of text blocks, and perform vector conversion on all the text blocks to obtain a plurality of text vectors.
[0189] The power service problem generation unit is configured to input the text blocks and a preset question extraction prompt word into a preset large language model to generate a plurality of power service problems.
[0190] The problem encoding unit is configured to encode all the power service problems to obtain a plurality of power service problem embedding vectors.
[0191] It should be noted that the apparatus embodiments described above are only illustrative, and the modules described above as separate components can or can not be physically separated, and the components shown as modules can or can not be physical modules, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment according to actual needs. In addition, the connection relationship between the modules in the apparatus embodiments provided by the present application indicates that there is a communication connection between them, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor. The above schematic diagram is only an example of a power service problem solving apparatus, and does not constitute a limitation on a power service problem solving apparatus, which can include more or fewer components than the diagram, or combine some components, or different components.
[0192] On the basis of the above-mentioned method embodiments, the present application correspondingly provides terminal device embodiments.
[0193] Another embodiment of the present application 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, wherein the processor executes the computer program to implement the power service problem solving method of any one of the above-mentioned embodiments.
[0194] For example, in this embodiment, the computer program can be divided into one or more modules, and the one or more modules are stored in the memory and executed by the processor to complete the present application. The one or more modules can be a series of computer program instruction segments that can complete a specific function, which are used to describe the execution process of the computer program in the device.
[0195] The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and other computing devices. The device can include, but is not limited to, a processor and a memory.
[0196] The processor can be a central processing module (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or can also be any conventional processor. The processor is a control center of the device, and is connected with various parts of the device through various interfaces and lines.
[0197] The memory can be used to store the computer program and / or the module, and the processor realizes various functions of the device by running or executing the computer program and / or the module stored in the memory and 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 by a function, etc. In addition, the memory can include a high-speed random access memory, and can also include a nonvolatile memory, for example, a hard disk, a 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 memory devices.
[0198] On the basis of the method embodiment, the application provides a storage medium embodiment.
[0199] Another embodiment of the application provides a storage medium, which includes a stored computer program. When the computer program runs, the device where the storage medium is located executes the power service problem solving method according to any one of the embodiments of the application.
[0200] In this embodiment, the storage medium is a computer readable storage medium, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, a software distribution medium, etc.
[0201] The above is the preferred embodiment of the present application, and it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which are also considered to be within the scope of protection of the present application.
Claims
1. A power service problem resolution method, characterized by, The method comprises the following steps: acquiring a user power service problem and constructing a model input prompt according to the user power service problem; inputting the model input prompt into a preset power service problem solving model to obtain a solution scheme of the user power service problem; wherein the training of the preset power service problem solving model comprises: acquiring a plurality of power service academic documents, and performing vector conversion and problem construction on the power service academic documents to obtain a plurality of text vectors and a plurality of power service problem embedding vectors; for each power service problem, calculating the similarity between the power service problem embedding vector corresponding to the power service problem and each text vector, and retaining the top K text vectors with the highest similarity as the corresponding reference text vectors; wherein K is a positive integer; inputting the text block corresponding to the reference text vector into a preset large language model as a reference text; inputting the reference text, the power service problem corresponding to the reference text, and a preset decision modeling prompt word into a preset large language model to generate a reference solution scheme; wherein the reference solution scheme comprises: problem description of the power service problem, objective function of the mathematical model established for solving the power service problem, constraint condition of the mathematical model, variable list involved in the mathematical model modeling process, pseudo code for implementing the mathematical model, and advantages and disadvantages of the established mathematical model; training the power service problem solving model according to the reference solution scheme and the corresponding power service problem to obtain the preset power service problem solving model.
2. The power service trouble resolution method of claim 1, wherein, The vector conversion and problem construction on the power service academic documents to obtain a plurality of text vectors and a plurality of power service problem embedding vectors comprise: dividing all the power service academic documents to obtain a plurality of text blocks; and performing vector conversion on all the text blocks to obtain a plurality of text vectors; inputting the text blocks and a preset problem extraction prompt word into a preset large language model to generate a plurality of power service problems; encoding all the power service problems to obtain a plurality of power service problem embedding vectors.
3. The power service trouble resolution method of claim 2, wherein, The dividing all the power service academic documents to obtain a plurality of text blocks comprises: performing format conversion on all the power service academic documents to generate a plurality of initial Markdown documents; performing data cleaning on all the initial Markdown documents to generate target Markdown documents; performing semantic segmentation on each target Markdown document to obtain a plurality of text blocks.
4. The power service trouble resolution method of claim 3, wherein, The vector conversion on all the text blocks to obtain a plurality of text vectors comprises: for each text block, the text block is split into a plurality of sub-word unit sequences; mapping the sub-word unit sequences into text vectors according to a preset encoder to obtain a plurality of text vectors.
5. The power service trouble resolution method of claim 4, wherein, The training of the power service problem solving model according to the reference solution scheme and the corresponding power service problem to obtain the preset power service problem solving model comprises: constructing an input prompt of the power service problem solving model according to the power service problem corresponding to the reference solution scheme; inputting the input prompt and the reference solution into a power business question answering model to be trained for iterative training until a loss function converges, to generate the preset power business question answering model; wherein, at each iteration training, a current predicted solution is generated according to a current input prompt; a current loss function is calculated according to the current predicted solution and a corresponding reference solution, and it is judged whether the current loss function converges; if the current loss function converges, the current power business question answering model is taken as the preset power business question answering model; otherwise, the parameters in the current power business question answering model are adjusted, and the training is continued.
6. An electric service trouble shooting apparatus characterized by comprising: comprising: an input prompt construction module and a solution output module: the input prompt construction module is configured to obtain a user power business question, and construct a model input prompt according to the user power business question; the solution output module is configured to input the model input prompt into a preset power business question answering model to obtain a solution to the user power business question; wherein the training of the preset power business question answering model comprises: obtaining a plurality of power business academic documents, and performing vector conversion and question construction on the power business academic documents to obtain a plurality of text vectors and a plurality of power business question embedding vectors; for each power business question, calculating the similarity between the power business question embedding vector corresponding to the power business question and each text vector, and retaining the top K text vectors with the highest similarity as the corresponding reference text vector; wherein K is a positive integer; inputting the text block corresponding to the reference text vector as a reference text into a preset large language model, inputting the reference text, the power business question corresponding to the reference text, and a preset decision modeling prompt word to generate a reference solution; wherein the reference solution comprises: a problem description of the power business question, an objective function of a mathematical model established for answering the power business question, a constraint condition of the mathematical model, a variable list involved in the mathematical model modeling process, a pseudo code for implementing the mathematical model, and advantages and disadvantages of the established mathematical model; training a power business question answering model according to the reference solution and the corresponding power business question to obtain the preset power business question answering model.
7. The power service trouble shooting apparatus according to claim 6, wherein the solution output module comprises: a text vector construction unit, a power business question generation unit, and a question coding unit; the text vector construction unit is configured to divide all the power business academic documents to obtain a plurality of text blocks; and perform vector conversion on all the text blocks to obtain a plurality of text vectors; the power business question generation unit is configured to input the text blocks and a preset question extraction prompt word into a preset large language model to generate a plurality of power business questions; the question coding unit is configured to code all the power business questions to obtain a plurality of power business question embedding vectors.
8. A terminal device, comprising: An apparatus including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the computer program, when executed by the processor, implements the power business problem solving method according to any one of claims 1 to 5.
9. A storage medium, characterized by The storage medium includes a stored computer program, wherein the computer program, when executed, controls a device in which the storage medium is located to perform the power business problem solving method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Power document intelligent question and answer method and system based on large language model
CN119577082A
Retrieval model training method and apparatus and computer device
WO2025102869A1