Power grid risk identification method based on pre-training Transform model and medium

Through the grid risk identification method based on the pre-trained Transformer model, combined with various risk dimensions such as future maintenance plans, load prediction data and natural disasters, the problem that traditional methods are difficult to fully consider the interaction effects of multiple factors is solved, and more efficient and accurate grid risk identification is achieved.

CN120046982APending Publication Date: 2025-05-27STATE GRID ANHUI ELECTRIC POWER CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510117364.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

Traditional grid risk identification methods are difficult to fully consider the influence of multi-factor interactions, and relying on manual analysis leads to low recognition efficiency and poor accuracy.

Method used

The grid risk identification method based on the pre-trained Transformer model is adopted to calculate the risk index through three risk dimensions: future maintenance plan, load prediction data and natural disasters, and standardize and time feature processing is carried out in combination with the power grid operation data, and finally use the Transformer model to perform risk identification.

Benefits of technology

It improves the accuracy and efficiency of grid risk identification, can better capture potential risk factors in complex environments, and reduces labor burden.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120046982A_ABST
    Figure CN120046982A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid risk identification method based on a pre-trained Transform model and a medium, and the method comprises the steps: selecting specific risk indexes under three risk dimensions, namely, a future maintenance plan, load prediction data and natural disasters, and designing a corresponding fusion risk index; setting risk threshold values of the indexes according to limited operation information in the power grid and normal operation indications of all the devices, calculating a specific risk index value according to the risk indexes by the current operation state of the power grid, and comparing the specific risk index value with the corresponding risk threshold value; and screening out the indexes exceeding the threshold value and the corresponding power grid operation data, and obtaining risk power grid data in a superposition state. Key information such as the topological structure of the power grid, the voltage and the current of each node and the like in the running state is used as input characteristics of a Transform model, risk identification is carried out on potential factors in the power grid, finally various risk identification results are obtained, and various potential risks in the power grid are accurately identified in cooperation with planned daily scheduling maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power grid risk identification, and relates to a power grid risk identification method and medium based on a pre-trained Transformer model. Background Art

[0002] With the rapid development of the power system, the power grid has undergone significant changes in scale, complexity, and operation mode. Under this background, how to effectively identify and evaluate the potential risks of the power grid has become an important issue for the safe operation of the power system. Power grid risk identification is not limited to the detection of single equipment failures, but also needs to comprehensively consider the mutual integration of various risk dimensions. Therefore, the problem of power grid risk identification has high complexity and diversity.

[0003] Most traditional power grid risk identification methods rely on deterministic analysis tools, such as power flow calculation, stability analysis, etc. Although these methods can provide effective evaluation results in certain specific scenarios, due to their relatively static models and assumptions, they cannot fully consider the complex factors that dynamically change in the power grid. For example, load prediction fluctuations, sudden changes in natural disasters, and future state arrangements of maintenance plans often cannot be accurately described by traditional analysis methods.

[0004] In the process of power grid risk identification, it generally relies on existing numerical parameters and traditional evaluation methods to determine whether there are potential risks in the power grid. However, in practical applications, these methods still face some deficiencies that need to be improved:

[0005] 1. Single risk assessment dimension and lack of comprehensive multi-dimensional consideration: Traditional power grid risk identification methods usually rely on single-dimensional parameter analysis. For example, they only focus on single factors such as equipment failures or load fluctuations. This makes the risk assessment may have limitations in a complex power grid operation environment. Especially in a power grid system, risks are usually the result of the combined action of multiple factors, and single-dimensional analysis methods often cannot fully reflect the interactive effects of these multiple risk factors. Therefore, traditional methods are prone to ignoring potential complex risks, resulting in a reduction in the accuracy and reliability of identification.

[0006] 2. High-difficulty manual analysis: The analysis of power grid risks usually requires operators to judge by combining a large number of power grid parameters. This process is complex and time-consuming. Due to the complex and changeable operation environment of the power grid, it is difficult for operators to quickly and accurately evaluate the risk level of the power grid in a short time, thereby affecting the timeliness of risk identification and decision-making efficiency. Summary of the Invention

[0007] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a power grid risk identification method based on a pre-trained Transformer model, which is used to solve the problems of low identification efficiency and poor accuracy caused by the lack of multi-dimensional comprehensive analysis and reliance on manual judgment in power grid risk assessment.

[0008] The object of the present invention can be achieved by the following technical solutions: The present invention proposes a power grid risk identification method based on a pre-trained Transformer model, including the following units:

[0009] A. Risk index calculation unit: Consider single indicators and fusion indicators for the power grid operation status according to three risk dimensions: future maintenance plan, load prediction data, and natural disasters, and obtain specific indicator values from various operation data information under the current power grid operation status.

[0010] B. Initial screening unit for operation risks: For the above specific risk indicators, set risk thresholds based on the defined operation information in the power grid and the indications under normal operation of each device, compare the specific values obtained from the risk index calculation with the thresholds, and screen out the indicators exceeding the thresholds and their corresponding power grid operation data.

[0011] C. Risk data construction unit: Take the power grid operation data exceeding the threshold as the power grid model data in a superposition state, perform standardization and additional time feature information processing on this data to enhance the accuracy of the next Transformer model risk identification, and perform risk identification on the risk power grid data after standardization and additional time features.

[0012] D. Pre-trained Transformer model risk identification unit: According to the above three single risk dimensions and multi-dimensional fusion risk dimensions of future maintenance plan, load prediction data, and natural disasters, use historical risk events and their corresponding risk identification results as the model training and test data sets. The model predicts and outputs the risk identification results of the power grid operation status, and compares them with the true risk identification results in the training set to obtain the Loss function. By minimizing the Loss function, gradually optimize the model parameters and improve the accuracy of the model risk identification.

[0013] E. Transformer model risk identification unit: The Transformer model regards the abnormal operation data of the power grid as a sample point. For each sample point (risk power grid data), the key information such as the topological structure of the power grid, the voltage and current of each node under this operation status is used as the input feature for the Transformer model risk identification. The model performs attention calculation on the operation data of the power grid to obtain the risk identification result.

[0014] Furthermore, the risk index calculation includes the following steps:

[0015] Risk dimension of future maintenance plan: The power fluctuation index is selected as the indicator in this dimension. The power fluctuation index is used to reflect the power change situation that may be caused by maintenance activities during future maintenance periods of the power grid. Through this formula

[0016]

[0017] Calculate the power fluctuation index of each region of the power grid at different time points, where T is the maintenance time period, P(t) is the power of the equipment at time t during maintenance, and P avg is the average value of the power of the equipment under normal operation, and α and β are preset fixed coefficient factors.

[0018] Risk dimension of load forecasting data: The load fluctuation index is selected as the indicator in this dimension. The load fluctuation index is used to evaluate the load demand fluctuation situation of the power grid in different time periods. Through this formula

[0019]

[0020] Analyze the predicted load data to obtain the load fluctuation index in the future state. Among them, T is the time period of load forecasting, Lt is the load at time t, and μ L is the average value of the load within the time period T, and p is a preset fixed coefficient factor.

[0021] Risk dimension of natural disasters: The natural disaster intensity index is selected as the main indicator in this dimension. The natural disaster intensity index is used to quantify the impact degree of natural disasters (blizzard, heavy rain, high temperature) on the operation of the power grid. Through the formula

[0022]

[0023] represent the disaster intensities of blizzard, heavy rain, and high temperature respectively. For the formula I snow , s represents the snowfall per unit time, and s 0 represents the average value of the snowfall, t represents the current temperature, and t 0 represents the average temperature, and η 1 and λ 1 are fixed coefficient factors. Through this formula

[0024]

[0025] Comprehensively consider the intensity index of natural disasters, where I snow , I rain and I heat are calculated by the above three formulas respectively, and μ and ν are fixed coefficient factors.

[0026] The risk dimension of future maintenance plans is integrated with the risk dimension of load forecasting data: The integration of the risk dimension of future maintenance plans and the risk dimension of load forecasting data is achieved by selecting the overlapping load change index caused by carrying out maintenance plans under abnormal fluctuations in equipment load as a risk indicator, aiming to quantify the impact of the interaction between maintenance plans and load fluctuations on power grid stability. This index is calculated by the formula

[0027]

[0028] where N is the equipment with abnormal load, P loss,i is the load loss during equipment maintenance, P total,i is the maximum load during equipment operation, L forecat,i is the load forecasting data, Δt i is the overlapping time, T total is the maintenance time period.

[0029] The risk dimension of future maintenance plans is integrated with the natural disaster risk dimension: The integration of the risk dimension of future maintenance plans and the natural disaster risk dimension is achieved by selecting the power loss index overlapping between future maintenance plans and natural disaster time periods as a risk indicator, aiming to quantify the power loss risk that the power grid may face during maintenance and when natural disasters occur. The specific index value is calculated according to this formula:

[0030]

[0031] where Δt is the time step for power calculation, T total is the entire maintenance time period, t end , t start is the start time and end time of maintenance, P loss,overlap (t) / P base (t) is the proportion of power loss in the total power, ∈ and η are fixed coefficient factors.

[0032] The risk dimension of future maintenance plans, the risk dimension of load forecasting data and the natural disaster risk dimension are integrated: The integration of the risk dimension of future maintenance plans, the risk dimension of load forecasting data and the natural disaster risk dimension is achieved by selecting the integrated load fluctuation index of equipment load fluctuations affected by maintenance plans and natural disasters as a risk indicator, aiming to comprehensively evaluate the combined impact of maintenance plans, load forecasting fluctuations and natural disasters on power grid load changes. This indicator is calculated by this formula:

[0033]

[0034] where t 0 , t 1 is the maintenance time period, P loss (t) is the load fluctuation during equipment maintenance, Ptotal The maximum load for device operation, L forecast L(t) is the load prediction at time t predicatd The load prediction for a time period, T repair The equipment to be repaired at time t, T total α and γ are the preset fixed coefficients for all the equipment to be repaired

[0035] Further, the initial screening unit for operation risks includes the following steps:

[0036] Receiving input data: The risk screening unit receives the power grid operation status data transferred from the index calculation unit, as well as various calculated risk indices (such as load fluctuation index, power loss index, etc.).

[0037] Threshold setting: Based on the specific risk indices set above, and according to the limited operation information in the power grid and the normal operation indicators of each device, determine the risk threshold for each index. The threshold is set by the power range allowed for the normal operation of power grid equipment, the fluctuation range of the load, and the fluctuation ranges of power, voltage, and load when no faults occur in the equipment under natural disasters.

[0038] Index screening: The operation risk screening unit compares the calculation result of each risk index with its corresponding threshold. If the value of a certain risk index is greater than the preset threshold, the power grid operation data related to this index is marked as risk power grid data. These power grid data represent the potential risks of the power grid in a certain time period or area, and the marked abnormal data is provided to the subsequent unit for detailed risk identification.

[0039] Further, the unit for constructing risk data includes the following steps:

[0040] Standardization of power grid data: First, identify each data type in the abnormal operation data of the power grid, such as equipment status data, load data, voltage, current, power loss, etc., and then use the Yeo-Johnson transformation for the data under each type:

[0041] T(x,0) = log(x), x > 0

[0042] T(x,0) = -log(-x), x ≤ 0

[0043] Perform data standardization, where x is the corresponding power grid operation data.

[0044] Adding time characteristics to power grid data: Extract the characteristics of the power grid data fluctuating with time from the time period in the power grid operation data. Perform time period segmentation on the data at one-hour intervals, and use sine and cosine transformations:

[0045]

[0046] Convert the time feature (hour) into sine and cosine values, preserving the periodicity of time, where T = 24H and t represents each whole-hour moment in 24 hours.

[0047] Furthermore, the pre-trained Transformer model risk identification unit further includes:

[0048] Feature engineering: Feature selection is performed according to the task requirements of power grid risk identification. For each sample point (risk power grid data), key information such as the topological structure of the power grid, the voltage and current of each node in this operating state is used as the input features for the risk identification of the Transformer model. According to the above three single risk dimensions of future maintenance plans, load forecasting data, and natural disasters, and the multi-dimensional fusion risk dimension, historical risk events and their corresponding risk identification results are used as the model training and test data sets, where the historical risk events in the training data set account for 70%, and the remaining 30% is the test data set.

[0049] Model architecture design: An encoder-decoder model architecture is adopted. Among them, the encoder applies attention encoding to represent the embedded vector X between the operating device information and its N - 1 adjacent devices. The encoder contains multiple attention layers, and the decoder calculates the probability value of what kind of risk the device has according to the embedded representation;

[0050] Q′ = Swish(XW Q ), K′ = Swish(XW K ), V′ = XW V

[0051]

[0052] O′ = A′V Decoder

[0053] Among them, X represents the embedded vector representation of the power grid operation information under the operating device involved in the risk power grid data and its N - 1 adjacent operating devices. W Q , W K , W V is the training parameter matrix of the model. Encoder i represents multiple attention layers in the encoder. V Decoder is the training parameter of the decoder. d k is the vector dimension of the risk power grid operation data embedding. O′ is the model risk identification output vector, and this output vector corresponds to the probability value of what kind of risk the device has. The risk category that the device has is determined according to the roulette algorithm.

[0054] Model Pretraining and Tuning: Set the hyperparameters of the model, including the Loss function and the parameter optimizer. The model predicts and outputs the risk identification results of each device corresponding to the power grid operation status, and compares them with the true risk identification results in the training set to obtain the Loss function. By minimizing the Loss function:

[0055]

[0056] Gradually optimize the model parameters to improve the accuracy of the model's risk identification. Among them, N is the risk category, and y i is the risk identification category predicted by the model, and

[0057] is the true risk category.

[0058] Furthermore, the Transformer model risk identification unit further includes:

[0058] Risk Identification: Use the operation information such as voltage and current of the device in the abnormal operation data of the power grid as the query vector (query) of the Transformer model, and use the operation information such as voltage and current of its adjacent N - 1 nodes as the key vector (key). Calculate the compatibility between the abnormal device and its N - 1 nodes through self - attention:

[0059] Q′ = Swish(XW Q ), K′ = Swish(XW K ), V′ = XW V

[0060]

[0061] O′ = A′V

[0062] where X represents the embedded vector representation of the operation information of the operating devices involved in the risk power grid data and their N - 1 adjacent operating devices, W Q , W K , W V , V is the parameter matrix of the model pre - training, d k is the vector dimension of the risk power grid operation data embedding, and O′ is the model risk identification output vector. Further, this output vector corresponds to the probability value of what kind of risk the device has. Select the risk category with the largest probability value as the potential risk category identified by the model for this device.

[0063] On the other hand, the present invention also discloses a computer - readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is caused to execute the steps of the above - mentioned method.

[0064] In another aspect, the present invention also discloses a computer device, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor is caused to execute the steps of the above method.

[0065] In summary, the present invention discloses a power grid risk identification method and medium based on a pre-trained Transformer model, relating to the technical field of power grid risk identification, and solving the problems that traditional risk identification methods are difficult to comprehensively consider the interactive effects of multiple factors in the power grid and the cumbersome and time-consuming manual power grid risk analysis. The present invention selects specific risk indicators under three risk dimensions of future maintenance plans, load prediction data, and natural disasters, and additionally considers the fusion indicators of the three risk dimensions, designs corresponding fusion risk indices, sets the risk thresholds of the above indicators according to the limited operation information in the power grid and the normal operation indications of each device, calculates the specific risk index value of the current power grid operation state according to the risk indicators, compares the specific risk index value with the corresponding risk threshold, screens out the indicators exceeding the threshold and their corresponding power grid operation data, and obtains the risk power grid data in a superposition state. Further, the power grid data is processed by standardization and additional time feature information to obtain the input data of the Transformer risk identification model. For each sample point (risk power grid data), the key information such as the topological structure of the power grid, the voltage and current of each node in this operation state is used as the input features of the Transformer model. The model identifies the potential factors in the power grid, and finally obtains various risk identification results, in cooperation with planned daily scheduling and maintenance, so as to accurately identify various potential risks in the power grid.

[0066] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0067] (1) Comprehensive consideration of multi-dimensional risks: Traditional power grid risk identification methods often focus on a single risk dimension, such as equipment failure or load fluctuation, etc., resulting in difficulty in comprehensively reflecting the multi-factor interaction in the power grid system. The present invention provides a comprehensive risk assessment framework by introducing risk indicators of multiple dimensions (including future maintenance plans, load prediction data, natural disasters) and integrating the indicator information of these dimensions. This multi-dimensional risk identification improves the accuracy of risk identification, can better capture potential risk factors in a complex environment, and to a certain extent avoids the limitations of traditional methods in a high-dimensional complex power grid environment.

[0068] (2) Automated Risk Identification Based on Pre-trained Transformer Model: Current power grid risk identification relies on manual analysis. Operators need to combine a large amount of power grid data for judgment, which is time-consuming and error-prone. The present invention utilizes a pre-trained Transformer model to analyze the operating state of the power grid in an automated manner and quickly identify potential risks. This greatly improves the identification speed, reduces the manual burden, and is beneficial to the efficiency and accuracy of power grid risk assessment, thus better coping with the complex and changeable power grid environment. Description of the Drawings

[0069] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0070] Figure 1 It is a schematic diagram of the method steps of the present invention. Detailed Embodiments

[0071] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0072] Please refer to Figure 1 As shown, the present invention proposes a power grid risk identification method based on a pre-trained Transformer model, including the following units:

[0073] A. Risk Index Calculation Unit: It is used to consider single indicators and integrated indicators for the operating state of the power grid according to three risk dimensions: future maintenance plan, load prediction data, and natural disasters, and obtain specific indicator values.

[0074] Specifically, the above risk index calculation includes specific risk indicators for the future maintenance plan risk dimension, load prediction data risk dimension, natural disaster risk dimension, the integration of the future maintenance plan risk dimension and the load prediction data risk dimension, the integration of the future maintenance plan risk dimension and the natural disaster risk dimension, the integration of the load prediction data risk dimension and the natural disaster risk dimension, and the integration of the future maintenance plan risk dimension, load prediction data risk dimension, and natural disaster risk dimension.

[0075] The indicator selected for the above future maintenance plan risk dimension is: power fluctuation index, through the following formula:

[0076]

[0077] Calculate the power fluctuation index of each region of the power grid at different time points, where T is the maintenance time period, P(t) is the power of the equipment at time t during the maintenance period, and P avg is the average value of the power under normal operation of the equipment, and α and β are preset fixed coefficient factors.

[0078] The indicators selected for the above load prediction data risk dimension are: load fluctuation index, through the following formula:

[0079]

[0080] Analyze the predicted load data to obtain the load fluctuation index in the future state. Among them, T is the time period of load prediction, Lt is the load at time t, and μ L is the average value of the load within the time period T, and p is a preset fixed coefficient factor.

[0081] Among them, the average value μ of the load within the time period T in the load fluctuation index L is obtained by obtaining the maximum load fluctuation and the minimum load fluctuation during the normal operation period of the power grid, and using the formula load average value to obtain.

[0082] The indicators selected for the above natural disaster risk dimension are: natural disaster intensity index, through the following formula:

[0083]

[0084] respectively represent the disaster intensities of blizzard, heavy rain and high temperature. For the formula I snow , s represents the snowfall per unit time, and s 0 represents the average value of the snowfall, t represents the current temperature, and t 0 represents the average temperature, and η 1 and λ 1 are fixed coefficient factors. Through this formula

[0085]

[0086] Comprehensively consider the intensity index of natural disasters, where I snow , I rain and I heat are respectively calculated by the above three formulas, and μ and ν are fixed coefficient factors.

[0087] In the calculation formula of the blizzard intensity in the natural disaster risk dimension, s 0 , using the formula to obtain, and in the calculation formula of the heavy rain intensity, p0 , obtained by using the formula in the high-temperature strength calculation formula, t 0 , obtained by using the formula .

[0088] It should be noted that the above natural disaster information is obtained from the meteorological center in the area where the power grid is located.

[0089] The above indicators selected by integrating the future maintenance plan risk dimension and the load forecast data risk dimension: the overlapping load change index caused by the maintenance plan under abnormal load fluctuations of equipment, calculated by the formula

[0090]

[0091] where N is the equipment with abnormal load, P loss,i is the load loss during equipment maintenance, P total,i is the maximum load during equipment operation, L forecat,i is the load forecast data, Δt i is the overlapping time, T total is the maintenance time period, α i and γ i are preset fixed coefficient factors.

[0092] Furthermore, the equipment with abnormal load fluctuations includes, but is not limited to, transformers, distribution lines, capacitors...

[0093] The above indicators selected by integrating the future maintenance plan risk dimension and the natural disaster risk dimension: the power loss index of the overlap between the future maintenance plan and the natural disaster time period, calculated by the formula

[0094]

[0095] where Δt is the time step for power calculation, T total is the entire maintenance time period, t end , t start is the start time and end time of the maintenance, P loss,overlap (t) / P base (t) is the proportion of power loss to the total power, and ∈ and η are fixed coefficient factors.

[0096] The above indicators selected by integrating the future maintenance plan risk dimension, the load forecast data risk dimension and the natural disaster risk dimension: the integrated load fluctuation index of the load fluctuation of the equipment affected by the maintenance plan and natural disasters, calculated by the formula:

[0097]

[0098] where t0 ,t 1 are the start time and end time of the maintenance period, P loss (t) is the load fluctuation during equipment maintenance, P total is the maximum load during equipment operation, L forecast (t) is the load prediction at time t, L predicatd is the load prediction for the time period, T repair is the number of equipment under maintenance at time t, T total is the total number of equipment under maintenance. α and γ are preset fixed coefficients.

[0099] B. Initial screening unit for operation risks: For the above specific risk indicators, determine the risk thresholds based on the limited operation information in the power grid and the indicators under normal operation of each equipment. Compare the specific values calculated from the risk indices with the thresholds, and screen out the indicators exceeding the thresholds and their corresponding power grid operation data.

[0100] In the specific implementation manner of the present invention, the method for setting the thresholds of the above specific risk indicators is as follows: Based on the above-set specific risk indicators, determine the risk threshold for each indicator according to the limited operation information in the power grid and the normal operation indicators of each equipment. The threshold is set by the power range allowed for the normal operation of power grid equipment, the fluctuation range of the load, and the fluctuation ranges of power, voltage, and load when no failure occurs to the equipment under natural disasters.

[0101] In the above technical solution, screening out the risk power grid data exceeding the risk thresholds includes the following steps: Receive the power grid operation status data transmitted from the indicator calculation unit and the calculated risk indicators (such as load fluctuation index, power loss index, etc.).

[0102] Compare the calculation result of each risk indicator with its corresponding threshold. If the value of a certain risk indicator is greater than the preset threshold, the power grid operation data related to this indicator is marked as risk power grid data. These power grid data represent the potential risks of the power grid in a certain time period or area, and the marked abnormal data is provided to the subsequent unit for detailed risk identification.

[0103] Assume that in the dimension of load prediction risk, the load prediction time period is T = 24H, and the load data for each hour is as follows: L = [100, 120, 110,..., 650]. The indicator threshold is 150, and an abnormal value of 650 appears in the load data at t = 24h, which is much higher than the indicator threshold. Then, the power grid area operation data involved in the load at this moment is marked as risk power grid data, and the Transformer risk identification model conducts further risk identification on this risk power grid data.

[0104] Traditional power grid risk identification methods usually focus on a single risk dimension, such as equipment failure or load fluctuation, which makes it difficult for them to comprehensively reflect the interactions of multiple factors in the power grid system. The present invention establishes a more comprehensive risk assessment framework by introducing indicators of multiple risk dimensions, including future maintenance plans, load forecast data, natural disasters, etc., and combining the risk information of these different dimensions. This method can improve the accuracy of risk identification, more effectively capture potential risk factors in a complex environment, and overcome the limitations of traditional methods in the face of a high-dimensional complex power grid environment.

[0105] C. Construct a risk data unit: Use the power grid operation data exceeding the threshold as the power grid model data in a superposition state, and perform standardization and additional time feature information processing on this data to enhance the accuracy of the next-step risk identification by the Transformer model. Perform risk identification on the risk power grid data after standardization and adding time features.

[0106] In the specific implementation manner of the present invention, the specific method for performing standardization and additional time feature information processing on the above-mentioned risk power grid data is as follows: For power grid data standardization, first identify each data type in the abnormal power grid operation data, such as equipment status data, load data, voltage, current, power loss, etc. Then, for the data under each type, use the formula:

[0107] T(x,0) = log e (x), x > 0

[0108] T(x,0) = -log e (-x), x ≤ 0

[0109] Perform data standardization using the Yeo-Johnson transformation.

[0110] As an example of the above solution, assume that the load data of the transformer is 115, 155 > 0. After standardizing this equipment data, the load data is processed as ln(115).

[0111] Adding time features to power grid data: Extract the features of the power grid data fluctuating with time from the time period in the power grid operation data. Perform time period segmentation on the data at one-hour time intervals, and use sine and cosine transformations:

[0112]

[0113] Convert the time features (hours) into sine and cosine values, and retain the periodicity of time.

[0114] As an example of the above solution, assume that the risk power grid data is in the time period 18:00 - 19:00, and use sine transformation and cosine transformation:

[0115]

[0116] Attach the time feature information sint = 1, cost = 0 to this data.

[0117] D. Pre-trained Transformer model risk identification unit: According to the above three single risk dimensions of future maintenance plans, load forecasting data, and natural disasters, and the multi-dimensional fusion risk dimension, use historical risk events and their corresponding risk identification results as the model training and test data sets. The model predicts and outputs the risk identification results of the power grid operation status, and compares them with the true risk identification results in the training set to obtain the Loss function. By minimizing the Loss function, gradually optimize the model parameters to improve the accuracy of the model's risk identification.

[0118] In the specific implementation manner of the present invention, the specific pre-training method of the above pre-trained Transformer model risk identification unit is as follows: Pre-train the Transformer model risk identification unit, perform feature selection according to the task requirements of power grid risk identification. For each sample point (risk power grid data), use the topological structure of the power grid, the voltage and current of each node, and other key information under this operating state as the input features of the Transformer model risk identification. According to the above three single risk dimensions of future maintenance plans, load forecasting data, and natural disasters, and the multi-dimensional fusion risk dimension, use historical risk events and their corresponding risk identification results as the model training and test data sets, where the historical risk events in the training data set account for 70%, and the remaining 30% is the test data set.

[0119] Model architecture design: Use the operating information such as voltage and current of the equipment in the abnormal operation data of the power grid as the query vector (query) of the Transformer model, and use the operating information such as voltage and current of its adjacent N - 1 nodes as the key vector (key). Calculate the compatibility between the abnormal equipment and its N - 1 nodes through self-attention:

[0120] Q′ = Swish(XW Q ), K′ = Swish(XW K ), V′ = XW V

[0121]

[0122] O′ = A′V

[0123] Among them, X represents the embedded vector representation of the power grid operating information of the operating equipment involved in the risk power grid data and its N - 1 adjacent operating equipment, W Q , W K , W V, V is the training parameter matrix of the model, d k is the vector dimension of the risk power grid operation data embedding, O′ is the model risk identification output vector. Further, this output vector corresponds to the probability value of what kind of risk the device has, and the risk category of the device is determined according to the roulette algorithm.

[0124] Model pre-training and tuning: Set the hyperparameters of the model, including the Loss loss function and the parameter optimizer. The model predicts and outputs the risk identification results of each device corresponding to the power grid operation state, and compares them with the true risk identification results in the training set to obtain the Loss function. By minimizing the Loss function:

[0125]

[0126] Gradually optimize the model parameters to improve the accuracy of the model risk identification. Among them, N is the risk category, y i is the risk identification category predicted by the model, is the true risk category.

[0127] E. Risk identification unit of the Transformer model: The Transformer model regards the abnormal operation data of the power grid as a sample point. For each sample point (risk power grid data), the topological structure of the power grid, the voltage and current of each node, and other key information in this operation state are used as the input features for the risk identification of the Transformer model. The model performs attention calculation on the operation data of the power grid to obtain the risk identification result. The risk identification inference process of the Transformer model is as follows: The topological structure of the power grid, the voltage and current of each node, and other key information in the risk power grid data in this operation state are used as the input features for the risk identification of the Transformer model.

[0128] Take the operation information such as voltage and current of the device in the abnormal operation data of the power grid as the query vector (query) of the Transformer model, and take the operation information such as voltage and current of its adjacent N - 1 nodes as the key vector (key), and calculate the compatibility between the abnormal device and its N - 1 nodes through self-attention:

[0129] Q′ = Swish(XW Q ), K′ = Swish(XW K ), V′ = XW V

[0130]

[0131] O′ = A′V

[0132] Among them, X represents the embedded vector representation of the grid operation information of the operating equipment involved in the risk grid data and its N-1 adjacent operating equipment, W Q , W K , W V , V is the training parameter matrix of the model, d k is the vector dimension of the risk grid operation data embedding, O′ is the model risk identification output vector. Further, this output vector corresponds to the probability value of what kind of risk occurs for this equipment, and the risk category with the largest probability value is selected as the potential risk category of the equipment identified by the model.

[0133] As an example of the above solution, assume that the power grid system has 5 devices (device 1 to device 5), and the connections between the devices form a simple topological structure. The indicator of device 1 (transformer) has an anomaly, exceeding its corresponding indicator risk threshold. It is necessary to determine whether device 1 has a fault risk and evaluate the mutual influence with other devices (device 2 to device 5). Then the input features of the Transformer model are: the power grid topological structure, device 1 is connected to device 2, device 3, device 4, and device 5; the voltage and current data of each device (risk grid data).

[0134] Further, convert the input features into high-dimensional embedded vectors:

[0135]

[0136] From this embedded vector, the Transformer model calculates Q′ = Swish(XW Q ) to represent information such as the voltage, current, power, and frequency of device 1; calculates K′ = Swish(XW K ) to represent the association information between device 1 and device 2 to device 5; calculates V′ = XW V to represent the operation information of device 1 and its adjacent devices; where W Q , W K , W v are the training parameter matrices of the model, and Swish is the activation function adopted by the model.

[0137] Next, the Transformer model uses self-attention to calculate

[0138]

[0139] to obtain the attention matrix of the grid data, and calculate the output vector according to the attention matrix A′

[0140] O′ = A′V

[0141] represents the potential risk of device 1. The output vector O′ is mapped to specific risk categories (such as equipment failure, overload, etc.).

[0142] It should be noted that all the above input data of the Transformer model already contain time feature information.

[0143] Specifically, a power grid risk identification method based on a pre-trained Transformer model described in an embodiment of the present invention, when applied, includes the following steps:

[0144] Step 1: Calculate the operation data index for the power grid operation data according to the specific risk indicators and the fused risk indicators in three dimensions of future maintenance plans, load prediction data, and natural disasters, so as to provide basic information for subsequent risk identification.

[0145] Step 2: Determine the risk threshold of the above indicators based on the limited operation information in the power grid and the normal operation indicators of each device. Compare the specific risk indicator value calculated in Step 1 with its corresponding threshold. If it is greater than the threshold, the power grid operation data related to this indicator is marked as risk power grid data. These power grid data represent the potential risks of the power grid in a certain period or area. The marked data is provided to the subsequent unit for detailed risk identification.

[0146] Step 3: Perform standardization and additional time feature information processing on the power grid operation abnormal risk data, that is, perform missing value filling and mean standardization operations on the corresponding operation information (such as load, voltage, and current) of each device. Further, divide the data into multiple time periods at one-hour intervals, and attach the time period information to the corresponding operation data of the device in each time period.

[0147] Step 4: Use the historical power grid data as the training data set and test data set of the Transformer risk identification model. For each sample point (risk power grid data) in the training data set, use the key information such as the topological structure of the power grid, the voltage and current of each node device in this operation state as the input features for the risk identification of the Transformer model. The model identifies the potential risks for each device and corresponds them to the true risks of the device to obtain the Loss loss function. By minimizing the Loss function, gradually optimize the performance of the model's risk identification.

[0148] Step 5: Based on the pre-trained Transformer risk identification model, perform potential risk identification on the operation data of the power grid to obtain accurate risk identification results.

[0149] In summary, since the current power grid risk identification relies on manual analysis, operators need to process a large amount of power grid data for judgment, which is not only time-consuming but also error-prone. The present invention discloses a power grid risk identification method based on a pre-trained Transformer model, which considers single-dimensional indicators and multi-dimensional indicator fusion for the power grid operation state from three risk dimensions: future maintenance plans, load prediction data, and natural disasters. According to the set indicator formula, each indicator index under the current power grid operation state is calculated, and the risk thresholds of the above indicators are set based on the defined operation information in the power grid and the normal operation indicators of each device. The indicators exceeding each risk threshold and their corresponding risk power grid data are screened out. Further, the risk power grid data is used as the power grid model data in the superposition state. After data standardization and additional time feature processing, the input data of the Transformer risk identification model is obtained. The pre-trained Transformer risk identification model comprehensively evaluates the power grid risk, identifies potential risk factors from complex power grid data, and performs accurate risk identification, which has good practicability.

[0150] Generally speaking, the embodiment of the present invention can quickly identify potential risks by using a pre-trained Transformer model and adopting an automated method to analyze the power grid operation state. This greatly improves the identification speed, reduces the manual burden, and further improves the efficiency and accuracy of power grid risk assessment, so as to better cope with the complex and changeable power grid environment.

[0151] On the other hand, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to execute the steps of the above method.

[0152] On yet another hand, the present invention also discloses a computer device including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to execute the steps of the above method.

[0153] In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which, when running on a computer, causes the computer to execute any one of the above-mentioned mobile source emission prediction methods based on temporal feature migration.

[0154] It can be understood that the systems, devices, and storage media provided by the embodiments of the present invention correspond to the methods provided by the embodiments of the present invention. The explanations, examples, and beneficial effects of the relevant content can refer to the corresponding parts in the above methods.

[0155] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

[0156] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.

[0157] Each embodiment in this specification is described in a related manner. For the same and similar parts between the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and reference can be made to the relevant parts of the method embodiment for the relevant content.

[0158] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A power grid risk identification method based on a pre-trained Transformer model, characterized in that: The following steps are included: The grid operation status is considered from three risk dimensions: future maintenance plan, load forecast data and natural disasters. The single-dimensional indicator and multi-dimensional indicator integration are considered. The various indicator indexes of the current grid operation status are calculated and compared with the risk thresholds set according to the limited operation information in the grid and the normal operation indicators of each device. The indicators exceeding the threshold and their corresponding grid operation data are screened to obtain the superimposed risk grid data. Furthermore, the risky power grid data is processed by data standardization and additional time features to obtain the input data of the Transformer risk identification model. The pre-trained Transformer risk identification model conducts a comprehensive assessment of power grid risks, identifies potential risk factors from complex power grid data, and performs accurate risk identification.

2. The power grid risk identification method based on the pre-trained Transformer model according to claim 1 is characterized in that: The method comprises the following units: A. Risk index calculation unit: It considers the grid operation status according to the three risk dimensions of future maintenance plan, load forecast data and natural disasters as single index and integrated index, and obtains specific index values ​​from various operation data information under the current grid operation status; B. Operation risk initial screening unit: For the above specific risk indicators, the risk threshold is set according to the operation information defined in the power grid and the indications of normal operation of each device. The specific value calculated according to the risk index is compared with the threshold, and the indicators exceeding the threshold and their corresponding power grid operation data are screened; C. Constructing risk data unit: The grid operation data exceeding the threshold is used as the grid model data in the superposition state, and the data is standardized and additional time feature information is processed to enhance the accuracy of the next step of Transformer model risk identification, and the risk grid data after standardization and additional time features is used for risk identification; D. Pre-trained Transformer model risk identification unit: According to the three single risk dimensions and multi-dimensional fusion risk dimensions of future maintenance plans, load forecast data and natural disasters mentioned above, historical risk events and their corresponding risk identification results are used as model training and test data sets. The model predicts and outputs the risk identification results of the power grid operation status, and compares them with the actual risk identification results in the training set to obtain the Loss function. By minimizing the Loss function, the model parameters are gradually optimized to improve the accuracy of model risk identification; E. Transformer model risk identification unit: The Transformer model regards the abnormal operation data of the power grid as a sample point. For each sample point, i.e., risky power grid data, the topological structure of the power grid under the operating state, the voltage and current of each node and other key information are used as the input features of the Transformer model risk identification. The model performs attention calculation on the operation data of the power grid to obtain the risk identification results.

3. The power grid risk identification method based on the pre-trained Transformer model according to claim 2 is characterized in that: The risk index calculation unit further performs risk index calculation including: Future maintenance plan risk dimension: This dimension selects the power fluctuation index as an indicator. The power fluctuation index is used to reflect the power changes that may be caused by maintenance activities during the future maintenance period of the power grid. The following formula is used: Calculate the power fluctuation index of each area of ​​the power grid at different time points, where T is the maintenance period, P(t) is the power of the equipment at time t during the maintenance period, and P avg is the average power of the device under normal operation, and α and β are preset fixed coefficient factors; Load forecast data risk dimension: This dimension uses the load fluctuation index as an indicator. The load fluctuation index is used to evaluate the fluctuation of load demand in the power grid in different time periods. The following formula is used: The predicted load data is analyzed to obtain the future load fluctuation index, where T is the load forecast period, Lt is the load at time t, μ L is the average value of the load in the time period T, and p is the preset fixed coefficient factor; Natural disaster risk dimension: This dimension uses the natural disaster intensity index as the main indicator; the natural disaster intensity index is used to quantify the impact of natural disasters on power grid operation; through the following formula: Represent the disaster intensity of heavy snow, heavy rain and high temperature respectively. For formula I snow , s represents the snowfall per unit time, s0 represents the mean snowfall, t represents the current temperature, t0 represents the average temperature, η1 and λ1 are fixed coefficient factors, and the following formula is used Comprehensively consider the intensity index of natural disasters, among which I snow ,I rain with I heat Calculated by the above three formulas, μ and ν are fixed coefficient factors; Fusion of the risk dimension of future maintenance plan and the risk dimension of load forecast data: The fusion of the risk dimension of future maintenance plan and the risk dimension of load forecast data selects the overlapping load change index caused by the maintenance plan under abnormal equipment load fluctuation as the risk indicator, aiming to quantify the impact of the interaction between maintenance plan and load fluctuation on the stability of the power grid. The index is given by the following formula Calculated, where N is the equipment with abnormal load, P loss,i is the load loss during equipment maintenance, P total,i is the maximum load of the equipment, L forecat,i is the load forecast data, Δt i is the overlap time, T total is the maintenance time period, α i With γ i is the preset fixed coefficient factor; Integration of future maintenance plan risk dimension and natural disaster risk dimension: The integration of future maintenance plan risk dimension and natural disaster risk dimension selects the power loss index when the future maintenance plan and natural disaster time period overlap as the risk indicator, aiming to quantify the power loss risk that the power grid may face during the maintenance period and when natural disasters occur; the specific index value is calculated according to this formula: Where Δt is the time step of power calculation, T total is the entire maintenance period, t end ,t start The start and end time of maintenance, P loss,overlap (t) / P base (t) is the ratio of power loss to total power, ∈ and η are preset fixed coefficient factors; Fusion of load forecast data risk dimension and natural disaster risk dimension: The fusion of load forecast data risk dimension and natural disaster risk dimension selects the cross index of load fluctuation caused by abnormal load forecast fluctuation and natural disaster as the risk index, aiming to quantify the impact of natural disasters and load forecast errors on power grid stability; it is calculated by the following formula: Among them, T is the time period of abnormal load fluctuation, L t is the load change caused by natural disasters, is the load under normal conditions, ΔL net,t is the predicted abnormal load fluctuation, p and q are fixed coefficient factors; Integration of future maintenance plan risk dimension, load forecast data risk dimension and natural disaster risk dimension: The integration of future maintenance plan risk dimension, load forecast data risk dimension and natural disaster risk dimension selects the load fluctuation of equipment and the fused load fluctuation index affected by maintenance plan and natural disaster as risk indicators, aiming to comprehensively evaluate the joint impact of maintenance plan, load forecast fluctuation and natural disaster on power grid load change; this indicator is calculated by this formula: Among them, t0, t1 are the start and end time of the maintenance time period, P loss (t) is the load fluctuation during equipment maintenance, P total is the maximum load of the equipment, L forecast (t) is the load forecast at time t, L predicatd is the load forecast during the maintenance period, T repair is the number of maintenance equipment at time t, T total is the total number of maintenance equipment, α and γ are preset fixed coefficients.

4. The power grid risk identification method based on the pre-trained Transformer model according to claim 2 is characterized in that: Operational risk screening unit Operational risk screening further includes: Receiving input data: The risk screening unit receives the power grid operation status data transmitted from the indicator calculation unit, as well as the calculated risk indicators; Threshold setting: Based on the specific risk indicators set above, the risk threshold of each indicator is set according to the limited operation information in the power grid and the normal operation indicators of each device; the threshold is set by the power range allowed for the normal operation of the power grid equipment, the load fluctuation range, and the power, voltage and load fluctuation range information of the equipment without failure in the event of a natural disaster; Indicator screening: The operation risk screening unit compares the calculation result of each risk indicator with its corresponding threshold; if a risk indicator value is greater than the preset threshold, the grid operation data related to the indicator is marked as risky grid data; these grid data represent the potential risks of the grid in a certain period or area, and the marked abnormal data are provided to subsequent units for detailed risk identification.

5. The power grid risk identification method based on the pre-trained Transformer model according to claim 2 is characterized in that: The risk data construction unit further comprises: Grid data standardization: First, identify the various data types in the abnormal operation data of the grid, and then use the Yeo-Johnson transformation formula for each type of data: T(x,0)=log(x),x>0 T(x,0)=-log(-x),x≤0 Perform data standardization, where x is the corresponding power grid operation data; Additional time features of power grid data: Extract the characteristics of power grid data fluctuation over time from the time period in the power grid operation data, divide the data into time periods according to the time interval of one hour, and use sine and cosine transformation: The time characteristics are converted into sine and cosine values ​​in hours, retaining the periodicity of time, where T = 24H, and t represents every hour in 24h.

6. The power grid risk identification method based on the pre-trained Transformer model according to claim 2 is characterized in that: Pre-training Transformer model The risk identification unit pre-trains the Transformer model further including: Feature engineering: Feature selection is performed according to the task requirements of power grid risk identification. For each sample point, key information such as the topological structure of the power grid, voltage and current of each node under the operating state is used as the input features of the Transformer model risk identification; according to the three single risk dimensions and multi-dimensional fusion risk dimensions of future maintenance plans, load forecast data and natural disasters mentioned above, historical risk events and their corresponding risk identification results are used as model training and test data sets, of which historical risk events account for 70% of the training data set, and the remaining 30% is the test data set.

7. The power grid risk identification method based on the pre-trained Transformer model according to claim 6 is characterized in that: Pre-trained Transformer model risk identification unit pre-trained Transformer model also includes, Model architecture design: The encoder and decoder model architecture is adopted, in which the encoder uses attention encoding to represent the embedded vector X between the running device information and its N-1 adjacent devices. The encoder contains multiple attention layers, and the decoder calculates the probability value of the device's risk based on the embedded representation; Q′=Swish(XW Q ),K′=Swish(XW K ),V′=XW V O′=A′V Decoder Where X represents the embedded vector representation of the grid operation information of the operating equipment involved in the risk grid data and its N-1 adjacent operating equipment, W Q , W K , W V is the training parameter matrix of the model, Encoder i Represents multiple attention layers in the encoder, V Decoder is the training parameter of the decoder, d k is the vector dimension of risk power grid operation data embedding, O′ is the model risk identification output vector, which corresponds to the probability value of the risk of the device, and the risk category of the device is determined according to the roulette algorithm.

8. The power grid risk identification method based on the pre-trained Transformer model according to claim 7 is characterized in that: Pre-trained Transformer model risk identification unit pre-trained Transformer model also includes: Risk identification: The voltage and current of the equipment in the abnormal operation data of the power grid are used as the query vector query of the Transformer model, and the voltage, current and other operation information of its adjacent N-1 nodes are used as the key vector key. The compatibility between the abnormal equipment and its N-1 nodes is calculated through self-attention: Q′=Swish(XW Q ),K′=Swish(XW K ),V′=XW V O′=A′V Where X represents the embedded vector representation of the grid operation information of the operating equipment involved in the risk grid data and its N-1 adjacent operating equipment, W Q , W K , W V , V is the parameter matrix of the pre-trained model, d k is the vector dimension of risk power grid operation data embedding, O′ is the model risk identification output vector, which corresponds to the probability value of the risk of the equipment. The risk category with the largest probability value is selected as the model to identify the potential risk category of the equipment.

9. The power grid risk identification method based on the pre-trained Transformer model according to claim 8 is characterized in that: Pre-trained Transformer model risk identification unit pre-trained Transformer model also includes, Model pre-training and tuning: setting the model's hyperparameters, including the loss function and parameter optimizer; The model predicts and outputs the risk identification results of each device under the corresponding power grid operation status, and compares them with the actual risk identification results in the training set to obtain the Loss function. By minimizing the Loss function: Gradually optimize the model parameters to improve the accuracy of model risk identification; where N is the risk category, y i Identify the risk categories predicted by the model, It is a real risk category.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Data-driven power transmission safety grading risk assessment method

    CN121119671A

  • Cable multi-state sensing fault diagnosis method, system and terminal

    CN121540999A