A Transformer Fault Diagnosis Method and System Based on Adaptive Reasoning
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-08-11
AI Technical Summary
人工诊断高度依赖专家的知识水平,效率低下且难以应对新型或复杂故障;专家系统则规则固化,泛化能力差
1、本发明通过自适应选择推理模式,能够根据输入数据的复杂程度灵活切换诊断策略。对于简单、明确的故障特征,采用快速诊断模式,迅速给出核心故障结论与处置建议,大幅提升诊断效率,降低计算资源消耗,特别适用于需要实时监控和快速告警的变压器故障诊断场景,解决了现有技术中简单问题复杂化的资源浪费问题。
Smart Images

Figure CN121684015B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and power system technology, and more specifically, to a transformer fault diagnosis method and system based on adaptive reasoning. Background Technology
[0002] Transformers are core hub equipment in power grid systems, and their safe and stable operation is crucial. Traditional transformer fault diagnosis mainly relies on human experience or expert systems based on fixed rules. Human diagnosis is highly dependent on the knowledge level of experts, resulting in low efficiency and difficulty in handling new or complex faults; expert systems, on the other hand, have rigid rules and poor generalization ability. In recent years, machine learning and deep learning methods have been applied to fault diagnosis, but they are usually treated as black-box models, only providing classification results and lacking transparent diagnostic processes and logical basis, making it difficult for operation and maintenance engineers to be convinced and make decisions based on them. With the development of large language models, their powerful chain-reasoning capabilities have made it possible to provide detailed and interpretable diagnostic reports, but the existing application model has significant drawbacks: for all fault warnings, the model uses lengthy chain-reasoning, leading to resource waste in complicating simple problems and the risk of inaccurate diagnosis in simplifying complex problems.
[0003] In implementing the embodiments of the present invention, the prior art has at least the following problems or defects: the prior art lacks a diagnostic method that can intelligently judge the complexity of faults and adaptively match the inference depth, which leads to the waste of resources in making simple problems complicated and the risk of inaccurate diagnosis in simplifying complex problems in practical applications. Summary of the Invention
[0004] This invention provides a transformer fault diagnosis method and system based on adaptive reasoning.
[0005] In a first aspect of the present invention, a transformer fault diagnosis method based on adaptive reasoning is provided, comprising: S1. Data reception and preprocessing: Real-time collection and fusion of multi-source heterogeneous data from transformer online monitoring system and historical database, and data cleaning and normalization to construct time series features; S2. Diagnosis using a transformer hybrid reasoning diagnostic model: The processed data is input into the transformer hybrid reasoning diagnostic model, which adaptively selects a reasoning mode based on the complexity of the input data. The reasoning modes include a rapid diagnostic mode and a deep tracing mode. S3. Output Diagnostic Report: Output the corresponding diagnostic report based on the selected reasoning mode.
[0006] Further, in step S2, the transformer hybrid reasoning diagnostic model selects the reasoning mode through the following judgment logic: When a single fault feature exists in the input data and the key indicators of that fault feature exceed the preset threshold, select the quick diagnosis mode. Select the deep tracing mode when the input data meets any of the following conditions: (1) Multiple fault characteristic indicators simultaneously exceed the warning value; (2) Key fault characteristic indicators are in a critical state; (3) The fault characteristics reflected by different monitoring data are contradictory; (4) It is necessary to combine historical trend data to analyze the development of faults.
[0007] Furthermore, in the rapid diagnosis mode, the transformer hybrid reasoning diagnosis model directly outputs diagnostic conclusions that include fault type, fault cause, and handling suggestions; In the deep tracing mode, the transformer hybrid reasoning diagnostic model performs the following analysis process: First, feature extraction and correlation analysis were performed on the dissolved gas analysis data and electrical and thermal data in the oil. Then, the failure development process is analyzed by combining historical data trends; Next, a fault type elimination analysis was performed based on multi-dimensional monitoring data; Finally, a comprehensive diagnostic report containing detailed reasoning processes is generated.
[0008] Furthermore, the transformer hybrid reasoning diagnostic model is obtained through the following two-stage training process: S31. First stage: Perform dual-expert knowledge distillation to train the transformer hybrid reasoning diagnostic model to generate a diagnostic report based on the corresponding reasoning mode according to the control tags; S32. Second stage: Perform reinforcement learning optimization to train the transformer hybrid reasoning diagnostic model to adaptively select the reasoning mode.
[0009] Furthermore, the dual-expert knowledge distillation includes the following steps: S311. Construct a reasoning expert model and an instruction following expert model, wherein the reasoning expert model is trained to generate detailed thought chains, and the instruction following expert model is optimized to generate concise answers; S312. Use two expert models to generate paired training samples for each fault case, including quick diagnosis mode answers and deep source tracing mode answers; S313. The initial model is supervised and fine-tuned using the training samples so that the initial model can generate a diagnostic report of the corresponding inference mode based on the control tags.
[0010] Furthermore, the training samples are in the following form:
[0011] in, This represents the input data for the i-th fault case. This indicates a quick diagnostic pattern answer generated by instructions following an expert model. This represents the deep-source pattern answer generated by the reasoning expert model. This indicates the total number of failure cases.
[0012] Furthermore, the reinforcement learning optimization includes the following steps: S321. Define a reward function to calculate a reward score based on the correctness of the reasoning pattern and diagnostic conclusions output by the model. S322. The GRPO algorithm is used to optimize the strategy model based on the reward function.
[0013] Furthermore, the reward function is defined as follows:
[0014] in, , This represents the answer extractor. This represents the answer validator. This indicates that the corresponding standard answer should be entered. This indicates the reasoning mode selected by the model. This represents the efficiency penalty factor.
[0015] Furthermore, the objective function in the reinforcement learning optimization is defined as:
[0016] in, Describe the overall objective function. This represents the target function at the token level. Denotes KL divergence, Indicates the current policy model. Represents the reference model. Indicates the KL penalty coefficient. Indicates the number of sampled outputs. This indicates the number of tokens in the i-th output; The objective function at the token level is defined as follows:
[0017] in Indicates relative advantage, This indicates the trimming parameters.
[0018] In a second aspect of the invention, a transformer fault diagnosis system based on adaptive reasoning is provided, comprising: The data preprocessing module is used to collect and integrate multi-source heterogeneous data from the transformer online monitoring system and historical database in real time, and to clean and normalize the data to construct time series features. The transformer hybrid reasoning diagnostic module is used to input the processed data into the transformer hybrid reasoning diagnostic model. The transformer hybrid reasoning diagnostic model adaptively selects the reasoning mode according to the complexity of the input data. The reasoning mode includes a fast diagnostic mode and a deep tracing mode. The output module is used to output the corresponding diagnostic report based on the selected reasoning mode.
[0019] The embodiments of the present invention have at least the following beneficial effects: 1. This invention, through adaptive selection of inference modes, can flexibly switch diagnostic strategies based on the complexity of the input data. For simple and clear fault characteristics, a rapid diagnosis mode is adopted to quickly provide core fault conclusions and handling suggestions, significantly improving diagnostic efficiency and reducing computational resource consumption. It is particularly suitable for transformer fault diagnosis scenarios requiring real-time monitoring and rapid alarms, solving the resource waste problem of complicating simple problems in existing technologies.
[0020] 2. When faced with complex faults involving ambiguous data, multiple intertwined fault characteristics, or contradictions, this invention can automatically switch to a deep tracing mode to perform detailed chain-like thinking and multi-dimensional data analysis. It combines historical trend data to assess the development of the fault and gradually outputs a detailed reasoning process and a comprehensive diagnostic report, ensuring the accuracy and reliability of the diagnosis. This avoids the omissions or misjudgments caused by the simplification of complex problems in existing technologies and solves the problem of insufficient accuracy and depth in the diagnosis of complex faults in existing technologies.
[0021] 3. This invention employs a two-stage training process combining dual-expert knowledge distillation and reinforcement learning optimization. This enables the model to generate answers using two different reasoning modes and, through a reward mechanism, autonomously learns to select the appropriate reasoning mode at the right time. This training method not only improves the model's generalization ability and adaptability but also optimizes the overall performance of the diagnostic system. It allows the model to demonstrate higher comprehensive intelligence and adaptability when dealing with diverse and uncertain real-world operational scenarios, solving the problem of existing technologies' single model training methods that struggle to balance efficiency and accuracy. Attached Figure Description
[0022] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein: Figure 1 This is a flowchart illustrating a transformer fault diagnosis method based on adaptive reasoning provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a transformer fault diagnosis system based on adaptive reasoning, provided in an embodiment of the present invention. Detailed Implementation
[0023] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make the invention more thorough and complete, and to fully convey the scope of the invention to those skilled in the art.
[0024] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, apparatus, device, method, or computer program product. Therefore, the present invention can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0025] It should be noted that the number of any elements in the accompanying drawings is for illustrative purposes only and not as a limitation, and any naming is for distinction only and has no limiting meaning.
[0026] The following is for reference. Figure 1 , Figure 1 This is a flowchart illustrating a transformer fault diagnosis method based on adaptive reasoning, provided in an embodiment of the present invention. Figure 1 As shown, a transformer fault diagnosis method based on adaptive reasoning includes: S1. Data reception and preprocessing: Real-time collection and fusion of multi-source heterogeneous data from transformer online monitoring system and historical database, and data cleaning and normalization to construct time series features; S2. Diagnosis using a transformer hybrid reasoning diagnostic model: The processed data is input into the transformer hybrid reasoning diagnostic model, which adaptively selects a reasoning mode based on the complexity of the input data. The reasoning modes include a rapid diagnostic mode and a deep tracing mode. S3. Output Diagnostic Report: Output the corresponding diagnostic report based on the selected reasoning mode.
[0027] It should be noted that the transformer fault diagnosis method based on adaptive reasoning proposed in this invention aims to achieve efficient and accurate fault diagnosis by using an intelligent diagnostic model that adaptively selects the reasoning mode according to the complexity of the input data.
[0028] During the data reception and preprocessing stage, multi-source heterogeneous data from the transformer online monitoring system and historical databases are collected and integrated in real time. These data include dissolved gas analysis data in oil, electrical and thermal data, and historical data.
[0029] Multi-source heterogeneous data refers to data from different sources and in different formats. After cleaning and normalization, these data are used to construct time-series features, providing standardized input for subsequent diagnostic models. The transformer hybrid inference diagnostic model adaptively selects the inference mode based on the complexity of the input data. The inference modes include a rapid diagnostic mode and a deep source tracing mode.
[0030] The rapid diagnosis mode is suitable for simple and clear fault characteristics and can quickly provide diagnostic conclusions; the deep tracing mode is suitable for complex and ambiguous fault characteristics and can perform detailed reasoning and analysis.
[0031] Specifically, the multi-source heterogeneous data involved in the data reception and preprocessing stage includes the following categories: dissolved gas analysis data in oil, such as hydrogen concentration, methane concentration, ethane concentration, ethylene concentration, acetylene concentration, etc., which reflect the internal chemical state of the transformer; electrical and thermal data, such as top oil temperature, winding hot spot temperature, load current, voltage, partial discharge signal, etc., which reflect the operating status of the transformer; historical data, including historical fault records, maintenance reports, fault case databases of the same model of equipment, and historical trend data of key parameters, which provide historical reference for diagnosis. In the transformer hybrid reasoning diagnostic model, the selection between the rapid diagnosis mode and the deep tracing mode is based on specific judgment logic. The rapid diagnosis mode is suitable for situations where a single fault feature and key indicators exceed preset thresholds. For example, when the concentration of a certain gas in the dissolved gas analysis data in oil significantly exceeds the standard, the model will select the rapid diagnosis mode. The deep tracing mode is suitable for one of the following situations: multiple fault feature indicators simultaneously exceed the attention value; key fault feature indicators are in a critical state; the fault features reflected by different monitoring data are contradictory; and it is necessary to combine historical trend data to judge the fault development. These conditions ensure that the model can perform in-depth analysis under complex conditions.
[0032] Preferably, the specific operations in the data receiving and preprocessing stage include cleaning the data, removing noise and outliers, and then normalizing the data to convert data from different sources into a unified format and range to construct time series features. For example, for dissolved gas analysis data in oil, the gas concentration data can be normalized to the range of 0 to 1 so that the model can process it better. In the construction of the transformer hybrid reasoning diagnostic model, the model is obtained through a two-stage training process. The first stage is dual-expert knowledge distillation, which constructs a reasoning expert model and an instruction following expert model. The reasoning expert model is used to generate detailed thought chains, and the instruction following expert model is used to generate concise answers. These two expert models generate paired training samples for each fault case, including quick diagnosis mode answers and deep source tracing mode answers. The second stage is reinforcement learning optimization, which defines a reward function, calculates reward scores based on the correctness of the reasoning mode and diagnostic conclusion output by the model, and uses the GRPO algorithm to optimize the strategy model, enabling the model to adaptively select the reasoning mode. This training method ensures that the model can flexibly select the reasoning mode according to the complexity of the fault in practical applications, thereby achieving efficient and accurate fault diagnosis.
[0033] Specifically, the dissolved gas analysis data in the multi-source heterogeneous data includes parameters such as hydrogen concentration, methane concentration, ethane concentration, ethylene concentration, and acetylene concentration. These gas concentrations are detected using techniques such as gas chromatography. Different gas concentrations exceeding limits correspond to different types of faults. For example, a significant increase in acetylene concentration usually indicates an arc discharge fault. The top oil temperature in the electrical and thermal data refers to the oil temperature at the top of the transformer tank; the winding hot spot temperature refers to the temperature of the hottest spot in the transformer windings; the load current and voltage are the current and voltage values during transformer operation; and the partial discharge signal refers to the signal generated by partial discharge inside the transformer. These signals can be detected using ultra-high frequency or acoustic sensors. The historical fault records and maintenance reports in the historical data provide detailed records of past transformer faults and maintenance measures. The fault case database for the same model of equipment collects fault cases of transformers of the same model, providing comparison and reference for current transformer fault diagnosis. The historical trend data of key parameters helps analyze the changing trends of parameters over time and determine the development stage of the fault.
[0034] Preferably, in the data receiving and preprocessing stage, for dissolved gas analysis data in oil, a gas chromatograph can be used for real-time monitoring. The detected gas concentration data can be standardized, for example, by using the Z-score standardization method to convert the data into a distribution with a mean of 0 and a standard deviation of 1, for subsequent model processing. For electrical and thermal data, a sensor network can be used to collect data such as top oil temperature, winding hot spot temperature, load current, voltage, and partial discharge signals in real time, and noise and outliers can be removed using data cleaning algorithms. For historical data, a structured database can be established to classify, store, and manage historical fault records, maintenance reports, fault case libraries of the same model of equipment, and historical trend data of key parameters, facilitating rapid retrieval and reference by the model during the diagnostic process. During the data fusion process, data fusion algorithms, such as the Kalman filter algorithm, can be used to fuse data from different sources, construct time series features, and provide comprehensive and accurate input data for the transformer hybrid inference diagnostic model.
[0035] In some embodiments, in step S2, the transformer hybrid reasoning diagnostic model selects the reasoning mode through the following judgment logic: When a single fault feature exists in the input data and the key indicators of that fault feature exceed the preset threshold, select the quick diagnosis mode. Select the deep tracing mode when the input data meets any of the following conditions: (1) Multiple fault characteristic indicators simultaneously exceed the warning value; (2) Key fault characteristic indicators are in a critical state; (3) The fault characteristics reflected by different monitoring data are contradictory; (4) It is necessary to combine historical trend data to analyze the development of faults.
[0036] The rapid diagnosis mode is suitable for situations where the input data contains a single fault characteristic and the key indicator of that fault characteristic exceeds a preset threshold. This mode can quickly provide a diagnostic conclusion and is suitable for scenarios where the fault characteristics are obvious and easily identifiable. The deep tracing mode is suitable for situations with more complex input data, including multiple fault characteristic indicators simultaneously exceeding attention thresholds, key fault characteristic indicators being in a critical state, conflicting fault characteristics reflected by different monitoring data, and situations requiring the integration of historical trend data for fault development analysis. This mode provides a detailed diagnostic report through in-depth analysis and reasoning, and is suitable for complex situations where fault characteristics are not obvious or where multiple possibilities exist.
[0037] Specifically, in the rapid diagnostic mode, a single fault characteristic refers to a significant anomaly in a particular fault characteristic indicator within the input data. For example, a significantly excessive acetylene concentration in dissolved gas analysis data of oil typically indicates an arc discharge fault. A key indicator exceeding a preset threshold means that the value of that fault characteristic exceeds a set safety threshold, such as an acetylene concentration exceeding 50 ppm.
[0038] In the deep tracing mode, multiple fault characteristic indicators simultaneously exceeding the attention value means that multiple fault characteristic indicators are abnormal at the same time, but have not reached a clear fault threshold. For example, hydrogen concentration and methane concentration are slightly exceeded at the same time. Critical fault characteristic indicators being in a critical state means that some fault characteristic indicators are close to but have not exceeded the threshold. For example, the winding hot spot temperature is close to but has not exceeded the maximum allowable temperature.
[0039] Contradictory fault characteristics reflected by different monitoring data refer to inconsistencies between different types of monitoring data. For example, a partial discharge signal may show abnormalities, but the oil temperature may be within the normal range. The need to combine historical trend data for fault development analysis means that the changing trends of certain fault characteristic indicators need to be judged by referring to historical data. For example, the concentration of a certain gas may have been rising continuously over a period of time, but has not yet exceeded the threshold.
[0040] Preferably, in the transformer hybrid reasoning diagnostic model, the rapid diagnostic mode can be implemented by setting a simple threshold judgment logic. For example, for dissolved gas analysis data in oil, the rapid diagnostic mode can be triggered directly when the acetylene concentration exceeds 50 ppm. The model will quickly output a diagnostic conclusion that the fault type is arc discharge fault and provide corresponding handling suggestions. The implementation of the deep tracing mode is more complex and requires multi-dimensional analysis of the input data. For example, when both hydrogen and methane concentrations are detected to be slightly exceeded, the model will enter the deep tracing mode. First, feature extraction is performed on the dissolved gas analysis data in oil to analyze the changing trends and interrelationships of each gas concentration; then, historical data is combined to examine the changes in these gas concentrations over a period of time; next, electrical and thermal data are compared to analyze whether there are abnormal temperature or current changes; finally, all information is integrated to generate a detailed diagnostic report, indicating the possible fault type and cause, and proposing corresponding handling suggestions. This hierarchical reasoning mode selection mechanism allows the model to flexibly adjust the diagnostic strategy under different fault scenarios, ensuring both diagnostic efficiency and accuracy.
[0041] In some embodiments, in rapid diagnostic mode, the transformer hybrid reasoning diagnostic model directly outputs diagnostic conclusions including fault type, fault cause, and handling suggestions; In the deep tracing mode, the transformer hybrid reasoning diagnostic model performs the following analysis process: First, feature extraction and correlation analysis were performed on the dissolved gas analysis data and electrical and thermal data in the oil. Then, the failure development process is analyzed by combining historical data trends; Next, a fault type elimination analysis was performed based on multi-dimensional monitoring data; Finally, a comprehensive diagnostic report containing detailed reasoning processes is generated.
[0042] In rapid diagnostic mode, the model can directly output diagnostic conclusions including fault type, fault cause, and handling suggestions. This mode is suitable for scenarios with obvious and easily identifiable fault characteristics, providing a quick and concise diagnostic result. In deep tracing mode, the model performs a series of more complex analysis processes, including feature extraction and correlation analysis of dissolved gas analysis data and electrical and thermal data, analysis of fault development processes based on historical data trends, fault type elimination analysis based on multi-dimensional monitoring data, and finally, a comprehensive diagnostic report containing detailed reasoning processes. This mode is suitable for complex situations where fault characteristics are not obvious or where multiple possibilities exist, providing more comprehensive and in-depth diagnostic information.
[0043] Specifically, in the rapid diagnosis mode, the diagnostic conclusion refers to the concise summary of the fault type, cause, and handling suggestions directly provided by the model when it identifies a single fault feature and key indicators exceed preset thresholds. For example, when a significant exceedance of acetylene concentration is detected in the dissolved gas analysis data of oil, the model will quickly determine it as an arc discharge fault and suggest checking whether arc discharge occurs inside the transformer. In the deep tracing mode, feature extraction and correlation analysis refers to processing dissolved gas analysis data and electrical and thermal data to extract fault-related feature parameters and analyze the correlation between these parameters. For example, by analyzing the changing trends of hydrogen and methane concentrations and their relationship with top-layer oil temperature and winding hot spot temperature, the nature and development trend of the fault can be determined. Historical data trend analysis refers to combining historical data to examine the changes of key parameters over a period of time to determine the development trend of the fault. For example, if the concentration of a certain gas has shown a slow upward trend over the past 90 days, this may indicate that the fault is continuing to develop. Fault type elimination analysis refers to comparing different monitoring data to eliminate some impossible fault types. For example, if the partial discharge monitoring data is normal, the possibility of corona discharge and spark discharge can be largely ruled out.
[0044] Preferably, in rapid diagnostic mode, the model can be built based on a simple rule engine. Input parameters include key gas concentrations from dissolved gas analysis data in the oil, such as acetylene concentration, and key parameters from electrical and thermal data, such as top-layer oil temperature. When these parameters exceed preset thresholds, the model directly triggers the corresponding diagnostic conclusion. For example, if the acetylene concentration exceeds 50 ppm, the model outputs a diagnostic conclusion of arc discharge fault.
[0045] In the deep source tracing mode, the model construction is more complex. First, the feature extraction module processes the dissolved gas analysis data in the oil, extracting characteristic parameters such as the rate of change and peak values of each gas concentration; it also processes the electrical and thermal data, extracting characteristic parameters such as the rate of change in temperature and current fluctuations. Then, the correlation analysis module analyzes the relationships between these characteristic parameters, for example, by calculating the correlation coefficient between gas concentration and temperature changes to determine the thermal effect of the fault. The historical data trend analysis module combines historical data to analyze the long-term trends of key parameters, for example, by using a linear regression model to predict future changes in gas concentration. The fault type elimination analysis module compares different monitoring data to eliminate some impossible fault types; for example, by analyzing partial discharge monitoring data and gas concentration data, it eliminates the possibility of corona discharge. Finally, the comprehensive diagnostic report generation module integrates all analysis results to generate a detailed diagnostic report, including the fault type, cause, development trend, and treatment recommendations. This hierarchical analysis process enables the model to provide more accurate and comprehensive diagnostic information in complex fault scenarios.
[0046] In some embodiments, the transformer hybrid reasoning diagnostic model is obtained through the following two-stage training process: S31. First stage: Perform dual-expert knowledge distillation to train the transformer hybrid reasoning diagnostic model to generate a diagnostic report based on the corresponding reasoning mode according to the control tags; S32. Second stage: Perform reinforcement learning optimization to train the transformer hybrid reasoning diagnostic model to adaptively select the reasoning mode.
[0047] It should be noted that the transformer hybrid reasoning diagnostic model mentioned in this invention is obtained through a two-stage training process. This process aims to enable the model to adaptively select the reasoning mode based on the complexity of the input data. The first stage is dual-expert knowledge distillation, which generates paired training samples by constructing a reasoning expert model and an instruction compliance expert model, enabling the model to generate diagnostic reports for the corresponding reasoning mode based on control tags. The second stage is reinforcement learning optimization, which optimizes the policy model by defining a reward function and using the GRPO algorithm, enabling the model to adaptively select the reasoning mode. This two-stage training method not only improves the model's generalization ability and adaptability but also optimizes the efficiency of the entire diagnostic system, making it exhibit higher comprehensive intelligence and adaptability when dealing with diverse and uncertain real-world operation and maintenance scenarios.
[0048] Specifically, in the dual-expert knowledge distillation stage, the reasoning expert model is a trained model capable of generating detailed thought chains. It produces detailed diagnostic reports through step-by-step reasoning and is suitable for deep tracing of complex faults. The instruction-following expert model is an optimized model capable of generating concise answers and is suitable for rapid diagnosis of simple faults. These two expert models generate paired training samples for each fault case, including answers for both the rapid diagnosis and deep tracing modes. The training samples are in the form of…
[0049] in This represents the input data for the i-th fault case. This indicates a quick diagnostic pattern answer generated by instructions following an expert model. This represents the deep-source pattern answer generated by the reasoning expert model. This represents the total number of failure cases. During the reinforcement learning optimization phase, the reward function calculates reward scores based on the correctness of the model's output inference patterns and diagnostic conclusions. It guides the model to learn to select appropriate inference patterns at appropriate times through a reward mechanism.
[0050] Preferably, in the dual-expert knowledge distillation stage, the inference expert model and the instruction-following expert model can be constructed based on different neural network architectures. The inference expert model can adopt a multi-layer recurrent neural network (RNN) or Transformer architecture. Input parameters include dissolved gas analysis data in oil, electrical and thermal quantity data, and historical data. Features are extracted progressively through the multi-layer network to generate a detailed thought chain. The instruction-following expert model can use a lightweight neural network, such as a single-layer perceptron or a shallow convolutional neural network (CNN). Input parameters also include the aforementioned data, but the focus is on generating concise answers. During training, for each fault case, the inference expert model and the instruction-following expert model generate a deep tracing mode answer and a rapid diagnosis mode answer, respectively, forming paired training samples. For example, for a simple arc discharge fault case, the inference expert model might generate a diagnostic report containing detailed gas analysis and temperature changes, while the instruction-following expert model generates a concise conclusion, such as an arc discharge fault, suggesting checking the internal discharge point. In the reinforcement learning optimization stage, the reward function can be defined to set reward scores based on the correctness of the inference mode selected by the model and the diagnostic conclusion. For example, if the model selects the rapid diagnosis mode and gives the correct conclusion, the reward score is 1; if it selects the deep tracing mode and gives the correct conclusion, the reward score is 1- ,in This is an efficiency penalty factor used to balance inference depth and efficiency; if the diagnosis is incorrect, the reward score is -1 regardless of the selected mode. Through this reward mechanism, the model gradually learns to select the most appropriate inference mode in different situations during training, thus enabling it to flexibly adjust the diagnostic strategy according to the complexity of the fault in practical applications, thereby improving the efficiency and accuracy of diagnosis.
[0051] In some embodiments, the dual-expert knowledge distillation includes the following steps: S311. Construct a reasoning expert model and an instruction following expert model, wherein the reasoning expert model is trained to generate detailed thought chains, and the instruction following expert model is optimized to generate concise answers; S312. Use two expert models to generate paired training samples for each fault case, including quick diagnosis mode answers and deep source tracing mode answers; S313. The initial model is supervised and fine-tuned using the training samples so that the initial model can generate a diagnostic report of the corresponding inference mode based on the control tags.
[0052] By constructing reasoning expert models and instruction following expert models, paired training samples are generated for each fault case, including answers for rapid diagnostic patterns and deep tracing patterns. The reasoning expert models focus on generating detailed thought processes, suitable for in-depth analysis of complex faults; while the instruction following expert models optimize the generation of concise answers, suitable for rapid diagnosis of simple faults. Supervised fine-tuning enables the initial model to generate diagnostic reports for corresponding reasoning patterns based on control markers, thus laying the foundation for subsequent adaptive reasoning pattern selection.
[0053] The reasoning expert model and the instruction-following expert model are constructed based on different training objectives and optimization strategies. The reasoning expert model uses deep learning algorithms, such as Long Short-Term Memory (LSTM) networks or Transformer architectures, to perform multi-layered processing on the input data, generating detailed reasoning processes and diagnostic reports. For example, for a complex fault case, the reasoning expert model might progressively analyze changes in dissolved gas concentrations in the oil, trends in electrical and thermal data, and correlations with historical data, ultimately generating a diagnostic report containing multi-step reasoning. The instruction-following expert model, on the other hand, uses lightweight neural networks, such as single-layer perceptrons or shallow convolutional neural networks (CNNs), to directly generate concise diagnostic conclusions. For example, for a simple arc discharge fault, the instruction-following expert model might directly output "arc discharge fault" and suggest checking the internal discharge point. The paired training samples generated by these two models for each fault case are in the form of…
[0054] in This represents the input data for the i-th fault case. This indicates the answer in the quick diagnostic mode. This indicates the answer in the deep source tracing mode. This represents the total number of failure cases. These training samples are used to supervise the fine-tuning of the initial model, enabling it to generate diagnostic reports for the corresponding inference patterns based on control markers.
[0055] Preferably, when constructing the reasoning expert model, a multi-layer LSTM network can be used. Input parameters include dissolved gas analysis data in the oil, such as the concentrations of hydrogen, methane, ethane, ethylene, and acetylene; electrical and thermal data, such as top-layer oil temperature, winding hotspot temperature, load current, voltage, partial discharge signals; and historical data, such as historical fault records, maintenance reports, a database of fault cases for the same model of equipment, and historical trend data of key parameters. For example, for dissolved gas analysis data in the oil, the rate of change and peak values of gas concentration can be used as features input into the LSTM network. Features are gradually extracted through a multi-layer network to generate a detailed reasoning process. For instruction-following expert models, a single-layer perceptron can be used. The input parameters also include the aforementioned data, but the focus is on generating concise answers. For example, for a simple arc discharge fault, if the input acetylene concentration exceeds 50 ppm, the model directly outputs an arc discharge fault and suggests checking the internal discharge point. In the supervised fine-tuning stage, the initial model learns from these paired training samples and can then adjust according to control markers, such as... or This generates a diagnostic report based on the corresponding reasoning pattern. For example, when a single fault feature exists in the input data and key indicators exceed a preset threshold, the model... The model generates concise diagnostic conclusions based on the tags; when the input data is complex, the model adjusts accordingly. The system generates detailed inference reports. This training method ensures that the model can flexibly select inference modes under different fault scenarios, improving the efficiency and accuracy of diagnosis.
[0056] In the training samples The input data represents the i-th fault case. This data includes dissolved gas analysis data, electrical and thermal data, and historical data. For example, dissolved gas analysis data may include the concentrations of hydrogen, methane, ethane, ethylene, and acetylene; electrical and thermal data may include top oil temperature, winding hot spot temperature, load current, voltage, and partial discharge signals; historical data may include historical fault records, maintenance reports, a fault case library of the same model of equipment, and historical trend data of key parameters. It is a quick diagnostic pattern answer generated by instructions following an expert model. It is usually a concise diagnostic conclusion, such as an arc discharge fault, suggesting checking the internal discharge point. The answer, generated by a deep-source model from an expert inference system, typically involves a detailed reasoning process. For example, according to IEC 60599, the result calculated using the three-ratio method is (1,1,2), and the Duval trigonometric type 1 coordinate falls within the T2 medium-temperature overheating region. Historical data shows that the concentrations of ethylene (C2H4) and methane (CH4) have been slowly and synchronously increasing over the past 90 days, indicating a continuing development of the fault. The overall assessment is a continuously developing medium-low temperature overheating fault (<300°C), with the fault likely located at the winding or lead connection. Recommendation: Include this as a priority area, shorten the monitoring cycle, and plan a detailed internal inspection during the next power outage. This paired training sample format allows the model to learn how to generate different styles of diagnostic reports based on control flags during supervised fine-tuning.
[0057] Preferably, the following steps can be used when constructing training samples: 1. Data Collection and Preprocessing: Multi-source heterogeneous data, including dissolved gas analysis data in oil, electrical and thermal quantity data, and historical data, were collected from the transformer online monitoring system and historical databases. This data was cleaned and normalized to construct time-series features.
[0058] 2. Expert Model-Generated Answers: Inference expert models and instruction-following expert models are used to generate answers for deep tracing and rapid diagnosis modes, respectively. For example, for a simple arc discharge fault case, the instruction-following expert model might output "arc discharge fault" and suggest checking the internal discharge point, while the inference expert model might output a detailed reasoning process.
[0059] 3. Construction of paired training samples: The input data for each failure case... Answers to the corresponding quick diagnostic mode And the answer to the deep source tracing mode Pair them up to form training samples.
[0060] 4. Supervised Fine-Tuning: The initial model is supervised and fine-tuned using these paired training samples, enabling the model to generate diagnostic reports based on control markers and corresponding inference patterns. For example, when a single fault feature exists in the input data and a key indicator exceeds a preset threshold, the model... The model generates concise diagnostic conclusions based on the tags; when the input data is complex, the model adjusts accordingly. The tags generate a detailed reasoning report.
[0061] In some embodiments, the reinforcement learning optimization includes the following steps: S321. Define a reward function to calculate a reward score based on the correctness of the reasoning pattern and diagnostic conclusions output by the model. S322. The GRPO algorithm is used to optimize the strategy model based on the reward function.
[0062] Reinforcement learning optimization aims to enable models to adaptively select inference modes based on the complexity of the input data. By defining a reward function and using the GRPO algorithm to optimize the policy model, the model can obtain different reward scores based on the correctness and efficiency of the diagnostic conclusion, thereby learning to select the appropriate inference mode at the right time.
[0063] Specifically, the reward function in reinforcement learning optimization is a function that calculates reward scores based on the correctness of the inference patterns and diagnostic conclusions output by the model. The definition of the reward function is as follows: If the model selects the quick diagnosis mode and gives the correct conclusion, the reward score is 1.
[0064] If the model selects the deep source tracing mode and provides the correct conclusion, the reward score is 1- ,in It is an efficiency penalty factor used to balance reasoning depth and efficiency.
[0065] If the model gives an incorrect conclusion, the reward score is -1 regardless of which mode is selected.
[0066] Here This is an adjustable parameter representing the additional computational cost incurred by deep inference. Users can adjust it according to their different preferences for efficiency and rigor. The value. For example, if efficiency is a greater priority, it can be... Set it to a larger value; if greater emphasis is placed on diagnostic accuracy, you can... Set it to a smaller value.
[0067] Preferably, in the reinforcement learning optimization phase, model training may include the following steps: 1. Define the reward function: Define a reward function according to the rules above to ensure that the model receives an appropriate reward or penalty when selecting an inference mode. For example, for a simple arc discharge fault, if the model selects the rapid diagnosis mode and diagnoses correctly, it receives a reward score of 1; if it selects the deep tracing mode and diagnoses correctly, it receives a reward score of 1- .
[0068] 2. Sampling Outputs: Sample multiple outputs from the current policy model. Each output includes an inference pattern and a diagnostic conclusion. For example, sample 10 outputs, each corresponding to a diagnostic result for a fault case.
[0069] 3. Calculate the reward score: Calculate the reward score for each output based on the reward function. For example, a correct quick diagnostic output has a reward score of 1; a correct deep source tracing output has a reward score of 1- For an incorrect diagnostic output, the reward score is -1.
[0070] 4. Optimize the policy model: The GRPO algorithm is used to optimize the policy model, enabling it to adjust its policy based on reward scores. This allows the model to learn the most appropriate inference pattern under different circumstances during training. The GRPO algorithm optimizes the model's policy by maximizing expected reward, ensuring that the model achieves the highest cumulative reward in the long run.
[0071] Through this reinforcement learning optimization method, the model can gradually learn to select the most appropriate inference mode under different fault scenarios during the training process, thereby flexibly adjusting the diagnostic strategy according to the complexity of the fault in practical applications and improving the efficiency and accuracy of diagnosis.
[0072] The reward function expression is:
[0073] The predicted answers generated for the model are processed by the answer extractor. The sequence output from the model It was extracted from [the source].
[0074] This is to input the corresponding standard answer, i.e., the correct diagnostic result.
[0075] This is an answer validator used to evaluate the predicted answers generated by the model. Is it consistent with the standard answer? Consistent.
[0076] The inference mode selected for the model can be a rapid diagnostic mode. Or deep source tracing mode .
[0077] This is an efficiency penalty factor used to balance inference depth and efficiency. When the model selects the deep source tracing mode, even if the diagnostic result is correct, it will still be penalized due to the high inference depth. The penalty score is [value missing]. .
[0078] Preferably, the reward function can be implemented by following these steps: 1. Answer Extraction: Use an answer extractor The sequence output from the model Extracting predicted answers For example, the sequence output by the model might be a string containing multiple tokens, from which the answer extractor can extract key diagnostic conclusions.
[0079] 2. Answer Verification: Use an answer verifier. Judge and predict the answer Is it consistent with the standard answer? Consistency. For example, if the standard answer is arc discharge fault, and the model-generated predicted answer is also arc discharge fault, then... .
[0080] 3. Reward Calculation: Based on the reasoning mode selected by the model. The reward score is calculated based on the answer verification results. For example, if the model selects the rapid diagnosis mode and the diagnosis result is correct, the reward score is 1; if the model selects the deep tracing mode and the diagnosis result is correct, the reward score is [missing information]. If the model's diagnostic result is incorrect, the reward score is -1.
[0081] 4. Parameter settings: Set the efficiency penalty factor according to actual needs. For example, if efficiency is a greater priority, one could... Set it to a large value, such as 0.5; if greater emphasis is placed on diagnostic accuracy, you can... Set it to a small value, such as 0.1.
[0082] By designing and implementing this reward function, the model can learn to select the most appropriate inference mode under different circumstances during training, thereby flexibly adjusting the diagnostic strategy according to the complexity of the fault in practical applications and improving the efficiency and accuracy of diagnosis.
[0083] In some embodiments, the objective function in the reinforcement learning optimization is defined as:
[0084] This is the overall objective function, used to measure the overall performance of the model.
[0085] This is a token-level objective function used to measure the accuracy of each token generated by the model. Specifically, it calculates the loss by comparing the tokens generated by the model with those generated by a reference model.
[0086] KL divergence is used to measure the current policy model. Compared with the reference model The difference between them. The smaller the KL divergence, the more similar the two models are.
[0087] The current policy model, i.e., the model being trained, has the following parameters: .
[0088] The reference model is typically a pre-trained model used to provide a reference strategy.
[0089] This is the KL penalty coefficient, used to balance the KL divergence and the objective function at the token level. A larger one... The value will make the model closer to the reference model.
[0090] The number of outputs sampled represents the number of outputs sampled from the current policy model.
[0091] Let be the number of tokens in the i-th output, representing the number of tokens contained in each output.
[0092] Preferably, the objective function can be implemented by following these steps: 1. Sampling Output: Sample multiple outputs from the current policy model. Each output includes an inference pattern and a diagnostic conclusion. For example, sample 10 outputs, each corresponding to a diagnostic result for a fault case.
[0093] 2. Calculate the objective function at the token level: For each sampled output, calculate the objective function for each token. Specifically, for each token, the relative advantage between the token generated by the current strategy model and the token generated by the reference model is calculated. The loss is calculated based on the relative advantage. For example, if the token generated by the current strategy model is the same as the token generated by the reference model, and the relative advantage is higher, the loss is smaller.
[0094] 3. Calculate KL divergence: Calculate the current policy model. Compared with the reference model KL divergence between The smaller the KL divergence, the more similar the two models are.
[0095] 4. Optimize the objective function: Combine the token-level objective function and KL divergence to calculate the overall objective function. And use optimization algorithms, such as gradient descent, to update the model parameters. This minimizes the overall objective function. For example, by adjusting... The value of can strike a balance between the accuracy and efficiency of the model.
[0096] 5. Parameter Settings: Set the KL penalty coefficient according to actual needs. For example, if more emphasis is placed on the accuracy of the model, it can be... Set it to a small value, such as 0.1; if you are more concerned about model efficiency, you can... Set it to a large value, such as 0.5.
[0097] By designing and implementing this objective function, the model can learn to select the most appropriate inference mode under different circumstances during training, thereby flexibly adjusting the diagnostic strategy according to the complexity of the fault in practical applications and improving the efficiency and accuracy of diagnosis.
[0098] The above embodiments of the present invention have the following beneficial effects: 1. This invention, through adaptive selection of inference modes, can flexibly switch diagnostic strategies based on the complexity of the input data. For simple and clear fault characteristics, a rapid diagnosis mode is adopted to quickly provide core fault conclusions and handling suggestions, significantly improving diagnostic efficiency and reducing computational resource consumption. It is particularly suitable for transformer fault diagnosis scenarios requiring real-time monitoring and rapid alarms, solving the resource waste problem of complicating simple problems in existing technologies.
[0099] 2. When faced with complex faults involving ambiguous data, multiple intertwined fault characteristics, or contradictions, this invention can automatically switch to a deep tracing mode to perform detailed chain-like thinking and multi-dimensional data analysis. It combines historical trend data to assess the development of the fault and gradually outputs a detailed reasoning process and a comprehensive diagnostic report, ensuring the accuracy and reliability of the diagnosis. This avoids the omissions or misjudgments caused by the simplification of complex problems in existing technologies and solves the problem of insufficient accuracy and depth in the diagnosis of complex faults in existing technologies.
[0100] 3. This invention employs a two-stage training process combining dual-expert knowledge distillation and reinforcement learning optimization. This enables the model to generate answers using two different reasoning modes and, through a reward mechanism, autonomously learns to select the appropriate reasoning mode at the right time. This training method not only improves the model's generalization ability and adaptability but also optimizes the overall performance of the diagnostic system. It allows the model to demonstrate higher comprehensive intelligence and adaptability when dealing with diverse and uncertain real-world operational scenarios, solving the problem of existing technologies' single model training methods that struggle to balance efficiency and accuracy.
[0101] like Figure 2 As shown in some embodiments, a transformer fault diagnosis system based on adaptive reasoning includes: The data preprocessing module 201 is used to collect and integrate multi-source heterogeneous data from the transformer online monitoring system and historical database in real time, and to clean and normalize the data to construct time series features; The transformer hybrid reasoning diagnosis module 202 is used to input the processed data into the transformer hybrid reasoning diagnosis model. The transformer hybrid reasoning diagnosis model adaptively selects the reasoning mode according to the complexity of the input data. The reasoning mode includes a fast diagnosis mode and a deep tracing mode. Output module 203 is used to output a corresponding diagnostic report based on the selected reasoning mode.
[0102] It is understandable that the modules described in this adaptive reasoning-based transformer fault diagnosis system are similar to those in the reference system. Figure 1 The steps described correspond to those in the adaptive reasoning-based transformer fault diagnosis method. Therefore, the operations, features, and beneficial effects described above for the adaptive reasoning-based transformer fault diagnosis method are also applicable to the adaptive reasoning-based transformer fault diagnosis system and its constituent modules, and will not be repeated here.
[0103] Furthermore, the storage medium in the embodiments of this application stores program instructions capable of implementing all the above methods. These program instructions can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.
[0104] The above description is merely an explanation of some preferred embodiments of the present invention and the technical principles employed. Those skilled in the art should understand that the scope of the invention as described in the embodiments of the present invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention.
Claims
1. A transformer fault diagnosis method based on adaptive reasoning, characterized in that, Includes the following steps: S1. Data Reception and Preprocessing: Real-time collection and fusion of multi-source heterogeneous data from the transformer online monitoring system and historical database, and data cleaning and normalization processing to construct time series features; the multi-source heterogeneous data includes dissolved gas analysis data in oil, electrical and thermal quantity data and historical data, wherein the electrical and thermal quantity data includes top oil temperature, winding hot spot temperature, load current, voltage and partial discharge signal; S2. Diagnosis using a transformer hybrid reasoning diagnostic model: The processed data is input into the transformer hybrid reasoning diagnostic model, which adaptively selects a reasoning mode based on the complexity of the input data. The reasoning modes include a rapid diagnostic mode and a deep tracing mode. S3. Output Diagnostic Report: Output the corresponding diagnostic report based on the selected reasoning mode; In step S2, the transformer hybrid reasoning diagnostic model selects the reasoning mode through the following judgment logic: When a single fault feature exists in the input data and the key indicators of that fault feature exceed the preset threshold, select the quick diagnosis mode. Select the deep tracing mode when the input data meets any of the following conditions: (1) Multiple fault characteristic indicators simultaneously exceed the warning value; (2) Key fault characteristic indicators are in a critical state; (3) The fault characteristics reflected by different monitoring data are contradictory; (4) It is necessary to combine historical trend data to analyze the development of the fault; The transformer hybrid reasoning diagnostic model is obtained through the following two-stage training process: S31. First stage: Perform dual-expert knowledge distillation to train the transformer hybrid reasoning diagnostic model to generate a diagnostic report based on the corresponding reasoning mode according to the control tags; S32. Second stage: Perform reinforcement learning optimization to train the transformer hybrid reasoning diagnostic model to adaptively select the reasoning mode; The dual-expert knowledge distillation includes the following steps: S311. Construct a reasoning expert model and an instruction following expert model, wherein the reasoning expert model is trained to generate detailed thought chains, and the instruction following expert model is optimized to generate concise answers; S312. Use two expert models to generate paired training samples for each fault case, including quick diagnosis mode answers and deep source tracing mode answers; S313. The initial model is supervised and fine-tuned using the training samples so that the initial model can generate a diagnostic report of the corresponding reasoning mode based on the control tags; The reinforcement learning optimization includes the following steps: S321. Define a reward function to calculate a reward score based on the correctness of the reasoning pattern and diagnostic conclusions output by the model. S322. Optimize the strategy model using the GRPO algorithm based on the aforementioned reward function; The reward function is defined as follows: in, , This represents the answer extractor. This represents the answer validator. This indicates that the corresponding standard answer should be entered. This indicates the reasoning mode selected by the model. Indicates an efficiency penalty factor; The objective function in the reinforcement learning optimization is defined as: in, Describe the overall objective function. This represents the target function at the token level. Denotes KL divergence, Indicates the current policy model. Represents the reference model. Indicates the KL penalty coefficient. Indicates the number of sampled outputs. This indicates the number of tokens in the i-th output; The objective function at the token level is defined as follows: in, Indicates relative advantage, This indicates the trimming parameters.
2. The method according to claim 1, characterized in that: In rapid diagnostic mode, the transformer hybrid reasoning diagnostic model directly outputs diagnostic conclusions that include fault type, fault cause, and handling suggestions; In the deep tracing mode, the transformer hybrid reasoning diagnostic model performs the following analysis process: First, feature extraction and correlation analysis were performed on the dissolved gas analysis data and electrical and thermal data in the oil. Then, the failure development process is analyzed by combining historical data trends; Next, a fault type elimination analysis was performed based on multi-dimensional monitoring data; Finally, a comprehensive diagnostic report containing detailed reasoning processes is generated.
3. The method according to claim 1, characterized in that, The training samples are in the following form: in, This represents the input data for the i-th fault case. This indicates a quick diagnostic pattern answer generated by instructions following an expert model. This represents the deep-source pattern answer generated by the reasoning expert model. This indicates the total number of failure cases.
4. A transformer fault diagnosis system based on adaptive reasoning, characterized in that, include: The data preprocessing module is used to collect and integrate multi-source heterogeneous data from the transformer online monitoring system and historical database in real time, and to clean and normalize the data to construct time series features. The multi-source heterogeneous data includes dissolved gas analysis data in oil, electrical and thermal data, and historical data. Among them, the electrical and thermal data includes top oil temperature, winding hot spot temperature, load current, voltage, and partial discharge signal. The transformer hybrid reasoning diagnostic module is used to input the processed data into the transformer hybrid reasoning diagnostic model. The transformer hybrid reasoning diagnostic model adaptively selects the reasoning mode according to the complexity of the input data. The reasoning mode includes a fast diagnostic mode and a deep tracing mode. The output module is used to output a corresponding diagnostic report according to the selected reasoning mode; the transformer hybrid reasoning diagnostic model selects the reasoning mode through the following judgment logic: when there is a single fault feature in the input data and the key indicators of the fault feature exceed the preset threshold, the fast diagnosis mode is selected; Select the deep tracing mode when the input data meets any of the following conditions: (1) Multiple fault characteristic indicators simultaneously exceed the warning value; (2) Key fault characteristic indicators are in a critical state; (3) The fault characteristics reflected by different monitoring data are contradictory; (4) It is necessary to combine historical trend data to analyze the development of the fault; The transformer hybrid reasoning diagnostic model is obtained through the following two-stage training process: Phase 1: Perform dual-expert knowledge distillation to train the transformer hybrid reasoning diagnostic model to generate diagnostic reports based on the corresponding reasoning patterns according to the control tags; Phase 2: Perform reinforcement learning optimization to train the transformer hybrid reasoning diagnostic model to adaptively select the reasoning mode; The dual-expert knowledge distillation includes the following steps: Construct a reasoning expert model and an instruction-following expert model, where the reasoning expert model is trained to generate detailed thought processes, and the instruction-following expert model is optimized to generate concise answers; Two expert models are used to generate paired training samples for each failure case, including quick diagnosis mode answers and deep source tracing mode answers; The initial model is supervised and fine-tuned using the training samples, enabling the initial model to generate diagnostic reports of the corresponding reasoning patterns based on the control tags. The reinforcement learning optimization includes the following steps: Define a reward function to calculate a reward score based on the correctness of the inference pattern and diagnostic conclusions output by the model. The GRPO algorithm is used to optimize the strategy model based on the aforementioned reward function; The reward function is defined as follows: in, , This represents the answer extractor. This represents the answer validator. This indicates that the corresponding standard answer should be entered. This indicates the reasoning mode selected by the model. Indicates an efficiency penalty factor; The objective function in the reinforcement learning optimization is defined as: in, Describe the overall objective function. This represents the target function at the token level. Denotes KL divergence, Indicates the current policy model. Represents the reference model. Indicates the KL penalty coefficient. Indicates the number of sampled outputs. This indicates the number of tokens in the i-th output; The objective function at the token level is defined as follows: in, Indicates relative advantage, This indicates the trimming parameters.
Citation Information
Patent Citations
Adaptive decision-making method and system based on large language model, and storage medium
CN118503394A
Power transformer fault diagnosis method based on dynamic multi-modal information fusion
CN119167185A