Operation state anomaly detection method of electric power system and related equipment
By using the gate control and multi-head attention mechanism of long and short-term memory network model in the power system, the problem of insufficient accuracy of power system situation awareness and risk assessment in the prior art is solved, and more accurate power is achieved System status prediction and fault identification ensure the stability of power supply.
Patent Information
- Application Number
- CN202411167364.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-27
AI Technical Summary
The existing power system operating state perception and risk assessment methods are insufficient in the prediction accuracy when facing extreme conditions or sparse data situations, and it is difficult to effectively integrate multiple information, resulting in insufficient situational awareness in complex dynamic systems.
The pre-trained long-term short-term memory network model is used to extract the power data through its gate mechanism and multi-head attention mechanism to obtain the original and target features, and then output the prediction data to determine the abnormal operating status of the power system.
It improves the accuracy of the power system prediction data, can timely identify potential faults, ensures the continuity and safety of power supply, and enhances the situational awareness and risk assessment capabilities of complex power systems.
Smart Images

Figure CN119202967A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method for detecting abnormal operation status of an electric power system and related equipment. Background Art
[0002] In modern power systems, with the popularization of distributed energy and the increasing volatility of electricity demand, the perception of the operating status and risk assessment of the power system have become key links in maintaining the stability of the power grid. In the existing technical solutions, the perception of the operating status of the distribution network to capture the changes in the operating status of the active power system mainly relies on two types of time series prediction methods. The first type is based on mathematical tools and statistical analysis, such as Kalman filtering, autoregressive (AR) and autoregressive moving average (ARMA) models. They are good at processing linear and static time series, but the accuracy of the prediction results of complex dynamic systems is limited. The second type relies on artificial intelligence algorithms, such as extreme learning machines (ELM), support vector machines (SVM) and various neural networks, especially the traditional long short-term memory network (LSTM). The latter has excellent self-learning ability and nonlinear mapping characteristics, and has outstanding performance in time series prediction in the power industry, becoming one of the most widely used models. However, although these methods have improved the prediction accuracy to a certain extent, their performance still needs to be improved when facing extreme conditions or data sparse situations, and how to effectively integrate multivariate information to achieve more accurate situation perception and risk assessment is still a key problem that needs to be solved. Summary of the invention
[0003] In view of this, the purpose of the present application is to propose a method for detecting abnormal operation status of an electric power system and related equipment to overcome all or part of the deficiencies in the prior art.
[0004] Based on the above-mentioned purpose, the present application provides a method for detecting abnormal operating status of an electric power system, including: obtaining electric power data in the electric power system; inputting the electric power data into a pre-trained long short-term memory network model, and extracting features of the electric power data through the gating mechanism of the long short-term memory network model to obtain original features; extracting features of the original features through the multi-head attention mechanism of the long short-term memory network model to obtain target electric power features; based on the target electric power features, outputting predicted data corresponding to the electric power data through the long short-term memory network model; based on the predicted data, determining a tolerance value corresponding to the predicted data, and in response to determining that the tolerance value meets a predetermined condition, determining that the electric power system is in an abnormal operating state in a future time period.
[0005] Optionally, the gating mechanism includes a forget gate mechanism, an input gate mechanism and an output gate mechanism; the feature extraction of the power data through the gating mechanism of the long short-term memory network model to obtain the original feature includes: extracting the first sub-feature corresponding to the power data through the forget gate mechanism; extracting the second sub-feature corresponding to the power data through the input gate mechanism; based on the first sub-feature and the second sub-feature, determining the original feature through the output gate mechanism.
[0006] Optionally, extracting the first sub-feature corresponding to the power data by using the forget gate mechanism includes: extracting the first sub-feature corresponding to the power data by using the following formula: Among them, f t is the first sub-feature, σ1 is the first Sigmoid activation function, W ft is the neuron weight corresponding to the forget gate mechanism, is the first state matrix of the t-1th layer, x t is the power data to be processed at the tth layer, C t-1 is the updated feature of the t-1th layer, b ft is the neuron bias corresponding to the forget gate mechanism.
[0007] Optionally, extracting the second sub-feature corresponding to the power data through the input gate mechanism includes: extracting the second sub-feature corresponding to the power data through the following formula: Among them, g t is the second sub-feature, σ2 is the second Sigmoid activation function, b g is the offset corresponding to the input gate mechanism, W g is the neuron weight corresponding to the input gate mechanism, is the second state matrix of the t-1th layer, x t is the power data to be processed at the tth layer.
[0008] Optionally, determining the original feature by the output gate mechanism based on the first sub-feature and the second sub-feature includes: determining the original feature by the following formula: Among them, t is the original feature, σ3 is the third Sigmoid activation function, W oc is the neuron weight corresponding to the output gate mechanism, is the third state matrix of the t-1th layer, x t is the power data to be processed at the tth layer, b oc is the offset corresponding to the output gate mechanism, C t-1 is the updated feature of the t-1th layer, f tis the first sub-feature, C t0 is a predefined value, g t This is the second sub-feature.
[0009] Optionally, extracting the original features through the multi-head attention mechanism of the long short-term memory network model to obtain the target power features includes: determining the target power features through the following formula: Among them, b j is the target power characteristic, W (q) is the query matrix, C t is the updated feature of the tth layer, W (k) is the bond matrix, W (v) is the value matrix, d q,k is the dimension of the key vector, o t is the original feature.
[0010] Optionally, the predicted data includes predicted voltage data and predicted current data, and the withstand value includes a voltage withstand value corresponding to the predicted voltage data and a current withstand value corresponding to the predicted current data; determining the withstand value corresponding to the predicted data based on the predicted data, and determining that the power system is in an abnormal operating state in a future time period in response to determining that the withstand value satisfies a predetermined condition, includes: determining the voltage withstand value based on the predicted voltage data by the following formula: in, is the voltage withstand value, is the predicted voltage data of the node i to be predicted at the future time s, is the average of the upper and lower limits of the voltage of the ith node; based on the predicted current data, the current bearing value is determined by the following formula: Among them, E I I,s is the current carrying value, I l,s The predicted current data of the lth branch to be predicted at time s in the future, I l,N is the rated current of the lth line; in response to determining that the voltage withstand value is greater than a predetermined voltage value, and the current withstand value is greater than a predetermined current value, determining that the power system is in the abnormal operating state in the future time period.
[0011] Based on the same inventive concept, the present application also provides an abnormal operation status detection device for an electric power system, comprising: an acquisition module, configured to acquire electric power data in the electric power system; a first feature extraction module, configured to input the electric power data into a pre-trained long short-term memory network model, and perform feature extraction on the electric power data through the gating mechanism of the long short-term memory network model to obtain original features; a second feature extraction module, configured to perform feature extraction on the original features through the multi-head attention mechanism of the long short-term memory network model to obtain target electric power features; an output module, configured to output predicted data corresponding to the electric power data through the long short-term memory network model based on the target electric power features; a determination module, configured to determine a tolerance value corresponding to the predicted data based on the predicted data, and in response to determining that the tolerance value satisfies a predetermined condition, determine that the electric power system is in an abnormal operation state in a future time period.
[0012] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method as described above when executing the computer program.
[0013] Based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method as described above.
[0014] As can be seen from the above, the method and related equipment for detecting abnormal operation status of the power system provided by the present application include obtaining power data in the power system. The power data is input into a pre-trained long short-term memory network model, and the power data is feature extracted through the gating mechanism of the long short-term memory network model to obtain the original features, so as to achieve the purpose of preliminarily and accurately determining the features corresponding to the power data. The original features are feature extracted through the multi-head attention mechanism of the long short-term memory network model to obtain the target power features, so as to achieve the purpose of accurately determining the important features corresponding to the power data. Based on the target power features, the predicted data corresponding to the power data is output through the long short-term memory network model, thereby improving the accuracy of the predicted data. Based on the predicted data, the bearing value corresponding to the predicted data is determined, and in response to determining that the bearing value meets the predetermined conditions, it is determined that the power system is in an abnormal operation state in the future time period, and measures can be taken in time to prevent or reduce potential power failures, ensure the stable operation of the power system, and thus ensure the continuity and safety of power supply. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A schematic diagram of a flow chart of a method for detecting abnormal operation status of a power system according to an embodiment of the present application;
[0017] Figure 2 A schematic diagram of the input and output structure of a traditional long short-term memory network model of an embodiment of the present application;
[0018] Figure 3 A schematic diagram of a long short-term memory network model with a neuron structure according to an embodiment of the present application;
[0019] Figure 4 A schematic diagram of a long short-term memory network model with a multi-head attention mechanism according to an embodiment of the present application;
[0020] Figure 5 A schematic diagram of the structure of a device for detecting abnormal operation status of a power system according to an embodiment of the present application;
[0021] Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0023] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0024] As described in the background technology section, in modern power systems, with the popularization of distributed energy and the increased volatility of electricity demand, the operating status perception and risk assessment of the power system have become key links in maintaining the stability of the power grid. Distribution network operating status perception refers to the comprehensive understanding of the operating status of the power system through real-time monitoring and data analysis, including but not limited to the real-time values and historical trends of key parameters such as voltage, current, power, temperature, and the health status of the equipment. The purpose of state perception is to immediately discover any signs of deviation from normal operating conditions and provide basic data support for real-time monitoring and intelligent operation and maintenance of the power grid. Risk assessment is to further analyze and predict the risks that may occur in the operation of the power grid and their potential impact on the basis of state perception. It includes the identification, quantification and ranking of various threats to the safety, stability and economic operation of the power grid, such as equipment failure, line overload, voltage fluctuation, natural disasters, etc. Risk assessment usually uses probabilistic statistical methods, prediction models and expert systems, combined with historical fault data, weather forecasts, load forecasts and other information sources to determine the possibility of risk occurrence and the severity of the consequences, provide decision-making basis for power grid managers, and help them take preventive measures to reduce the probability and impact of risk occurrence.
[0025] Power system situation awareness technology is the basis for economical, reliable and safe operation of power systems. The real-time monitoring, analysis, evaluation and prediction of the future state of power system operation are important contents of situation awareness and risk assessment of intelligent power systems. Situation awareness technology can be divided into three stages: situation awareness, situation understanding and situation prediction. Situation awareness is essentially to monitor and obtain important data and key elements in the environment; situation understanding is to integrate the collected data and information, analyze the objects in the data and their behaviors and the relationship between objects; situation prediction is to further process the acquired data information on the basis of awareness and understanding, and predict and judge the future trend of change. Determine the possible future state change trend of the system, and then comprehensively evaluate the operation status of the power system, comprehensively and accurately control the operation situation of the power system, and provide a reference basis for the distribution dispatching and control personnel to carry out dispatching work.
[0026] In the existing technical solutions, the awareness of distribution network operation status in order to capture the changes in the operation status of the active power system mainly relies on two categories of time series prediction methods. The first category is based on mathematical tools and statistical analysis, such as Kalman filtering, autoregression and autoregressive moving average models. They are good at processing linear and static time series, but have limited prediction effects on complex dynamic systems. The second category relies on artificial intelligence algorithms, such as extreme learning machines, support vector machines and various neural networks, especially traditional long and short-term memory networks. The latter has outstanding performance in time series prediction in the power industry due to its excellent self-learning ability and nonlinear mapping characteristics, and has become one of the most widely used models. However, although these methods have improved the prediction accuracy to a certain extent, their performance still needs to be improved when facing extreme conditions or data sparse situations, and how to effectively integrate multivariate information to achieve more accurate situation awareness and risk assessment is still a key issue that needs to be solved.
[0027] In particular, the traditional long short-term memory network (LSTM) has been widely used in power system operation situation awareness and risk assessment due to its outstanding performance in processing time series data, but its limitations cannot be ignored. Although a single LSTM model can provide relatively accurate prediction results in the short term, it is difficult to effectively process long time series, especially when facing high-dimensional feature data, its information mining ability is relatively weak, resulting in a decrease in prediction accuracy. To overcome this limitation, in recent years, researchers have tried to combine convolutional neural networks (CNN) with LSTM, extracting features and reducing dimensions of data through the convolutional layer and pooling layer of CNN, and then inputting the results into LSTM for prediction. However, although this fusion strategy can enhance the feature extraction ability of the model in theory, it may face new challenges in actual operation. Specifically, the feature extraction process of CNN may lead to the loss of some key information, especially when processing complex and changeable power system data, some detailed features that are critical to prediction may be mistakenly regarded as redundant information and filtered out, thereby affecting the accuracy of the overall prediction. In addition, the combination of CNN and LSTM increases the complexity of the model, which not only increases the computational cost, but also may introduce additional error sources, further weakening the reliability and practicality of the model in real-time monitoring and risk assessment scenarios. Therefore, how to effectively avoid the loss of key feature information and reduce computing resource consumption while maintaining the prediction accuracy of the model has become an urgent problem to be solved. It is necessary to explore more efficient, accurate and robust distribution network operation situation awareness and risk assessment methods.
[0028] In view of this, the present application embodiment proposes a method for detecting abnormal operation status of a power system, referring to Figure 1 , including the following steps:
[0029] Step 101: Acquire power data in the power system.
[0030] In this step, the stability and reliability of the power system affect the development of all walks of life. It is very important that the power system is always in a normal operating state. Therefore, the prediction of the operating state of the power system is essential. The power data in the power system can reflect the operating state of the power system. Therefore, the power data in the power system must be obtained first. The power data is the power data of a predetermined historical time period. Through the above power data, the power data of the future time period corresponding to the predetermined historical time period can be predicted. For example, the power data of June last year can be used to predict the power data of June this year.
[0031] Step 102: input the power data into a pre-trained long short-term memory network model, extract features from the power data through a gating mechanism of the long short-term memory network model, and obtain original features.
[0032] In this step, feature extraction is an important step in the artificial intelligence algorithm. It starts with a set of initial measurement data and promotes subsequent learning and generalization steps by constructing derived values (features) that are intended to provide information and are non-redundant. In order to better understand and analyze power data, the power data is input into a pre-trained long short-term memory network model, and the gating mechanism of the long short-term memory network model is used to extract features from the power data to obtain the original features. It should be noted that the pre-constructed long short-term memory network model in this application is different from the traditional long short-term memory network model. The input and output structures of the traditional long short-term memory network model are as follows: Figure 2 As shown, all hidden layers are composed of LSTM neurons. Figure 3 A long short-term memory network model with a neuron structure is shown. The traditional long short-term memory network model is designed to solve the gradient vanishing and gradient exploding problems of the traditional RNN when processing long sequence data. The gating mechanism can capture and remember important contexts. This ability enables the traditional long short-term memory network model to perform well when processing data with long-term dependencies. However, when facing high-dimensional data, the information mining ability of the traditional long short-term memory network model is relatively weak, resulting in the failure to accurately mine not only the important features corresponding to the high-dimensional data, but also the irrelevant features corresponding to the high-dimensional data. Since the power data includes relatively many attributes, the power data belongs to high-dimensional data. The original features obtained by extracting the features of the power data through the gating mechanism include not only the important features corresponding to the power data, but also the irrelevant features corresponding to the power data. Therefore, the power data is feature extracted through the gating mechanism to achieve the purpose of preliminarily and accurately determining the features corresponding to the power data.
[0033] Step 103, extracting the original features through the multi-head attention mechanism of the long short-term memory network model to obtain target power features.
[0034] In this step, the multi-head attention mechanism allows the LSTM network model to focus on different features of the input sequence from different angles at the same time, and each head is responsible for processing a specific aspect of the input, thereby enhancing the understanding of complex dependencies. The advantages of the multi-head attention mechanism for feature extraction mainly include capturing information diversity, improving parallel computing efficiency, enhancing model expression ability, enhancing robustness, and easy optimization. Integrating the multi-head attention mechanism into the LSTM network model can help the LSTM network model better capture the long-distance dependencies in the matching operation sequence and improve its ability to process high-dimensional feature data. As the amount of data in the deep learning model increases, the corresponding features will also increase. Therefore, a multi-head attention mechanism that simulates the human brain process is proposed to improve the ability of the neural network to process information. The essence is to use the learning ability of the attention mechanism to quantify the correlation between the corresponding prediction target and different feature values. This can not only provide the learning efficiency of the neural network, but also reduce the prediction error, so that the traditional LSTM network model can more accurately capture and utilize the key information in the historical data after combining the attention mechanism, thereby greatly improving the prediction accuracy. Therefore, the multi-head attention mechanism can accurately extract relatively important features, namely the target power features, from the original features, so as to achieve the purpose of accurately determining the important features corresponding to the power data.
[0035] Step 104: Based on the target power characteristics, output prediction data corresponding to the power data through the long short-term memory network model.
[0036] In this step, the target power characteristics reflect the important characteristics of the power data, and then the long short-term memory network model can accurately classify the target power characteristics to obtain the prediction data corresponding to the power data, where the prediction data is the power data for the future time period. The prediction data is output by the long short-term memory network model, which improves the accuracy of the prediction data.
[0037] Step 105 , based on the prediction data, determining a tolerance value corresponding to the prediction data, and in response to determining that the tolerance value satisfies a predetermined condition, determining that the power system is in an abnormal operating state in a future time period.
[0038] In this step, if the power data exceeds the value that the power system can bear, it will cause abnormal operation of the power system. The predicted data is the power data of the future time period. Through the predicted data, it can be known whether the power system will operate abnormally in the future time period. First, based on the predicted data, the bearing value corresponding to the predicted data is determined, and the bearing value reflects the maximum bearing capacity of the power system. Secondly, it is determined whether the bearing value meets the predetermined conditions. When the bearing value meets the predetermined conditions, it means that the bearing value exceeds the maximum bearing capacity of the power system, and it is determined that the power system is in an abnormal operating state in the future time period. By accurately predicting the operating status of the power system in the future time period, timely measures can be taken to prevent or reduce potential power failures and ensure the stable operation of the power system, thereby ensuring the continuity and safety of power supply.
[0039] It should be noted that the power data obtained in this application can not only monitor the operating status of the power system in real time and detect anomalies, but also predict possible future risks by building a long-short term memory network model, thereby achieving closed-loop management from state perception to risk assessment. Compared with traditional manual monitoring, this method can significantly improve the accuracy and response speed of monitoring, reduce false alarms and missed alarms, and reduce operation and maintenance costs, providing strong technical support for the safe, reliable and efficient operation of the power system. The overall goal is to build a more intelligent, efficient and accurate power system operation situation awareness and risk assessment framework to meet the increasingly complex challenges of power grid operations.
[0040] Through the above scheme, the power data in the power system is obtained. The power data is input into a pre-trained long short-term memory network model, and the power data is feature extracted through the gating mechanism of the long short-term memory network model to obtain the original features, so as to achieve the purpose of preliminarily and accurately determining the features corresponding to the power data. The original features are feature extracted through the multi-head attention mechanism of the long short-term memory network model to obtain the target power features, so as to achieve the purpose of accurately determining the important features corresponding to the power data. Based on the target power features, the predicted data corresponding to the power data is output through the long short-term memory network model, thereby improving the accuracy of the predicted data. Based on the predicted data, the tolerance value corresponding to the predicted data is determined. In response to determining that the tolerance value meets the predetermined conditions, it is determined that the power system is in an abnormal operating state in the future time period, and measures can be taken in time to prevent or reduce potential power failures, ensure the stable operation of the power system, and thus ensure the continuity and safety of power supply.
[0041] In some embodiments, the gating mechanism includes a forget gate mechanism, an input gate mechanism and an output gate mechanism; the feature extraction of the power data through the gating mechanism of the long short-term memory network model to obtain the original feature includes: extracting the first sub-feature corresponding to the power data through the forget gate mechanism; extracting the second sub-feature corresponding to the power data through the input gate mechanism; based on the first sub-feature and the second sub-feature, determining the original feature through the output gate mechanism.
[0042] In this embodiment, the forget gate mechanism can determine which information is outdated or unimportant based on the current input information, and delete it from the memory unit, thereby avoiding the accumulation and interference of information. Therefore, the first sub-feature corresponding to the power data can be accurately extracted through the forget gate mechanism. The role of the input gate is not limited to simply adding new information, it also involves the screening and filtering of old information to ensure that only important information is retained. This mechanism helps the model to effectively integrate and use relevant information when processing complex tasks, thereby improving the performance and accuracy of the model. Therefore, the second sub-feature corresponding to the power data can be accurately extracted through the input gate mechanism. The output gate determines which information in the first sub-feature and the second sub-feature should be output and which information should be discarded, reducing the problem of too many features and effectively preventing the gradient message or explosion problem caused by information retention.
[0043] In some embodiments, extracting the first sub-feature corresponding to the power data by using the forget gate mechanism includes: extracting the first sub-feature corresponding to the power data by using the following formula: Among them, f t is the first sub-feature, σ1 is the first Sigmoid activation function, W ft is the neuron weight corresponding to the forget gate mechanism, is the first state matrix of the t-1th layer, x t is the power data to be processed at the tth layer, C t-1 is the updated feature of the t-1th layer, b ft is the neuron bias corresponding to the forget gate mechanism.
[0044] In this embodiment, the forget gate mechanism is a key component in the long short-term memory network model. Its main function is to determine which information should be retained and which information should be forgotten based on the current input and the output state of the previous moment. This mechanism enables the long short-term memory network model to effectively screen and memorize important information when processing sequence data, thereby improving the prediction and memory capabilities of the model. Specifically, the forget gate mechanism uses the Sigmoid function to generate a value between 0 and 1, where 0 means complete forgetting and 1 means complete retention. The forget gate mechanism needs to calculate the correlation between the historical state matrix and the current input data, as well as the impact of the updated features of the previous moment on the current input data, to determine whether to allow the historical state matrix to flow into the current state. By dynamically adjusting the retention and forgetting of information, the long short-term memory network model can better adapt to the dynamic changes of data, thereby improving prediction accuracy and performance.
[0045] In some embodiments, extracting the second sub-feature corresponding to the power data through the input gate mechanism includes: extracting the second sub-feature corresponding to the power data through the following formula: Among them, g t is the second sub-feature, σ2 is the second Sigmoid activation function, b g is the offset corresponding to the input gate mechanism, W g is the neuron weight corresponding to the input gate mechanism, is the second state matrix of the t-1th layer, x t is the power data to be processed at the tth layer.
[0046] In this embodiment, the input gate mechanism is a key component in the LSTM network model, which determines how much of the input information of the current time step will be added to the long-term memory of the next time step. This process involves screening and processing the input information to ensure that only relevant and important information is retained, thereby enhancing the memory capacity of the LSTM network model and the accuracy of data processing. Specifically, the role of the input gate is to compress the function value to a threshold between (0,1) through an activation function. When the function value is close to 1, it means that more information is retained, and when the function value is close to 0, it means that less information is retained.
[0047] In some embodiments, determining the original feature through the output gate mechanism based on the first sub-feature and the second sub-feature includes: determining the original feature through the following formula: Among them, t is the original feature, σ3 is the third Sigmoid activation function, W oc is the neuron weight corresponding to the output gate mechanism, is the third state matrix of the t-1th layer, x t is the power data to be processed at the tth layer, b oc is the offset corresponding to the output gate mechanism, C t-1 is the updated feature of the t-1th layer, f t is the first sub-feature, C t0 is a predefined value, g t This is the second sub-feature.
[0048] In this embodiment, the output gate mechanism is responsible for controlling the output of information in the memory unit. Through the formula corresponding to the output gate mechanism, the input data can be effectively utilized to enable the long short-term memory network model to have a long sequence of memory functions, thereby better capturing the features in the data. The output gate mechanism is divided into two parts: one is the output gate weight: which determines which information should be stored, and the other is the candidate memory unit: which contains the measurement information that needs to be added to the model. Specifically, the output gate formula realizes the screening and output of information in the memory unit by calculating the external state at the current moment. This process helps to extract and strengthen the key features in the data and improve the effect of data analysis. The formula corresponding to the output gate mechanism includes the predefined value C t0 , it can update the state of the memory unit according to the information of the forget gate and the input gate. In addition, the formula of the output gate also involves the use of the forget gate and the input gate. Using these gating mechanisms together, the long short-term memory network model can retain important historical information when processing sequence data, and adjust the memory content according to the current input, so as to better adapt to different data feature extraction requirements.
[0049] In some embodiments, extracting the original features through the multi-head attention mechanism of the long short-term memory network model to obtain the target power features includes: determining the target power features through the following formula: Among them, b j is the target power characteristic, W (q) is the query matrix, C t is the updated feature of the tth layer, W (k) is the bond matrix, W (v) is the value matrix, d q,k is the dimension of the key vector, o t is the original feature.
[0050] In this embodiment, the core of the multi-head attention mechanism is that multiple independent attention heads work in parallel, and each head can learn different dimensional features and information of the data. Specifically, the multi-head attention mechanism calculates the attention weights at each position of the sentence during the encoding process, and then calculates the implicit vector representation of the entire sentence in the form of the sum of weights. This mechanism solves the defect that the self-attention mechanism may over-focus on its own position when encoding the information at the current position, and processes information in parallel through multiple attention heads, thereby improving the performance and accuracy of the model.
[0051] Compared with the traditional LSTM network model, the attention mechanism can improve the calculation speed in model training. However, when the attention mechanism establishes a weight matrix for the entire input and the shape of the weight matrix is equal to the input, an overly large weight matrix will lead to too many matrix inner product calculations, reducing the calculation efficiency. In order to further speed up the calculation speed, a multi-head attention mechanism is introduced and integrated into the structure of the LSTM network model, such as Figure 4 As shown. Taking x1 as an example, we get three attention heads b1 1 , b1 2 ,b1 3 To get the output, connect the multi-head to the end-to-end vector, and then use linear transformation to get the output b1 1 , and a single-layer fully connected structure without nonlinear active layers is obtained. The calculation process of other input nodes in the input vector is the same, and the weight matrix is shared among all input nodes to obtain the output of the multi-head attention mechanism, which is then set as the input of the long short-term memory network model.
[0052] In some embodiments, the predicted data includes predicted voltage data and predicted current data, and the withstand value includes a voltage withstand value corresponding to the predicted voltage data and a current withstand value corresponding to the predicted current data; determining the withstand value corresponding to the predicted data based on the predicted data, and determining that the power system is in an abnormal operating state in a future time period in response to determining that the withstand value satisfies a predetermined condition, includes: determining the voltage withstand value based on the predicted voltage data by the following formula: in, is the voltage withstand value, is the predicted voltage data of the node i to be predicted at the future time s, is the average of the upper and lower limits of the voltage of the ith node; based on the predicted current data, the current bearing value is determined by the following formula: Among them, E I I,s is the current carrying value, I l,s The predicted current data of the lth branch to be predicted at time s in the future, I l,Nis the rated current of the lth line; in response to determining that the voltage withstand value is greater than a predetermined voltage value, and the current withstand value is greater than a predetermined current value, determining that the power system is in the abnormal operating state in the future time period.
[0053] In this embodiment, in view of the voltage over-limit problem that may be caused by the node voltage change, a voltage bearing value is proposed to reflect the future change trend of the voltage of each node in the power system. The voltage bearing value is calculated by a formula, and the voltage bearing value of the power system is digitized to improve the efficiency and accuracy of data processing. The upper and lower limits of the predicted voltage data in the formula are taken as 1.07 and 0.95 respectively. In view of the overload safety problem of branch current, the utility risk theory and the idea of continuous piecewise function are used to propose a current bearing value to reflect the future change trend of each branch. The current bearing value is calculated by a formula, and the electric withstand value of the power system is digitized to improve the efficiency and accuracy of data processing. The voltage bearing value and the current bearing value can comprehensively and accurately reflect the operating status of the power system, providing strong data support for risk assessment and decision support. When the voltage bearing value is greater than the predetermined voltage value and the current bearing value is greater than the predetermined current value, it means that the power system is overloaded in the future time period, and then it is determined that the power system is in an abnormal operating state in the future time period. Relevant personnel conduct power regulation in time to ensure that the power system is always in normal operation. It should be noted that this embodiment uses the predicted data as input for power flow calculation to obtain the future operating status of the power system; then, indicators such as node voltage tolerance value, branch current tolerance value and node voltage / branch current fluctuation coefficient are used to characterize and analyze the future operating status of the power system from two different levels: nodes and branches.
[0054] In another embodiment provided in the present application, in order to verify the prediction performance of the method proposed in the present application, the proposed method is compared with the traditional long short-term memory network model (LSTM), and the wind power prediction results and load prediction results of each model, and the prediction performance are shown in Table 1 and Table 2. Table 1 and Table 2 show that the method proposed in the present application has excellent prediction performance.
[0055] Table 1 Comparison of evaluation indicators of wind power prediction results
[0056]
[0057] Table 2 Comparison of evaluation indicators of load forecasting results
[0058]
[0059] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0060] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0061] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a device for detecting abnormal operation status of a power system.
[0062] refer to Figure 5 , the power system operation status abnormality detection device comprises:
[0063] The acquisition module 10 is configured to acquire power data in the power system.
[0064] The first feature extraction module 20 is configured to input the power data into a pre-trained long short-term memory network model, extract features from the power data through the gating mechanism of the long short-term memory network model, and obtain original features.
[0065] The second feature extraction module 30 is configured to extract the original features through the multi-head attention mechanism of the long short-term memory network model to obtain the target power features.
[0066] The output module 40 is configured to output prediction data corresponding to the power data through the long short-term memory network model based on the target power characteristics.
[0067] The determination module 50 is configured to determine a tolerance value corresponding to the prediction data based on the prediction data, and in response to determining that the tolerance value satisfies a predetermined condition, determine that the power system is in an abnormal operating state in a future time period.
[0068] Through the above-mentioned device, the power data in the power system is obtained. The power data is input into a pre-trained long short-term memory network model, and the power data is feature extracted through the gating mechanism of the long short-term memory network model to obtain the original features, so as to achieve the purpose of preliminarily and accurately determining the features corresponding to the power data. The original features are feature extracted through the multi-head attention mechanism of the long short-term memory network model to obtain the target power features, so as to achieve the purpose of accurately determining the important features corresponding to the power data. Based on the target power features, the predicted data corresponding to the power data is output through the long short-term memory network model, thereby improving the accuracy of the predicted data. Based on the predicted data, the tolerance value corresponding to the predicted data is determined. In response to determining that the tolerance value meets the predetermined conditions, it is determined that the power system is in an abnormal operating state in the future time period, and measures can be taken in time to prevent or reduce potential power failures, ensure the stable operation of the power system, and thus ensure the continuity and safety of power supply.
[0069] In some embodiments, the first feature extraction module 20 is further configured such that the gating mechanism includes a forget gate mechanism, an input gate mechanism and an output gate mechanism; the first sub-feature corresponding to the power data is extracted through the forget gate mechanism; the second sub-feature corresponding to the power data is extracted through the input gate mechanism; based on the first sub-feature and the second sub-feature, the original feature is determined through the output gate mechanism.
[0070] In some embodiments, the first feature extraction module 20 is further configured to extract the first sub-feature corresponding to the power data by using the following formula: Among them, f t is the first sub-feature, σ1 is the first Sigmoid activation function, W ft is the neuron weight corresponding to the forget gate mechanism, is the first state matrix of the t-1th layer, x t is the power data to be processed at the tth layer, C t-1 is the updated feature of the t-1th layer, b ft is the neuron bias corresponding to the forget gate mechanism.
[0071] In some embodiments, the first feature extraction module 20 is further configured to extract the second sub-feature corresponding to the power data by using the following formula: Among them, g t is the second sub-feature, σ2 is the second Sigmoid activation function, b g is the offset corresponding to the input gate mechanism, W g is the neuron weight corresponding to the input gate mechanism, is the second state matrix of the t-1th layer, xt is the power data to be processed at the tth layer.
[0072] In some embodiments, the first feature extraction module 20 is further configured to determine the original feature by the following formula: Among them, t is the original feature, σ3 is the third Sigmoid activation function, W oc is the neuron weight corresponding to the output gate mechanism, is the third state matrix of the t-1th layer, x t is the power data to be processed at the tth layer, b oc is the offset corresponding to the output gate mechanism, C t-1 is the updated feature of the t-1th layer, f t is the first sub-feature, C t0 is a predefined value, g t This is the second sub-feature.
[0073] In some embodiments, the second feature extraction module 30 is further configured to determine the target power feature by the following formula: Among them, b j is the target power characteristic, W (q) is the query matrix, C t is the updated feature of the tth layer, W (k) is the bond matrix, W (v) is the value matrix, d q,k is the dimension of the key vector, o t is the original feature.
[0074] In some embodiments, the determination module 50 is further configured such that the predicted data includes predicted voltage data and predicted current data, the withstand value includes a voltage withstand value corresponding to the predicted voltage data and a current withstand value corresponding to the predicted current data; based on the predicted voltage data, the voltage withstand value is determined by the following formula: in, is the voltage withstand value, is the predicted voltage data of the node i to be predicted at the future time s, is the average of the upper and lower limits of the voltage of the ith node; based on the predicted current data, the current bearing value is determined by the following formula: Among them, E I I,s is the current carrying value, I l,s The predicted current data of the lth branch to be predicted at time s in the future, I l,Nis the rated current of the lth line; in response to determining that the voltage withstand value is greater than a predetermined voltage value, and the current withstand value is greater than a predetermined current value, determining that the power system is in the abnormal operating state in the future time period.
[0075] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0076] The device of the above embodiment is used to implement the corresponding method for detecting abnormal operation status of the power system in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0077] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for detecting abnormal operating status of the power system as described in any of the above embodiments is implemented.
[0078] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0079] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0080] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0081] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0082] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0083] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0084] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0085] The electronic device of the above embodiment is used to implement the corresponding method for detecting abnormal operation status of the power system in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0086] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for detecting abnormal operating status of the power system as described in any of the above embodiments.
[0087] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0088] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method for detecting abnormal operation status of the power system as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0089] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the method for detecting abnormal operating status of the power system as described in any of the above embodiments, which has the beneficial effects of the corresponding method embodiments and will not be repeated here.
[0090] It should be noted that the embodiments of the present application can be further described in the following manner:
[0091] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0092] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0093] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0094] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0095] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0096] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0097] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0098] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A method for detecting abnormal operation status of a power system, characterized in that: include: Obtain power data in the power system; Inputting the power data into a pre-trained long short-term memory network model, extracting features of the power data through a gating mechanism of the long short-term memory network model to obtain original features; Extracting the original features through the multi-head attention mechanism of the long short-term memory network model to obtain target power features; Based on the target power characteristics, outputting prediction data corresponding to the power data through the long short-term memory network model; Based on the prediction data, a tolerance value corresponding to the prediction data is determined, and in response to determining that the tolerance value satisfies a predetermined condition, it is determined that the power system is in an abnormal operating state in a future time period.
2. The method according to claim 1, characterized in that The gating mechanism includes a forget gate mechanism, an input gate mechanism and an output gate mechanism; The feature extraction of the power data by the gating mechanism of the long short-term memory network model to obtain the original features includes: Extracting the first sub-feature corresponding to the power data through the forget gate mechanism; Extracting a second sub-feature corresponding to the power data through the input gate mechanism; Based on the first sub-feature and the second sub-feature, the original feature is determined through the output gate mechanism.
3. The method according to claim 2, wherein the step of extracting the first sub-feature corresponding to the power data through the forget gate mechanism comprises: The first sub-feature corresponding to the power data is extracted by the following formula: f t =σ1(W ft [h 1t-1 ,x t ,C t-1 ]+b ft ), Among them, f t is the first sub-feature, σ1 is the first Sigmoid activation function, W ft is the neuron weight corresponding to the forget gate mechanism, h 1t-1 is the first state matrix of the t-1th layer, x t is the power data to be processed at the tth layer, C t-1 is the updated feature of the t-1th layer, b ft is the neuron bias corresponding to the forget gate mechanism.
4. The method according to claim 2, wherein the step of extracting the second sub-feature corresponding to the power data through the input gate mechanism comprises: The second sub-feature corresponding to the power data is extracted by the following formula: g t =σ2(b g +W g [h 2t-1 ,x t ]), Among them, g t is the second sub-feature, σ2 is the second Sigmoid activation function, b g is the offset corresponding to the input gate mechanism, W g is the neuron weight corresponding to the input gate mechanism, is the second state matrix of the t-1th layer, x t is the power data to be processed at the tth layer.
5. The method according to claim 2, wherein the determining the original feature through the output gate mechanism based on the first sub-feature and the second sub-feature comprises: The original feature is determined by the following formula: Among them, t is the original feature, σ3 is the third Sigmoid activation function, W oc is the neuron weight corresponding to the output gate mechanism, is the third state matrix of the t-1th layer, x t is the power data to be processed at the tth layer, b oc is the offset corresponding to the output gate mechanism, C t-1 is the updated feature of the t-1th layer, f t is the first sub-feature, C t0 is a predefined value, g t This is the second sub-feature.
6. The method according to claim 1, characterized in that The extracting the original features through the multi-head attention mechanism of the long short-term memory network model to obtain the target power features includes: The target power characteristic is determined by the following formula: Among them, b j is the target power characteristic, W (q) is the query matrix, C t is the updated feature of the tth layer, W (k) is the bond matrix, W (v) is the value matrix, d q,k is the dimension of the key vector, o t is the original feature.
7. The method according to claim 1, characterized in that The predicted data includes predicted voltage data and predicted current data, and the tolerance value includes a voltage tolerance value corresponding to the predicted voltage data and a current tolerance value corresponding to the predicted current data; The determining, based on the prediction data, a tolerance value corresponding to the prediction data, and in response to determining that the tolerance value satisfies a predetermined condition, determining that the power system is in an abnormal operating state in a future time period, includes: Based on the predicted voltage data, the voltage tolerance value is determined by the following formula: in, is the voltage withstand value, is the predicted voltage data of the node i to be predicted at the future time s, is the mean of the upper and lower limits of the voltage at the i-th node; Based on the predicted current data, the current bearing value is determined by the following formula: Among them, E I I,s is the current carrying value, I l,s The predicted current data of the lth branch to be predicted at time s in the future, I l,N is the rated current of the lth circuit; In response to determining that the voltage withstand value is greater than a predetermined voltage value and the current withstand value is greater than a predetermined current value, it is determined that the power system is in the abnormal operating state in the future time period.
8. A device for detecting abnormal operation status of a power system, characterized in that: include: An acquisition module, configured to acquire power data in the power system; A first feature extraction module is configured to input the power data into a pre-trained long short-term memory network model, extract features from the power data through a gating mechanism of the long short-term memory network model, and obtain original features; A second feature extraction module is configured to extract the original features through the multi-head attention mechanism of the long short-term memory network model to obtain target power features; an output module, configured to output prediction data corresponding to the power data through the long short-term memory network model based on the target power characteristics; The determination module is configured to determine a tolerance value corresponding to the prediction data based on the prediction data, and in response to determining that the tolerance value meets a predetermined condition, determine that the power system is in an abnormal operating state in a future time period.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Power failure early warning method and system based on convolutional long short-term memory network
CN112949947A
Voice endpoint detection method and system based on long short-term memory network
CN112967739A
Method and system for visually sensing power grid situation
CN116780503A
Short-term power load prediction method and system based on GAT-LSTM, storage medium and computer
CN117787073A
Data dual-drive method, apparatus, and device for predicting power grid failure during typhoon
WO2023045278A1
Cited By
Power system source load prediction-oriented pre-training model construction method
CN120012957A
Equipment model and state determination method and device, electronic equipment and storage medium
CN120974354A
