Power equipment operation inspection intelligent agent construction method and related system

By building a power equipment operation and inspection intelligent body, combined with multi-stage gradual pre-training and fine-tuning, the professional integration and logical reasoning capabilities of the power equipment operation and inspection model are improved, the shortcomings of intelligent models in the existing technology are solved, and efficient and interpretable operation and inspection decision support is achieved.

CN120409531APending Publication Date: 2025-08-01CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +3
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510470209.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the operation and inspection of existing power equipment, the intelligent model has insufficient professional integration, poor logical reasoning capabilities, low analysis accuracy and no explanatory ability, resulting in low integration of the model and business and low practicality.

Method used

Build a power equipment operation and inspection intelligent body, build a corpus by obtaining corpus, merging the professional vocabulary of equipment, conducting multi-stage gradual pre-training and fine-tuning, combining the equipment operation and inspection business thinking chain for question-and-answer and Monte Carlo tree search, and constructing an evaluation model for inference thinking chain constraints to achieve the professional knowledge understanding of the model and the improvement of logical reasoning capabilities.

Benefits of technology

It significantly improves the accuracy of the model's understanding of power professional terms and operation and inspection processes, enhances logical reasoning capabilities and interpretability of results, shortens the time from problem discovery to resolution, improves operation and inspection decision-making efficiency and accuracy, and reduces operation and maintenance costs and risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409531A_ABST
    Figure CN120409531A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of operation inspection intelligent models, and discloses a power equipment operation inspection intelligent agent construction method and a related system.The power equipment operation inspection intelligent agent construction method comprises the steps that a power equipment related professional word list is introduced when a corpus is constructed, and the power equipment related professional word list is combined with an original word list; the understanding accuracy of the model on electric power terminologies, equipment operation scenes and details in an operation and inspection process can be obviously improved; in the multi-stage progressive pre-training and subsequent fine tuning process, the pre-training model continuously learns in the corpus which is richer and more accordant with the power operation inspection requirement, and professional knowledge and general language understanding ability supplement each other. By adopting multi-stage progressive pre-training, the method can progressively transition from basic language ability to knowledge mastering of a power equipment scene, and the logical reasoning ability of the model in a complex scene is gradually enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of operation and inspection intelligent models, and particularly relates to a method for constructing an intelligent agent for power equipment operation and inspection and a related system. Background Art

[0002] As a core component of the power system, power equipment is an important foundation for the production, transmission, and use of electric energy, directly related to the stability of the power grid and the reliable supply of electric energy. By applying cutting-edge technologies such as artificial intelligence to construct professional models for equipment operation and inspection, it is an effective means to timely detect, diagnose, and dispose of equipment defects and faults, thus significantly improving the operation and maintenance level of power equipment and enhancing the ability to detect and respond to faults. However, limited by factors such as unclear planning of equipment operation and inspection processes and complex task decomposition, narrow business coverage of single perception or cognitive models, and weak collaborative scheduling capabilities of multiple models and multiple business systems, artificial intelligence models in the power equipment operation and inspection scenario currently have problems such as insufficient professional integration, poor logical reasoning ability, low analysis accuracy, and lack of interpretability, ultimately resulting in low model-business integration and practicality. Summary of the Invention

[0003] An object of the present invention is to overcome the problems of insufficient professional integration, poor logical reasoning ability, low analysis accuracy, and lack of interpretability of the above intelligent models, and provide a method for constructing an intelligent agent for power equipment operation and inspection and a related system.

[0004] To achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a method for constructing an intelligent agent for power equipment operation and inspection, including the following steps: Obtain the corpus of the required equipment to establish a corpus, construct an equipment professional vocabulary based on the corpus, and after merging the constructed equipment professional vocabulary and the original vocabulary, construct an intelligent agent model; Perform multi-stage progressive pre-training on the intelligent agent model to obtain a pre-trained model; Use the pre-trained model to answer questions about the corpus of the required equipment, and fine-tune the pre-trained model according to the answer results to obtain a fine-tuned model; Infer the corpus of the required equipment through the fine-tuned model to generate an initial inference result, retrieve the corpus based on the initial inference result to obtain retrieval information, and modify the initial inference result through the retrieval information to obtain a final result.

[0005] A further improvement of the present invention is that the corpus of the required equipment includes general corpus, power industry corpus, and equipment operation and inspection business thinking chain.

[0006] A further improvement of the present invention is that the specific method for performing multi-stage progressive pre-training on the intelligent agent model to obtain a pre-trained model is as follows: Freeze the main structure parameters of the agent model, train and update the embedding layer parameters of the agent model to obtain a first pre-trained model; Based on a preset pre-trained mixed corpus, use multi-stage progressive pre-training to train and update all the parameters of the first pre-trained model to obtain a second pre-trained model as the final pre-trained model.

[0007] A further improvement of the present invention is that a pre-trained model is used to answer questions about the corpus of the required device, and the pre-trained model is fine-tuned according to the question-and-answer results. The specific method for obtaining the fine-tuned model is as follows: Use the preset operation and maintenance business thinking chain of the device as the original question and answer to answer the first business with an inference process in the corpus of the required device to obtain the first business question-and-answer triple data, and use the first business question-and-answer triple data to fine-tune the second pre-trained model to obtain a first fine-tuned model; Construct the second business question-and-answer triple data through the Monte Carlo tree search result based on the business thinking chain evaluation, and use the second business question-and-answer triple data to fine-tune the second pre-trained model to obtain a second fine-tuned model; Construct an evaluation model with inference thinking chain constraints, and use the evaluation model to train the second fine-tuned model through reinforcement learning to obtain the final fine-tuned model.

[0008] A further improvement of the present invention is that the preset operation and maintenance business thinking chain of the device is used as the original question and answer to answer the first business with an inference process in the corpus of the required device to obtain the first business question-and-answer triple data, and the first business question-and-answer triple data is used to fine-tune the second pre-trained model to obtain the first fine-tuned model. The specific method is as follows: Use the preset operation and maintenance business thinking chain of the device to construct an inference process from the question to the answer, and generate a prompt word according to the inference process; Combine the generated prompt word with each question-and-answer pair in the data of the original question and answer as the input data of the second pre-trained model; Repeat the process of inputting the input data into the first business with an inference process in the corpus of the required device to answer questions, and construct the first business question-and-answer triple data; Use the first business question-and-answer triple data to fine-tune the second pre-trained model to obtain a first fine-tuned model.

[0009] A further improvement of the present invention is that the second business question-and-answer triple data is constructed through the Monte Carlo tree search result based on the business thinking chain evaluation, and the second business question-and-answer triple data is used to fine-tune the second pre-trained model to obtain the second fine-tuned model. The specific method is as follows: Through Monte Carlo tree search based on business thinking chain evaluation, the optimal path update is selected, and the reasoning process in the first business question and answer triple data is updated using the optimal search path to construct the second business question and answer triple data; Based on the second business question and answer triplet data, fine-tune the second pre-trained model to obtain a second fine-tuned model.

[0010] A further improvement of the present invention is to construct an evaluation model for reasoning thought chain constraints, and use the evaluation model to train the second fine-tuning model through reinforcement learning. The specific method for obtaining the final fine-tuning model is as follows: Based on the first fine-tuning model and combined with the preset equipment operation and maintenance business thinking chain, a reasoning path evaluation model is constructed; Extracting questions from the second business question-answer triplet data to form a question set; Based on the preset equipment operation and maintenance business thinking chain and combined with the reasoning path evaluation model, a preference data generation model constrained by the business thinking chain is constructed through the second fine-tuning model; Construct a preference dataset based on the preference data generation model; Based on the preference dataset, the second fine-tuning model is fine-tuned by the preference optimization method to obtain the final fine-tuning model.

[0011] In a second aspect, the present invention provides a system for constructing an intelligent entity for operation and maintenance of electric power equipment, comprising: The intelligent agent model construction module is used to obtain the corpus of the required equipment to build a corpus, construct a device professional vocabulary based on the corpus, merge the constructed device professional vocabulary with the original vocabulary, and then build the intelligent agent model; The pre-training module is used to perform multi-stage progressive pre-training on the agent model to obtain a pre-trained model; The fine-tuning module is used to use the pre-trained model to answer questions about the corpus of the required device, and fine-tune the pre-trained model based on the question-answering results to obtain a fine-tuned model; The reasoning module is used to reason about the corpus of the required device through the fine-tuning model to generate the initial reasoning result, search the corpus based on the initial reasoning result to obtain the retrieval information, and modify the initial reasoning result based on the retrieval information to obtain the final result.

[0012] A further improvement of the present invention is that the specific functions of the pre-training module are implemented by the following method: Freeze the main structure parameters of the intelligent agent model, train and update the embedding layer parameters of the intelligent agent model, and obtain a first pre-trained model; Based on the preset pre-trained mixed corpus, multi-stage progressive pre-training is used to train and update all parameters of the first pre-trained model to obtain the second pre-trained model as the final pre-trained model.

[0013] A further improvement of the present invention lies in that the specific functions of the fine-tuning module are implemented by the following method: Using a preset operation and maintenance business thought chain of equipment as the original Q&A, conducting Q&A on the first service with an inference process in the corpus of the required equipment to obtain the first service Q&A triple data, and using the first service Q&A triple data to fine-tune the second pre-trained model to obtain the first fine-tuned model; Constructing the second service Q&A triple data based on the Monte Carlo tree search results evaluated by the business thought chain, and using the second service Q&A triple data to fine-tune the second pre-trained model to obtain the second fine-tuned model; Constructing an evaluation model constrained by the inference thought chain, and using the evaluation model to train the second fine-tuned model through reinforcement learning to obtain the final fine-tuned model.

[0014] In a third aspect, the present invention provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of a method for constructing an intelligent agent for power equipment operation and maintenance are implemented.

[0015] In a fourth aspect, the present invention provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for constructing an intelligent agent for power equipment operation and maintenance are implemented.

[0016] Compared with the prior art, the present invention has the following beneficial effects: By introducing a professional vocabulary related to power equipment when constructing the corpus and merging it with the original vocabulary, the present invention can significantly improve the accuracy of the model's understanding of power professional terms, equipment operation scenarios, and details in the operation and maintenance process; during the multi-stage progressive pre-training and subsequent fine-tuning process, the pre-trained model continuously learns in a corpus that is richer and more in line with the requirements of power operation and maintenance, and the professional knowledge and general language understanding ability complement each other. The use of multi-stage progressive pre-training can gradually enable the present invention to transition from basic language ability to the mastery of knowledge of power equipment scenarios, and gradually strengthen the model's logical reasoning ability in complex scenarios; when combined with question-and-answer fine-tuning, deep learning is carried out for common problems, fault scenarios, and diagnostic processes in the operation and maintenance of power equipment, and the extraction of key points and the accuracy of the reasoning results are significantly improved. After the initial reasoning is completed, by retrieving the equipment professional vocabulary and combining the retrieved information with the initial reasoning result for correction, the final result is not only more accurate, but also has verifiable logical support from a professional perspective; the link of retrieving the professional vocabulary makes the model reasoning process traceable and verifiable, avoids the "black box" type of result output, enhances the interpretability of the result, and is convenient for review, verification, and validation in the power operation and maintenance scenario. The present invention can play a role in multiple business scenarios such as overhaul, maintenance, fault diagnosis, and risk assessment by understanding and efficiently processing various types of data related to the operation and maintenance of power equipment; with the cooperation of front-line operation and maintenance personnel and expert teams, it can significantly shorten the time from problem discovery to solution, improve the efficiency and accuracy of operation and maintenance decision-making, and reduce operation and maintenance costs and risks. In summary, the present invention combines the power professional vocabulary with the general pre-trained model, and iteratively optimizes through multi-stage progressive pre-training and retrieval correction mechanisms, not only effectively filling the knowledge blind spots of the general intelligent model in the power professional subdivision field, but also making the result have higher reliability and interpretability, and can better meet the business requirements in the power equipment operation and maintenance scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a flowchart of Embodiment 1; Figure 2 is a system diagram of Embodiment 2; Figure 3 is a system diagram of Embodiment 7; Figure 4 is a system diagram of Embodiment 8. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0018] To further understand the content of the present invention, the following describes the present invention in detail with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments are only for explaining the present invention and not for limiting it.

[0019] Embodiment 1: Refer to Figure 1, a method for constructing an intelligent agent for operation and maintenance of power equipment, comprising the following steps: S1. Obtain the corpus of the required equipment to establish a corpus, construct a professional vocabulary for the equipment according to the corpus, and after merging the constructed professional vocabulary for the equipment and the original vocabulary, construct an intelligent agent model.

[0020] S2. Perform multi-stage progressive pre-training on the intelligent agent model to obtain a pre-trained model.

[0021] S3. Use the pre-trained model to answer questions about the corpus of the required equipment, and fine-tune the pre-trained model according to the question-and-answer results to obtain a fine-tuned model.

[0022] S4. Use the fine-tuned model to reason about the corpus of the required equipment to generate an initial reasoning result, retrieve the corpus according to the initial reasoning result to obtain retrieval information, and modify the initial reasoning result through the retrieval information to obtain a final result.

[0023] Embodiment 2: See Figure 2 , a system for constructing an intelligent agent for operation and maintenance of power equipment, comprising: An intelligent agent model construction module, configured to obtain the corpus of the required equipment to establish a corpus, construct a professional vocabulary for the equipment according to the corpus, and after merging the constructed professional vocabulary for the equipment and the original vocabulary, construct an intelligent agent model; A pre-training module, configured to perform multi-stage progressive pre-training on the intelligent agent model to obtain a pre-trained model; A fine-tuning module, configured to use the pre-trained model to answer questions about the corpus of the required equipment, and fine-tune the pre-trained model according to the question-and-answer results to obtain a fine-tuned model; An inference module, configured to use the fine-tuned model to reason about the corpus of the required equipment to generate an initial reasoning result, retrieve the corpus according to the initial reasoning result to obtain retrieval information, and modify the initial reasoning result through the retrieval information to obtain a final result.

[0024] Embodiment 3: In this embodiment, the corpus of the equipment in the above embodiment is further defined. The corpus of the equipment includes general corpus, power industry corpus, and operation and maintenance business thinking chain of the equipment. The general corpus includes a wide range of general data such as high-quality Chinese, English, multilingual, code, and mathematics. The power industry corpus includes more than 20 categories of power knowledge documents covering multiple business fields such as power general, equipment, dispatching, marketing, development, materials, infrastructure, finance, and safety supervision, such as books and textbooks, technical standards, policy documents, and system regulations. The operation and maintenance business thinking chain corpus of the equipment includes multiple core business rule libraries formed by current guidelines, standard systems, and expert experience summaries, such as equipment status assessment inference rule libraries, equipment defect and fault diagnosis inference rule libraries, defect standard libraries, operation content libraries, and process risk libraries.

[0025] Example 4: This embodiment further defines the method for performing multi-stage progressive pre-training on the agent model in the above embodiment to obtain a pre-trained model. The specific method is as follows: Step 1: Freeze the main structure parameters of the intelligent agent model, train and update the embedding layer parameters of the intelligent agent model, and obtain a first pre-trained model.

[0026] In step 2, based on the preset pre-trained mixed corpus, multi-stage progressive pre-training is used to train and update all parameters of the first pre-trained model to obtain a second pre-trained model as the final pre-trained model.

[0027] The above two steps are combined and explained below.

[0028] First, to improve the pre-trained model's ability to understand and encode / decode business vocabulary related to power equipment, we used word segmentation algorithms to train a specialized vocabulary table (PV), such as BPE, WordPiece, Unigram, and SentencePiece, for the equipment power knowledge documents and the equipment operation and maintenance business thought chain corpus (EC). The specialized vocabulary table was then merged with the vocabulary table (OV) of the original basic large model. This process can be expressed as follows:

[0029]

[0030] in, For the adjusted vocabulary, For word segmentation operation, This is the vocabulary merging operation. Then, the main structural parameters of the large model are frozen, while the embedding layer parameters remain trainable. Training and updating for the next token prediction task are performed to ensure that the newly added professional word vectors can be coordinated with the semantic space of the original large model. This allows for the representation and understanding of power equipment business-related vocabulary without changing the original model performance as much as possible. This process can be expressed as follows:

[0031] in, is the training loss value for the embedding layer parameters, is the input text sequence, is the target text sequence, are the embedding layer parameters, is a logarithmic operation, It is the index of the text sequence. Finally, based on the pre-trained mixed corpus, a multi-stage progressive pre-training strategy is adopted. Considering factors such as data categories and business difficulties, corpus subsets are constructed in stages from easy to difficult to train for the next token prediction task, thereby obtaining the final pre-trained model for the operation and maintenance of power equipment. This process can be expressed as:

[0032] Among them, is the training loss value of all parameters of the model in the th stage, is the full set of parameters, is the corpus in the th stage, is the input and target text sequence pair.

[0033] Example 5: This example further defines the method of using the pre-trained model to answer questions about the corpus of the required equipment, and fine-tuning the pre-trained model according to the question-and-answer results to obtain the fine-tuned model. The specific method is as follows: Step 1, use the preset operation and maintenance business thinking chain of the equipment as the original question and answer, answer the first business with an inference process in the corpus of the required equipment to obtain the first business question-and-answer triple data, and use the first business question-and-answer triple data to fine-tune the second pre-trained model to obtain the first fine-tuned model.

[0034] Step 2, construct the second business question-and-answer triple data through the Monte Carlo tree search results based on the evaluation of the business thinking chain, and use the second business question-and-answer triple data to fine-tune the second pre-trained model to obtain the second fine-tuned model.

[0035] Step 3, construct an evaluation model with inference thinking chain constraints, and use the evaluation model to train the second fine-tuned model through reinforcement learning to obtain the final fine-tuned model.

[0036] The specific method of Step 1 is as follows: The first step is to use the preset operation and maintenance business thinking chain of the equipment to construct the inference process from the question to the answer, and generate prompt words according to the inference process.

[0037] The second step is to combine the generated prompt words with each question-and-answer pair in the original question-and-answer data as the input data of the second pre-trained model.

[0038] The third step is to repeatedly input the input data into the first business with an inference process in the corpus of the required equipment to answer questions and construct the first business question-and-answer triple data.

[0039] The fourth step is to use the first business question-and-answer triple data to fine-tune the second pre-trained model to obtain the first fine-tuned model.

[0040] The above four steps are combined and explained below.

[0041] First, generate prompt words for the second pre-trained model to build the question-to-answer reasoning process , specifically including the equipment operation and maintenance business thinking chain , generate instructions The two parts are used to provide professional knowledge and describe the generation requirements. Then, for the original question-answer data The Question and answer pairs , combined to generate prompt words and original question-answer pairs as the second pre-training model The process can be expressed as:

[0042] in, Represents a combined operation, Indicates the generated Repeat the process to construct the first business question-answer triple data ,in Indicates the Finally, based on the constructed first business question-answer triple data, an efficient parameter fine-tuning method is used to train the second pre-trained model, including but not limited to LoRA and QLora, to obtain the first fine-tuning model. The training loss function at this stage can be expressed as:

[0043] in, is the number of triples in the first business question and answer triple data, is the length of the text sequence after the reasoning process and the answer are combined, Added new efficient fine-tuning parameters.

[0044] Specifically, two prompt word examples for equipment status assessment and defect handling are given. For transformer status assessment, the prompt word examples may be: "Condition assessment reasoning process: For transformers, the equipment operating status is comprehensively analyzed based on the state quantity indicators of seven state quantity types, including oil chromatography, partial discharge, mechanical, operation, status, pressure and temperature. The specific indicators are as follows: 1. Oil chromatogram three-ratio results and fault type; 2. Whether there is any abnormality in partial discharge; 3. Whether there is any abnormality in tap changer vibration; 4. Whether there is any abnormality in core clamp current; 5. Whether there is any abnormality in bushing end screen voltage; 6. Whether there is any abnormality in SF6 gas pressure; 7. Whether there is any abnormality in oil temperature.

[0045] Generation requirements: Based on the above background knowledge, think step by step to generate the intermediate reasoning process for the following question-and-answer pairs. The process must strictly follow the above process, without making up randomly, and each step of reasoning should be concise and condensed. For defect handling, it can be: "Defect handling reasoning process: The process risk level of the transformer routine test is medium, which may cause high-altitude falls, mechanical injuries, low-voltage electric shocks, and high-voltage electric shocks; insulation breakdown and residual magnetism cause protection malfunctions. The corresponding risk prevention measures are <omitted>, and the process control measures are <omitted>.

[0046] Generation requirements: Based on the above background knowledge, think step by step to generate the intermediate reasoning process for the following question-and-answer pairs. The process must strictly follow the above process, without making up randomly, and each step of reasoning should be concise and condensed. The specific method of step two is as follows: First, through Monte Carlo tree search based on the evaluation of the business thought chain, select the optimal path for update, and use the optimal search path to update the reasoning process in the first business Q&A triple data to construct the second business Q&A triple data; Second, based on the second business Q&A triple data, fine-tune the second pre-trained model to obtain the second fine-tuned model.

[0047] The above two steps will be combined and described below.

[0048] First, according to the equipment operation and maintenance business thought chain, considering the two factors of reasoning correctness and integrity, construct an evaluation prompt word for the first fine-tuned model , to form an inference path evaluation model. Then, use Monte Carlo tree search to update the reasoning process in the first business Q&A triple data to form high-quality second business Q&A triple data; specifically, for each triple, repeat the following four steps (1)-(4) until the end marker is output or the iteration number threshold is reached to obtain a better reasoning process and replace the original reasoning process.

[0049] (1) Selection: Starting from the root node in the inference tree structure, repeatedly select the branch with the highest UCB1 (Upper Confidence Bound) metric value until the leaf node. The specific calculation method is:

[0050] where represents the reward score of the current node, is a constant, represents the number of visits to the node, represents the number of visits to its parent node; (2) Expansion: For the leaf node selected in the selection stage, use the first fine-tuned model to generate A new node representing a new inference path, the state of which is composed of the state and action of the current leaf node:

[0051] Among them, is the depth where the selected leaf node is located, is the depth where the new node is expanded, represents the state of the selected leaf node (the text formed by concatenating the states of all nodes in the inference path), represents the action of the selected leaf node (the text generated by the first fine-tuning model based on the node state), represents the state of the th expanded new node; the state of the new node serves as the context for the inference of the first fine-tuning model. At the same time, the generated text of the expanded nodes is introduced to avoid redundant generation, and the generation diversity is controlled by adjusting the inference temperature parameter. The specific expansion process can be expressed as:

[0052] Among them, represents the generated text of the previous th newly expanded node, represents the generated text of the th newly expanded node; (3) Evaluation: Evaluate the newly expanded inference path of the model through the inference path. If the inference is incorrect, it is rated as a low score; if the inference is correct but incomplete, it is rated as a medium score; if the inference is correct and complete, it is rated as a high score. This process can be expressed as:

[0053] Among them, is the score of the newly expanded node; (4) Backtracking: Recursively transfer the reward increment from the leaf node to the parent node to update the reward of the parent node. This calculation process is:

[0054]

[0055] Among them, represents the number of times the node is visited, represents the reward increment provided by the child node to the parent node, is used to balance the original reward of the parent node and the increment of the child node.

[0056] ​Finally, based on the constructed second business Q&A triple data, use an efficient parameter fine-tuning method, including but not limited to LoRA and QLora, to train the second pre-trained model to obtain the second fine-tuned model. The training loss function at this stage can be expressed as:

[0057] where is the number of triples in the second business Q&A triple data, is the length of the text sequence after updating the inference process and answer combination, represents the th updated inference process in the

[0058] Specifically, an example of the prompt for the inference path evaluation model can be: "Device operation and maintenance business chain of thought: <To be determined according to the actual situation, omitted here>.

[0059] Evaluation rules: Based on the above background knowledge, comprehensively evaluate the following inference process from two aspects: inference correctness and integrity. The score range is [1, 10]. The higher the score, the better the inference process, and vice versa. If the inference is incorrect, it is rated as a low score. If the inference is correct but incomplete, it is rated as a medium score. If the inference is correct and complete, it is rated as a high score. The result only outputs the evaluation score." The specific method for Step 3 is as follows: First, based on the first fine-tuned model, combined with the preset device operation and maintenance business chain of thought, construct an inference path evaluation model.

[0060] Second, extract the questions in the second business Q&A triple data to form a question set.

[0061] Third, based on the preset device operation and maintenance business chain of thought, combined with the inference path evaluation model, construct a preference data generation model constrained by the business chain of thought through the second fine-tuned model.

[0062] Fourth, construct a preference data set according to the preference data generation model.

[0063] Fifth, based on the preference data set, fine-tune the second fine-tuned model through a preference optimization method to obtain the final fine-tuned model.

[0064] The above five steps will be combined and described below.

[0065] First, extract the questions in the second business Q&A triple data to form a question set , where represents the th question; then, based on the device operation and maintenance business chain of thought, design a two-stage prompt, and through the second fine-tuned model Construct a preference data generation model with business thinking chain constraints to construct a preference data set for the question set Specifically, for each question in the question set, repeat the following three steps (1)-(3).

[0066] (1) Adjust the temperature parameter through the second fine-tuning model to generate two answers for the question. This process can be formalized as:

[0067]

[0068] where and represent two answers to the th question, and represent two randomly selected model inference temperature parameters; (2) Based on the business thinking chain of equipment operation and maintenance, combine the question, answer text, and evaluation criterion description to form a comparative analysis prompt ={context, , , ,criterion}. The process of generating a comparative analysis of the answer through the second fine-tuning model can be formalized as:

[0069] where is the comparative analysis result corresponding to the th question; (3) Based on the comparative analysis process, form a preference output prompt ={ ,optional}. The process of outputting a preference answer through the second fine-tuning model can be formalized as:

[0070] where is the preference answer result corresponding to the th question.

[0071] Finally, based on the constructed preference data set, fine-tune the second fine-tuning model through the direct preference optimization (DPO) method to obtain the third fine-tuning model .

[0072] Specifically, an example of the comparative analysis prompt can be: "Business thinking chain of equipment operation and maintenance: <to be determined according to the actual situation, omitted here> Question: The grounding current of the transformer core is 350 mA, and the grounding current of the clamping piece is 300 mA. Is there any abnormality? Answer 1: The grounding current of the core is abnormal, and the grounding current of the clamping piece is abnormal. There is a synchronous increase phenomenon. The status of this transformer is yellow code. The reason is that the insulation between the core and the clamping piece is damaged or overlapped. It is necessary to carry out grounding current monitoring and, if necessary, install a current-limiting resistor live.

[0073] Answer 2: The grounding current of the core is abnormal, and the grounding current of the clamping piece is abnormal. The insulation between the core and the clamping piece is abnormal. The status of this transformer is yellow code. It is necessary to carry out grounding current monitoring and, if necessary, install a current-limiting resistor live.

[0074] Comparative analysis requirements: Based on the above equipment operation and maintenance business thinking chain, conduct a detailed comparative analysis of the two answers from the aspects of reasoning correctness and integrity, and the results should be well-founded. Give examples of preference output prompts, which can be: "Equipment operation and maintenance business thinking chain: <To be determined according to the actual situation, omitted here> Question: The grounding current of the transformer core is 350 mA, and the grounding current of the clamping piece is 300 mA. Is there any abnormality? Answer 1: The grounding current of the core is abnormal, and the grounding current of the clamping piece is abnormal. There is a synchronous increase phenomenon. The status of this transformer is yellow code. The reason is that the insulation between the core and the clamping piece is damaged or overlapped. It is necessary to carry out grounding current monitoring and, if necessary, install a current-limiting resistor live.

[0075] Answer 2: The grounding current of the core is abnormal, and the grounding current of the clamping piece is abnormal. The insulation between the core and the clamping piece is abnormal. The status of this transformer is yellow code. It is necessary to carry out grounding current monitoring and, if necessary, install a current-limiting resistor live.

[0076] Analysis result: Both answers judge that there is an abnormality in the transformer core clamping piece. Answer 1 also discovers the synchronous increase phenomenon and gives a possible reason. In contrast, the output of Answer 2 is less complete.

[0077] Preference output requirements: Select the preferred answer based on the above information. If you choose Answer 1, output 1; if you choose Answer 2, output 2. Do not output other irrelevant information. Example 6: This example further defines the method in the above example of generating an initial reasoning result by fine-tuning the model for the corpus of the required equipment, retrieving the corpus based on the initial reasoning result to obtain retrieval information, and modifying the initial reasoning result through the retrieval information to obtain the final result. The specific method is as follows: Step 1: The intelligent agent model generates an initial reasoning process and answer for the user's question. This process can be formalized as:

[0078] Among them, represents the initial reasoning process and answer, represents the user's question; Step 2: Construct query generation prompt words , and generate a query statement according to the reasoning content through the third fine-tuning model. This process can be formalized as:

[0079] Among them, represents generating a query; Step 3: Retrieve the equipment operation and maintenance business thinking chain knowledge base based on the generated query statement, and return the M pieces of knowledge with the highest similarity. This process can be formalized as:

[0080] Among them, represents the retrieval operation, represents the M pieces of knowledge with the highest similarity.

[0081] Step 4: Construct reasoning process correction prompt words , and output the answer after correcting the initial reasoning process according to the retrieved knowledge through the third fine-tuning model. This process can be formalized as:

[0082] Among them, represents the corrected reasoning process and answer.

[0083] Specifically, an example of the prompt words for query generation can be: "Question: <To be determined according to the actual situation, omitted here>.

[0084] Reasoning content: <To be determined according to the actual situation, omitted here>.

[0085] Requirement: Generate corresponding query statements for the parts that cannot be determined according to the above question and reasoning content to retrieve the knowledge base." An example of the prompt words for reasoning process correction can be: "Question: <To be determined according to the actual situation, omitted here>.

[0086] Reasoning content: <To be determined according to the actual situation, omitted here>.

[0087] Reference knowledge: <To be determined according to the actual situation, omitted here>.

[0088] Requirement: Based on the above question, correct the reasoning content based on the reference knowledge and give the final answer." Example 7: See Figure 3 , the system is based on the cloud-edge size model collaboration mechanism. The edge side is responsible for collecting device-related state parameters and reasoning of professional small models, and the cloud side is responsible for the multi-modal sample library, the device operation and maintenance L2 large model, the knowledge base, and tools. Specifically, device state parameters such as oil chromatogram, temperature, partial discharge, grounding current, and vibration collected by the edge side are real-time aggregated into the cloud-side multi-modal sample library, and the multi-modal sample library provides data support for the construction and update of the device operation and maintenance L2 large model. The core of the construction of the device operation and maintenance L2 large model is the business execution process and the device operation and maintenance thinking chain. By orchestrating and scheduling the cloud-side knowledge base and tools, and the edge-side professional small models, the device state fusion evaluation and defect and fault disposal decision are realized.

[0089] Embodiment 8: Please refer to Figure 4 As shown, the present invention also provides an electronic device 100 for a method of constructing a power device operation and maintenance intelligent body; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.

[0090] The memory 101 can be used to store the computer program 103. The processor 102 realizes the steps of a method for constructing a power device operation and maintenance intelligent body described in Embodiment 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the electronic device 100 (such as audio data, etc.). In addition, the memory 101 may include non-volatile memory, such as 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 magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.

[0091] The at least one processor 102 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or the processor 102 may also be any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and connects various parts of the entire electronic device 100 through various interfaces and lines.

[0092] The memory 101 in the electronic device 100 stores a plurality of instructions to implement a method for constructing an intelligent agent for operation and maintenance of power equipment. The processor 102 can execute the plurality of instructions to implement: Obtain the corpus of the required equipment to establish a corpus, construct a device-specific vocabulary based on the corpus, and after merging the constructed device-specific vocabulary and the original vocabulary, construct an intelligent agent model; Perform multi-stage progressive pre-training on the intelligent agent model to obtain a pre-trained model; Use the pre-trained model to answer questions about the corpus of the required equipment, and fine-tune the pre-trained model according to the question-and-answer results to obtain a fine-tuned model; Infer the corpus of the required equipment through the fine-tuned model to generate an initial inference result, retrieve the corpus according to the initial inference result to obtain retrieval information, and modify the initial inference result through the retrieval information to obtain a final result.

[0093] Embodiment 5 If the modules / units integrated in the electronic device 100 are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, and read-only memory (ROM, Read-Only Memory).

[0094] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0095] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0096] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable apparatus to produce a computer-implemented process, thereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one process or a plurality of processes and / or boxes. Figure 1 one process or a plurality of processes and / or boxes Figure 1 steps of the functions specified in one box or a plurality of boxes.

[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.

Claims

1. A method for constructing an intelligent agent for power equipment operation and maintenance, characterized in that It includes the following steps: Obtain the corpus of the required equipment to establish a corpus, construct an equipment professional vocabulary based on the corpus, and after merging the constructed equipment professional vocabulary and the original vocabulary, construct an agent model; Perform multi-stage progressive pre-training on the agent model to obtain a pre-trained model; Use the pre-trained model to answer questions about the corpus of the required equipment, and fine-tune the pre-trained model according to the question-and-answer results to obtain a fine-tuned model; Infer the corpus of the required equipment through the fine-tuned model to generate an initial inference result, retrieve the corpus according to the initial inference result to obtain retrieval information, and modify the initial inference result through the retrieval information to obtain a final result.

2. The method for constructing an intelligent agent for operation and maintenance of power equipment according to claim 1, wherein The corpus of the required equipment includes general corpus, power industry corpus, and equipment operation and maintenance business thought chain.

3. A method for constructing an intelligent agent for power equipment operation and maintenance according to claim 1, characterized in that The specific method for performing multi-stage progressive pre-training on the agent model to obtain a pre-trained model is as follows: Freeze the main structure parameters of the agent model, train and update the embedding layer parameters of the agent model to obtain a first pre-trained model; Based on a preset pre-training mixed corpus, use multi-stage progressive pre-training to train and update all the parameters of the first pre-trained model to obtain a second pre-trained model as the final pre-trained model.

4. A method for constructing an intelligent agent for operation and maintenance of power equipment according to claim 1, characterized in that The specific method for using the pre-trained model to answer questions about the corpus of the required equipment and fine-tuning the pre-trained model according to the question-and-answer results to obtain a fine-tuned model is as follows: Use the preset equipment operation and maintenance business thought chain as the original question and answer, answer the first business with an inference process in the corpus of the required equipment to obtain the first business question-and-answer triple data, and use the first business question-and-answer triple data to fine-tune the second pre-trained model to obtain a first fine-tuned model; Construct the second business question-and-answer triple data through the Monte Carlo tree search result based on the business thought chain evaluation, and use the second business question-and-answer triple data to fine-tune the second pre-trained model to obtain a second fine-tuned model; Construct an evaluation model with inference thought chain constraints, and use the evaluation model to train the second fine-tuned model through reinforcement learning to obtain the final fine-tuned model.

5. A method for constructing an intelligent agent for operation and maintenance of power equipment according to claim 4, characterized in that, The specific method for using the preset equipment operation and maintenance business thought chain as the original question and answer, answering the first business with an inference process in the corpus of the required equipment to obtain the first business question-and-answer triple data, and using the first business question-and-answer triple data to fine-tune the second pre-trained model to obtain a first fine-tuned model is as follows: Use the preset equipment operation and maintenance business thought chain to construct an inference process from the question to the answer, and generate a prompt word according to the inference process; Combine the generated prompt word with each question-and-answer pair in the data of the original question and answer as the input data of the second pre-trained model; Repeat inputting the input data into the first business with an inference process in the corpus of the required equipment to answer questions, and construct the first business question-and-answer triple data; Use the first business question-and-answer triple data to fine-tune the second pre-trained model to obtain a first fine-tuned model.

6. A method for constructing an intelligent agent for operation and maintenance of power equipment according to claim 4, characterized in that, The specific method for constructing the second business question-and-answer triple data through the Monte Carlo tree search result based on the business thought chain evaluation and using the second business question-and-answer triple data to fine-tune the second pre-trained model to obtain a second fine-tuned model is as follows: Through Monte Carlo tree search based on business thinking chain evaluation, select the optimal path for update, and use the optimal search path to update the inference process in the first business Q&A triple data to construct the second business Q&A triple data; Based on the second business Q&A triple data, fine-tune the second pre-trained model to obtain the second fine-tuned model.

7. A method for constructing an intelligent agent for operation and maintenance of power equipment according to claim 4, characterized in that The specific method for constructing an evaluation model with inference thinking chain constraints and training the second fine-tuned model by the evaluation model through reinforcement learning to obtain the final fine-tuned model is as follows: Based on the first fine-tuned model, combined with the preset device operation and maintenance business thinking chain, construct an inference path evaluation model; Extract the questions in the second business Q&A triple data to form a question set; Based on the preset device operation and maintenance business thinking chain, combined with the inference path evaluation model, construct a preference data generation model with business thinking chain constraints through the second fine-tuned model; Construct a preference data set according to the preference data generation model; Based on the preference data set, fine-tune the second fine-tuned model through the preference optimization method to obtain the final fine-tuned model.

8. An intelligent agent construction system for operation and maintenance of power equipment, characterized in that, Including: An agent model construction module, which is used to obtain the corpus of the required device to establish a corpus, construct a device professional vocabulary according to the corpus, and after merging the constructed device professional vocabulary and the original vocabulary, construct an agent model; A pre-training module, which is used to perform multi-stage progressive pre-training on the agent model to obtain a pre-trained model; A fine-tuning module, which is used to use the pre-trained model to answer questions about the corpus of the required device, and fine-tune the pre-trained model according to the answer results to obtain a fine-tuned model; An inference module, which is used to infer the corpus of the required device through the fine-tuned model to generate an initial inference result, retrieve the corpus according to the initial inference result to obtain retrieval information, and modify the initial inference result through the retrieval information to obtain the final result.

9. The intelligent agent construction system for power equipment operation and maintenance according to claim 8, characterized in that The specific functions of the pre-training module are implemented by the following methods: Freeze the main structure parameters of the agent model, train and update the embedding layer parameters of the agent model to obtain the first pre-trained model; Based on the preset pre-training mixed corpus, use multi-stage progressive pre-training to train and update the full-scale parameters of the first pre-trained model to obtain the second pre-trained model as the final pre-trained model.

10. A system for constructing an intelligent agent for power equipment operation and maintenance according to claim 8, characterized in that, The specific functions of the fine-tuning module are implemented by the following methods: Use the preset device operation and maintenance business thinking chain as the original Q&A to answer the first business with an inference process in the corpus of the required device to obtain the first business Q&A triple data, and use the first business Q&A triple data to fine-tune the second pre-trained model to obtain the first fine-tuned model; Construct the second business Q&A triple data through the Monte Carlo tree search results based on business thinking chain evaluation, and use the second business Q&A triple data to fine-tune the second pre-trained model to obtain the second fine-tuned model; Construct an evaluation model with inference thinking chain constraints, and use the evaluation model to train the second fine-tuned model through reinforcement learning to obtain the final fine-tuned model.

11. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method for constructing an intelligent agent for power equipment operation and maintenance according to any one of claims 1 to 7.

12. A storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by a processor, it implements the steps of a method for constructing an intelligent agent for power equipment operation and maintenance inspection described in any one of claims 1 to 7.

Citation Information

Cited By

  • Power dispatching scene-oriented thinking chain question and answer data synthesis method and device

    CN121303370A