Power distribution network anomaly detection processing method, system and equipment based on cue word

By collecting real-time and historical data of the distribution network for feature extraction and matrix construction, and combining prompt words and large-scale pre-trained models for intelligent reasoning, the efficiency and accuracy of distribution network abnormal detection in the existing technology are solved, timely response and forward-looking prediction are achieved, and the system flexibility and adaptability are improved.

CN120296630APending Publication Date: 2025-07-11GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510392030.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The prior art cannot detect and process abnormal status in a timely and accurate manner by multi-dimensional data of the distribution network, resulting in false alarms or missed alarms, making it difficult to deal with sudden failures and environmental changes.

Method used

By collecting real-time and historical operation data of the distribution network, feature extraction and matrix construction are performed, prompt words and abnormal state detection models are used for intelligent abnormal detection and prediction, and intelligent inference and exception processing are performed in combination with large-scale pre-trained models.

Benefits of technology

It improves the efficiency and accuracy of abnormal detection of distribution networks, can respond to sudden failures in a timely manner and make forward-looking predictions, reduce false alarms and missed alarms, and enhances the flexibility and adaptability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120296630A_ABST
    Figure CN120296630A_ABST
Patent Text Reader

Abstract

The invention discloses a power distribution network anomaly detection processing method, system and device based on cue words, and belongs to the technical field of power distribution network anomaly detection.The method comprises the steps that power grid operation data corresponding to a power distribution network at each time point is collected and divided into time series data and non-time series data, and the time series data and the non-time series data are stored; performing feature extraction on the time series data and the non-time series data to obtain a plurality of feature variables, and constructing a real-time state feature matrix of the power distribution network at a current time point and a historical state feature matrix of the power distribution network in a historical time period; cue words corresponding to all the abnormal states are obtained, and based on the cue words, the real-time state feature matrix, the historical state feature matrix and a pre-constructed abnormal state detection model, a judgment result, a prediction result and a processing scheme corresponding to each abnormal state are obtained. Therefore, the problem that the abnormal state of the power distribution network cannot be timely and accurately detected and processed in the prior art can be solved by implementing the power distribution network abnormal state detection method and the power distribution network abnormal state processing device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of distribution network anomaly detection, and in particular to a method, system and device for distribution network anomaly detection and processing based on prompt words. Background Art

[0002] In modern power systems, the distribution network undertakes the task of power distribution from substations to users, and its stability and security have become an important part of ensuring the stable operation of the power system. However, with the rapid growth of power demand and distributed energy, the scale and complexity of the distribution network are also continuously expanding. At this time, it has become increasingly complex to perform accurate and effective condition monitoring and anomaly detection on the distribution network to ensure its stable operation.

[0003] When the prior art performs condition detection and anomaly processing on the distribution network, it often adopts detection methods based on thresholds, rule-driven monitoring means, and empirical methods. Although the above detection methods are simple to operate, they have many limitations. In practical applications, they rely on fixed thresholds or rules, and not only cannot be dynamically adjusted according to the actual operating state of the power grid, but also the monitoring effect and accuracy are often poor when facing the changing complex states in the power grid.

[0004] In recent years, with the rapid development of big data and artificial intelligence technologies, using statistical models, machine learning methods, etc. for condition detection and anomaly detection of the distribution network has become an emerging technical means. However, when the above methods face highly non-linear and multi-dimensional real-time data, they cannot respond in a timely manner to various possible abnormal states, resulting in common false alarms or missed alarms in the detection results of abnormal states. Moreover, when facing sudden faults or environmental changes, traditional methods often have difficulty responding in a timely manner to sudden abnormal conditions, resulting in the inability to accurately discover potential abnormal risks and process them. Summary of the Invention

[0005] The present invention provides a method, system and device for distribution network anomaly detection and processing based on prompt words. The method performs real-time detection and risk prediction on various abnormal states of the distribution network by inputting prompt words corresponding to each abnormal state and various characteristic variables corresponding to the operation data of the distribution network into the model, improves the efficiency and accuracy of anomaly detection, and further solves the problem that the prior art cannot analyze multi-dimensional data and thus cannot process the abnormal states of the distribution network in a timely and accurate manner.

[0006] To achieve the above object, in the first aspect, the present invention discloses a method for distribution network anomaly detection and processing based on prompt words, including:

[0007] Collect the power grid operation data corresponding to each time point within a preset time period for the distribution power grid; wherein, the power grid operation data includes the real-time operation data corresponding to the current time point and the historical operation data corresponding to each historical time point within the historical time period where the current time point is located;

[0008] Split the power grid operation data into time series data and non-time series data, and perform feature extraction on the time series data and the non-time series data respectively to obtain several types of feature variables corresponding to the power grid operation data;

[0009] Construct a real-time state feature matrix of the distribution power grid at the current time point and a historical state feature matrix of the distribution power grid during the historical time period according to the feature variables;

[0010] Obtain the prompt words corresponding to each abnormal state, and based on the prompt words, the real-time state feature matrix, the historical state feature matrix and a pre-constructed abnormal state detection model, obtain the determination result, prediction result and processing solution corresponding to each abnormal state.

[0011] A method for detecting and processing distribution power grid anomalies based on prompt words disclosed by the present invention first collects the real-time operation data of the distribution power grid at the current time point and the historical operation data at each historical time point, provides a data basis for subsequent anomaly state detection and prediction, and ensures the accuracy of anomaly detection. Secondly, the collected operation data is split into time series data and non-time series data to extract the feature variables corresponding to the time series data and the non-time series data respectively. On the one hand, it improves the accuracy of feature extraction, and thus improves the accuracy of anomaly detection. On the other hand, it reduces the data input volume of the subsequent model, improves the processing speed of the model, and thus improves the efficiency of anomaly detection and processing. Then, construct a matrix corresponding to the feature variables to improve the feature expression ability of the operation data, and thus improve the accuracy of detecting abnormal states. Then, use the model, the prompt words corresponding to each abnormal type, and the above-mentioned constructed feature matrix to detect and predict each abnormal state, so as to respond in time to the detection and processing of each abnormal state, and thus improve the efficiency and accuracy of anomaly detection and processing.

[0012] As a preferred example, the step of collecting the power grid operation data corresponding to each time point within a preset time period for the distribution power grid includes:

[0013] Collect the initial real-time operation data of the distribution power grid at the current time point and retrospectively obtain the initial historical operation data corresponding to each historical time point within the historical time period where the current time point is located; wherein, the initial real-time operation data and the initial historical operation data include equipment status data, load data, voltage and current data, environmental factor data and historical fault data;

[0014] Remove the abnormal data values in the initial real-time operation data and each of the initial historical operation data to obtain the first real-time operation data and several first historical operation data;

[0015] Fill in the missing data values in the first real-time operation data and each of the first historical operation data to obtain the second real-time operation data and several second historical operation data;

[0016] Perform normalization processing on the second real-time operation data and each of the second historical operation data to obtain the real-time operation data of the distribution network at the current time point and the historical operation data corresponding to each historical time point of the distribution network.

[0017] In the above solution, by obtaining the real-time operation data of the distribution network at the current time point and retrospectively obtaining the historical operation data of the historical time points before the current time point, the abnormal state that suddenly appears in the distribution network can be detected in a timely manner through the real-time operation data, and the abnormal state that may appear in the future of the distribution network can be predicted by using the historical operation data for early processing, thereby improving the efficiency of abnormal processing. Secondly, after obtaining the corresponding power grid operation data, removing abnormal data, filling in missing data, and performing normalization processing on the data can improve the accuracy of the data, thereby improving the accuracy of abnormal processing.

[0018] As a preferred example, splitting the power grid operation data into time series data and non-time series data, and respectively extracting features from the time series data and the non-time series data to obtain several characteristic variables corresponding to the power grid operation data, including:

[0019] Based on the data characteristics, split the power grid operation data into multiple time series data and several non-time series data;

[0020] Perform one-hot encoding on each of the non-time series data to obtain several first characteristic variables;

[0021] Perform stationarity detection on each of the time series data, and divide the multiple time series data into several stationary time series data and several non-stationary time series data according to the results of the stationarity detection;

[0022] Extract the first frequency domain features corresponding to each of the stationary time series data based on the fast Fourier transform;

[0023] Extract the second frequency domain features corresponding to each of the non-stationary time series data based on the short-time Fourier transform;

[0024] Obtain the mean, variance, skewness, and kurtosis corresponding to the multiple time series data, and use the mean, the variance, the skewness, and the kurtosis as the statistical features of the time series data.

[0025] In the above solution, the data is split into time-series data and non-time-series data according to the characteristics of the data, and feature extraction can be performed on data of different dimensions, so as to realize the processing of complex non-linear data and improve the accuracy of anomaly processing. Among them, after the data is divided into time-series data and non-time-series data, one-hot encoding is performed on the non-time-series data to convert the non-time-series data into feature variables recognizable by the model. At the same time, stationarity detection is performed on the non-time-series data to extract frequency-domain features in different time-series data respectively by using different Fourier transform methods, so as to process the global and local features in time-series data and provide an accuracy basis for accurately locating and identifying sudden abnormal states in the power grid. Then, statistical features of the time-series data are extracted to make up for the deficiency that simple frequency-domain features cannot comprehensively describe the data distribution characteristics, and can capture data characteristics more completely, thereby improving the accuracy of anomaly processing.

[0026] As a preferred example, constructing the real-time state feature matrix of the distribution network at the current time point and the historical state feature matrix of the distribution network in the historical time period according to the feature variables includes:

[0027] Obtain the statistical features, several first feature variables, several first frequency-domain features, and several second frequency-domain features corresponding to the current time point, and construct the real-time state matrix corresponding to the current time point;

[0028] Obtain the statistical features, several first feature variables, several first frequency-domain features, and several second frequency-domain features corresponding to each historical time point and the current time point respectively, and construct the historical state feature matrix of the historical time period.

[0029] In the above solution, various feature variables corresponding to each time point are converted into a feature matrix to better reflect the eigenvalue of the power grid operation data at each time point, so that the model can better detect abnormal states from the feature matrix, improving the accuracy and efficiency of detection. Secondly, a feature matrix corresponding to the historical time period is constructed based on multiple feature variables at each time point within the historical time period to show the change trend of the feature variables according to the feature matrix, and then predict possible abnormal states therein, so as to process the abnormal states in advance and improve the efficiency of anomaly processing.

[0030] As a preferred example, constructing the real-time state feature matrix of the distribution network at the current time point and the historical state feature matrix of the distribution network in the historical time period according to the feature variables further includes:

[0031] Perform standardization processing on the real-time state matrix and the historical state feature matrix respectively to obtain the standardized real-time state matrix and historical state feature matrix;

[0032] Use the principal component analysis method to reduce the dimensions of the standardized real-time state matrix and the historical state feature matrix to obtain the reduced-dimensional real-time state matrix and historical state feature matrix.

[0033] In the above solution, since different features have different dimensions and value ranges, standardizing the feature matrix can make all features within the same numerical scale to improve the accuracy of the model for detecting abnormal states. Using the principal component analysis method to reduce the dimensions of the matrix can reduce the data dimensions, thereby improving the calculation efficiency of the model to improve the efficiency of anomaly handling.

[0034] As a preferred example, obtaining the prompt words corresponding to each abnormal state respectively, and based on the prompt words, the real-time state feature matrix, the historical state feature matrix, and a pre-constructed abnormal state detection model, obtaining the determination result, prediction result, and corresponding processing solution corresponding to each abnormal state respectively, includes:

[0035] Retrieve the prompt words corresponding to each abnormal state from the pre-constructed prompt word template library;

[0036] Input the prompt words and the real-time state feature matrix into the pre-constructed abnormal state detection model to identify the target abnormal state corresponding to the prompt words through the abnormal state detection model;

[0037] Screen out a number of first feature variables corresponding to the target abnormal state from the real-time state feature matrix through the attention mechanism preset in the abnormal state detection model;

[0038] Based on a number of the first feature variables, calculate the probability value of the target abnormal state through the abnormal state detection model;

[0039] When the probability value is greater than or equal to a preset probability threshold, determine that the distribution network has the target abnormal state through the abnormal state detection model and obtain the processing solution corresponding to the target abnormal state.

[0040] In the above solution, during the process of detecting the abnormal state through the pre-constructed abnormal detection model using the prompt words corresponding to each abnormal state and the real-time operation data corresponding to the current time point, the intelligent context understanding and reasoning ability in the model can accurately capture the dynamic changes and complex abnormal patterns of the power grid, and then conduct intelligent abnormal recognition for each abnormal state, improving the efficiency of abnormal detection. Secondly, using the model to output the corresponding processing plan according to the determination result of the abnormal state can improve the efficiency and accuracy of abnormal processing.

[0041] As a preferred example, obtaining the prompt words corresponding to each abnormal state respectively, and based on the prompt words, the real-time state feature matrix, the historical state feature matrix and the pre-constructed abnormal state detection model, obtaining the determination result, prediction result and processing plan corresponding to each abnormal state respectively, includes:

[0042] Inputting the historical state feature matrix into the pre-constructed abnormal state detection model to screen out a number of second feature variables corresponding to the target abnormal state from the historical state feature matrix through the attention mechanism; wherein, the second feature variables include a number of the first feature variables corresponding to each time point respectively.

[0043] Based on a number of the second feature variables, predicting the probability value of the target abnormal state in the future time period through the abnormal state detection model.

[0044] When the probability value is greater than or equal to the preset probability threshold, predicting that the target abnormal state exists in the power distribution network in the future time period through the abnormal state detection model and obtaining the processing plan corresponding to the target abnormal state.

[0045] In the above solution, inputting the feature matrix of the power distribution network in a certain time period into the model, through the powerful reasoning ability of the model, combining the historical operation data of the power grid and the context information of the prompt words, automatically conducting intelligent reasoning to extract the abnormal state in the future time period for forward-looking prediction, and processing the possible abnormal state according to the forward-looking prediction, improving the efficiency and accuracy of abnormal processing.

[0046] As a preferred example, the obtaining the determination result, prediction result and processing plan corresponding to each abnormal state respectively based on the prompt words, the real-time state feature matrix, the historical state feature matrix and the pre-constructed abnormal state detection model further includes:

[0047] When it is predicted by the abnormal state detection model that the target abnormal state exists in the distribution network within the future time period or it is determined that the target abnormal state exists in the distribution network, the abnormal cause corresponding to the target abnormal state is obtained according to the first feature variable and the abnormal state detection model;

[0048] According to the abnormal cause, the determination result or prediction result corresponding to the target abnormal state, and the processing scheme corresponding to the target abnormal state, a warning message for the target abnormal state is generated;

[0049] A processing message corresponding to the target abnormal state is generated according to the warning message, and the abnormal state detection model is updated according to the processing message.

[0050] In the above solution, the feature variables matched by the abnormal state detection according to the model are traced to the abnormal cause leading to the abnormal state, and then the efficiency of processing is improved by the abnormal cause, recommended processing scheme and target abnormal state output by the model. Secondly, after processing the abnormal state, the abnormal state detection model is updated according to the processing information generated during the processing, so that the model adapts to the fault transformation of the distribution network, improves the accuracy of the model, and improves the accuracy of abnormal processing.

[0051] In a second aspect, the present invention discloses a distribution network abnormal detection and processing system based on prompt words, including a data acquisition module, a feature extraction module, a matrix construction module and an abnormal processing module;

[0052] The data acquisition module is used to collect the grid operation data corresponding to each time point of the distribution network within a preset time period; wherein, the grid operation data includes the real-time operation data corresponding to the current time point and the historical operation data corresponding to each historical time point within the historical time period where the current time point is located;

[0053] The feature extraction module is used to split the grid operation data into time series data and non-time series data, and respectively extract features from the time series data and the non-time series data to obtain several types of feature variables corresponding to the grid operation data;

[0054] The matrix construction module is used to construct a real-time state feature matrix of the distribution network at the current time point and a historical state feature matrix of the distribution network within the historical time period according to the feature variables;

[0055] The abnormal processing module is used to obtain the prompt words corresponding to each abnormal state, and based on the prompt words, the real-time state feature matrix, the historical state feature matrix and a pre-constructed abnormal state detection model, obtain the determination result, prediction result and processing scheme corresponding to each abnormal state.

[0056] A power distribution network anomaly detection and processing system based on prompt words disclosed by the present invention first collects real-time operation data of the power distribution network at the current time point and historical operation data at each historical time point, provides a data basis for subsequent anomaly status detection and prediction, and ensures the accuracy of anomaly detection. Secondly, the collected operation data is split into time-series data and non-time-series data to extract the characteristic variables corresponding to the time-series data and non-time-series data respectively. On the one hand, it improves the accuracy of feature extraction, and then improves the accuracy of anomaly detection. On the other hand, it reduces the data input volume of the subsequent model, improves the processing speed of the model, and then improves the efficiency of anomaly detection and processing. Then, a matrix corresponding to the characteristic variables is constructed to improve the characteristic expression ability of the operation data, and then improve the accuracy of detecting the anomaly status. Then, a model, the prompt words corresponding to each anomaly type, and the constructed feature matrix are used to detect and predict each anomaly status, so as to respond in a timely manner to the detection and processing of each anomaly status, and then improve the efficiency and accuracy of anomaly detection and processing.

[0057] In a third aspect, the present invention discloses a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a power distribution network anomaly detection and processing method based on prompt words as described in the first aspect. Description of the Drawings

[0058] In order to more clearly illustrate the technical solutions of the present application, the drawings required for the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0059] Figure 1 It is a flowchart of a power distribution network anomaly detection and processing method based on prompt words provided by an embodiment of the present invention;

[0060] Figure 2 It is a structural diagram of a power distribution network anomaly detection and processing system based on prompt words provided by an embodiment of the present invention;

[0061] Figure 3 It is a flowchart of a power distribution network anomaly detection and processing method based on prompt words provided by another embodiment of the present invention. Detailed Embodiments

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following will clearly and completely describe the technical solutions in this application with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts belong to the scope of protection of this application.

[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above description of the drawings are intended to cover non-exclusive inclusion.

[0064] In the description of the embodiments of this application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity, specific order, or primary-secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "a plurality" is more than two, unless otherwise specifically defined.

[0065] Referring to "embodiments" herein means that the specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of this application. The phrase does not necessarily refer to the same embodiment at every occurrence in the specification, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0066] In the description of the embodiments of this application, the term "and / or" is merely a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this text generally represents an "or" relationship between the preceding and following associated objects.

[0067] In the description of the embodiments of this application, the term "a plurality" refers to more than two (including two). Similarly, "a plurality of groups" refers to more than two groups (including two groups), and "a plurality of pieces" refers to more than two pieces (including two pieces).

[0068] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installation", "connection", "connection", "fixation" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can also be a mechanical connection or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, and can be the communication inside two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific situations.

[0069] Embodiment 1

[0070] See Figure 1 , to solve the problem that in the prior art, multi-dimensional data cannot be analyzed, and thus the abnormal state of the distribution network cannot be detected and processed in a timely and accurate manner, this embodiment provides a method for detecting and processing abnormal states of the distribution network based on prompt words, which is used to detect and process the abnormal state of the distribution network in a timely and accurate manner. The method includes:

[0071] Step 101: Collect the grid operation data corresponding to each time point of the distribution network within a preset time period; wherein, the grid operation data includes the real-time operation data corresponding to the current time point and the historical operation data corresponding to each historical time point within the historical time period where the current time point is located.

[0072] Step 102: Split the grid operation data into time series data and non-time series data, and respectively extract features from the time series data and the non-time series data to obtain several feature variables corresponding to the grid operation data.

[0073] Step 103: Construct a real-time state feature matrix of the distribution network at the current time point and a historical state feature matrix of the distribution network within the historical time period according to the feature variables.

[0074] Step 104: Obtain the prompt words corresponding to each abnormal state, and based on the prompt words, the real-time state feature matrix, the historical state feature matrix, and a pre-constructed abnormal state detection model, obtain the determination result, prediction result, and processing solution corresponding to each abnormal state.

[0075] In an implementation manner of this Embodiment 1, to improve the accuracy of collecting grid operation data, and thus provide accurate data basis for detecting and processing abnormal states of the distribution network, Step 101 includes:

[0076] Step 1011: Collect the initial real-time operation data of the distribution network at the current time point and retrospectively obtain the initial historical operation data corresponding to each historical time point within the historical time period where the current time point is located; wherein, the initial real-time operation data and the initial historical operation data include equipment status data, load data, voltage and current data, environmental factor data, and historical fault data;

[0077] Step 1012: Remove the abnormal data values in the initial real-time operation data and each of the initial historical operation data to obtain the first real-time operation data and several first historical operation data;

[0078] Step 1013: Fill in the missing data values in the first real-time operation data and each of the first historical operation data to obtain the second real-time operation data and several second historical operation data;

[0079] Step 1014: Perform standardization processing on the second real-time operation data and each of the second historical operation data to obtain the real-time operation data of the distribution network at the current time point and the historical operation data corresponding to each historical time point of the distribution network.

[0080] In the above steps, by obtaining the real-time operation data of the distribution network at the current time point and retrospectively obtaining the historical operation data of the historical time points before the current time point, the abnormal state that suddenly appears in the distribution network can be detected in a timely manner through the real-time operation data, and the abnormal state that may appear in the future of the distribution network can be predicted by using the historical operation data for early processing, thereby improving the efficiency of abnormal processing. Secondly, after obtaining the corresponding power grid operation data, removing abnormal data, filling in missing data, and performing standardization processing on the data can improve the accuracy of the data, thereby improving the accuracy of abnormal processing.

[0081] In a certain implementation manner of this embodiment, when extracting the characteristic variables of the power grid operation data, in order to improve the accuracy and extraction efficiency of the characteristic variables, the step 102 includes:

[0082] Step 1021: Split the power grid operation data into multiple time series data and several non-time series data based on data characteristics;

[0083] Step 1022: Perform one-hot encoding on each of the non-time series data to obtain several first characteristic variables;

[0084] Step 1023: Perform stationarity detection on each of the time series data, and divide the multiple time series data into several stationary time series data and several non-stationary time series data according to the results of the stationarity detection;

[0085] Step 1024: Extract the first frequency-domain feature corresponding to each of the stationary time series data based on the fast Fourier transform;

[0086] Step 1025: Extract the second frequency-domain feature corresponding to each of the non-stationary time series data based on the short-time Fourier transform;

[0087] Step 1026: Obtain the mean, variance, skewness, and kurtosis corresponding to multiple pieces of the time series data, and use the mean, the variance, the skewness, and the kurtosis as the statistical features of the time series data.

[0088] In the above steps, the data is split into time series data and non-time series data according to the characteristics of the data, and feature extraction can be performed on data of different dimensions, thereby realizing the processing of complex non-linear data to improve the accuracy of anomaly processing. Among them, after the data is divided into time series data and non-time series data, one-hot encoding is performed on the non-time series data to convert the non-time series data into feature variables recognizable by the model. At the same time, the stationarity of the non-time series data is detected to use different Fourier transform methods to extract the frequency-domain features in different time series data respectively, so as to process the global and local features in the time series data, providing an accuracy basis for accurately locating and identifying sudden abnormal states in the power grid. Then, extracting the statistical features of the time series data makes up for the deficiency that the simple frequency-domain features cannot comprehensively describe the data distribution characteristics, can capture the data characteristics more completely, and thus improve the accuracy of anomaly processing.

[0089] In an implementation manner of this Embodiment 1, to improve the efficiency and accuracy of anomaly detection and processing, the step 103 constructs a real-time state feature matrix at the current time point and a historical state feature matrix in a historical time period through the following steps; where the steps include:

[0090] Step 1031: Obtain the statistical features, several of the first feature variables, several of the first frequency-domain features, and several of the second frequency-domain features corresponding to the current time point, and construct a real-time state matrix corresponding to the current time point;

[0091] Step 1032: Obtain the statistical features, several of the first feature variables, several of the first frequency-domain features, and several of the second frequency-domain features corresponding to each historical time point and the current time point respectively, and construct a historical state feature matrix in the historical time period;

[0092] Step 1033: Perform standardization processing on the real-time state matrix and the historical state feature matrix respectively to obtain a standardized real-time state matrix and a standardized historical state feature matrix;

[0093] Step 1034: Use the principal component analysis method to reduce the dimensions of the standardized real-time state matrix and the historical state feature matrix, and obtain the reduced-dimension real-time state matrix and the historical state feature matrix.

[0094] In the above steps, various feature variables corresponding to each time point are converted into a feature matrix to better reflect the eigenvalue of the power grid operation data at each time point, so that the model can better detect abnormal states from the feature matrix, improving the accuracy and efficiency of detection. Secondly, a feature matrix corresponding to the historical time period is constructed based on multiple feature variables at each time point within the historical time period to display the change trend of the feature variables according to the feature matrix, and then predict possible abnormal states therein, so as to process the abnormal states in advance and improve the efficiency of abnormal processing. Among them, since different features have different dimensions and value ranges, standardizing the feature matrix can make all features within the same numerical scale, improving the accuracy of the model for detecting abnormal states. Using the principal component analysis method to reduce the dimensions of the matrix can reduce the data dimension, and then improve the calculation efficiency of the model, so as to improve the efficiency of abnormal processing.

[0095] In a certain implementation manner of this embodiment, to improve the efficiency and accuracy of abnormal detection and processing, step 104 includes:

[0096] Step 1041: Retrieve the prompt words corresponding to each abnormal state from a pre-constructed prompt word template library;

[0097] Step 1042: Input the prompt words and the real-time state feature matrix into a pre-constructed abnormal state detection model to identify the target abnormal state corresponding to the prompt words through the abnormal state detection model; screen out several first feature variables corresponding to the target abnormal state from the real-time state feature matrix through an attention mechanism preset in the abnormal state detection model; calculate the probability value of the target abnormal state based on the several first feature variables through the abnormal state detection model; when the probability value is greater than or equal to a preset probability threshold, determine that the distribution network has the target abnormal state through the abnormal state detection model and obtain the processing scheme corresponding to the target abnormal state;

[0098] Step 1043: Input the historical state feature matrix into a pre-constructed abnormal state detection model to screen out a number of second feature variables corresponding to the target abnormal state from the historical state feature matrix through the attention mechanism; wherein, the second feature variables include a number of the first feature variables corresponding to each time point respectively; based on the number of the second feature variables, predict the probability value of the target abnormal state within a future time period through the abnormal state detection model; when the probability value is greater than or equal to a preset probability threshold, predict that the distribution network has the target abnormal state within the future time period through the abnormal state detection model and obtain a processing solution corresponding to the target abnormal state;

[0099] Step 1044: When it is predicted through the abnormal state detection model that the distribution network has the target abnormal state within the future time period or it is determined that the distribution network has the target abnormal state, obtain the abnormal cause corresponding to the target abnormal state according to the first feature variable and the abnormal state detection model;

[0100] Step 1045: Generate a warning message for the target abnormal state according to the abnormal cause, the determination result or prediction result corresponding to the target abnormal state, and the processing solution corresponding to the target abnormal state;

[0101] Step 1046: Generate a processing message corresponding to the target abnormal state according to the warning message, and update the abnormal state detection model according to the processing message.

[0102] In the above steps, during the process of detecting abnormal states through the prompt words corresponding to each abnormal state and the real-time operation data corresponding to the current time point using a pre-constructed abnormal detection model, the intelligent context understanding and reasoning capabilities in the model can accurately capture the dynamic changes and complex abnormal patterns of the power grid, and then perform intelligent abnormal identification for each abnormal state, improving the efficiency of abnormal detection. Secondly, using the model to output corresponding processing solutions according to the determination results of abnormal states can improve the efficiency and accuracy of abnormal processing. Secondly, inputting the feature matrix of the distribution network within a certain time period into the model, through the powerful reasoning capabilities of the model, combining the historical operation data of the power grid and the context information of the prompt words, automatically perform intelligent reasoning to extract abnormal states in the future time period for forward-looking prediction, and process possible abnormal states according to the forward-looking prediction, improving the efficiency and accuracy of abnormal processing. Among them, trace the abnormal causes leading to the abnormal state according to the feature variables matched by the model for the detection of the abnormal state, and then improve the processing efficiency through the abnormal causes, recommended processing solutions, and target abnormal states output by the model. Secondly, after processing the abnormal state, update the abnormal state detection model according to the processing information generated during the processing process, so that the model adapts to the fault transformation of the distribution network, improving the accuracy of the model and thus the accuracy of abnormal processing.

[0103] As Figure 2 shown, based on the above method item embodiments, corresponding device item embodiments are provided. Among them, a distribution network abnormal detection and processing system based on prompt words provided in this embodiment includes a data acquisition module 201, a feature extraction module 202, a matrix construction module 203, and an abnormal processing module 204.

[0104] The data acquisition module 201 is used to acquire the power grid operation data corresponding to each time point within a preset time period of the distribution network; among them, the power grid operation data includes the real-time operation data corresponding to the current time point and the historical operation data corresponding to each historical time point within the historical time period where the current time point is located.

[0105] The feature extraction module 202 is used to split the power grid operation data into time series data and non-time series data, and respectively extract features from the time series data and the non-time series data to obtain several types of feature variables corresponding to the power grid operation data.

[0106] The matrix construction module 203 is used to construct the real-time state feature matrix of the distribution network at the current time point and the historical state feature matrix of the distribution network within the historical time period according to the feature variables.

[0107] The abnormal handling module 204 is configured to obtain the prompt words corresponding to the respective abnormal states, and based on the prompt words, the real-time state feature matrix, the historical state feature matrix, and a pre-constructed abnormal state detection model, obtain the determination result, prediction result, and handling solution corresponding to each of the abnormal states.

[0108] It can be understood that the above device item embodiments correspond to the method item embodiments, and can implement a method for detecting and handling distribution network anomalies based on prompt words provided by any one of the above method item embodiments of this embodiment.

[0109] It should be noted that the device embodiments described above are merely illustrative. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0110] Based on the above embodiments of a method for detecting and handling distribution network anomalies based on prompt words, this embodiment provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a method for detecting and handling distribution network anomalies based on prompt words in any one of the implementation manners of this embodiment.

[0111] Exemplarily, in this embodiment, the computer program can be divided into one or more modules. The one or more modules are stored in the memory and executed by the processor to complete the present invention. The one or more module elements can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the terminal device.

[0112] The terminal device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory.

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

[0114] A method, system, and device for detecting and processing distribution network anomalies based on prompt words provided in this embodiment first collect the real-time operation data of the distribution network at the current time point and the historical operation data at each historical time point, providing a data basis for subsequent anomaly status detection and prediction to ensure the accuracy of anomaly detection. Secondly, the collected operation data is split into time-series data and non-time-series data to extract the characteristic variables corresponding to the time-series data and non-time-series data respectively. On the one hand, it improves the accuracy of feature extraction, thereby improving the accuracy of anomaly detection. On the other hand, it reduces the data input volume of the subsequent model, improves the processing speed of the model, and thereby improves the efficiency of anomaly detection and processing. Then, a matrix corresponding to the characteristic variables is constructed to improve the feature expression ability of the operation data, and thereby improve the accuracy of detecting the anomaly status. Then, a model, the prompt words corresponding to each anomaly type, and the above-constructed feature matrix are used to detect and predict each anomaly status, so as to timely respond to the detection and processing of each anomaly status, and thereby improve the efficiency and accuracy of anomaly detection and processing.

[0115] Embodiment 2

[0116] In recent years, with the rapid development of big data and artificial intelligence technologies, using data-driven intelligent monitoring methods to detect and process distribution network anomalies has become a popular research direction. Among them, large models in the field of natural language processing (such as GPT, BERT, etc.) have demonstrated excellent reasoning and pattern recognition capabilities. Through the language understanding ability of the large model, combined with the real-time operation data and historical information of the power grid, they can more accurately capture potential anomaly patterns, and thus achieve more intelligent monitoring and early warning, which provides new possibilities for the status monitoring and anomaly detection of the distribution network.

[0117] However, the combination of large models and distribution network monitoring, especially the use of Prompt Engineering for anomaly detection and intelligent monitoring of distribution networks, is still a relatively novel research field. Currently, although there are some distribution network monitoring solutions based on machine learning, the application research on combining Prompt Engineering to optimize the model input and inference process is still insufficient in the field of distribution networks. Therefore, how to effectively combine large models and Prompt Engineering to improve the accuracy, flexibility, and real-time performance of distribution network condition monitoring has become a technical problem that urgently needs to be solved.

[0118] Referring to Figure 3 , to address the limitations of traditional distribution network monitoring methods when dealing with complex and multi-dimensional data, this embodiment proposes a method for detecting and processing distribution network anomalies based on prompts. By leveraging the powerful reasoning and understanding capabilities of large-scale pre-trained models and combining them with the real-time operation data of the distribution network, potential anomalies can be automatically identified, and predictions and solutions can be provided to improve the efficiency and accuracy of anomaly handling.

[0119] Specifically, the method includes:

[0120] Step 301: Collect the real-time operation data of the distribution network at the current time point and retrieve the historical operation data of each historical time point in the historical time period where the current time point is located, and use the real-time operation data and the historical operation data as the original state data of the distribution network.

[0121] Specifically, when collecting the real-time operation data or the historical operation data, since the collected data is an important basis for ensuring anomaly detection and handling, obtaining various types of data from the distribution network can effectively improve the accuracy of anomaly detection.

[0122] Among them, when collecting the state data, various types of data such as equipment state data, load data, voltage and current data, environmental factor data, and historical fault data of the distribution network can be obtained. Further, the equipment state data includes the real-time operating states of each device, such as voltage, current, temperature, load, power, etc., so that it can be judged whether the device has a fault or an abnormal operating state according to the equipment state data; the load data includes the load conditions of each node in the distribution network, such as total load, current fluctuation, etc., so as to capture potential abnormal states through the real-time changes of the load; the voltage and current data includes the voltage and current values of each node, so as to monitor the power quality of the power grid in real time according to the voltage and current values, and abnormal voltage or current fluctuations are usually precursors of problems in the power system; the environmental factor data includes environmental parameters such as temperature, humidity, wind speed, etc., and these factors may affect the operating state of the distribution network. For example, extreme weather, such as heavy rain, strong wind, etc., may cause equipment failures or other abnormalities; the historical fault data includes recorded past equipment failures, power outages, load abnormalities, etc., which are used to analyze the historical patterns of faults and provide references for future anomaly detection.

[0123] Step 302: Perform preprocessing and standardization processing on the original state data to obtain standardized state data.

[0124] In this embodiment, abnormal data values in the real-time operating data and each piece of the historical operating data are removed, and missing data values in the real-time operating data and the historical operating data are filled, so as to perform standardization processing on the real-time operating data and the historical operating data to obtain the standardized state data of the distribution network.

[0125] Specifically, after collecting the real-time operating data and the historical operating data as the original state data of the distribution network, data preprocessing is performed on the real-time operating data and the historical operating data to remove the noise in the data, ensure the accuracy and consistency of the data, and further improve the accuracy of anomaly detection processing.

[0126] Among them, first, abnormal values in the real-time operating data and the historical operating data are removed. In one embodiment, statistical analysis can be used to identify and remove outliers or abnormal points, where abnormal values may be caused by sensor failures or data acquisition errors.

[0127] Then, the missing data in the real-time operating data and the historical operating data is filled. In one embodiment, interpolation methods, mean filling methods, etc. can be used to fill the missing data. For time series data, linear interpolation methods or means based on adjacent time points can usually be used to fill the data.

[0128] Secondly, perform data standardization processing on the real-time operation data and the historical operation data. In one embodiment, standardization is to standardize the data so that the mean of the data is 0 and the variance is 1. The formula for the standardization is:

[0129]

[0130] where X′ is the standardized data, X is the original data, μ is the mean of the data, and σ is the standard deviation.

[0131] Step 303: Extract and analyze features from the standardized status data to construct a real-time status feature matrix corresponding to the real-time operation data and a historical status feature matrix corresponding to the historical operation data including the real-time operation data.

[0132] In this embodiment, first, based on the data characteristics, the standardized status data is split into multiple time-series data and several non-time-series data; one-hot encoding is performed on each of the non-time-series data to obtain several first feature variables; stationarity detection is performed on each of the time-series data, and based on the results of the stationarity detection, the multiple time-series data are divided into several stationary time-series data and several non-stationary time-series data; the first frequency-domain features corresponding to each of the stationary time-series data are extracted based on the fast Fourier transform; the second frequency-domain features corresponding to each of the non-stationary time-series data are extracted based on the short-time Fourier transform; the mean, variance, skewness, and kurtosis corresponding to the multiple time-series data are obtained, and the mean, the variance, the skewness, and the kurtosis are used as the statistical features of the time-series data.

[0133] Specifically, the purpose of feature extraction is to extract valuable patterns and information from the data to support subsequent anomaly detection. Considering that there are both time-series data and non-time-series data in the distribution network status data, therefore, first, according to the collected data characteristics, the data is divided into time-series data and non-time-series data. Secondly, considering that there may be non-stationarity in the time-series data, stationarity detection is performed on the time-series data, that is, the time-series data, and then feature extraction is performed on the stationary time-series data and the non-stationary time-series data respectively.

[0134] Among them, when extracting features from non-time-series data, such as equipment status data, that is, equipment status data, electrical equipment fault discrete status data, and historical fault data, such as historical record data such as the number of faults and fault types, one-hot encoding can be performed to extract the feature variables corresponding to each of the time-series data. For example, frequency statistics are performed on the historical number of faults to capture the frequency of equipment failures.

[0135] Secondly, when extracting features from time series data such as real-time voltage and current data, real-time load data, real-time load values and fluctuations, real-time environmental data, and data that changes over time such as environmental temperature and humidity, the stationarity of the time series data is first detected to classify the time series data into stationary time series data and non-stationary time series data. In an implementation manner of this embodiment, the stationarity of the time series data can be determined by the Augmented Dickey-Fuller (ADF) test. The specific steps are as follows:

[0136] (a) For the time series x to be tested t Establish a regression model:

[0137]

[0138] where, Δx t is the difference sequence of the data, α, β, γ, and β i are the parameters to be estimated, and ε t is the error term.

[0139] (b) Test the hypothesis:

[0140] The null hypothesis H0: The sequence x t is a non-stationary sequence;

[0141] The alternative hypothesis H1: The sequence x t is a stationary sequence.

[0142] When the test statistic is less than the critical value, reject the null hypothesis and confirm that the sequence is stationary; otherwise, it is a non-stationary sequence.

[0143] Next, for the stationary time series data confirmed by the stationarity test, in an implementation manner of this embodiment, the fast Fourier transform can be used to achieve frequency domain conversion and extract the frequency domain features corresponding to each stationary time series data. Among them, the formula for the fast Fourier transform is as follows:

[0144]

[0145] where, x(n) is the original time domain sequence data, X(k) is the corresponding frequency domain data, N is the total number of data points, and n and k are the indices of the time domain and frequency domain respectively.

[0146] For the non-stationary time series data confirmed by the stationarity test, in an implementation manner of this embodiment, the short-time Fourier transform method can be used to achieve frequency domain conversion and extract the frequency domain features corresponding to each non-stationary time series data. Among them, the formula for the short-time Fourier transform method is:

[0147]

[0148] Among them, w(τ - t) is a selected window function (such as Hanning window, Hamming window or Gaussian window) for localizing the signal; τ is the integration variable representing the time index for localizing the signal in the window; t represents the time position of the window center; and f represents the frequency.

[0149] Through the above-mentioned fast Fourier transform and short-time Fourier transform methods, the global and local features in the time-series data can be extracted, providing strong support for accurately locating and identifying periodic fluctuations or sudden abnormal signals in the power grid, and improving the accuracy and timeliness of anomaly detection.

[0150] In an implementation manner of this first embodiment, to make up for the deficiency that the simple frequency features cannot comprehensively describe the data distribution characteristics, the statistical features of the time-series data are extracted to more completely capture the features in the time-series data. Among them, the mean, variance, skewness and kurtosis of the time-series data are extracted as the statistical features of the time-series data.

[0151] Specifically, the calculation formula for extracting the mean is:

[0152]

[0153] Among them, μ represents the mean, N represents the number of time-series data; x i represents the i-th time-series data;

[0154] The calculation formula for extracting the variance is:

[0155]

[0156] Among them, σ represents the variance;

[0157] The calculation formula for extracting the skewness is:

[0158]

[0159] Among them, S represents the skewness;

[0160] The calculation formula for extracting the kurtosis is:

[0161]

[0162] Among them, K represents the kurtosis.

[0163] After extracting the frequency domain features and statistical features corresponding to the time-series data and performing one-hot encoding on the non-time-series data to extract multiple feature variables corresponding to each time point, a real-time state feature matrix for the current time point and a historical state feature matrix for the historical time period are constructed.

[0164] In one implementation of this embodiment, taking time t as an example, n different features are collected from the distribution network, including: equipment status features: current I t , voltage U t , temperature T t ; load data features: real-time load P t , load fluctuation ΔP t ; environmental data features: ambient temperature T env,t , humidity H t ; time features: timestamp TS t , seasonal fluctuation S t ; historical fault data features: number of faults F t , fault type C t After that, the feature matrix F t at time t is represented as follows:

[0165] F t = [I t , U t , T t , P t , ΔP t , T env,t , H t , TS t , S t , F t , C t

[0166] If the data of the past m time steps is considered as the input, the complete feature matrix can be represented as:

[0167]

[0168] Among them, the rows (time dimension) represent time steps, from t - m + 1 to t; the columns (feature dimension) represent the feature values at each time step, including the above frequency features, statistical features, and non-temporal data features.

[0169] In the process of feature extraction, in the distribution network data, parameters such as load and voltage often show obvious seasonal change patterns. For example, the electricity consumption peak in summer or the increase in electricity demand in winter is reflected in the periodic fluctuation patterns of parameters such as load, voltage, and current that repeatedly appear at specific times of the year or day. The seasonal fluctuation feature S t ​That is, it is the periodic change characteristics comprehensively extracted from the data of load, voltage, current and environmental factors (such as environmental temperature), and can be obtained through the following steps: First, select the load, voltage, current and environmental temperature data with a long time series as the analysis object to capture the periodic change characteristics of the data in different seasons or different time periods. Then, use the seasonal time series decomposition method (such as STL decomposition, that is, Seasonal and Trend decomposition using Loess) to decompose the historical load, voltage, current and environmental temperature data into trend, seasonal and residual components. The specific formula is as follows:

[0170] X t =T t +S t +R t

[0171] Among them, X t is the original time series data (such as voltage, load or environmental temperature); T t is the trend component, describing the long-term trend change of the data; S t is the seasonal component, that is, the seasonal fluctuation characteristics used in this patent, representing the periodically repeated changes of the data; R t is the random residual term.

[0172] Finally, according to the above STL decomposition method, the seasonal component S t extracted from the data such as voltage, load and environmental temperature is used as the characteristic for describing the seasonal fluctuation of the data in this embodiment. In practical applications, this seasonal component is used to assist the anomaly detection model in identifying the operation anomalies or atypical fluctuation conditions of the distribution network in a specific season or cycle.

[0173] Step 304: Perform standardization processing and dimensionality reduction processing on the real-time state feature matrix and the historical state feature matrix to obtain a dimensionality-reduced real-time state feature matrix and a dimensionality-reduced historical state feature matrix.

[0174] In this embodiment, the real-time state matrix and the historical state feature matrix are respectively subjected to standardization processing to obtain the standardized real-time state matrix and historical state feature matrix; the principal component analysis method is used to perform dimensionality reduction on the standardized real-time state matrix and historical state feature matrix to obtain the dimensionality-reduced real-time state matrix and historical state feature matrix.

[0175] Specifically, since different features have different dimensions and value ranges, the feature matrix X is standardized so that all features are within the same numerical scale to improve the stability of model training. In one implementation manner of this embodiment, the min-max normalization method can be used for the standardization process. The calculation formula of the min-max normalization method is as follows:

[0176]

[0177] where x min and x max are the minimum and maximum values of this feature respectively. This method is applicable to the case where the data range is known and needs to be restricted between [0, 1], and is particularly commonly used in neural network models.

[0178] Next, in order to reduce the data dimension and improve the computational efficiency of the model, in one implementation manner of this embodiment, the principal component analysis (PCA) method is used to reduce the dimension of the feature matrix. PCA solves the eigenvectors through the feature covariance matrix, projects the high-dimensional features into a low-dimensional space, and retains the main information of the data as much as possible.

[0179] The PCA process is as follows:

[0180] ① Calculate the covariance matrix of the data:

[0181]

[0182] where, is the feature mean and N is the number of samples.

[0183] ② Calculate the eigenvalues and eigenvectors of the covariance matrix:

[0184] Cov(X)v = λv

[0185] where v is the eigenvector and λ is the eigenvalue.

[0186] ③ Select the eigenvectors corresponding to the top d largest eigenvalues to construct a dimensionality reduction transformation matrix:

[0187] W PCA = [v1, v2,..., v d

[0188] where W PCA is the matrix composed of the top d eigenvectors.

[0189] After PCA processing, the dimension of the feature matrix is reduced from the original n dimensions to d dimensions, while retaining the main information of the data to the greatest extent and improving the computational efficiency.

[0190] ​Step 305: Construct a prompt word corresponding to each abnormal state to be detected in the distribution network, and train a pre-constructed large model according to the prompt word to obtain an anomaly detection model.

[0191] Specifically, design prompt words that meet the monitoring requirements of the distribution network, and input the pre-constructed data set and the involved prompt words into the pre-constructed large-scale model for training to obtain an anomaly detection model.

[0192] Among them, first define the anomaly detection objectives: determine the key abnormal types in the distribution network, such as equipment failures, overloads, voltage fluctuations, current anomalies, etc. Different abnormal types require different prompt words to guide the model. Then consider the actual application scenarios in the distribution network. The design of the prompt words should include information such as equipment status, operating parameters, and environmental factors. By combining these background information, determine the objectives and application scenarios of the prompt words. Then, according to the common abnormal situations in the distribution network, design specific prompt words. The following are examples of several types of prompt words: Related to equipment failure: Example: "Device X in the distribution network has failed. Is emergency handling required?", its meaning is: The prompt word guides the model to reason whether there is a need for emergency handling by clearly specifying the device (such as transformers, switchgear, etc.) and its failure situation; Related to load anomaly: Example: "The load in the distribution network is abnormal. Is it beyond the predetermined range?", its meaning is: The prompt word describes the load change situation to help the model identify whether the load is within the normal range; Related to voltage fluctuation: Example: "The voltage fluctuation is abnormal. What are the possible reasons?", its meaning is: Voltage fluctuation is usually an indication of distribution network problems. The prompt word guides the model to find possible reasons (such as overload, equipment failure, etc.); Related to current anomaly: Example: "The current exceeds the standard. Is it necessary to detect the status of the equipment in this area?", its meaning is: The current exceeding the standard prompt word helps the model judge the area of current anomaly and further identify whether there is equipment anomaly; Related to environmental factors: Example: "The environmental temperature is too high. Does it affect the operation of the equipment?", its meaning is: Considering the impact of the external environment (such as temperature, humidity, etc.) on the equipment, it helps the model identify potential faults caused by environmental factors; Related to historical faults and trends: Example: "According to historical data, there are frequent voltage fluctuations in area X. Is an upgrade required?", its meaning is: Combining historical fault information, it guides the model to judge whether further improvement or optimization measures are needed.

[0193] Next, the feature matrix extracted from the real-time data and historical data of the distribution network and the designed prompt words are input into a large-scale pre-trained model for intelligent reasoning and anomaly detection. The following are the detailed steps of the input design: The input to the large model not only includes the feature matrix but also needs to include the designed prompt words. The specific method is as follows: Construct a feature matrix based on the data such as voltage, current, load, temperature, and environmental conditions of each device in the distribution network. These data reflect the current operating state of the distribution network; then, according to the state and monitoring requirements of the distribution network, select the prompt words related to the current data.

[0194] For example, assume that a device in the distribution network has an excessive current. The input could be:

[0195] Prompt word: "The current exceeds the standard. Is it necessary to detect the status of the devices in this area?" Input data: "The current value of device X is 15A, and the rated current of the device is 12A." In this case, the model will combine the prompt word and the input data to perform reasoning and anomaly judgment.

[0196] After receiving the input, the large model performs anomaly detection and prediction through its powerful language understanding and reasoning capabilities. The model analyzes the relationship between the prompt word and the input data to determine whether the distribution network is currently in an abnormal state. Then, based on the input data and the prompt word, the model outputs whether there is an anomaly and the type of anomaly (such as equipment failure, voltage fluctuation, etc.), and gives possible solutions or handling suggestions based on historical data.

[0197] For example, the output of the model may be: Judgment: The current is abnormal and exceeds the predetermined range. Suggestion: Check whether device X is overloaded. It may be necessary to conduct equipment inspection or load balancing.

[0198] Step 306: Perform anomaly detection on the distribution network according to the anomaly detection model, the prompt word, the reduced-dimensional real-time state feature matrix, and the reduced-dimensional historical state feature matrix, and output the determination result, prediction result, and recommended processing solution of the abnormal state.

[0199] In this embodiment, the prompt words corresponding to each abnormal state are retrieved from a pre-constructed prompt word template library; the prompt word and the real-time state feature matrix are input into a pre-constructed abnormal state detection model to identify the target abnormal state corresponding to the prompt word through the abnormal state detection model; several first feature variables corresponding to the target abnormal state are screened out from the real-time state feature matrix through an attention mechanism preset in the abnormal state detection model; based on the several first feature variables, the abnormal state detection model calculates the probability value of the target abnormal state; when the probability value is greater than or equal to a preset probability threshold, the abnormal state detection model determines that the distribution network has the target abnormal state and obtains the processing solution corresponding to the target abnormal state.

[0200] Then, input the historical state feature matrix into a pre-constructed abnormal state detection model to screen out a number of second feature variables corresponding to the target abnormal state from the historical state feature matrix through the attention mechanism; wherein, the second feature variables include a number of the first feature variables corresponding to each time point respectively; based on the number of the second feature variables, predict the probability value of the target abnormal state in a future time period through the abnormal state detection model; when the probability value is greater than or equal to a preset probability threshold, predict that the distribution network has the target abnormal state in the future time period through the abnormal state detection model and obtain a processing scheme corresponding to the target abnormal state.

[0201] Specifically, after constructing the prompt words, the dimensionality-reduced real-time state feature matrix, and the dimensionality-reduced historical state feature matrix, the model has received the designed prompt words and the constructed feature matrices. Next, perform inference through a large-scale pre-trained model to complete anomaly detection and prediction.

[0202] Among them, in the model input stage, first input the constructed feature matrices (including frequency features, statistical features, and non-temporal features) and the designed prompt words into the anomaly detection model obtained after pre-training. The model predicts the corresponding fault type based on the input prompt words and the real-time data feature matrix, and performs probability inference and judgment on the anomaly. Among them, the process of the probability inference and judgment is as follows:

[0203] Before making an anomaly judgment inside the model, first perform context understanding on the input prompt words. Through Prompt Engineering technology, the model will identify the corresponding anomaly type (such as current anomaly, voltage anomaly, load anomaly, etc.) based on the prompt words, and perform weight assignment to relevant features in the input data based on the Attention Mechanism, so as to accurately match the anomaly type corresponding to the prompt words. Among them, the specific matching process can be expressed by the following formula of the attention mechanism:

[0204]

[0205] Among them, Q (Query): The embedding vector based on the prompt words, representing the anomaly type understood by the model from the prompt words; K, V: The key-value pairs of the input feature matrix respectively, used to identify the degree of association between the features in the data and the anomaly type.

[0206] Through this process, the model can efficiently determine the features in the current data that are most relevant to the anomaly type described by the prompt words.

[0207] After the above matching, the model calculates the probability of a specific anomaly type using the feature data selected by the attention mechanism:

[0208] P(Exception Type∣Data)=σ(W·X+b)

[0209] Where X is the input feature matrix constructed in step S1; W and b are the weight parameters obtained in the pre-training stage of the model; P("Exception Type"|"Data") is the probability of a specific type of anomaly occurring given the input data.

[0210] According to the calculated probability result, if the anomaly probability exceeds the set threshold (e.g., 0.7), the model determines that there is an anomaly of the corresponding type; otherwise, it is considered that the current operation of the distribution network is normal.

[0211] When the model determines that there is an anomaly, it will further perform precise positioning at the device level through the correlation analysis between the device identification features and data features embedded in the model. The specific implementation method is as follows: The feature matrix including device status data (such as device operating temperature, current, voltage, etc.) has been incorporated during the model input stage; the model precisely determines the anomaly source in the data and identifies the specific faulty device by assigning feature weights to each device; the large model realizes the anomaly traceability and positioning at the device level through the backtracking analysis of the attention weights at the output end (such as the Attention score of the Transformer model).

[0212] In a certain implementation manner of this embodiment, the anomaly judgment output by the model may be: Judgment: Voltage fluctuation anomaly of the transformer (device number: X-202); Anomaly probability: 0.85 (exceeding the threshold of 0.7); Possible reasons: Device failure or overloading; Specific suggestions: Check the insulation status of the device and perform timely maintenance or replacement.

[0213] Once the model determines the existence of an anomaly through inference, the next step is to classify the type of anomaly. Generally, the anomaly types in the distribution network can be classified into the following categories: 1) Equipment failure category: ① Example: A certain transformer fails, resulting in abnormal current or voltage fluctuations. ② Anomaly judgment: By comparing the historical data of the equipment with the current state (such as temperature, current, voltage, etc.), the model can identify the failure mode of the equipment. ③ Classification output: Anomaly type: Equipment failure; Possible reasons: Equipment aging, overload, electrical short circuit, etc.; Recommended measures: Detect the operating state of the equipment, perform maintenance or replacement; 2) Abnormal load category: ① Example: The load in a certain area of the distribution network surges abnormally. ② Anomaly judgment: The model will judge whether there is an abnormal load by comparing the historical load data with the current load value. ③ Classification output: Anomaly type: Abnormal load; Possible reasons: Peak hours, equipment failure, insufficient power supply, etc.; Recommended measures: Perform load balancing, adjust load distribution, increase standby power supply, etc.; 3) Abnormal voltage category: ① Example: The voltage of the distribution network fluctuates continuously and exceeds the specified range. ② Anomaly judgment: Based on the relationship between voltage and load and combined with the historical voltage fluctuation pattern, the model will judge whether the current voltage exceeds the standard. ③ Classification output: Anomaly type: Abnormal voltage; Possible reasons: Grid overload, equipment failure, uneven power flow, etc.; Recommended measures: Adjust the grid load, check the equipment status; 4) Abnormal current category: ① Example: The current in a certain area of the distribution network exceeds the standard. ② Anomaly judgment: By analyzing the relationship between current and load, equipment, the model infers whether the current is abnormal. ③ Classification output: Anomaly type: Abnormal current; Possible reasons: Equipment overload, short circuit, grounding fault, etc.; Recommended measures: Check the current load of the equipment, detect the grounding condition of the line; 5) Anomalies related to environmental factors: ① Example: The environmental temperature is too high, which may affect the normal operation of the equipment. ② Anomaly judgment: Based on the real-time environmental data (such as temperature, humidity, etc.) and the equipment operation parameters, the model analyzes whether environmental factors cause the equipment to malfunction. ③ Classification output: Anomaly type: Environmental factor anomaly; Possible reasons: High temperature, high humidity, etc.; Recommended measures: Increase cooling equipment, adjust the grid load.

[0214] In addition to detecting anomalies at the current moment, the large model can also predict anomalies in historical data and trends based on the input dimensionality-reduced historical state matrix. By comprehensively analyzing the temporal characteristics of historical data (such as the historical fluctuation trends and spectral characteristics of load, voltage, and current) and real-time environmental factor data (such as temperature, humidity, etc.), it predicts possible future anomaly events and issues early warnings accordingly.

[0215] Specifically, based on the dimensionality-reduced historical state feature matrix, the large model can capture trends and periodic features in historical data. For example, the load usually shows periodic growth during specific time periods or seasons, and the voltage and current may fluctuate or change abnormally accordingly; during the prediction process, the model combines the spectral features, statistical features of time-domain data, and environmental factor features to perform trend modeling and predict the data trend in future time periods.

[0216] In one implementation manner of this embodiment, taking load prediction as an example, its prediction process can be described as follows: Input data: historical time-series data of load, voltage, and current within a past period (such as the most recent 24 hours, the past week) and corresponding environmental data; Output result: predicting possible abnormal situations that may occur in a future period, such as load overload, abnormal voltage fluctuations, or equipment failure risks, etc.;

[0217] Among them, the model uses the self-attention mechanism based on the Transformer architecture for sequence prediction. Input data example:

[0218]

[0219] Prediction output example:

[0220] Prediction result: Within the next 3 hours, the load in area X may exceed 120% of the rated value, and there may be abnormal voltage fluctuations or equipment overload risks; Possible reason: It is expected that the temperature will continue to rise, triggering a peak in electricity consumption and increasing the burden on equipment; Early warning suggestion: Take preventive measures such as load transfer, equipment status inspection, or backup power supply access in advance before the load reaches the warning value to avoid equipment overload or damage.

[0221] Step 307: Generate a warning message based on the determination result, prediction result, and recommended treatment plan, generate a treatment report for the abnormal state according to the warning message and a preset feedback mechanism, and update the abnormal detection model according to the treatment report.

[0222] Specifically, when the model predicts that an abnormal situation may occur in a future time period or determines that an abnormal state appears at the current moment, it automatically triggers a warning mechanism and provides detailed abnormal types (such as load abnormality, voltage abnormality, equipment failure risk, etc.), and indicates the specific area or equipment location where the abnormality occurs according to the cause of the abnormality; gives the precise time window and trend prediction for the possible occurrence of the abnormality; at the same time, outputs a preset recommended disposal plan to help operation and maintenance personnel make early preparations for risk prevention and handling.

[0223] In a specific implementation manner of this embodiment, specific examples of warning information are as follows: Predicted abnormal type: load abnormality; Possible occurrence time: within the next 3 hours; Predicted detailed description: Based on real-time power grid operation data and environmental factor data (ambient temperature), combined with historical trends and spectral feature analysis, it is predicted that the load in area X will continue to rise and exceed 120% of the rated load upper limit within the next 3 hours, which may cause risks of overloading operation of equipment such as transformers in the area; Suggested disposal measures: This warning information is supported by the knowledge base built into the model during the training phase. Through learning historical fault cases and the ability to identify abnormal patterns of power grid equipment, it accurately outputs specific disposal suggestions for corresponding fault types and equipment, thereby improving the timeliness and effectiveness of abnormal disposal.

[0224] Once the large model detects an abnormality in the distribution network or predicts a possible fault, it immediately triggers an alarm and conveys detailed information to the operator or relevant person in charge. The content of the alarm includes the following parts:

[0225] ① Alarm type: "Current exceeding standard", "Equipment failure", "Voltage fluctuation".

[0226] ② Abnormality level: Different levels of alarms are set according to the severity of the abnormality, including "Warning", "Severe", "Emergency", etc.

[0227] ③ Fault location: Point out the specific location or equipment where the abnormality occurs (such as distribution line A, transformer B, etc.).

[0228] ④ Abnormality description and prediction: Describe in detail the nature of the abnormality, the cause of occurrence, and the possible consequences.

[0229] ⑤ Warning timeliness: Set the timeliness of the warning so that the operator can respond within the shortest time.

[0230] The alarm notification can be conveyed through various methods, such as system interface pop-up window: directly displayed on the monitoring system interface; Email notification: Send a detailed report to the operator's email; SMS / APP push: Send a short alarm message to the mobile phones of relevant personnel; Phone notification: For urgent abnormalities, relevant personnel can be notified through an automated phone call.

[0231] After the alarm is triggered, according to the abnormal type and possible reasons, a set of treatment plans are automatically generated, and the treatment plans include:

[0232] ① Immediate response measures, such as switching load, power off, enabling standby equipment, starting the cooling system, etc.

[0233] ② Technical support plan, guiding the operator on how to conduct fault troubleshooting or repair, such as checking equipment status, analyzing fault logs, viewing historical data, etc.

[0234] ③ Safety measures to prevent the accident from expanding further, such as remote control devices, current limiting, etc.

[0235] During the abnormal response process, the feedback mechanism is crucial. It ensures continuous monitoring from the occurrence of the fault to the recovery process and continuously provides new information to the model to optimize the subsequent abnormal detection ability.

[0236] Once the abnormality is handled, a feedback report is automatically generated, detailing the entire process of the abnormal event. The content of the report includes abnormal description, handling measures, recovery status, as well as event summary and experience. Among them, after the operator executes the abnormal response, some additional feedback may be provided, including whether the handling plan is effective and whether it needs to be modified. Provide the current status of the equipment or area (such as load, current, voltage, etc.) to the system so that the system can make judgments based on the latest data. Such as updating detection rules, adjusting monitoring parameters, etc.

[0237] After collecting the feedback information, continuously optimize the large model according to the feedback information to improve the accuracy and efficiency of subsequent abnormal detection and response. The operating environment of the distribution network will change, so the feedback report after each abnormal response and the actual operations of the operator should become new training data. The system uses the following data as input for model optimization:

[0238] New abnormal cases: including abnormal types, occurrence patterns, solutions, etc.

[0239] Real-time operation data: including the status, load, voltage, current, etc. of each device in the distribution network.

[0240] Operator feedback: Further improve the accuracy of the model through manually labeled abnormal types or processing results.

[0241] Based on the new data, retrain the large model (such as GPT, BERT, etc.) to ensure that the model can adapt to the newly emerging fault patterns in the distribution network.

[0242] By implementing an abnormal detection and processing method for a distribution network based on prompt words provided in this embodiment for abnormal detection and processing, the following beneficial effects are obtained:

[0243] (1) By introducing a large-scale pre-trained model based on prompt engineering, abnormal detection no longer depends on fixed rules, but through intelligent context understanding and reasoning capabilities, it can accurately capture the dynamic changes and complex abnormal patterns of the power grid. The model can, without relying on artificially set threshold conditions, through comprehensive analysis of real-time data and historical data, perform intelligent abnormal identification and prediction, significantly improving the response speed and accuracy of the system. Effectively overcome the limitations of traditional monitoring technologies in complex environments, enabling the distribution network to quickly respond to emergencies and identify potential risks in advance.

[0244] (2) By introducing large-scale pre-trained language models combined with Fourier transform, complex non-linear relationships in the distribution network can be processed. Through deep learning methods, the large model automatically extracts effective features from multi-dimensional data for flexible non-linear modeling, ensuring that the system can maintain high-precision and high-robustness anomaly detection and prediction performance under various influencing factors. This innovative method solves the problem that traditional technologies cannot handle complex non-linear data, enabling the distribution network monitoring system to more accurately respond to complex power grid environments.

[0245] (3) Using a design method based on prompt engineering, real-time data of the distribution network and designed prompts are input into the large-scale pre-trained model. Through the powerful reasoning ability of the model, combined with historical operation data and context information of the power grid, intelligent reasoning is automatically carried out. This method can not only accurately identify anomalies in the current state but also extract potential anomaly patterns based on historical data for forward-looking prediction and dynamically adjust detection strategies according to new data. By introducing this intelligent reasoning ability, the model can autonomously identify anomaly patterns in the power grid, automatically adjust detection thresholds and rules, ensuring that anomaly detection can be carried out efficiently and accurately under different power grid operating states, significantly improving the flexibility and adaptability of the system.

[0246] (4) Based on prompt engineering and the reasoning ability of the large model, the detection strategy can be adjusted for different scenarios, and an intelligent feedback report with specific handling suggestions can be automatically generated when an anomaly is detected. Through an adaptive feedback mechanism, the model can flexibly adjust the anomaly detection strategy according to changes in the power grid operating environment and automatically generate alarm information, anomaly reports, and handling plans. This highly intelligent and flexible anomaly detection and response mechanism can significantly improve the adaptability of the distribution network monitoring system in different scenarios, reduce manual intervention, enhance the reliability and emergency response ability of the system, and ensure the stable operation of the power grid in various complex environments.

[0247] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also considered within the protection scope of the present invention.

Claims

1. A method for detecting and processing abnormal conditions in a distribution network based on prompt words, characterized in that, Including: Collecting grid operation data corresponding to each time point within a preset time period for the distribution network; wherein, the grid operation data includes real-time operation data corresponding to the current time point and historical operation data corresponding to each historical time point within the historical time period where the current time point is located; Splitting the grid operation data into time series data and non-time series data, and respectively performing feature extraction on the time series data and the non-time series data to obtain several types of feature variables corresponding to the grid operation data; Constructing a real-time state feature matrix of the distribution network at the current time point and a historical state feature matrix of the distribution network within the historical time period based on the feature variables; Obtaining prompt words corresponding to each abnormal state, and based on the prompt words, the real-time state feature matrix, the historical state feature matrix, and a pre-constructed abnormal state detection model, obtaining a determination result, a prediction result, and a processing solution corresponding to each abnormal state.

2. The method for detecting and processing abnormal conditions of a distribution network based on prompt words according to claim 1, wherein, The collecting grid operation data corresponding to each time point within a preset time period for the distribution network includes: Collecting initial real-time operation data of the distribution network at the current time point and retrospectively obtaining initial historical operation data corresponding to each historical time point within the historical time period where the current time point is located; wherein, the initial real-time operation data and the initial historical operation data include equipment status data, load data, voltage and current data, environmental factor data, and historical fault data; Removing abnormal data values from the initial real-time operation data and each of the initial historical operation data to obtain first real-time operation data and several first historical operation data; Filling in missing data values in the first real-time operation data and each of the first historical operation data to obtain second real-time operation data and several second historical operation data; Performing standardization processing on the second real-time operation data and each of the second historical operation data to obtain real-time operation data of the distribution network at the current time point and historical operation data corresponding to each historical time point of the distribution network.

3. The method for detecting and processing abnormal conditions of a distribution network based on prompt words according to claim 1, wherein, The splitting the grid operation data into time series data and non-time series data, and respectively performing feature extraction on the time series data and the non-time series data to obtain several types of feature variables corresponding to the grid operation data includes: Splitting the grid operation data into multiple time series data and several non-time series data based on data characteristics; Performing one-hot encoding on each of the non-time series data to obtain several first feature variables; Performing stationarity detection on each of the time series data, and dividing the multiple time series data into several stationary time series data and several non-stationary time series data according to the results of the stationarity detection; Extracting first frequency domain features corresponding to each of the stationary time series data based on the fast Fourier transform; Extracting second frequency domain features corresponding to each of the non-stationary time series data based on the short-time Fourier transform; Obtaining the mean, variance, skewness, and kurtosis corresponding to the multiple time series data, and using the mean, the variance, the skewness, and the kurtosis as statistical features of the time series data.

4. The method for detecting and processing abnormal conditions in a distribution network based on prompt words according to claim 3, wherein, Constructing the real-time state feature matrix of the distribution network at the current time point and the historical state feature matrix of the distribution network in the historical time period according to the feature variables includes: Obtaining the statistical features, a number of the first feature variables, a number of the first frequency domain features, and a number of the second frequency domain features corresponding to the current time point, and constructing a real-time state matrix corresponding to the current time point; Obtaining the statistical features, a number of the first feature variables, a number of the first frequency domain features, and a number of the second frequency domain features corresponding to each historical time point and the current time point, and constructing a historical state feature matrix of the historical time period.

5. A method for detecting and processing abnormal conditions in a distribution network based on prompt words according to claim 4, characterized in that, The constructing the real-time state feature matrix of the distribution network at the current time point and the historical state feature matrix of the distribution network in the historical time period according to the feature variables further includes: Performing standardization processing on the real-time state matrix and the historical state feature matrix respectively to obtain a standardized real-time state matrix and a historical state feature matrix; Using the principal component analysis method to reduce the dimensions of the standardized real-time state matrix and the historical state feature matrix to obtain a reduced-dimensional real-time state matrix and a historical state feature matrix.

6. The method for detecting and processing abnormal conditions in a distribution network based on prompt words according to claim 4, wherein Obtaining the prompt words corresponding to each abnormal state, and based on the prompt words, the real-time state feature matrix, the historical state feature matrix, and a pre-constructed abnormal state detection model, obtaining the determination result, prediction result, and corresponding processing solution corresponding to each abnormal state includes: Retrieving the prompt words corresponding to each abnormal state from a pre-constructed prompt word template library; Inputting the prompt words and the real-time state feature matrix into a pre-constructed abnormal state detection model to identify the target abnormal state corresponding to the prompt words through the abnormal state detection model; Screening out a number of the first feature variables corresponding to the target abnormal state from the real-time state feature matrix through an attention mechanism preset in the abnormal state detection model; Calculating the probability value of the target abnormal state through the abnormal state detection model based on a number of the first feature variables; When the probability value is greater than or equal to a preset probability threshold, determining that the distribution network has the target abnormal state through the abnormal state detection model and obtaining the processing solution corresponding to the target abnormal state.

7. A method for detecting and processing abnormal conditions in a distribution network based on prompt words according to claim 6, characterized in that, Obtaining the prompt words corresponding to each abnormal state, and based on the prompt words, the real-time state feature matrix, the historical state feature matrix, and a pre-constructed abnormal state detection model, obtaining the determination result, prediction result, and processing solution corresponding to each abnormal state includes: Inputting the historical state feature matrix into a pre-constructed abnormal state detection model to screen out a number of the second feature variables corresponding to the target abnormal state from the historical state feature matrix through the attention mechanism; wherein, the second feature variables include a number of the first feature variables corresponding to each time point. Based on a plurality of the second feature variables, predict the probability value of the target abnormal state within a future time period through the abnormal state detection model; When the probability value is greater than or equal to a preset probability threshold, predict that the distribution network has the target abnormal state within the future time period through the abnormal state detection model and obtain a processing solution corresponding to the target abnormal state.

8. A method for detecting and processing abnormal conditions in a distribution network based on prompt words according to any one of claims 6-7, characterized in that, The obtaining of the determination result, prediction result and processing solution corresponding to each abnormal state based on the prompt word, the real-time state feature matrix, the historical state feature matrix and the pre-constructed abnormal state detection model further includes: When it is predicted through the abnormal state detection model that the distribution network has the target abnormal state within the future time period or it is determined that the distribution network has the target abnormal state, obtain the abnormal cause corresponding to the target abnormal state according to the first feature variable and the abnormal state detection model; Generate a warning message for the target abnormal state according to the abnormal cause, the determination result or prediction result corresponding to the target abnormal state, and the processing solution corresponding to the target abnormal state; Generate processing information corresponding to the target abnormal state according to the warning message, and update the abnormal state detection model according to the processing information.

9. A prompt-based abnormal detection and processing system for a distribution network, characterized in that, It includes a data acquisition module, a feature extraction module, a matrix construction module and an abnormal processing module; The data acquisition module is used to acquire the grid operation data corresponding to each time point within a preset time period for the distribution network; wherein, the grid operation data includes the real-time operation data corresponding to the current time point and the historical operation data corresponding to each historical time point within the historical time period where the current time point is located; The feature extraction module is used to split the grid operation data into time series data and non-time series data, and respectively extract features from the time series data and the non-time series data to obtain several types of feature variables corresponding to the grid operation data; The matrix construction module is used to construct a real-time state feature matrix of the distribution network at the current time point and a historical state feature matrix of the distribution network within the historical time period according to the feature variables; The abnormal processing module is used to obtain the prompt words corresponding to each abnormal state, and based on the prompt words, the real-time state feature matrix, the historical state feature matrix and the pre-constructed abnormal state detection model, obtain the determination result, prediction result and processing solution corresponding to each abnormal state.

10. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a method for abnormal detection and processing of a distribution network based on prompt words as described in any one of claims 1-8.