Power grid fault analysis auxiliary research and judgment method based on self-learning and self-updating large language model

Through the power grid fault analysis assisted analysis method based on self-learning and self-updating large language model, the limitations of relying on manual experience and insufficient analysis decision-making efficiency in the existing technology are solved, and higher fault analysis accuracy and response speed are achieved.

CN119989195APending Publication Date: 2025-05-13STATE GRID SHANDONG ELECTRIC POWER CO
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510051141.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing grid fault analysis methods rely highly on the professional knowledge and practical experience of dedicated personnel, and are difficult to adapt to the rapid development of new power systems, and there are obvious shortcomings in the analysis and decision-making efficiency.

Method used

The grid fault analysis assisted analysis method based on self-learning and self-updating large language model is adopted. By building a data review and labeling platform, collecting power system data, generating sample files, fine-tuning the parameters of the basic large language model, forming a fault analysis large model, and using the self-learning mechanism for optimization and update, to build a fault analysis assisted decision-making engine.

Benefits of technology

It improves the accuracy of predicting and judgment of grid fault types, locations and severity, solves the time synchronization problem of multi-site recording signals, improves the overall performance and response speed of fault diagnosis, and reduces power outage time and losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989195A_ABST
    Figure CN119989195A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of fault analysis auxiliary research and judgment, in particular to a power grid fault analysis auxiliary research and judgment method based on a self-learning and self-updating large language model. The method comprises the following steps: constructing a data auditing and labeling platform; after the data auditing and labeling platform is constructed, collecting power system data and generating a sample file; based on the basic large language model, performing parameter fine tuning on the basic large language model by utilizing historical cases and the generated sample file to obtain a business large model; optimizing and updating the business large model by using a self-learning mechanism to form a fault research and judgment large model; and constructing a fault analysis aided decision engine based on the fault research and judgment large model, and analyzing the power system data through the fault analysis aided decision engine to obtain a power grid fault reason. According to the design of the invention, the large business model is constructed, and the self-learning mechanism is continuously utilized for optimization and updating, so that the accuracy of prediction and judgment of the type, position and severity of the power grid fault can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault analysis auxiliary research and judgment, and in particular to a power grid fault analysis auxiliary research and judgment method based on a self-learning and self-updating large language model. Background Art

[0002] At present, the power grid fault analysis method is highly dependent on the professional knowledge and practical experience of the dedicated personnel. These dedicated personnel not only need to master a solid theoretical foundation of power systems, but also must have rich field operation experience and keen problem detection ability. When a power system fails, they need to quickly determine the nature and possible location of the fault based on the data performance of the fault node and their own accumulated experience. However, this analysis method that relies on personal experience and intuition has increasingly become limited in the face of complex and changeable power system failures; at present, the power grid fault analysis method is difficult to adapt to the rapid development of my country's new power system. With the rapid development of new power systems, the existing power grid fault analysis methods are facing unprecedented challenges. On the one hand, the scale of the power grid is rapidly expanding, and more and more distributed energy, energy storage devices and electric vehicles are connected to the power grid, which not only increases the complexity of the power grid, but also makes the failure mode more diverse and uncertain. On the other hand, the application of new power electronic equipment, such as high-voltage direct current transmission and flexible alternating current transmission systems, has improved the flexibility and efficiency of power transmission, but also introduced new types of faults and technical difficulties. Traditional fault analysis methods often fail to respond to these new situations in a timely and effective manner, making fault location and processing more difficult; the current power grid fault analysis methods have obvious deficiencies in analysis and decision-making efficiency. In the traditional mode, the entire process from the occurrence of a fault to its final location and repair often takes a long time. This is mainly because the analysis and decision-making of fault data are mostly done manually, which is not only slow, but also easily affected by human factors, such as misjudgment or omission. With the continuous growth of electricity demand, power companies have higher and higher requirements for fault response speed. Therefore, how to improve the automation level of fault analysis and shorten the fault handling time has become one of the key issues that the power industry needs to solve urgently. Therefore, a power grid fault analysis auxiliary judgment method based on a self-learning and self-updating large language model is provided. Summary of the invention

[0003] The purpose of the present invention is to provide a power grid fault analysis auxiliary judgment method based on a self-learning and self-updating large language model to solve the problems proposed in the above background technology that the current power grid fault analysis method is highly dependent on the professional knowledge and practical experience of dedicated personnel, is difficult to adapt to the rapid development of my country's new power system, and has obvious deficiencies in analysis and decision-making efficiency.

[0004] To achieve the above object, the present invention aims to provide a power grid fault analysis auxiliary judgment method based on a self-learning and self-updating large language model, comprising the following steps: S1. Build a data review and annotation platform; S2. After the data review and annotation platform is built, the power system data is collected and sample files are generated; S3. Based on the basic large language model, use historical cases and generated sample files to fine-tune the parameters of the basic large language model to obtain a business large model. S4. Use the self-learning mechanism to optimize and update the business big model, form a fault analysis big model, provide fault analysis and decision support, and introduce the time synchronization error function in the optimization and update process to address the time synchronization problem of multi-site recording signals; S5. Build a fault analysis auxiliary decision engine based on the fault analysis model, and use the fault analysis auxiliary decision engine to analyze the power system data to obtain the cause of the power grid failure.

[0005] As a further improvement of the present technical solution, in S2, the power system data includes alarm information, time series data, and recording information of power stations at both ends of the line.

[0006] As a further improvement of the technical solution, in S3, based on the basic large language model, the parameters of the basic large language model are fine-tuned by using historical cases and generated sample files to obtain a business large model, including the following steps: S3.1. Analyze the zero-sequence voltage, phase voltage, voltage amplitude change, three-phase current and current change characteristics, reclosing voltage and reclosing time characteristics during the reclosing process, fault occurrence time and fault duration characteristics, and interphase short circuit fault characteristics from the recorded information; S3.2. Decode and synchronize the original recorded data, and extract the segment signals of the cycle before the fault, the cycle after the fault, and the cycle related to the reclosing according to the fault time and the reclosing time; S3.3, calculating voltage, current and timing characteristics from the extracted signal segments; S3.4, expanding the feature vector by the extracted features; S3.5. Build a big business model based on the feature vector to predict the type, location and severity of power grid faults.

[0007] As a further improvement of the technical solution, in S3.5, the business model is: ; in, Indicates the type, location and severity of the predicted power grid fault; represents the fault type identification function; represents the fault location prediction function; represents the fault severity evaluation function; represents a feature vector.

[0008] As a further improvement of the technical solution, in S4, the service big model is optimized and updated by using a self-learning mechanism to form a fault analysis big model, including the following steps: S4.1. Collect new power system data, pre-process the new power system data, and use BasicDataController class data to query and manage the original power system data; S4.2. Filter key data for improving the business model through weight allocation and information gain, and fine-tune the business model through optimization algorithms; S4.3. Use incremental learning algorithms to update the parameters of the business big model, and apply self-supervised learning to enhance the business big model's ability to extract features of new data, and generate a fault analysis big model; S4.4. Use the tree search algorithm to optimize the parameter adjustment path of the fault analysis model.

[0009] As a further improvement of the technical solution, in S4.2, fine-tuning the business big model by an optimization algorithm includes the following steps: S4.21. Define the goal of fine-tuning and divide the newly added data into training set, validation set and test set; S4.22, load the pre-trained parameters of the basic large language model and select stochastic gradient descent as the optimization algorithm; S4.23, divide the training set data into small batches, and input them into the business model batch by batch for training; S4.24. Use the business big model to input feature vector Make predictions and calculate task loss ; S4.25. Loss function for the current batch , calculate the gradient of the business model parameters ; S4.26. Update the business model parameters according to the stochastic gradient descent formula.

[0010] As a further improvement of the technical solution, in S4.26, the stochastic gradient descent formula is: ; in, Indicates Business model parameters at the first iteration; Indicates Business model parameters at the first iteration; represents the learning rate; Indicates the parameters of the business model The gradient operator of ; represents the loss function; Represents a large business model based on input The predicted output of Represents the input feature vector The true label of Indicates The feature vector of sample file input; Represents the index of the sample file; Aiming at the time synchronization problem of multi-site recording signals, the time synchronization error function is introduced into the stochastic gradient descent formula: ; in, Indicates the optimized business model parameters; represents the time synchronization error weight; represents the time synchronization error function.

[0011] As a further improvement of the technical solution, in S4.3, the self-supervised learning enhancement model is applied to the feature extraction capability of the newly added data, including the following steps: S4.31. Construct a loss function for each pair of sample files and divide the sample files into positive sample and negative sample pairs; S4.32. Design a contrastive learning loss function to minimize the distance between positive sample pairs and maximize the distance between negative sample pairs. To address the problem of scarce negative samples in power grid fault data, combine generative adversarial networks to generate more diverse negative samples. S4.33, input the newly added data into the self-supervised learning enhancement model, and learn the feature representation of each sample file through the contrastive learning task; S4.34. Use the features learned through comparative learning as input to further fine-tune the business model and update the parameters of the business model. .

[0012] As a further improvement of the technical solution, in S4.34, the contrastive learning loss function is: ; in, Represents the value of the contrastive learning loss function; Indicates the number of sample files; Indicates The feature vector of sample files; Representation and Positive sample feature vectors belonging to the same category; Representation and Negative sample feature vectors belonging to different categories; represents an indicator variable; Represents the distance metric between feature vectors; Represents the minimum distance between negative samples; Represents the index of the sample file; To address the problem of scarce negative samples in power grid fault data, we combine generative adversarial networks to generate more diverse negative samples. ; in, Represents the value of the contrast loss function after combining with the generative adversarial network; Parameter representing the balance loss; Represents the pseudo negative sample generated by the generator after the noise vector is input; represents a randomly sampled noise vector; Represents the negative sample loss term generated by the generative adversarial network.

[0013] As a further improvement of the technical solution, in S5, a fault analysis auxiliary decision engine is constructed based on the fault analysis and judgment large model, and the fault analysis auxiliary decision engine analyzes the power system data to obtain the cause of the power grid fault, including the following steps: S5.1. Import the power system data into the console through the ETL tool, and use the ETL tool to extract the recorded information in the power system; S5.2. Review and label the imported data, and label the imported data through a combination of manual review and automated review; adapt the imported data, and convert and normalize the imported data format according to the input requirements of the fault analysis model; S5.3. Extract the characteristics before and after the fault from the recorded information; S5.4. Based on the extracted results, the fault analysis auxiliary decision engine uses the fault analysis model to make inferences and determine the cause of the fault; S5.5. Build a RESTful API interface to allow external systems to access and call the fault analysis and decision engine. Based on the fault analysis results of the fault analysis model, the console provides real-time decision support. At the same time, based on the fault prediction results, early warning information is sent in advance and a graphical interface is provided. S5.6. Assist in analysis and judgment through ExpertFeedback and FeedbackConclusion components, provide conclusion display, and monitor the service status of the fault analysis auxiliary decision engine in real time.

[0014] Compared with the prior art, the present invention has the following beneficial effects: 1. In the power grid fault analysis and auxiliary judgment method based on the self-learning and self-updating large language model, by constructing a business large model specifically for the power system and continuously optimizing and updating it using the self-learning mechanism, this method can effectively improve the accuracy of predicting and judging the type, location and severity of power grid faults. In particular, the introduction of the time synchronization error function solves the time synchronization problem of multi-site recording signals, allowing data from different locations to be more accurately compared and analyzed, thereby improving the overall performance of fault diagnosis. In addition, the model's feature extraction ability for newly added data is enhanced through self-supervised learning and generative adversarial networks (GAN), especially when dealing with scarce negative samples, which further improves the model's learning ability and generalization ability, ensuring the timeliness and reliability of fault diagnosis.

[0015] 2. This power grid fault analysis and auxiliary judgment method based on the self-learning and self-updating large language model not only provides an advanced fault analysis tool, but also builds a complete fault analysis auxiliary decision engine, realizing a one-stop service from data collection, preprocessing to fault cause analysis. It can be seamlessly integrated with other systems through the RESTful API interface, providing real-time decision support and early warning information sending functions, helping power companies to quickly respond to fault conditions and reduce power outage time and losses. At the same time, the addition of a graphical interface and expert feedback module enables non-technical personnel to understand and use the judgment results, improving the user-friendliness and service quality of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flow chart of the overall method of the present invention; DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] Example: See Figure 1 As shown, this embodiment provides a power grid fault analysis auxiliary judgment method based on a self-learning and self-updating large language model, comprising the following steps: S1. Build a data review and annotation platform to ensure the accuracy of power system status, fault records and response measures. Through fuzzy retrieval, data update and annotation, ensure the integrity and authenticity of the data, and provide reliable basic data for subsequent model training; In this embodiment, the process of building a data review and annotation platform is as follows: modular design, including data collection, review, annotation and management modules, supporting cloud and local collaboration; collecting various power grid data (status, faults, alarms, etc.), classified storage, to ensure efficient retrieval; filtering data based on rule engines and anomaly detection models, and experts reviewing abnormal or complex data; graphical tools annotating fault types, impact ranges, and time characteristics; optimizing automatic annotation algorithms based on user feedback.

[0019] S2. After the construction of the data review and annotation platform is completed, the power system data is collected through the SCADA system (supervisory control and data acquisition system), PMU (phasor measurement unit), and recorder to generate sample files; In this embodiment, the power system data includes comprehensive alarm information based on the power grid data system D5000, time series data (reclosing timestamp (such as 1065.00ms and 1071.20ms), switch value change time (such as "220kV Xiayi Line_213 Switch_Protection_Reclosing" time), recording analysis data (voltage and current waveform data)), and recording information of power stations at both ends of the line. The generated sample file contains information such as the cycle before and after reclosing, reclosing action and timing data when a fault occurs within a period of time, which is used to train and fine-tune the model.

[0020] S3. Based on the basic large language model (Qwen-7B), use historical cases and generated sample files to fine-tune the parameters of the basic large language model to obtain the business large model; In this embodiment, based on the basic large language model (Qwen-7B), the parameters of the basic large language model are fine-tuned using historical cases and generated sample files to obtain a business large model, including the following steps: S3.1. Analyze the zero-sequence voltage, phase voltage, voltage amplitude change, three-phase current and current change characteristics from the recorded information, the reclosing voltage and reclosing time characteristics during the reclosing process, the fault occurrence time and fault duration characteristics, and the phase-to-phase short-circuit fault characteristics. Low zero-sequence voltage, significant drop in the voltage of the affected two phases (phase A and phase B), a significant increase in the current of the affected two phases with a large change, and a small zero-sequence current will lead to an AB phase-to-phase short-circuit fault; S3.2. Decode and synchronize the original recorded data, and extract the segment signals of the cycle before the fault, the cycle after the fault, and the cycle related to the reclosing according to the fault time and the reclosing time; S3.3, calculating voltage, current and timing characteristics from the extracted signal segments; S3.4, expanding the feature vector by the extracted features; S3.5. Build a big business model based on the feature vector to predict the type, location and severity of power grid faults; Furthermore, the business model is: ; in, Indicates the type, location and severity of the predicted power grid fault; represents the fault type identification function; represents the fault location prediction function; represents the fault severity evaluation function; represents the feature vector; Fault type identification function: ; in, ; Specifically, the feature vector Represents the observed value describing the state of the circuit or device, specifically the observed value describing the state of the circuit or device, frequency components, environmental condition data (temperature, humidity, etc.) and power device status signal; function is a classifier that maps input features to different fault type categories; its output is a set of discrete values ​​representing the identified fault types; If yes Feature Input , then the rule model based on feature threshold is: In the formula, To measure the characteristics Whether it exceeds a certain limit, for example: the current amplitude greater than a certain value indicates a short circuit; is with The corresponding threshold is used to determine whether the voltage characteristic exceeds the normal range; Used for judgment Is it below a certain value; for example, if a voltage signal is below , then the corresponding line is broken; is a combination of one or more thresholds, such as Whether it is within a certain range or meets certain frequency and impedance characteristics to determine the ground fault; Specifically, , and Both are thresholds, which are pre-set values ​​used to determine whether the input features meet the conditions of a certain fault type. Their values ​​are determined based on experience, experiments, or theoretical analysis to distinguish different fault types. The specific values ​​need to be adjusted according to system characteristics and application scenarios. Fault location prediction function: ; It can be the line number, distance from the substation, etc. The output is the location where the fault occurred; Specifically, Used to associate fault-related input features Transformed into predicted value of fault location ; Furthermore, based on the impedance method, the fault location is estimated by measuring the impedance value from the point to the fault point: ; In the formula, Indicates the measured impedance value; It represents the line impedance per unit length; Indicates the total length of the line; The output is the distance between the fault point and the measurement point.

[0021] If there are multiple measurement points at the device location (such as measurements at both ends), the impedance value difference between the two sites needs to be combined to estimate the location. If there are many line branches, the network topology information needs to be combined to determine the fault point of the specific branch.

[0022] For equipment failures such as transformers, the model may locate them based on the abnormal voltage and current characteristics at the equipment connection points.

[0023] (1) Single line failure For simple line structures, the fault location can be determined by calculating the impedance value from the measurement point to the fault point.

[0024] If the total line length L = 10 km, the unit length impedance Zunit length = 0.1Ω / km, and the measured impedance Zmeasured = 0.5Ω, then the fault point is 5 km away from the measuring point.

[0025] (2) Fault location using two-terminal measurement There are measurement points at both ends of the line, and the impedance values ​​measured at both ends can be used to locate the fault more accurately.

[0026] Calculate the measured impedances ZAZ_AZA and ZBZ_BZB at both ends.

[0027] Combine topology information and line parameters to determine the location of the fault point.

[0028] (3) Branch line fault When there are multiple branches on the trunk line, it is necessary to locate them by combining branch current and topology information.

[0029] The current and impedance values ​​of each branch are measured.

[0030] Determine the branch with abnormal current and locate the fault point along the branch.

[0031] (4) Transformer equipment failure When a transformer or other equipment fails, it is necessary to locate it based on the abnormal characteristics of the equipment parameters and connection points.

[0032] Analyze the current fluctuations on both sides of the transformer.

[0033] The fault point is determined by using the equipment impedance model and the current and voltage change characteristics of the abnormal point.

[0034] (5) Ring network failure Fault location in a ring power grid is relatively complex and requires comprehensive measurement information from multiple points.

[0035] Based on the network topology and measurement point data, an iterative algorithm is used to narrow the fault scope.

[0036] Further positioning is performed using current difference and impedance modeling.

[0037] Fault severity evaluation function: ; , the higher the value, the more serious the fault.

[0038] Specifically, Used to quantify the severity of the fault, its implementation needs to be based on the input features (voltage, current, power fluctuation, duration, etc.); ; In the formula, Indicates single or combined characteristic values ​​related to the effects of a fault; Represents the parameter that adjusts the slope of the nonlinear curve.

[0039] S4. Use the self-learning mechanism to optimize and update the business big model, form a fault analysis big model, and provide fault analysis and decision support; In this embodiment, the power system is dynamically changing. Over time, the grid structure, operation mode and equipment status will change. Through the self-learning / self-updating mechanism, the model can continuously learn from the latest data to ensure that its prediction ability and accuracy are always in the best state and can reflect the latest situation in a timely manner. With the advancement of technology and the increase in the complexity of the power grid, new fault types or abnormal behaviors may appear. Traditional static models are difficult to capture these emerging phenomena. The use of a self-learning mechanism can enable the model to continuously learn new types of fault characteristics, thereby improving the ability to identify unknown problems. By updating model parameters in real time, it can better support grid operators to make fast and accurate decisions. For example, when facing emergencies, a self-updated fault analysis model can provide more accurate risk assessment and response strategy recommendations, which helps to reduce power outage time and service interruption costs. The self-learning / self-updating mechanism is used to optimize and update the business big model to form a fault analysis big model, including the following steps: S4.1. Collect newly added power system data, including status data, fault records, alarm information, and waveform information, pre-process the newly added power system data, and use the BasicDataController class data to query and manage the original power system data; The BasicDataController class is responsible for managing and providing access to the latest power system data, which includes but is not limited to querying, updating, and maintaining data; Furthermore, the BasicDataController class function flow is: Receive a query condition and paging parameters, and return a list of data that meets the conditions and paging information: Receive a client request, the client sends a POST request to / api / basic / data / page, and the request body contains the query condition (dto) and paging parameters (page); Use the @Validated annotation to verify the query condition dto parameters to ensure the legitimacy of the fields, and convert the request body to a BasicDataQueryDTO object through @RequestBody; Call the selectBasicDataListByPage(dto,page) method through the dependency-injected basicDataService, which queries the database based on the query condition and paging parameters and returns the paging result object PageResult <basicdatavo>, the returned data includes: the data list of the current page, the total number of records, the total number of pages and other paging information; use Result.ok(pageResult) to encapsulate the result, construct a unified response format, and return the response to the client, including the paging data; According to the unique identifier (faultId) provided by the client, query and return the corresponding data details: the client sends a POST request to / api / basic / data / detail, and the request body contains faultId (encapsulated by the FaultIdDTO object); use the @Validated annotation to verify the parameters of the FaultIdDTO object to ensure that the faultId field is not empty and the format is legal, and the request body is converted to the FaultIdDTO object through @RequestBody; call the method selectBasicDataDetailByFaultId(dto.getFaultId()) through the dependency injection of basicDataService. This method queries the database based on faultId and returns the data detail object FaultDetailVO. The data details usually include the specific values ​​of all fields; use Result.ok(vo) to encapsulate the result, construct a unified response format, and return the response to the client, including the data details; S4.2. Filter key data for improving the business model through weight allocation and information gain, and fine-tune the business model through optimization algorithms; Although pre-trained large language models have been trained on large-scale general data sets and have strong natural language understanding and generation capabilities, they may not be directly applicable to specific fields (such as power grid fault analysis). Through fine-tuning, the model can be better adapted to the specific terms, patterns and characteristics of the power system; the fine-tuning process allows the model to learn the fault modes related to the power system, thereby improving its accuracy and reliability in this field, which includes but is not limited to identifying different types of faults, the time points when faults occur, possible causes, etc.; by fine-tuning on real-world power system data, it can be ensured that the model not only performs well on known data, but also can effectively handle unseen data or new situations, that is, enhance the generalization ability of the model; Among them, fine-tuning the business model through optimization algorithm includes the following steps: S4.21. Define the goals of fine-tuning, including fault type identification, fault location prediction, and fault severity assessment, and divide the newly added data into training set, validation set, and test set; S4.22, load the pre-trained parameters of the basic large language model (Qwen-7B), and select stochastic gradient descent (SGD) as the optimization algorithm; S4.23. Divide the training set data into small batches, each batch size is , and input them batch by batch into the large business model for training; S4.24. Use the business big model to input feature vector Make predictions and calculate task loss ; S4.25. Loss function for the current batch , calculate the gradient of the business model parameters ; S4.26. Update the parameters of the business model according to the stochastic gradient descent formula; The main task of the stochastic gradient descent formula is to find a set of model parameters that makes the difference between the model's predicted output and the true label (i.e., the loss function) as small as possible. For the auxiliary judgment method of power grid fault analysis, this means minimizing the model's error rate in classification tasks such as fault type, location, and cause. By adjusting the parameters, the model can better capture the patterns and features in the power system data, thereby improving its accuracy and reliability in fault detection, classification, and other related tasks. For example, during fine-tuning, the model can learn fault signal features specific to the power system, such as changes in current and voltage waveforms. Pre-trained large language models are usually trained on large-scale general corpora, while practical applications often require customized adjustments for data in specific fields. By fine-tuning using data from the power system and adopting appropriate optimization algorithms, the model can be more in line with the needs of power grid fault analysis and provide more accurate results. Furthermore, the stochastic gradient descent formula is: ; in, Indicates The business model parameters (such as weights and biases) at the iteration; Indicates The business model parameters at the iteration, indicating the parameter values ​​of the previous round of training; Represents the learning rate, which controls the amplitude of model parameter update. The learning rate determines the speed of model parameter adjustment at each update step; Indicates the parameters of the business model The gradient operator of ; represents the loss function, ; Represents a large business model based on input The predicted output of Represents the input feature vector The true label of Indicates j The feature vector of sample file input; Represents the index of the sample file; Multiple sites or devices in a power grid often collect data at different times, and these signals may have slight time synchronization errors, especially in distributed systems. If these signals are not properly aligned, the fault analysis model may not be able to accurately analyze the propagation or location of the fault. Therefore, the time synchronization error function is introduced to unify the signals from different sites into a time frame, eliminate time deviations, and improve the accuracy and consistency of the data; in the self-learning and self-updating large language model, stochastic gradient descent (SGD) is used as an optimization method to adjust parameters during training to minimize the loss function. If there is a time deviation in the recorded signal, the training process of the model may be affected, resulting in the learned representation not being consistent with the actual situation. By introducing the time synchronization error function, the model is able to consider the time synchronization problem at each update, thereby avoiding training instability or misleading results caused by time misalignment; Aiming at the time synchronization problem of multi-site recording signals, the time synchronization error function is introduced into the stochastic gradient descent formula: ; in, Indicates the optimized business model parameters; Represents the time synchronization error weight, which adjusts the impact of the time synchronization error on the total loss; represents the time synchronization error function, which quantifies the time alignment deviation of multi-site recording signals and contains regularization terms for the similarity of recording signal features and timestamp differences; In the time synchronization error function, firstly, the business big model Extract the feature vectors of multi-site recording signals. These features include: time series features (such as time window slices of voltage and current signals), dynamic features (such as waveform changes before and after faults), and relative time (such as fault time and reclosing time). The recording signal features of each site are used express; Through the distance function , calculate the similarity or error between signals from different sites, and the distance metric is: ; The error regularization term is implemented by temporal shift Quantify the timestamp differences between sites: ,in, , indicating the site and Site The time stamp difference of the recorded signals; represents the ideal synchronization time offset (usually zero); represents the regularization coefficient that controls the effect of time offset on the overall loss; Based on the above, the time synchronization error function is designed as: ; in, Indicates the total number of sites involved in the calculation; Indicates the characteristic comparison range of the target site signal; Indicates Recording signals of each station; Represents the signal feature comparison weight; represents the weight coefficient of the time offset error; S4.3. Use incremental learning algorithms to update the parameters of the business big model (the incremental learning algorithm gradually uses new data to fine-tune the parameters of the pre-trained big language model without retraining the overall model, so as to continuously optimize its performance and adapt to new situations). At the same time, self-supervised learning is used to enhance the business big model's ability to extract features from newly added data and generate a fault diagnosis big model. Self-supervised learning is to let the model predict some partially missing or implicit features, and learn the potential structure of the data through these prediction tasks. It is a machine learning method that learns useful representations from unlabeled data. It is often difficult to obtain enough labeled samples for fault data in fields such as power systems. Self-supervised learning allows the model to use unlabeled data for pre-training, improving its performance with a small amount of labeled data. By designing appropriate self-supervised tasks (such as predicting the next value in a sequence, reconstructing inputs, or contrastive learning), the model can learn the complex relationships and patterns within the data, which is particularly important for identifying anomalies and faults. Self-supervised learning helps the model better understand the data distribution, so that it can not only perform well on the training set, but also effectively process unseen data, that is, improve the generalization ability of the model. The application of self-supervised learning to enhance the model's ability to extract features from new data includes the following steps: S4.31. Construct a loss function for each pair of sample files, the loss function helps the model distinguish between different types of faults and normal states, and divide the sample files into positive sample pairs and negative sample pairs. The sample files include positive sample pairs (two samples belonging to the same category, such as different records of the same type of fault, or similar fault data in different areas of the power grid at the same time) and negative sample pairs (two samples belonging to different categories, such as different types of faults or a comparison between normal and fault states); S4.32. Design a contrastive learning loss function to minimize the distance between positive sample pairs and maximize the distance between negative sample pairs, so that the model can learn more discriminative features. To address the problem of scarce negative samples in power grid fault data, a generative adversarial network (GAN) is combined to generate more diverse negative samples. S4.33. Input the newly added data into the self-supervised learning enhancement model, and learn the feature representation of each sample file through the contrastive learning task. The contrastive learning loss function will adjust the model parameters according to the similarity of each pair of samples, and promote the optimization of the model towards a more effective feature representation direction; S4.34. Use the learned features as input to further fine-tune the business model. During fine-tuning, use the labeled data (such as fault type, location, and severity labels) to optimize the model so that it can accurately identify the specific type, location, and severity of power grid faults, and update the parameters of the business model. .

[0040] Furthermore, the contrastive learning loss function is: ; in, Represents the value of the contrastive learning loss function, which is used to measure the similarity of the model output and the distinction between different samples; Indicates the number of sample files; Indicates The feature vector of a sample file is usually a feature vector extracted from the original data (such as power grid fault data); Representation and The positive sample feature vector belongs to the same category, which is They should be close in feature space; Representation and Negative sample feature vectors belonging to different categories, which are They should be far apart in feature space; Represents an indicator variable, which is used to identify the relationship between two sample pairs, that is, the positive sample ( ) or negative samples ( ), which determines whether the model should minimize the distance between similar samples (for positive samples) or maximize the distance between different samples (for negative samples); Represents the distance metric between feature vectors; Indicates the minimum distance between negative samples, ensuring that different samples maintain a certain distance, thereby increasing the distinction between samples; Represents the index of the sample file; Power grid fault data usually has serious class imbalance, that is, the normal operating state (negative samples) is far more than the fault state (positive samples). This imbalance will cause the model to tend to predict the majority class, thereby reducing the detection accuracy of the minority class (fault). By generating more negative samples through GAN, the data distribution can be balanced to a certain extent, so that the model can treat all categories more fairly, especially those rare fault types; the introduction of negative samples generated by GAN can provide the model with a wider range of learning materials, so that it does not only rely on limited real data. This helps to improve the generalization ability of the model, enabling it to make accurate judgments even when faced with data it has never seen. Especially in the power grid environment, failure modes may change over time, so it is crucial to have a model that can adapt to new situations; To address the problem of scarce negative samples in power grid fault data, a generative adversarial network (GAN) is used to generate more diverse negative samples: ; in, Represents the value of the contrast loss function after combining with the generative adversarial network; Parameter representing the balance loss; Represents the pseudo negative sample generated by the generator in the adversarial network after the noise vector is input; represents a randomly sampled noise vector; Represents the negative sample loss term generated by the generative adversarial network; In the context of scarce negative samples, traditional contrast loss relies on real negative samples. However, insufficient negative samples may cause the model to fail to learn fully. Therefore, a generative adversarial network (GAN) is introduced to generate negative samples to make up for the problem of data scarcity. The generator is based on the input noise vector , by learning the characteristics of the real data distribution, generate pseudo negative samples: , ,here Output simulated negative samples that are close to the distribution of real negative samples; The discriminator distinguishes the input Whether they come from the real data distribution, through adversarial training, the quality of negative samples generated by the generator gradually improves; Compute the discriminator loss, which attempts to distinguish between real negative samples and generated negative samples: ; Calculate the generator loss so that the generated samples are identified as real samples: ; By alternately optimizing the generator and the discriminator, high-quality generated negative samples are obtained; S4.4. Use the tree search algorithm to optimize the parameter adjustment path of the large fault analysis model and explore the globally optimal update solution. The tree search algorithm gradually explores and converges on the globally optimal parameter update solution by constructing and evaluating the search tree of parameter configuration, combined with pruning and heuristic search strategies. After adjustment, the DocumentValidator class is used to verify the fault analysis results.

[0041] S5. Build a fault analysis auxiliary decision engine based on the fault analysis model, and use the fault analysis auxiliary decision engine to analyze the power system data to obtain the cause of the power grid fault; In this embodiment, advanced fault detection, diagnosis and prediction capabilities are integrated to provide power system operators with real-time, accurate fault information and decision support to improve response speed, reduce power outage time, optimize maintenance resources, and ensure safe and stable operation of the power grid; Based on the fault analysis and judgment big model, a fault analysis auxiliary decision engine is built. The fault analysis auxiliary decision engine analyzes the power system data to obtain the cause of the power grid fault, including the following steps: S5.1. Import the power system data into the control console through the ETL tool, and use the ETL tool to extract the recorded information in the power system to ensure that the data meets the format requirements before entering the system; S5.2. Review and label the imported data to ensure the accuracy and completeness of the imported data. Label the imported data (such as fault type, occurrence time, impact range, etc.) through a combination of manual review and automated review to ensure that the data meets the requirements of model training and reasoning. Adapt the imported data to ensure that the data is compatible with the large model decision engine. According to the input requirements of the large fault analysis model (such as time series data, alarm information, etc.), convert and normalize the imported data format so that the data can be directly input into the model for decision-making. S5.3. Extract the characteristics before and after the fault from the recorded information. The characteristics before and after the fault include the zero-sequence voltage value and the zero-sequence current value before and after the fault. Compare the differences between the three-phase voltages before and after the fault, calculate the change in the zero-sequence voltage, and compare the threshold value under normal operating conditions to determine whether there is a significant increase. Analyze the growth trend of the zero-sequence current, evaluate whether it exceeds the normal range, and determine the affected voltage, which helps to locate the possible fault location. S5.4. Based on the extracted results, the fault analysis auxiliary decision engine uses the fault analysis model to reason and determine the cause of the fault. Fault judgment includes: ground fault: usually causes a significant increase in zero-sequence current and zero-sequence voltage, especially when the ground wire contacts the fault, the zero-sequence voltage will change abnormally; short-circuit fault: the current fluctuates greatly, the voltage is seriously unbalanced, especially when the three-phase current increases rapidly, the zero-sequence current sometimes increases; equipment failure: if the fault is caused by a fault in the equipment (such as a transformer, switch, etc.), the model will identify abnormal changes in the equipment's operating status, such as voltage drop, equipment failure alarm information, etc.; S5.5. Build a RESTful API interface or WebSocket service to allow external systems (such as the dispatch center, operator platform, etc.) to access and call the fault analysis and decision engine. Based on the fault analysis results of the fault analysis model, the console provides real-time decision support, including fault type classification, fault location, impact range analysis, etc. At the same time, based on the fault prediction results, send early warning information in advance to help relevant personnel prepare for fault handling, and provide a graphical interface (such as a dashboard, fault distribution map, trend map, etc.) to help users understand the fault situation more intuitively. Users can view the time sequence diagram of the fault event, the impact area map, and the progress of fault handling through the visual interface; S5.6, assist in analysis and judgment through ExpertFeedback and FeedbackConclusion components, provide conclusion display, and monitor the service status of the fault analysis auxiliary decision engine in real time; ExpertFeedback and FeedbackConclusion components work together to provide users with a platform where they can not only view the model's analysis conclusions but also give valuable feedback. This two-way communication mechanism not only enhances the practicality of the system, but also promotes the system's self-evolution, ensuring that it can continue to adapt to new challenges and needs over time; The main purpose of the ExpertFeedback component is to display the feedback information of the expert on a certain fault analysis conclusion. It provides a friendly user interface for experts to view the fault analysis conclusion generated by the model and give feedback based on their own professional knowledge. Experts can mark whether the fault analysis conclusion is correct (conclusion is correct, conclusion is wrong, or feedback is pending); Furthermore, the functional flow of the ExpertFeedback component is: Use React hooks (such as useState and useEffect) to manage the internal state of the component, such as whether to display specific content or loading status; the component receives props from the parent component or other sources, such as detailParams (containing fault analysis details), feedbackResult (conclusion status), showStatus (display status), etc., and deconstructs the received props and assigns them to local variables for subsequent use; API) to obtain additional data, such as the latest model prediction results or expert feedback records, and pre-process the obtained data, such as formatting timestamps, calculating differences, etc.; define a main container to hold all child elements and apply style classes to ensure good visual effects, display the "Analysis Conclusion" title to inform users that the following content is about the specific conclusion of the fault analysis; use the TextDiff component to display the difference between the old text and the new text to help users quickly understand the change points, highlight abnormal situations to help experts quickly locate the problem, provide a selection box or button to allow experts to mark the conclusion as "Conclusion Correct", "Conclusion Wrong" or "Pending Feedback", and provide a Submit button. When the expert completes the feedback, he can click Submit to trigger the API request to send the feedback information back to the server; define the handleSubmitFeedback method, which is responsible for collecting user input and sending it to the server as a POST request to update the model training data set or adjust the model parameters; once the expert feedback is submitted and saved, the system should automatically trigger the model retraining or parameter adjustment process to achieve self-learning and self-updating; The FeedbackConclusion component is used to display the fault analysis conclusion after model processing, including but not limited to text difference comparison, abnormal prompts and other information. It uses subcomponents such as TextDiff to intuitively display the differences between different versions to help users quickly understand the change points. The showStatus parameter controls the display of different states (such as correct conclusion, wrong conclusion or waiting for feedback) so that users can see at a glance. When there is an abnormal situation, FeedbackConclusion can highlight the abnormal prompt information to help experts quickly locate the problem. By displaying the conclusion and combining it with the ExpertFeedback component, a complete feedback loop is formed to ensure that each user interaction can provide valuable information for the next iteration of the system; Furthermore, the functional flow of the FeedbackConclusion component is: Call the custom Hook useStyles to get the style object styles and the tool method cx, which is used to dynamically merge multiple style class names; get the analysis-related data from FailureAnalysis.analysisDetail through useModel; determine whether there is stationLists data. If so, use map to traverse stationLists and generate corresponding content for each station to display the analysis results or content related to each station; define an area called analysis conclusion and use the TextDiff component to compare the new and old texts of diffConclusion. If diffConclusion.new exists, display the new text. If diffConclusion.new does not exist, return to display the old text, and control the specific behavior or style of TextDiff according to showStatus; render an exception prompt area. If the exceptionMessage array is not empty, use map to traverse the array and render each exception message as a div element. If the array is empty, display the placeholder _; check whether showStatus is equal to 1. If the condition is met, render the specified content; otherwise return null (no rendering).

[0042] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and descriptions are only preferred examples of the present invention, and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.< / basicdatavo>

Claims

1. A power grid fault analysis and auxiliary judgment method based on a self-learning and self-updating large language model, characterized in that: The following steps are involved: S1. Build a data review and annotation platform; S2. After the data review and annotation platform is built, the power system data is collected and sample files are generated; S3. Based on the basic large language model, use historical cases and generated sample files to fine-tune the parameters of the basic large language model to obtain a business large model; S4. Use the self-learning mechanism to optimize and update the business big model, form a fault analysis big model, provide fault analysis and decision support, and introduce the time synchronization error function in the optimization and update process to address the time synchronization problem of multi-site recording signals; S5. Build a fault analysis auxiliary decision engine based on the fault analysis model, and use the fault analysis auxiliary decision engine to analyze the power system data to obtain the cause of the power grid failure.

2. The power grid fault analysis auxiliary judgment method based on the self-learning and self-updating large language model according to claim 1 is characterized by: In S2, the power system data includes alarm information, time series data, and recording information of power plants at both ends of the line.

3. The power grid fault analysis auxiliary judgment method based on the self-learning and self-updating large language model according to claim 2 is characterized by: In S3, based on the basic large language model, the parameters of the basic large language model are fine-tuned using historical cases and generated sample files to obtain a business large model, including the following steps: S3.

1. Analyze the zero-sequence voltage, phase voltage, voltage amplitude change, three-phase current and current change characteristics, reclosing voltage and reclosing time characteristics during the reclosing process, fault occurrence time and fault duration characteristics, and interphase short circuit fault characteristics from the recorded information; S3.

2. Decode and synchronize the original recorded data, and extract the segment signals of the cycle before the fault, the cycle after the fault, and the cycle related to the reclosing according to the fault time and the reclosing time; S3.3, calculating voltage, current and timing characteristics from the extracted signal segments; S3.4, expanding the feature vector by the extracted features; S3.

5. Build a big business model based on the feature vector to predict the type, location and severity of power grid faults.

4. The power grid fault analysis auxiliary judgment method based on the self-learning and self-updating large language model according to claim 3 is characterized by: In S3.5, the business model is: ; in, Indicates the type, location and severity of the predicted power grid fault; represents the fault type identification function; represents the fault location prediction function; represents the fault severity evaluation function; represents a feature vector.

5. The power grid fault analysis auxiliary judgment method based on the self-learning and self-updating large language model according to claim 1 is characterized by: In S4, the service big model is optimized and updated by using the self-learning mechanism to form a fault analysis big model, including the following steps: S4.

1. Collect new power system data, pre-process the new power system data, and use BasicDataController class data to query and manage the original power system data; S4.

2. Filter key data for improving the business model through weight allocation and information gain, and fine-tune the business model through optimization algorithms; S4.

3. Use incremental learning algorithms to update the parameters of the business big model, and apply self-supervised learning to enhance the business big model's ability to extract features of new data, and generate a fault analysis big model; S4.

4. Use the tree search algorithm to optimize the parameter adjustment path of the fault analysis model.

6. The power grid fault analysis auxiliary judgment method based on the self-learning and self-updating large language model according to claim 5 is characterized by: In S4.2, the business model is fine-tuned by an optimization algorithm, including the following steps: S4.

21. Define the goal of fine-tuning and divide the newly added data into training set, validation set and test set; S4.22, load the pre-trained parameters of the basic large language model and select stochastic gradient descent as the optimization algorithm; S4.23, divide the training set data into small batches, and input them into the business model batch by batch for training; S4.

24. Use the business big model to input feature vector Make predictions and calculate task loss ; S4.

25. Loss function for the current batch , calculate the gradient of the business model parameters ; S4.

26. Update the business model parameters according to the stochastic gradient descent formula.

7. The power grid fault analysis auxiliary judgment method based on the self-learning and self-updating large language model according to claim 6 is characterized by: In S4.26, the stochastic gradient descent formula is: ; in, Indicates Business model parameters at the first iteration; Indicates Business model parameters at the first iteration; represents the learning rate; Indicates the parameters of the business model The gradient operator of ; represents the loss function; Represents a large business model based on input The predicted output of Represents the input feature vector The true label of Indicates The feature vector of sample file input; Represents the index of the sample file; Aiming at the time synchronization problem of multi-site recording signals, the time synchronization error function is introduced into the stochastic gradient descent formula: ; in, Indicates the optimized business model parameters; represents the time synchronization error weight; represents the time synchronization error function.

8. The power grid fault analysis auxiliary judgment method based on the self-learning and self-updating large language model according to claim 7 is characterized by: In S4.3, applying the self-supervised learning enhancement model to extract features of the newly added data includes the following steps: S4.

31. Construct a loss function for each pair of sample files and divide the sample files into positive sample and negative sample pairs; S4.

32. Design a contrastive learning loss function to minimize the distance between positive sample pairs and maximize the distance between negative sample pairs. To address the problem of scarce negative samples in power grid fault data, combine generative adversarial networks to generate more diverse negative samples. S4.33, input the newly added data into the self-supervised learning enhancement model, and learn the feature representation of each sample file through the contrastive learning task; S4.

34. Use the features learned through comparative learning as input to further fine-tune the business model and update the parameters of the business model. .

9. The power grid fault analysis auxiliary judgment method based on the self-learning and self-updating large language model according to claim 8 is characterized by: In S4.34, the contrastive learning loss function is: ; in, Represents the value of the contrastive learning loss function; Indicates the number of sample files; Indicates The feature vector of sample files; Representation and Positive sample feature vectors belonging to the same category; Representation and Negative sample feature vectors belonging to different categories; represents an indicator variable; Represents the distance metric between feature vectors; Represents the minimum distance between negative samples; Represents the index of the sample file; To address the problem of scarce negative samples in power grid fault data, we use generative adversarial networks to generate more diverse negative samples. ; in, Represents the value of the contrast loss function after combining with the generative adversarial network; Parameter representing the balance loss; Represents the pseudo negative sample generated by the generator after the noise vector is input; represents a randomly sampled noise vector; Represents the negative sample loss term generated by the generative adversarial network.

10. The power grid fault analysis auxiliary judgment method based on the self-learning and self-updating large language model according to claim 1 is characterized by: In S5, a fault analysis auxiliary decision engine is constructed based on the fault analysis and judgment big model, and the fault analysis auxiliary decision engine is used to analyze the power system data to obtain the cause of the power grid fault, including the following steps: S5.

1. Import the power system data into the console through the ETL tool, and use the ETL tool to extract the recorded information in the power system; S5.

2. Review and label the imported data, and label the imported data through a combination of manual review and automated review; adapt the imported data, and convert and normalize the imported data format according to the input requirements of the fault analysis model; S5.

3. Extract the characteristics before and after the fault from the recorded information; S5.

4. Based on the extracted results, the fault analysis auxiliary decision engine uses the fault analysis model to make inferences and determine the cause of the fault; S5.

5. Build a RESTful API interface to allow external systems to access and call the fault analysis and decision engine. Based on the fault analysis results of the fault analysis model, the console provides real-time decision support. At the same time, based on the fault prediction results, early warning information is sent in advance and a graphical interface is provided. S5.

6. Assist in analysis and judgment through ExpertFeedback and FeedbackConclusion components, provide conclusion display, and monitor the service status of the fault analysis auxiliary decision engine in real time.

Citation Information

Cited By

  • Intelligent auxiliary decision-making method and system for large language model driven net treatment system

    CN120894006A