Power report generation method, system, device and medium based on adaptive learning

By adopting an adaptive learning-based power report generation method, integrating multi-source data and optimizing the model, the problems of insufficient data integration and professionalism in power report generation are solved, realizing the intelligence and real-time performance of power reports, and improving the accuracy of reports and fault diagnosis capabilities.

CN120873028BActive Publication Date: 2026-02-06STATE GRID ZHEJIANG ELECTRIC POWER CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511359520.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2026-02-06
Estimated Expiration
2045-09-23

AI Technical Summary

Technical Problem

Existing methods for generating power reports are unable to effectively integrate multi-source data, lack flexibility and professionalism, and cannot reflect the dynamic changes of the power system in real time. This results in reports with limited content and insufficient accuracy, which affects the level of intelligent management.

Method used

An adaptive learning-based power report generation method is adopted. This method involves collecting and preprocessing power system data, using power knowledge-driven prompting technology to transform it into prompting words, and fusing it with a historical fault report database through a cross-modal feature enhancement mechanism. The report generation model is then optimized by combining an adaptive reflective learning loss function to ensure that the report content conforms to power professional knowledge.

Benefits of technology

It improves the professionalism and accuracy of reports, reflects equipment status in real time, enriches report content, enhances fault diagnosis and prevention capabilities, and strengthens the intelligence and practicality of the power report generation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873028B_ABST
    Figure CN120873028B_ABST
Patent Text Reader

Abstract

The application discloses a power report generation method, system, device and medium based on adaptive learning, which is applied to the field of power report and comprises the following steps: power knowledge driven prompt technology is used to convert power professional knowledge into prompt word units, and the prompt word units are used as context information; through a cross-modal feature enhancement mechanism, a historical report segment similar to the current device state is retrieved from a historical fault report database, and is fused with preprocessed power operation data to generate an enhanced feature representation; the enhanced feature representation and the prompt word units are input into a report generation model, an adaptive reflection learning loss function is used, loss weights are dynamically adjusted according to the learning state of data categories in the training process, and the report generation model is optimized; and a power field device inspection report is generated according to the optimized model. The application improves the professionalism and accuracy of the report content, and enhances the intelligent level and practicability of the power report generation system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power report, in particular to a power report generation method, system, device and medium based on adaptive learning. BACKGROUND

[0002] With the intelligentization and digitalization transformation of the power system, the operation data of power equipment grows exponentially, which puts forward higher requirements on the generation efficiency and accuracy of power reports. Traditional power report generation methods mainly rely on manual writing or fixed template-based automation tools, which have many limitations in dealing with complex and variable power operation data. For example, manual report writing is time-consuming and laborious, and is prone to subjective bias and errors; while fixed template-based automation tools lack flexibility and are difficult to adapt to dynamic data and diversified report requirements.

[0003] The existing technology is difficult to effectively integrate multi-source data such as device operation data, historical fault records and professional knowledge in power report generation, resulting in single report content, lack of depth and breadth. Secondly, the existing technology performs poorly in handling dynamic data, and cannot reflect the latest operation status of the power system in real time. In addition, traditional methods lack deep understanding and application of power professional knowledge in report generation, resulting in insufficient professional and accurate report content. These problems seriously affect the practicality and reliability of power reports, limiting the intelligent management level of the power system.

[0004] Therefore, how to realize the intelligent and automatic generation of power reports, improve the accuracy and efficiency of reports, and ensure the professionalism and real-time nature of report content has become a technical problem to be solved by those skilled in the art. SUMMARY

[0005] The present application provides a power report generation method, system, device and medium based on adaptive learning to improve the effect of report generation.

[0006] To solve the above technical problems, the present application provides a power report generation method based on adaptive learning, comprising:

[0007] Collecting power system operation data and preprocessing to obtain preprocessed power operation data;

[0008] Using power knowledge-driven prompting technology to convert power professional knowledge into prompt tokens, and taking the prompt tokens as context information;

[0009] Through a cross-modal feature enhancement mechanism, historical report fragments similar to the current device state are retrieved from the historical fault report database, and are fused with the preprocessed power operation data to generate enhanced feature representations;

[0010] The enhanced feature representation and the prompt token are input into the report generation model, an adaptive reflection learning loss function is used, the loss weight is dynamically adjusted according to the learning state of the data category in the training process, and the report generation model is optimized.

[0011] According to the optimized model, the power field equipment inspection report is generated.

[0012] Further, the power system operation data is collected and preprocessed to obtain preprocessed power operation data, including:

[0013] The original data of the power system operation state is collected through the power quality monitoring device;

[0014] The collected original data is cleaned, denoised and normalized to obtain the preprocessed power operation data.

[0015] Further, the prompt technology driven by power knowledge is used to convert power professional knowledge into prompt tokens, including:

[0016] The equipment fault classification information is obtained from the power system database;

[0017] The equipment fault classification information is converted into structured prompt tokens;

[0018] The prompt token is used as context information for the subsequent report generation process.

[0019] Further, the cross-modal feature enhancement mechanism is used to retrieve similar historical report segments from the historical fault report database according to the current equipment state, and fuse them with the preprocessed power operation data to generate an enhanced feature representation, including:

[0020] The pre-trained multi-modal retrieval model is used to retrieve the top-k historical report segments similar to the current equipment state from the historical fault report database;

[0021] The features of the retrieved historical report segments and the preprocessed power operation data are dynamically aggregated and fused to generate an enhanced feature representation.

[0022] Further, the adaptive reflection learning loss function includes:

[0023] The loss weight is dynamically adjusted according to the learning state of each data type in the training process;

[0024] The category prior distribution is introduced in the optimization process to enhance the learning sensitivity of low-frequency power equipment categories;

[0025] By dynamically adjusting the loss weight, the recognition ability of the model for rare fault types is improved.

[0026] Further, the generating power field equipment inspection report according to the optimized model comprises:

[0027] In the report generation model, an encoder-decoder architecture is used, wherein the encoder extracts features of the power operation data, and the decoder generates report content in combination with prompt tokens and enhanced feature representations;

[0028] In the decoder, the prompt tokens are used as context information to guide the report generation process, ensuring that the generated report content conforms to the power professional knowledge.

[0029] Another embodiment of the present application provides a power report generation system based on adaptive learning, comprising:

[0030] The data processing module is used for collecting power system operation data and pre-processing to obtain pre-processed power operation data;

[0031] The token conversion module is used for converting power professional knowledge into prompt tokens using power knowledge driven prompt technology, and using the prompt tokens as context information;

[0032] The feature enhancement module is used for retrieving historical report fragments similar to the current device state from the historical fault report database through a cross-modal feature enhancement mechanism, and fusing them with the pre-processed power operation data to generate enhanced feature representations;

[0033] The model optimization module is used for inputting the enhanced feature representations and prompt tokens into the report generation model, using an adaptive reflection learning loss function, dynamically adjusting the loss weight according to the learning state of the data category in the training process, and optimizing the report generation model;

[0034] The report generation module is used for generating a power field equipment inspection report according to the optimized model.

[0035] Further, the token conversion module is used for:

[0036] Obtaining device fault classification information from the power system database;

[0037] Converting the device fault classification information into structured prompt tokens;

[0038] Using the prompt tokens as context information for the subsequent report generation process.

[0039] Another embodiment of the present application provides a computer 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 implements the adaptive learning-based power report generation method as described above when executing the computer program.

[0040] Still another embodiment of the present application provides a computer readable storage medium storing a computer program, wherein a device in which the computer readable storage medium is located implements the adaptive learning-based power report generation method as described above when executing the computer program.

[0041] Compared with the prior art, the embodiment of the present application has at least one of the following advantages:

[0042] The introduction of power knowledge-driven prompting technology converts power professional knowledge into prompt tokens and integrates it into the report generation process, significantly improving the professionalism and accuracy of the report content. This method ensures that the generated report not only meets the standards and specifications of the power industry, but also accurately reflects the actual operating conditions of the equipment, providing more valuable information for maintenance personnel, thereby improving the scientificity and reliability of decision-making. The use of cross-modal feature enhancement mechanism can retrieve historical report fragments similar to the current device state from the historical fault report database and fuse them with preprocessed power operation data. This process effectively integrates multi-source information, enriches the details and background content of the report, and makes the report more in-depth and extensive, which helps maintenance personnel to fully understand the historical problems and potential risks of the equipment, thereby improving the ability of fault diagnosis and prevention. The use of adaptive reflection learning loss function dynamically adjusts the loss weight according to the learning state of the data category during the training process, optimizing the report generation model. This adaptive optimization mechanism enables the model to better handle data class imbalance problems, improve the ability to identify rare fault types, ensure the accuracy and robustness of report generation, and further enhance the intelligence level and practicality of the power report generation system. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 A step flowchart of the adaptive learning-based power report generation method in one of the embodiments of the present application;

[0044] Figure 2 A structural block diagram of the adaptive learning-based power report generation system in one of the embodiments of the present application;

[0045] Figure 3 A structural diagram of the computer device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0046] With reference to the drawings and embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. The purpose of providing these embodiments is to make the disclosure of the present application more thorough and complete. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of protection of the present application.

[0047] In the description of the present application, the terms "first", "second", "third" and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second", "third" and the like can be explicitly or implicitly included one or more features. In the description of the present application, unless otherwise stated, the meaning of "a plurality of" is two or more.

[0048] In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood in a broad sense, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through intermediate medium, or it can be the communication between two elements. The terms "vertical", "horizontal", "left", "right", "up", "down" and similar expressions used herein are for the purpose of description only, and cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. The term "and / or" used herein includes any and all combinations of one or more related listed items. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood in specific cases.

[0049] In the description of the present application, it should be noted that, unless otherwise defined, all technical and scientific terms used by the present application are the same as those commonly understood by those skilled in the art of the present application. The terms used in the specification of the present application are only for the purpose of describing the specific embodiments, and are not intended to limit the present application. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood in specific cases.

[0050] An embodiment of the present application provides a power report generation method based on adaptive learning, specifically, please refer to Figure 1 , Figure 1 The step flow chart of the power report generation method based on adaptive learning in one embodiment of the present application is shown, which includes steps S11-S15:

[0051] S11, collect power system operation data and preprocess to obtain preprocessed power operation data.

[0052] In the daily operation monitoring of power systems, power quality monitoring devices play a crucial role. These devices can collect raw data of the power system operation state in real time, including but not limited to voltage, current, frequency, and harmonic, etc. These raw data are a direct reflection of the power system operation state, but often contain noise and outliers, and the data volume is large and the format is diverse, which directly used for analysis and processing is inconvenient.

[0053] In order to ensure the accuracy and effectiveness of subsequent analysis, the raw data collected first need to be cleaned, denoised and normalized. The data cleaning process is mainly to remove errors, missing values and outliers in the data, to ensure the integrity and accuracy of the data. Denoising processing is to use signal processing techniques such as filtering algorithm to remove noise components in the data, making the data clearer. Normalization processing is to convert data of different dimensions and orders of magnitude to a unified scale, which is convenient for subsequent analysis and comparison, and the commonly used methods include min-max normalization, Z-score normalization, etc.

[0054] S12, use power knowledge-driven prompting technology to convert power professional knowledge into prompt tokens, and use the prompt tokens as context information.

[0055] The power system database is an important source of equipment fault classification information, which stores a large amount of data related to equipment faults, including fault description, fault type, fault occurrence time and location, etc. These information is usually stored in structured or semi-structured form in relational databases, such as the description attribute in the equipment fault maintenance information records the specific fault description, and the conclusion attribute and advice attribute record the maintenance conclusion and suggestion respectively. By extracting relevant data from these databases, comprehensive and detailed equipment fault classification information can be obtained, providing basic data support for subsequent fault analysis and report generation.

[0056] The structured processing of device fault classification information is a key step in achieving efficient fault diagnosis and report generation. First, the acquired fault classification information needs to be preprocessed, including data cleaning, removing duplicate data, handling missing values, and text standardization operations. Then, natural language processing techniques such as word segmentation processing and text vectorization are used to convert unstructured fault description texts into structured prompt tokens. For example, a pre-trained word vector library can be used to encode fault descriptions, generating corresponding word embeddings and sentence embeddings, which are further processed by a text classification model to obtain feature vectors reflecting the fault type discrimination. These structured prompt tokens can clearly express the characteristics and categories of faults, facilitating subsequent analysis and processing.

[0057] Using structured prompt tokens as context information can provide rich background knowledge and key information for the report generation process. In the report generation stage, these prompt tokens can be used as input to help generate accurate and detailed fault reports. For example, by inputting prompt tokens into a fault classification model, the model can automatically classify faults and generate corresponding fault classification labels. These labels can serve as key information in the report, helping technicians quickly understand the type and severity of the fault. In addition, combined with historical fault records and industry expertise, the content of the report can be further optimized to make it more targeted and practical.

[0058] S13, retrieve historical report segments similar to the current device state from the historical fault report database through a cross-modal feature enhancement mechanism, and fuse them with the preprocessed power operation data to generate enhanced feature representations.

[0059] In the fault diagnosis and analysis of power systems, the historical fault report database is a valuable resource that records detailed information about past device faults, including fault phenomena, diagnosis processes, solutions, etc. These historical reports can provide important references for the analysis of current device states. To efficiently find similar segments from the vast amount of historical reports, a pre-trained multi-modal retrieval model can be used. This model can handle multiple modalities of data such as text and images, and through learning the features and patterns in the data, it can achieve fast retrieval of historical reports.

[0060] Specifically, the multi-modal retrieval model can encode the text descriptions and related images (such as pictures of device fault scenes) in historical fault reports to generate unified feature representations. Then, by calculating the similarity between the feature representation of the current device state and the feature representation of the historical reports, the Top-k historical report segments most similar to the current device state are retrieved. These segments may contain similar fault phenomena, diagnosis methods, and solutions to the current fault, providing rich background information for subsequent fault analysis.

[0061] The retrieved historical report segments provide important reference information, but they need to be combined with the actual operation data of the current device to more accurately reflect the current state of the device. The preprocessed power operation data contains real-time operation parameters of the device, such as voltage, current, frequency, etc., which can provide detailed information about the current device operation. Dynamic aggregation and fusion of the retrieved historical report segment features and the preprocessed power operation data can generate more comprehensive and accurate feature representations.

[0062] The process of dynamic aggregation and fusion can be achieved through various methods. For example, attention mechanisms can be used to dynamically adjust the weights of historical report segment features and power operation data, giving higher weights to more relevant features according to the importance of the current device state. In addition, neural network models such as fully connected networks or long short-term memory networks (LSTM) can be used to deeply fuse the two types of features and generate enhanced feature representations. This enhanced feature representation not only contains experience information of historical failures, but also combines the actual running state of the current device, which can provide more powerful support for fault diagnosis and prediction.

[0063] S14, input the enhanced feature representation and the prompt token into the report generation model, use the adaptive reflection learning loss function to dynamically adjust the loss weight according to the learning state of the data category in the training process, and optimize the report generation model.

[0064] In the training process of the power equipment fault diagnosis model, the learning progress and difficulty of different data types (such as device operation data, historical fault report segments, etc.) may be different. In order to optimize the model performance, a dynamic weight optimization strategy can be used to dynamically adjust the loss weight according to the learning state of each data type in the training process. For example, if the loss function of a certain data type decreases rapidly at the beginning of training, it indicates that the learning difficulty of this data type is low, and its weight can be appropriately reduced; on the contrary, if the loss function of a certain data type decreases slowly, it indicates that its learning difficulty is high, and its weight needs to be increased to promote further learning of the model on this data type.

[0065] There may be a class imbalance problem in the power equipment failure data, that is, the number of samples of some failure types (low-frequency classes) is much less than that of other failure types (high-frequency classes). This imbalance can cause the model to bias towards high-frequency classes during training, reducing the recognition ability of low-frequency classes. To solve this problem, a class prior distribution can be introduced in the optimization process to enhance the learning sensitivity of low-frequency classes. Specifically, the initial weight can be set according to the inverse of the number of class samples or the inverse of the frequency of class occurrence, so that the model pays more attention to low-frequency classes at the beginning of training. As the training progresses, the weight can also be dynamically adjusted according to the learning progress of each class to further optimize the recognition ability of low-frequency classes by the model.

[0066] Rare failure types are easily ignored by the model during training due to the small number of samples, resulting in insufficient recognition ability. By dynamically adjusting the loss weight, the recognition ability of the model for rare failure types can be effectively improved. The specific method includes: during training, the accuracy of each failure type is regularly calculated, and for rare failure types with low accuracy, the loss weight is increased; for common failure types with high accuracy, the loss weight is reduced. In addition, the weight adjustment strategy can be further optimized by combining the class prior distribution to ensure that the model pays equal attention to all failure types during training. In this way, the model can better learn the features of rare failure types, thereby improving the recognition ability of these types.

[0067] S15, generating a power field equipment inspection report according to the optimized model.

[0068] In the power system failure report generation task, a model with an encoder-decoder architecture can efficiently convert power operation data into meaningful failure reports. The encoder part is responsible for deep feature extraction of power operation data, including real-time operating parameters of equipment (such as voltage, current, power, etc.) and equipment state information (such as temperature, vibration, etc.). Through the processing of multiple layers of neural networks, the encoder can convert the original data into high-dimensional feature vectors that can effectively capture the core information of the power equipment operating state.

[0069] The decoder part uses the feature vectors extracted by the encoder, combined with the preprocessed prompt tokens and enhanced feature representations to generate the report content. Prompt tokens are structured failure classification information that can provide clear failure types and key information for report generation. Enhanced feature representations are obtained by dynamically aggregating and fusing historical report segment features and power operation data, which contain rich background knowledge and historical experience information. The decoder integrates these information to gradually generate failure report content that conforms to power professional knowledge.

[0070] In the report generation process of the decoder, the prompt token plays a crucial role. As context information, the prompt token can provide clear fault types and key information to guide the report generation process in the right direction. For example, when the prompt token indicates that the fault type is "transformer overheating", the decoder will generate report content related to transformer overheating based on this information, including fault causes (such as cooling system failure, excessive load, etc.), detection methods (such as temperature sensor data anomalies), treatment suggestions (such as checking the cooling system, adjusting the load, etc.), etc.

[0071] To ensure that the generated report content conforms to the power professional knowledge, the decoder will refer to a large number of power field knowledge bases and historical fault reports during the generation process. These knowledge bases and historical reports provide the decoder with rich background information and language templates, enabling it to generate accurate, professional and readable fault reports. In this way, the decoder can effectively use the prompt token as context information to guide the report generation process, ensuring that the generated report content not only accurately reflects the current device fault status, but also meets the professional standards and specifications of the power industry.

[0072] To more accurately disclose the technical content of the scheme, another embodiment is provided to describe the scheme in detail:

[0073] First, this embodiment designs a prompt technology based on power knowledge driving. This framework introduces a power knowledge perception prompt mechanism to guide the text generation process, aiming to improve the accuracy and completeness of the generated report. Specifically, this embodiment adopts the mainstream encoder-decoder architecture and adds device fault classification knowledge on this basis. In the process of generating power field reports, the output of this type of knowledge will be converted into structured prompt tokens as context information to explicitly guide the decoder to generate more targeted and professional fault descriptions. Second, to further improve the quality of report generation, this embodiment designs a cross-modal feature enhancement mechanism. This mechanism uses a pre-trained multi-modal retrieval model to retrieve the top-k historical report segments most similar to the current image from the historical fault report database. These semantically rich text features are processed dynamically and fused with visual features to generate power field reports, simulating the way engineers "reference historical cases" for judgment. Finally, to address the problem of unbalanced data category distribution of power equipment, this embodiment introduces an adaptive reflection learning loss function. This loss function can dynamically adjust the weight distribution of each data type during the training process, ensuring the recognition ability of common categories while significantly improving the learning effect on rare data categories. This strategy overcomes the technical bottleneck of traditional text decoders that cannot actively regulate the generation probability of different data types, achieving coordinated optimization of report generation.

[0074] This invention will employ a mainstream encoder-decoder architecture for domain-related knowledge representation learning, with the encoder... Mainly used for extracting images in the power industry. Visual features, decoder Generating domain reports through the combined effect of visual features and knowledge-driven cues in the power sector. Specifically, its visual feature extraction process can be represented as follows:

[0075]

[0076] in, Represents feature map blocks, For feature dimension, A set of feature map patches, It is the input image. The total number of tiles, It is an encoder function. Therefore, report. It can be defined as a set of word sequences , , For vocabulary list, The input to the encoder is a preprocessed image of the power sector, divided into several patches. Each patch is mapped to a fixed-dimensional feature vector through an embedding layer, and positional encoding is added to preserve spatial information. The encoder extracts high-dimensional semantic features through a multi-layer Transformer encoding structure, outputting a contextual feature representation containing both global and local information. Therefore, the decoding process can be formally represented as:

[0077]

[0078] in, For time step Unpredictable word units to for This invention provides knowledge-driven prompts in the power sector. The decoder takes visual features output from the encoder and prompts from a power knowledge base as input. Internally, it employs a self-attention mechanism to capture sequence dependencies and fuses visual features and knowledge prompts through a cross-modal attention mechanism. Finally, it predicts the probability distribution of the current word unit through linear transformation and a softmax function, generating structured and semantically accurate power report content word by word. Therefore, this invention uses language modeling loss as the main optimization objective for the report generation task, as shown below:

[0079]

[0080] Among them, the report A vocabulary for a set of token sequences , , A vocabulary for a vocabulary, A report length, A probability distribution for a predicted word source.

[0081] In the power field report generation task (hereinafter taking the device fault inspection report generation task as an example), generating a text consistent with the power device fault diagnosis result is crucial for the power device inspection report generation task. This is because in the power system, the inspection report not only needs to describe the device state in detail, but also must accurately reflect the current device operating condition and potential fault risk. If the generated report has deviation in fault judgment, it may lead to wrong decision of the operation and maintenance personnel, and then affect the safe and stable operation of the power grid, and even cause serious accidents. However, the existing model still faces challenges in generating an inspection report with high fault diagnosis consistency and practical application value. Specifically, the inventors trained a basic fault classification model on the substation image training set provided by a certain power company, and compared it with the mainstream method on the test set. The results show that the current model still has obvious deficiencies in the consistency of fault recognition and description.

[0082] Therefore, the inventors propose a power knowledge driven prompting technique (such as power device fault common sense, etc.), which guides the text decoder to generate more engineering practical inspection reports by delivering diagnosis results from fault classification. The classification takes the average-pooled visual features enhanced by cross-modal as input (see the next subsection), and outputs the fault prediction results of each device type through L classification heads, where L is the number of predefined fault types. Each classification head performs a 4-class judgment task through a fully connected layer, i.e. "normal", "abnormal", "pending" and "not detected". The classification label can be obtained by structurally analyzing the original inspection text, such as extracting keywords or using a pre-trained NLP model to complete the entity recognition and classification task. A standard cross-entropy loss function is used to optimize the classification performance during the training process.

[0083] In the inference stage, the power device fault classification results will be converted into labeled prompts (prompt tokens), each prompt corresponding to the fault state of a specific device. For this purpose, the inventors introduce four new word segmentation in the vocabulary: [NOR] represents "normal", [ABN] represents "abnormal", [UND] represents "pending", and [NA] represents "not detected". These word segmentation will be injected as additional context information into the language model, guiding it to pay more attention to the semantic content related to the current device state when generating the report. Through this explicit prompting mechanism, the decoder can more accurately combine visual features and fault diagnosis information, and generate more engineering guidance meaningful inspection reports.

[0084] In addition, in order to further improve the understanding ability of the model to complex fault modes, the application also designs a visual analysis module to show how the prompt words affect the selection of key sentence patterns and terms in the generation process through the attention weight mechanism. It is worth mentioning that the application found that the fault types contained in the inspection reports in the training data far exceed the preset L common problems, such as transformer oil temperature anomaly, circuit breaker operation failure, insulator discharge trace, etc. These additional information is of great value to improve the model's diagnostic ability. Therefore, with the help of the large model, the application successfully obtains four types of auxiliary fault labeling results, including:

[0085] 1) Transformer (Transformer) anomaly: such as high oil temperature, winding overheating, abnormal oil pressure, etc.

[0086] 2) Isolator switch (Isolator Switch) anomaly: such as poor contact, mechanical jamming, contact burning, etc.

[0087] 3) Surge arrester (Surge Arrester) anomaly: such as leakage current exceeding standard, body aging, poor grounding, etc.

[0088] 4) Cable termination (Cable Termination) anomaly: such as partial discharge, joint loosening, outer skin damage, etc.

[0089] In actual training, the application uses Vicuna-13B model as an auxiliary labeling tool, and by designing prompt templates for different device types, the original inspection report is input into the model to obtain the labeling result of the target fault. In this way, the application effectively expands the semantic coverage of the training data, improves the generalization ability and diagnostic accuracy of the model in actual scenarios, and provides a basis for subsequent training.

[0090] In the process of generating power field device fault inspection reports, relying solely on device state images for judgment may have certain limitations. This is because in actual inspection and fault analysis, power engineers usually combine historical operation data of the device, past maintenance records, and related fault case libraries and other multi-source information for comprehensive analysis to improve the accuracy and reliability of diagnosis. Inspired by this, in the framework proposed by the application, in addition to using the visual feature extraction module to obtain key features representing the state from the power device image, the application further introduces cross-modal information based on the historical report database, and designs a cross-modal feature enhancement module.

[0091]

[0092] wherein, is the Top-k report feature retrieved, To average pool visual features, represents the concatenation operation, is a feature aggregation function. To realize the visual feature extraction under the guidance of dynamic feature extraction, the present application pre-trains a cross-modal model on a large-scale power failure report corpus to realize cross-modal retrieval of input images . Specifically, given a power equipment state image, the model can retrieve the top-k most similar failure report features in the historical report database, which contain key semantic information such as failure description, repair suggestion, and abnormal type potentially related to the current image.

[0093] Subsequently, to more effectively fuse these information from the text modality, the present application designs a dynamic aggregation module to integrate the retrieved top-k report features into a representative embedding vector. The core idea of the dynamic aggregation module is to realize weighted aggregation through attention mechanism, so that different report features obtain different weights according to their relevance to the current image. Specifically, the retrieved report features are first processed by self-attention to capture the context relationship between them; then the output is input to the cross-attention layer as a key-value pair, and the image features are used as the query vector to calculate the relevance weight between each report feature and the current image. Therefore, the above aggregation process can be defined as follows:

[0094]

[0095] wherein, is the retrieved top-k report embedding feature, is the average pooled visual feature. It should be particularly noted that the parameters in the dynamic aggregation module are learnable during the entire training process, while the pre-trained model for cross-modal retrieval is kept in a frozen state to ensure the stability and generalization ability of the retrieval process

[0096] Therefore, the design concept of the cross-modal feature enhancement module is highly consistent with the actual workflow, that is, when facing a new equipment state image, users often refer to the records and report contents of similar failures in the past to make accurate judgments. The method proposed by the present application adopts this "human-like" reasoning process, which realizes more explainable and robust report generation capability in the power field by fusing visual information and historical text information.

[0097] In the fault inspection task of power equipment, due to the significant difference in the probability of occurrence of different types of equipment faults in the actual operating environment, some common faults (such as insulation aging, poor contact, etc.) frequently appear in historical data, while some rare faults (such as local discharge mutation, short circuit under extreme environment, etc.) are less recorded. This inherent class distribution imbalance of power equipment will cause the model to learn fully on high-frequency faults during training, while the learning effect on low-frequency faults is poor, thereby affecting the robustness and generalization ability of the overall diagnosis system.

[0098] Although there have been studies trying various technical routes to solve the above problems, no method has been able to effectively alleviate the learning bias caused by class imbalance. This is mainly because traditional text decoders only model language probability when generating inspection reports, without explicitly distinguishing different fault types, so it is difficult to directly regulate the generation tendency of different classes through the decoding process. To solve this limitation, an adaptive reflection learning mechanism is proposed to achieve balanced learning of different fault types and further guide the text generation module to output more discriminative fault descriptions. Specifically, an adaptive reflection learning algorithm is designed, which can dynamically adjust the loss weight of each fault type according to its learning state in each training round, thereby improving the model's recognition ability for low-frequency classes. For this purpose, an improved logit adjustment loss function (LA Loss) is designed, the core idea of which is to enhance the learning sensitivity of low-frequency power equipment classes by introducing a class prior distribution in the optimization process. For a given power equipment fault type , its positive sample label , and the corresponding logit adjustment loss function is defined as follows:

[0099]

[0100] wherein, is the input sample, represents the true label class of the current sample, represents the predicted label class of the sample, represents the log value of the input sample class , and represents the log value of the input sample predicted class , and represents the class distribution of the equipment type , and represents the prior distribution of the equipment type in log form. This loss function introduces The adaptive self-critical learning mechanism proposed in the present application not only solves the long-standing class imbalance problem in power equipment fault diagnosis, but also improves the model's ability to recognize complex and rare faults by dynamically adjusting the loss weight. More importantly, this mechanism can naturally combine with the prompt-driven report generation process, making the generated text content significantly enhanced in terms of semantic accuracy and structural integrity, thereby better serving the actual application needs of the power field report generation task in business scenarios.

[0101] However, the log adjustment method based on fixed class distribution cannot reflect the dynamic learning state of the model during training. In fact, different fault types not only differ in sample size, but also differ in learning difficulty - for example, some rare faults may have obvious features and be easy to identify, while other common faults may be easily confused due to their high similarity to other types. Inspired by existing work, the present application proposes to use the average prediction score of the model on the validation set to evaluate the learning state of each fault: if a certain type of fault still maintains a low prediction score after multiple training cycles, it indicates that it is more difficult to learn and should be given a higher loss weight. To this end, the present application sets the initial class distribution π as the statistical frequency of the training data, and updates it adaptively during training through the following formula:

[0102]

[0103] wherein, represents the average prediction score of the th fault type on the validation set after the th training cycle. In this way, the present application can dynamically assign a reasonable loss weight to each fault, taking into account both the original data distribution and the changes in the model's mastery of it during training.

[0104] Finally, the present application combines the adaptive self-critical learning loss with the language modeling loss to form the total loss function of the training model, which is defined as follows:

[0105]

[0106] wherein, represents the language modeling loss of the report text generation part, represents the adaptive self-critical learning loss, is a hyperparameter that balances the two losses.

[0107] Therefore, the adaptive self-critical learning mechanism proposed in the present application not only solves the long-standing class imbalance problem in power equipment fault diagnosis, but also improves the model's ability to recognize complex and rare faults by dynamically adjusting the loss weight. More importantly, this mechanism can naturally combine with the prompt-driven report generation process, making the generated text content significantly enhanced in terms of semantic accuracy and structural integrity, thereby better serving the actual application needs of the power field report generation task in business scenarios.

[0108] The adaptive learning-based power report generation method of the present application introduces a power knowledge-driven prompting technique, converts power professional knowledge into prompt tokens and integrates it into the report generation process, significantly improving the professionalism and accuracy of the report content. This method ensures that the generated report not only meets the standards and specifications of the power industry, but also accurately reflects the actual operating conditions of the equipment, providing more valuable information to the operation and maintenance personnel, thereby improving the scientificity and reliability of decision-making. By using a cross-modal feature enhancement mechanism, similar historical report segments can be retrieved from the historical fault report database based on the current device state, and then fused with the preprocessed power operation data. This process effectively integrates multi-source information, enriches the details and background content of the report, making the report more in-depth and extensive, which helps operation and maintenance personnel to fully understand the historical problems and potential risks of the equipment, and thus improves the ability of fault diagnosis and prevention. By using an adaptive reflective learning loss function, the loss weight is dynamically adjusted according to the learning state of the data category during the training process, and the report generation model is optimized. This adaptive optimization mechanism enables the model to better handle the problem of data class imbalance, improves the ability to identify rare fault types, ensures the accuracy and robustness of report generation, and further enhances the intelligence and practicality of the power report generation system.

[0109] The embodiment of the present application also provides a power report generation system based on adaptive learning, which is used to execute the adaptive learning-based power report generation method as described above, Figure 2 The adaptive learning-based power report generation system structure diagram of the embodiment of the present application, the device comprises:

[0110] The data processing module 21 is used to collect power system operation data and pre-process it to obtain pre-processed power operation data;

[0111] The token conversion module 22 is used to convert power professional knowledge into prompt tokens by using a power knowledge-driven prompting technique, and use the prompt tokens as context information;

[0112] The feature enhancement module 23 is used to retrieve similar historical report segments from the historical fault report database based on the current device state by using a cross-modal feature enhancement mechanism, and fuse them with the pre-processed power operation data to generate enhanced feature representations;

[0113] The model optimization module 24 is used to input the enhanced feature representations and prompt tokens into the report generation model, and dynamically adjust the loss weight according to the learning state of the data category during the training process by using an adaptive reflective learning loss function, so as to optimize the report generation model;

[0114] The report generation module 25 is used to generate a power field device inspection report according to the optimized model.

[0115] The word conversion module is configured to:

[0116] Obtain device fault classification information from a power system database;

[0117] Convert the device fault classification information into structured prompt words;

[0118] Use the prompt words as context information for subsequent report generation.

[0119] The technical features and effects of the system provided by the embodiments of the present application are the same as those of the method provided by the embodiments of the present application, which will not be repeated here. Each module in the above system can be realized by software, hardware, and combinations thereof, in whole or in part. Each of the above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each of the above modules.

[0120] Referring to Figure 3 which is a structural diagram of a computer device provided by the embodiments of the present application. The computer device provided by the embodiments of the present application includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the steps in the above adaptive learning-based power report generation method embodiments are implemented, such as steps S11-S15 described in the above adaptive learning-based power report generation method embodiments. Figure 1 Alternatively, when the processor executes the computer program, the functions of each module in the above device embodiments are implemented, such as the modules 21-25 of the adaptive learning-based power report generation method system.

[0121] For example, the computer program can be divided into one or more modules, which 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 computer device.

[0122] The computer device can include, but is not limited to, a processor, a memory. Those skilled in the art can understand that the schematic diagram is only an example of the computer device and does not limit the computer device, which can include more or fewer components than the diagram, or combine certain components, or different components, for example, the computer device can also include an input / output device, a network access device, a bus, etc.

[0123] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The processor is a control center of the computer device, and connects various parts of the computer device through various interfaces and lines.

[0124] The memory can be used to store the computer program and / or modules, and the processor realizes various functions of the computer device by running or executing the computer program and / or modules 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. The program storage area can store an operating system, at least one application program required for a function (such as a sound playing function, an image playing function, etc.), etc.; and the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a nonvolatile 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 disk storage device, a flash storage device or other volatile solid-state storage device.

[0125] The modules integrated in the computer device can be stored in a computer readable storage medium in the form of software function units when they are sold or used as independent products. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related 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-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms. The computer readable medium can include any entity or device, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium.

[0126] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned various method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0127] Correspondingly, the embodiment of the present application provides a computer readable storage medium including a stored computer program. When the computer program is running, it controls the device where the computer readable storage medium is located to perform the steps in the power report generation method based on adaptive learning as in the above-mentioned embodiment, for example, the steps S11-S15 in the above-mentioned embodiment. Figure 1

[0128] In summary, the power report generation method, device, computer device, and computer readable storage medium based on adaptive learning provided by the embodiment of the present application have at least one of the following advantages compared with the prior art:

[0129] ​The introduction of power knowledge-driven prompting technology converts power professional knowledge into prompt tokens and integrates it into the report generation process, significantly improving the professionalism and accuracy of the report content. This method ensures that the generated report not only meets the standards and specifications of the power industry, but also accurately reflects the actual operating conditions of the equipment, providing more valuable information to the operation and maintenance personnel, thereby improving the scientificity and reliability of decision-making. The use of cross-modal feature enhancement mechanism can retrieve historical report fragments similar to the current device status from the historical fault report database and fuse them with the preprocessed power operation data. This process effectively integrates multi-source information, enriches the details and background content of the report, and makes the report more in-depth and extensive, which helps operation and maintenance personnel to fully understand the historical problems and potential risks of the equipment, and thus improves the ability of fault diagnosis and prevention. The use of adaptive reflection learning loss function dynamically adjusts the loss weight according to the learning state of the data category in the training process, optimizing the report generation model. This adaptive optimization mechanism enables the model to better handle data class imbalance problems, improve the ability to identify rare fault types, ensure the accuracy and robustness of report generation, and further enhance the intelligence level and practicality of the power report generation system.

[0130] The above-described embodiments only express several embodiments of the present application, and the description is more specific and detailed, but it should not be understood as limiting the scope of the patent of the present application. It should be noted that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A power report generation method based on adaptive learning, characterized in that, include: Collect power system operation data and preprocess it to obtain preprocessed power operation data; By utilizing power knowledge-driven prompting technology, power knowledge is transformed into prompting words, and these prompting words are used as contextual information. By using a cross-modal feature enhancement mechanism, historical report fragments similar to the current equipment status are retrieved from the historical fault report database and fused with preprocessed power operation data to generate an enhanced feature representation. The enhanced feature representations and cue words are input into the report generation model. An adaptive reflective learning loss function is used to dynamically adjust the loss weights according to the learning state of the data category during training, thereby optimizing the report generation model. Generate power equipment inspection reports based on the optimized model; The aforementioned prompting technology, driven by electricity knowledge, transforms electricity-related professional knowledge into prompting terms, including: Retrieve equipment fault classification information from the power system database; Transform equipment fault classification information into structured prompt words; Use the prompt words as contextual information for the subsequent report generation process; The adaptive reflective learning loss function includes: The loss weights are dynamically adjusted based on the learning status of each data type during the training process. In the optimization process, a category prior distribution is introduced to enhance the learning sensitivity to low-frequency power equipment categories; By dynamically adjusting the loss weights, the model's ability to identify rare fault types can be improved. The process of generating power equipment inspection reports based on the optimized model includes: In the report generation model, an encoder-decoder architecture is used, where the encoder extracts features from the power operation data and the decoder combines cue words and enhanced feature representations to generate report content. In the decoder, cue words are used as contextual information to guide the report generation process and ensure that the generated report content conforms to power industry expertise.

2. The power report generation method based on adaptive learning as described in claim 1, characterized in that, The process of collecting and preprocessing power system operation data to obtain preprocessed power operation data includes: Raw data on the operating status of the power system are collected through power quality monitoring devices; The collected raw data is cleaned, denoised, and normalized to obtain preprocessed power operation data.

3. The power report generation method based on adaptive learning as described in claim 1, characterized in that, The method employs a cross-modal feature enhancement mechanism to retrieve historical report fragments similar to the current equipment status from the historical fault report database, and fuses them with preprocessed power operation data to generate an enhanced feature representation, including: Using a pre-trained multimodal retrieval model, retrieve the top-k historical report fragments that are similar to the current device status from the historical fault report database; The retrieved historical report fragment features are dynamically aggregated and fused with preprocessed power operation data to generate enhanced feature representations.

4. A power report generation system based on adaptive learning, characterized in that, include: The data processing module is used to collect power system operation data and perform preprocessing to obtain preprocessed power operation data. The lexical conversion module is used to convert electrical knowledge into prompt lexical units using power knowledge-driven prompting technology, and to use the prompt lexical units as contextual information. The feature enhancement module is used to retrieve historical report fragments similar to the current equipment status from the historical fault report database through a cross-modal feature enhancement mechanism, and fuse them with preprocessed power operation data to generate an enhanced feature representation; The model optimization module is used to input the enhanced feature representations and prompt lexical units into the report generation model. It adopts an adaptive reflective learning loss function to dynamically adjust the loss weights according to the learning state of the data category during the training process, thereby optimizing the report generation model. The report generation module is used to generate equipment inspection reports in the power sector based on the optimized model. The word conversion module is used for: Retrieve equipment fault classification information from the power system database; Transform equipment fault classification information into structured prompt words; Use the prompt words as contextual information for the subsequent report generation process; The model optimization module is also used for: The loss weights are dynamically adjusted based on the learning status of each data type during the training process. In the optimization process, a category prior distribution is introduced to enhance the learning sensitivity to low-frequency power equipment categories; By dynamically adjusting the loss weights, the model's ability to identify rare fault types can be improved. The report generation module is also used for: In the report generation model, an encoder-decoder architecture is used, where the encoder extracts features from the power operation data and the decoder combines cue words and enhanced feature representations to generate report content. In the decoder, cue words are used as contextual information to guide the report generation process and ensure that the generated report content conforms to power industry expertise.

5. A computer device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the adaptive learning-based power report generation method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, it implements the power report generation method based on adaptive learning as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Loss function dynamic weighting method and device, equipment and storage medium

    CN114090952A

  • Energy storage battery anomaly analysis method and system based on retrieval enhancement generation

    CN119848726A