Dynamic power flow mask self-supervision training method and device
By calculating the importance index and self-supervised learning model of the power grid nodes, the key nodes are dynamically selected for trend calculation, which solves the problems of low computing efficiency and insufficient accuracy in traditional methods, and realizes the efficiency and accuracy of power grid trend calculation, and supports the stable operation of the power grid.
Patent Information
- Application Number
- CN202510476576.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-08-01
AI Technical Summary
Traditional trend computing methods are large in computing and low in efficiency in large-scale power grids, making it difficult to deal with changes in power grid state in real time, and lack accuracy and interpretability.
By calculating the importance index of power grid nodes, dynamically generate masks, building a self-supervised learning model, optimizing trend calculations, using deep neural networks for training, and adaptively selecting key nodes for trend calculations.
It improves the efficiency and accuracy of power grid trend calculation, reduces dependence on labeled data, enhances the reliability and security of power grid operation, and supports real-time scheduling and optimization of smart grids.
Smart Images

Figure CN120409600A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power system power flow calculation, and in particular to a dynamic power flow mask self-supervised training method and device. Background Art
[0002] With the continuous expansion of the scale of the power system and the rapid development of intelligent technologies, the complexity of power grid operation and the requirements for real-time scheduling and monitoring are also increasing. In the process of power grid scheduling and optimization, power flow calculation, as one of the core technologies, directly affects the stability, economy and reliability of the power grid. Traditional power flow calculation methods usually rely on numerical calculations based on physical models. Although these methods are accurate, they have a large amount of calculation in large-scale power grid systems and are difficult to respond to changes in power grid states in real time.
[0003] Power grid power flow calculation is a fundamental problem in power system analysis, aiming to calculate parameters such as the voltage and power flow of each node in the power grid. However, with the continuous increase in the scale of the power grid, traditional power flow calculation methods based on physical models face problems such as low calculation efficiency and difficulty in dealing with complex power grid topologies. In addition, the operating state of the power grid is affected by various factors, such as load fluctuations, equipment failures, and network topology changes, which makes real-time power flow calculation even more complex. How to improve the calculation efficiency while ensuring the calculation accuracy and being able to adapt to the dynamic changes of the power grid state has become an important research direction. Existing power grid power flow calculation methods still face many challenges, especially in terms of accuracy, efficiency and interpretability. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a dynamic power flow mask self-supervised training method and device, which perform self-supervised training through existing power flow data files to improve the efficiency and accuracy of power grid power flow calculation.
[0005] The present invention adopts the following technical solutions to solve the above technical problems:
[0006] In a first aspect, a dynamic power flow mask self-supervised training method according to the present invention includes:
[0007] Calculating the importance index of all power flow calculation nodes in the power grid, where the importance index I i of the i-th power flow calculation node in the power grid is calculated as follows: According to the load P i of the i-th power flow calculation node in the power grid, the power generation capacity G i , and the number N i of power equipment connected to the i-th power flow calculation node, perform weighted calculation to calculate I i , 1 ≤ i ≤ I, where I is the total number of all power flow calculation nodes in the power grid;
[0008] Based on I i Dynamically generate a mask M for each power flow calculation node i ;
[0009] Construct a self-supervised learning model for power flow calculation;
[0010] According to M i Calculate the power flow prediction value of the i-th power flow calculation node And Compare with the known true power flow results To obtain the loss function L;
[0011] Train the self-supervised learning model for power flow calculation by minimizing the loss function L to optimize power flow calculation and the mask;
[0012] Use the trained self-supervised learning model for power flow calculation to perform power flow calculation.
[0013] As a further optimization scheme of the dynamic power flow mask self-supervised training method described in the present invention, the self-supervised learning model for power flow calculation takes the power flow data of the power grid nodes as input and predicts the unknown power flow data of each power grid node, where the power flow data includes node load, power generation, voltage, and power flow.
[0014] As a further optimization scheme of the dynamic power flow mask self-supervised training method described in the present invention,
[0015] I i = αP i + βG i + γN i
[0016] where α, β, and γ are all weight coefficients.
[0017] As a further optimization scheme of the dynamic power flow mask self-supervised training method described in the present invention,
[0018]
[0019] where θ is a threshold.
[0020] As a further optimization scheme of the dynamic power flow mask self-supervised training method described in the present invention,
[0021]
[0022] As a further optimization scheme of the dynamic power flow mask self-supervised training method described in the present invention,
[0023] The self-supervised learning model for power flow calculation is a deep neural network model, which is trained through historical power flow data. The self-supervised learning model for power flow calculation is trained by the backpropagation algorithm, so that the mask selection and power flow calculation accuracy are automatically optimized during the process of minimizing the loss function L; the power flow calculation includes the voltage amplitude, phase angle, and power flow of the power grid nodes.
[0024] As a further optimization scheme of the dynamic power flow mask self-supervised training method described in the present invention, when M i is 1, M i participates in the power flow calculation; when M i is 0, M i does not participate in the power flow calculation.
[0025] In a second aspect, a dynamic power flow mask self-supervised training device includes:
[0026] A node importance calculation module, which is used to calculate the importance index of all power flow calculation nodes in the power grid. Among them, the importance index I i of the i-th power flow calculation node in the power grid is calculated as follows: based on the load P i of the i-th power flow calculation node in the power grid, the power generation capacity G i , and the number N i of power equipment connected to the i-th power flow calculation node, perform weighted calculation to calculate I i , 1 ≤ i ≤ I, where I is the total number of all power flow calculation nodes in the power grid;
[0027] A mask selection module, which is used to dynamically generate a mask M i for each power flow calculation node based on I i ;
[0028] A self-supervised training module, which is used to construct a self-supervised learning model for power flow calculation, calculate the power flow prediction value i of the i-th power flow calculation node according to M and compare it with the known true power flow result to obtain the loss function L; train the self-supervised learning model for power flow calculation by minimizing the loss function L to optimize the power flow calculation and the mask; use the trained self-supervised learning model for power flow calculation.
[0029] In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the steps of the dynamic power flow mask self-supervised training method as described in the first aspect or any corresponding implementation manner thereof.
[0030] Fourthly, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the steps of the dynamic power flow mask self-supervised training method as described in the first aspect or any corresponding embodiment thereof above.
[0031] Compared with the prior art, the present invention adopts the above technical solutions and has the following technical effects:
[0032] (1) By calculating the importance index of each node, the present invention dynamically selects key nodes to participate in the power flow calculation, and combines self-supervised learning to optimize the power flow prediction model, reducing redundant calculations and improving the calculation speed.
[0033] (2) At the same time, self-supervised learning is adopted to reduce the dependence on a large amount of labeled data, enhance the reliability and security of power grid operation, and provide effective support for the real-time scheduling and optimization of smart grids and large-scale power systems.
[0034] (3) The present invention aims to improve the accuracy and efficiency of power grid power flow calculation. Description of the Drawings
[0035] Figure 1 The dynamic power flow mask process based on node importance using the method proposed in the present invention;
[0036] Figure 2 The power flow mask voltage calculation result after using the method proposed in the present invention;
[0037] Figure 3 The power flow mask line load rate calculation result after using the method proposed in the present invention. Detailed Embodiments
[0038] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be described in detail below with reference to the drawings and specific embodiments.
[0039] Self-supervised learning is a new machine learning method that can enable the model to self-learn and optimize by designing specific tasks without the need for a large amount of manually labeled data. In power grid power flow calculation, self-supervised learning is expected to train the model by self-generating learning signals, so as to achieve accurate prediction of the power grid state. Compared with traditional supervised learning methods, self-supervised learning can reduce the dependence on labeled data and the cost of data collection and labeling. In addition, by combining the importance index of power grid nodes, key nodes affecting power flow calculation can be selectively targeted to improve the accuracy and efficiency of power flow calculation.
[0040] In view of the problems mentioned in the background art, there are still many challenges in the existing power grid power flow calculation methods, especially in terms of accuracy, efficiency, and interpretability. In this context, the present invention proposes a dynamic power flow mask self-supervised training method based on node importance indicators, combining self-supervised learning and node importance analysis to improve the efficiency and accuracy of power grid power flow calculation and effectively solve the interpretability problem in traditional methods. By adaptively selecting key nodes and using multi-source data fusion, power flow calculation can be carried out more accurately and efficiently, providing reliable support for the safe and stable operation of the power grid.
[0041] The present invention performs self-supervised training through existing power flow data files to improve the efficiency and accuracy of power grid power flow calculation. The method includes the following steps:
[0042] Figure 1 It is a flowchart for implementing the strategy proposed by the present invention. The method includes the following steps:
[0043] Step 1: Calculate the importance indicators of all power flow calculation nodes in the power grid;
[0044] (1) Select the i-th power flow calculation node in the power grid;
[0045] (2) Calculate the importance indicator I i of the i-th power flow calculation node in the power grid according to the load P i , power generation capacity G i , and the number N i of power equipment connected to the i-th power flow calculation node, etc., and perform weighted calculation. The formula is
[0046] I i = αP i + βG i + γN i
[0047] where α, β, and γ are all weight coefficients;
[0048] (3) Traverse the power flow calculation nodes to calculate the importance indicators of all power flow calculation nodes in the power grid;
[0049] Step 2: Dynamically generate node masks
[0050] (1) Set a threshold θ according to I i to judge the relative importance of the nodes.
[0051] (2) Generate a mask M i for each node according to I i , where:
[0052]
[0053] (3) Dynamically adjust the threshold θ according to the actual operating status and requirements of the power grid, so as to optimize the selection of computing nodes.
[0054] Step 3: Build a self-supervised learning model
[0055] (1) Build a self-supervised learning model, such as a deep neural network, which takes the power flow data of the power grid nodes as input and predicts the power flow parameters (such as voltage, power flow, etc.) of each node.
[0056] (2) According to the node mask M i Calculate the predicted power flow value of each node And compare it with the actual power flow result To obtain the loss function L, the formula is:
[0057]
[0058] (3) Use self-supervised learning methods to minimize the loss function L and gradually optimize the accuracy of power flow calculation and mask selection.
[0059] Step 4: Model training
[0060] (1) Use historical power grid power flow data (including information such as node load, power generation, power flow, etc.) to train the self-supervised learning model.
[0061] (2) During the training process, the model optimizes the parameters by minimizing the loss function L and gradually improves the accuracy of power flow calculation. [[ID=3�]]
[0062] (3) Dynamically adjust the node mask M [[ID=�5]] i And the threshold θ to ensure the adaptability of the model under different power grid states.
[0063] Step 5: Real-time power flow calculation
[0064] (1) During the real-time operation of the power grid, use the trained self-supervised learning model to perform power flow calculation. According to the current state of the power grid, dynamically calculate the power flow parameters (such as voltage, power flow, etc.) of each node.
[0065] (2) Through the dynamically generated mask M i , ensure that the calculation focuses on important nodes, thereby improving the calculation efficiency and accuracy.
[0066] (3) If the power grid state changes (such as load fluctuations, equipment failures, etc.), the model automatically adapts to the new power grid state, regenerates the mask and performs power flow calculation.
[0067] Step 6: Result optimization and feedback
[0068] (1) According to the real-time calculation results, such as Figure 2 , as shown in Figure 3, compare with the actual operation situation, and verify the power flow calculation results through the monitoring system. The calculated average voltage error is 1.02%, and the line load rate error is 0.56%. The power flow results have high precision, and the proposed algorithm can be applied to the actual system.
[0069] (2) If it is found that the calculation error is large, feedback to adjust the model parameters or the threshold θ, and perform training optimization again to improve the accuracy of the model.
[0070] (3) Under different power grid operation scenarios, automatically adjust the selection of key nodes and the power flow calculation strategy to ensure the stable and safe operation of the power grid.
[0071] I i 's calculation formula controls the influence of load, power generation capacity, and the number of devices on the node importance by adjusting the weight coefficients α, β, and γ.
[0072] The selection of the dynamic mask M i can adaptively adjust the threshold θ according to the change of the power grid operation state.
[0073] The self-supervised learning model is trained by the backpropagation algorithm, so that the mask selection and the power flow calculation accuracy are automatically optimized during the process of minimizing the loss function L.
[0074] When the node mask M i is 1, it means that node i has an important influence on the power flow calculation and participates in the power flow calculation; when it is 0, it means that node i has a small influence on the power flow calculation, and the power flow data of this node is ignored.
[0075] The self-supervised learning model is a deep neural network model, which is trained by a large amount of historical power flow data to optimize the accuracy of power flow calculation.
[0076] The power flow calculation of the power grid includes parameters such as the voltage amplitude, phase angle, and power flow of nodes. The self-supervised learning model can dynamically select and optimize the power flow calculation nodes under different power grid states.
[0077] A power system power flow calculation device includes:
[0078] A node importance calculation module, which is used to calculate the importance index of all power flow calculation nodes in the power grid. Among them, the importance index I i of the i-th power flow calculation node in the power grid is calculated as follows: According to the load P i , power generation capacity G i , and the number of power equipment N i connected to the i-th power flow calculation node, perform weighted calculation to calculate I i, where \(1\leq i\leq I\) and \(I\) is the total number of all power flow calculation nodes in the power grid;
[0079] A mask selection module, configured to dynamically generate a mask \(M\) for each power flow calculation node based on \(I\) i ; i ;
[0080] A self-supervised training module, configured to build a self-supervised learning model for power flow calculation, calculate the power flow prediction value of the \(i\)-th power flow calculation node according to \(M\) i and compare it with the known true power flow result to obtain a loss function \(L\); train the self-supervised learning model for power flow calculation by minimizing the loss function \(L\) to optimize power flow calculation and the mask; use the trained self-supervised learning model for power flow calculation. ; ;
[0081] The node importance calculation module calculates the load, generation capacity, and number of devices of the nodes through weighted calculation to obtain \(I\) i .
[0082] The mask selection module adaptively adjusts the threshold \(\theta\) according to the state of the power grid to optimize the selection of the node mask.
[0083] The self-supervised training module is trained using a deep neural network to minimize the power flow calculation error and optimize the accuracy of mask selection and power flow calculation.
[0084] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the steps of the dynamic power flow mask self-supervised training method as described above are implemented.
[0085] An embodiment of the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the dynamic power flow mask self-supervised training method in any of the above embodiments are implemented.
[0086] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes. The solutions in the embodiments of the present invention can be implemented in various computer languages, for example, object-oriented programming languages such as Java and interpreted scripting languages such as JavaScript.
[0087] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce means for implementing the functions specified in one or more flows and / or blocks Figure 1 one or more flows and / or blocks Figure 1 or more blocks.
[0088] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including instruction means that implement the functions specified in one or more flows and / or blocks Figure 1 one or more flows and / or blocks Figure 1 or more blocks.
[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows and / or blocks Figure 1 one or more flows and / or blocks Figure 1 or more blocks.
[0090] Although the preferred embodiments of the present invention have been described, additional changes and modifications can be made to these embodiments by those skilled in the art once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications that fall within the scope of the present invention.
[0091] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A dynamic trend mask self-supervised training method, characterized in that, Including: Calculate the importance index of all power flow calculation nodes in the power grid. Among them, the importance index I of the i-th power flow calculation node in the power grid i is calculated as follows: According to the load P of the i-th power flow calculation node in the power grid i , the power generation capacity G i , and the number N of power equipment connected to the i-th power flow calculation node i , perform weighted calculation to calculate I i , 1 ≤ i ≤ I, where I is the total number of all power flow calculation nodes in the power grid; Based on I i Dynamically generate a mask M for each power flow calculation node i ; Construct a self-supervised learning model for power flow calculation; According to M i Calculate the predicted power flow value of the i-th power flow calculation node And Compare with the known true power flow result to obtain the loss function L; Train the self-supervised learning model for power flow calculation by minimizing the loss function L to optimize power flow calculation and masking; Use the trained self-supervised learning model for power flow calculation for power flow calculation.
2. The dynamic tidal current mask self-supervised training method according to claim 1, wherein, The self-supervised learning model for power flow calculation takes the power flow data of power grid nodes as input and predicts the unknown power flow data of each power grid node. Among them, the power flow data includes node load, power generation, voltage, and power flow.
3. The dynamic power flow masking self-supervised training method according to claim 1, characterized in that I i = αP i + βG i + γN i where α, β, and γ are all weight coefficients.
4. The dynamic power flow masking self-supervised training method according to claim 1, characterized in that where θ is a threshold.
5. The dynamic power flow masking self-supervised training method according to claim 1, characterized in that 6. The dynamic power flow masking self-supervised training method according to claim 1, characterized in that The self-supervised learning model for power flow calculation is a deep neural network model and is trained by historical power flow data. The self-supervised learning model for power flow calculation is trained by the backpropagation algorithm, so that the masking selection and power flow calculation accuracy are automatically optimized during the process of minimizing the loss function L; the power flow calculation includes the voltage amplitude, phase angle, and power flow of power grid nodes.
7. A dynamic power flow mask self-supervised training method according to claim 1, characterized in that M i When it is 1, M i participates in power flow calculation; M i When it is 0, M i does not participate in power flow calculation.
8. A dynamic tidal current mask self-supervised training device, characterized in that, Including: Node importance calculation module, which is used to calculate the importance index of all power flow calculation nodes in the power grid. Among them, the importance index I of the i-th power flow calculation node in the power grid i is calculated as follows: According to the load P of the i-th power flow calculation node in the power grid i , generation capacity G i , and the number N of power equipment connected to the i-th power flow calculation node i , weighted calculation is performed to calculate I i , 1 ≤ i ≤ I, where I is the total number of all power flow calculation nodes in the power grid; A mask selection module, used to be based on I i dynamically generate a mask M for each power flow calculation node i ; A self-supervised training module for constructing a self-supervised learning model for power flow calculation, according to M i Calculate the power flow prediction value of the i-th power flow calculation node And Compare with the known true power flow results to obtain the loss function L; train the self-supervised learning model for power flow calculation by minimizing the loss function L, optimize the power flow calculation and the mask; perform power flow calculation using the trained self-supervised learning model for power flow calculation.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the dynamic power flow masking self-supervised training method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the dynamic power flow masking self-supervised training method according to any one of claims 1 to 7.