Power distribution network measurement data super-resolution sensing method based on transfer learning
By adopting the GAT+transformer cascade model based on transfer learning in the super-resolution perception of distribution network measurement data, the problem of insufficient overfitting and topological generalization capabilities in the prior art is solved, and more efficient distribution network state perception and lower application costs are achieved.
Patent Information
- Application Number
- CN202411591136.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-08
AI Technical Summary
In the prior art, the super-resolution perception method of the distribution network measurement data has overfitting problems and insufficient topological generalization capabilities, resulting in a degradation in the performance of the model when applied in the actual distribution network.
Using a transfer learning method, a cascading model is constructed through graph attention networks and transformer networks, pre-training and transfer learning training are performed to avoid overfitting problems caused by increasing the number of layers of graph neural networks, and to enhance the topological generalization ability of the model.
The performance and effect of the super-resolution perception model of the distribution network measurement data is improved, the application cost is reduced, the practicality of the model is enhanced, and the problem of difficult to obtain labeled data in the actual distribution network is solved.
Smart Images

Figure CN119539257A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of precise state estimation of distribution networks, and in particular to a method for super-resolution perception of distribution network measurement data based on transfer learning. Background Art
[0002] Obtaining reliable and accurate high-frequency measurement information of the distribution network is the basis for realizing accurate state estimation of the distribution network. At present, the collection of distribution network measurement information is mainly completed by a hybrid measurement system consisting of a supervisory control and data acquisition (SCADA), a wide area measurement system (WAMS) based on a synchronized phasor measurement unit (PMU), and an advanced metering infrastructure (AMI). In this hybrid measurement system, there is not only the problem of incomplete distribution of measurement devices, but also the low frequency of the collected measurement data, which cannot meet the requirements of high-precision state perception of the distribution network. If the reliability of the distribution network super-resolution perception model is insufficient, the accuracy of the model-generated data may decrease, which in turn affects the state perception effect of the distribution network.
[0003] In the prior art, the super-resolution perception methods of distribution network measurement data are mainly divided into two categories: physical drive and data drive. Among them, physical drive mainly realizes perception through the construction of distribution network system model and the calculation of physical parameters. However, this method has many problems compared with the data-driven method: first, the physical drive method is usually based on an ideal physical model. However, due to the large number of distributed power sources and nonlinear loads connected to the new distribution network, it is highly intermittent and random. The method based on the traditional physical model is difficult to accurately describe the operating status of the actual distribution network; secondly, the calculation amount of solving the complex distribution network model is too large, which makes it difficult to ensure the real-time performance of super-resolution perception.
[0004] Data-driven usually refers to the use of trained deep learning models to achieve perception, including convolutional neural networks (CNNs), recurrent neural networks (RNNs), and graph neural networks (GNNs). Since the distribution network is a natural undirected graph topology, in addition to containing the node attribute information of each node in the system, it also contains the spatial information of the connection relationship between nodes. Graph neural networks (GNNs) can mine the potential information of the distribution network from the two dimensions of time and space, thereby improving the accuracy of model prediction. Traditional deep learning models can usually only analyze the attribute information of distribution network nodes from the time dimension, and compared with graph neural networks, there is a problem of poor prediction accuracy. However, graph neural networks need to stack more layers to expand the aggregation range of node information so that the model can learn the characteristic connection between each node and a larger range of nodes. Increasing the number of model layers blindly not only makes the model bloated and significantly increases the computational cost, but also easily leads to overfitting of the model. At the same time, traditional methods have not taken into account the actual application of the model. Due to the large structural difference between the actual distribution network and the training topology, if the pre-trained model is directly applied to the actual distribution network, the model performance will be significantly reduced.
[0005] Therefore, in the relevant technology, there is an urgent need for a method that can solve the overfitting problem caused by the traditional method of expanding the receptive field by increasing the number of graph neural network layers, as well as the problem of insufficient topological generalization ability of the model, which leads to the degradation of model performance when the actual distribution network undergoes topological reconstruction and the model application object is migrated. Summary of the invention
[0006] Based on this, it is necessary to provide a distribution network measurement data super-resolution perception method based on transfer learning that can address the above technical problems and solve the overfitting problem caused by the traditional method of expanding the receptive field by increasing the number of graph neural network layers, as well as the problem of insufficient topological generalization ability of the model, which leads to model performance degradation when the actual distribution network undergoes topological reconstruction and the model application object is migrated.
[0007] In a first aspect, the present application provides a method for super-resolution perception of distribution network measurement data based on transfer learning. The method comprises:
[0008] Obtain high-frequency time series and preprocess them to obtain training sample data;
[0009] Building a cascade model based on a graph attention network and a transformer network, inputting the training sample data and the association matrix into the cascade model, and pre-training the cascade model, wherein the association matrix represents the topological connection relationship of the distribution network;
[0010] The pre-trained cascade model is divided into a learner part and a decision maker part, and transfer learning training is performed to retain the model parameters that achieve the training objectives, so as to obtain the final super-resolution perception model, wherein the learner part includes all layers except the linear output layer of the transformer, and the decision maker part includes the linear output layer of the transformer;
[0011] The real-time measurement data is input into the super-resolution perception model to obtain a super-resolution measurement generation result.
[0012] Optionally, in one embodiment of the present application, the preprocessing includes:
[0013] The high frequency time series is linearly normalized and down-sampled.
[0014] Optionally, in one embodiment of the present application, the cascade model includes:
[0015] The graph attention network layer is used to calculate the attention coefficient of low-frequency data, the attention coefficient is subjected to softmax normalization processing, and a node feature sequence is output;
[0016] The node feature sequence is input into the embedding layer for feature conversion and finally input into the transformer network. The linear layer of the transformer network outputs the super-resolution measurement result.
[0017] Optionally, in one embodiment of the present application, the transfer learning training includes:
[0018] The learner part is divided into three parts, including a GAT block, an encoder block and a decoder block;
[0019] Use different training schemes for transfer learning training, evaluate the model training effect, and select a better training scheme.
[0020] Optionally, in one embodiment of the present application, the training program includes:
[0021] Performing parameter updates on the GAT block, the encoder block and the decoder block respectively;
[0022] Locking the GAT block, and updating parameters of the encoder block and the decoder block respectively;
[0023] Locking the GAT block and the encoder block, and updating parameters of the decoder block;
[0024] The learner part is locked, and parameters of the decision maker part are updated.
[0025] Optionally, in one embodiment of the present application, the method further includes:
[0026] Model training is performed on the original topology and the reconstructed topology when the state of a single reconstructed switch changes;
[0027] A multi-task learning framework is adopted, and a power flow constraint task is added to update the loss function of the model training.
[0028] Optionally, in one embodiment of the present application, the method further includes:
[0029] The weight of the power flow constraint task is dynamically adjusted based on the learning rate.
[0030] In a second aspect, the present application also provides a distribution network measurement data super-resolution perception device based on transfer learning. The device comprises:
[0031] The data set acquisition module is used to acquire high-frequency time series and perform preprocessing to obtain training sample data;
[0032] A model pre-training module, used for building a cascade model based on a graph attention network and a transformer network, inputting the training sample data and an association matrix into the cascade model, and pre-training the cascade model, wherein the association matrix represents a topological connection relationship of a distribution network;
[0033] A transfer learning module is used to divide the pre-trained cascade model into a learner part and a decision maker part, and perform transfer learning training to retain the model parameters that achieve the training objectives to obtain the final super-resolution perception model, wherein the learner part includes all layers except the linear output layer of the transformer, and the decision maker part includes the linear output layer of the transformer;
[0034] The super-resolution perception module is used to input real-time measurement data into the super-resolution perception model to obtain a super-resolution measurement generation result.
[0035] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the methods described in the above embodiments.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in each of the above embodiments are implemented.
[0037] The above-mentioned method for super-resolution perception of distribution network measurement data based on transfer learning first obtains high-frequency time series and preprocesses them to obtain training sample data; then, a cascade model is constructed based on a graph attention network and a transformer network, and the training sample data and an association matrix are input into the cascade model to pre-train the cascade model, wherein the association matrix represents the topological connection relationship of the distribution network; then, the pre-trained cascade model is divided into a learner part and a decision maker part, and transfer learning training is performed, and the model parameters that achieve the training objectives are retained to obtain the final super-resolution perception model, wherein the learner part includes all layers except the linear output layer of the transformer, and the decision maker part includes the linear output layer of the transformer; finally, the real-time measurement data is input into the super-resolution perception model to obtain a super-resolution measurement generation result. In other words, the proposed GAT+transformer cascade deep learning model not only enables the model to deeply mine distribution network information from the two dimensions of time and space, but also further learns the connection between the characteristics of each node in the distribution network by introducing transformer, avoiding the model overfitting problem caused by blindly increasing the number of GAT layers, thereby improving the performance and effect of the hybrid model. At the same time, the transfer learning technology is introduced into the super-resolution perception method. By fine-tuning the pre-trained model, the pre-trained model developed for the source task can be well applied to the target task, which solves the problem of difficulty in obtaining high-quality labeled data in the actual distribution network, reduces the application cost of the distribution network super-resolution perception model, and enhances the practicability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is an application environment diagram of a method for super-resolution perception of distribution network measurement data based on transfer learning in one embodiment;
[0039] Figure 2 A schematic diagram of a flow chart of a method for super-resolution perception of distribution network measurement data based on transfer learning in one embodiment;
[0040] Figure 3 is a schematic diagram of a cascade model in one embodiment;
[0041] Figure 4 A schematic diagram of limiting the search range in transfer learning training in one embodiment;
[0042] Figure 5 is a schematic diagram of a transfer learning training scheme in one embodiment;
[0043] Figure 6 It is a flowchart of specific steps of a method for super-resolution perception of distribution network measurement data based on transfer learning in one embodiment;
[0044] Figure 7 It is a structural block diagram of a distribution network measurement data super-resolution perception device based on transfer learning in one embodiment;
[0045] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] The present application provides a method for super-resolution perception of distribution network measurement data based on transfer learning, which can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0048] In one embodiment, Figure 2 As shown in the figure, a super-resolution perception method for distribution network measurement data based on transfer learning is provided. Figure 1 The server in the example is used to illustrate the following steps:
[0049] S201: Obtain high-frequency time series and perform preprocessing to obtain training sample data.
[0050] In the embodiment of the present application, first, the high-frequency time series of each node required for model pre-training and transfer learning is obtained through simulation. The high-frequency time series of the pre-trained model is usually obtained by simulation in a smaller-scale system, while the high-frequency time series of transfer learning is obtained by simulating the actual distribution network. The sampling frequency of all nodes in the system is denoted as f, and the node attributes include the instantaneous value of the three-phase voltage V A 、V B 、V C , and the node injected active power P in , reactive power Q inAt the same time, it is preprocessed to obtain training sample data to meet the needs of model training.
[0051] Specifically, in one embodiment of the present application, the preprocessing includes:
[0052] The high frequency time series is linearly normalized and down-sampled.
[0053] In one embodiment of the present application, a voltage instantaneous value sequence V( t ) as an example, in order to meet the needs of model training, it is first linearly normalized and scaled to [-1, 1]. The calculation method is as follows.
[0054]
[0055] Where X = x1, x2, ..., x N , X max and X min are the maximum and minimum values in X, respectively. is the normalized value.
[0056] Afterwards, the high-frequency time series V (t) Split into fixed length l and define high-frequency labels for model training On this basis, a mask matrix M is defined to convert high-frequency labels Transformed into low frequency sequence This gives us a complete training sample.
[0057]
[0058] Where N is the number of nodes in the distribution network system, It means that the node has no measurement information at this position, but during the model training process, the positions without measurement information in the low-frequency sequence are filled with 0.
[0059] The transformation between high-frequency labels and low-frequency data is achieved by taking the Hadamard product of the mask matrix M and the high-frequency labels. The mask matrix M is shown below.
[0060]
[0061] S203: construct a cascade model based on the graph attention network and the transformer network, input the training sample data and the association matrix into the cascade model, and pre-train the cascade model, wherein the association matrix represents the topological connection relationship of the distribution network.
[0062] In the embodiment of the present application, GAT and transformer are combined in series to form a GAT+transformer cascade model. Since the distribution network super-resolution perception task is essentially a regression task, the softmax layer in the transformer network is deleted, and the linear layer is used as the final output layer of the model. The specific structure of the cascade model is as follows: Figure 3 Afterwards, the preprocessed data and the association matrix that can reflect the topological connection relationship of the distribution network are imported as input into the cascade model for pre-training until the loss function value reaches the predetermined requirement.
[0063] The most widely used graph neural networks currently include the spectral-domain-based graph convolutional neural network (GCN) and the spatial-domain-based graph attention network (GAT). However, GCN can only assign the same weight to neighboring nodes of the same order, and the fixed convolution kernel is used to aggregate the information of neighboring nodes, which makes GCN's ability to process dynamic graphs poor. In contrast, GAT introduces an attention mechanism to assign different weights to information transfer parameters, and can learn the different degrees of importance of neighboring nodes to the central node. GAT can also adaptively adjust attention parameters when the graph topology changes, thereby quickly and effectively adapting to changes in the graph structure. The transformer network can capture long-distance dependencies through a multi-head self-attention mechanism, so it can mine the correlation between the feature information of each node from multiple angles, effectively alleviating the high computational cost and overfitting problems caused by continuously stacking GAT layers to expand the perception range.
[0064] In one embodiment of the present application, the cascade model includes:
[0065] S301: Use the graph attention network layer to calculate the attention coefficient of the low-frequency data, perform softmax normalization on the attention coefficient, and output a node feature sequence.
[0066] S303: Input the node feature sequence into the embedding layer for feature conversion, and finally input it into the transformer network, and the linear layer of the transformer network outputs the super-resolution measurement result.
[0067] In one embodiment of the present application, first, the GAT layer of the graph attention network calculates the attention coefficient for low-frequency data. The specific formula is as follows:
[0068]
[0069] Among them, W——n out ×n in is the weight matrix, h i,k,j --n in ×1 is the input low-frequency time series, αT ——1×2n out is the mapping vector, LeakyReLU is the activation function, and the expression is as follows.
[0070]
[0071] Here, a is a very small constant, such as 0.01.
[0072] First, GAT respectively i and h j Perform feature extraction, and after extraction, adhere the information of the two, and map the vector α T The vector containing both the feature information of nodes i and j is mapped to a constant, and finally the mapping result is processed nonlinearly through the activation function. For the convenience of calculation, after the attention coefficients between the central node i and all the first-order neighboring nodes are calculated, all attention coefficients need to be normalized by softmax. When multiple GAT layers need to be stacked in the model, the input sequence can be first dimensioned and then reduced, so that the model can learn more complex feature information and improve model efficiency and performance. The specific approach is to control the length of the feature sequence of each node output by the layer through the number of rows of the weight matrix W of each layer.
[0073] The feature sequences of each node output by the GAT network need to pass through the embedding layer to complete feature conversion before entering the transformer encoder, so that the feature sequence of each node can be converted into a vector representation of a fixed dimension. At the same time, position encoding is added on this basis to characterize the positional relationship of each node.
[0074] The multi-head self-attention mechanism in the Transformer encoder allows the model to process information subspaces in parallel, and its calculation formula is as follows:
[0075]
[0076] Among them, Q, K, and V are query vectors, key vectors, and value vectors, respectively, and are all mappings to the input; d k is the sequence dimension of each head; Z (k) is the output result of each attention mechanism, which needs to be concatenated to get the final output. After normalization, the encoder output is completed through the feedforward fully connected layer. The calculation formula is as follows:
[0077] FFN(x)=max(0,xW1+b1)W2+b2
[0078] Among them, W1 and W2 are weight matrices, and b1 and b2 are bias vectors. This part is mainly composed of two layers of neural networks. The first layer maps the input to a higher-dimensional space and performs nonlinear processing, and the second layer converts it to the original dimension through linear transformation. At this point, the encoder's work is completed. The working principle of the decoder is similar to that of the encoder. Both can be stacked to enable the model to learn more complex feature representations. The model completes the final output through a linear layer.
[0079] S205: Divide the pre-trained cascade model into a learner part and a decision maker part, and perform transfer learning training, retain the model parameters that achieve the training objectives, and obtain the final super-resolution perception model, wherein the learner part includes all layers except the linear output layer of the transformer, and the decision maker part includes the linear output layer of the transformer.
[0080] In an embodiment of the present application, before performing transfer learning, it is believed that the performance of the pre-trained model on the source task is already excellent enough, and the generated pseudo-measurement not only has a high accuracy rate, but also the topological generalization performance of the model is sufficient to cope with small-scale topological reconstruction changes. Transfer learning is completed by fine-tuning the pre-trained model. First, the pre-trained model is divided into two parts: a learner and a decision maker. The learner part includes all layers except the linear layer of the transformer; the decision maker part only includes the linear output layer of the transformer. At the same time, it is believed that the learner part of the pre-trained model already has the ability to extract better features, and the focus is on re-learning the decision maker part. Therefore, in the model initialization stage, except that the decision maker part is randomly initialized, the learner part is directly copied from the pre-trained model, and fine-tuning or partial fine-tuning is performed on this basis later.
[0081] During the training phase, it is assumed that the initialized model is already near the optimal solution, so it is necessary to control the search range of the model during the training process. If there are no restrictions on the training process, since the sample size of the new task is very small during the transfer learning process, the more complex model can often remember the entire training set, so that although the error of the model during the training process is very small, the generalization error may not be the smallest, which can easily lead to overfitting of the model, causing the model to almost completely lose the knowledge learned from the pre-training data set, such as Figure 4 The specific approach is to use a very small learning rate to complete the parameter update, and control the training time by controlling the number of scans of the training set.
[0082] Specifically, in one embodiment of the present application, the transfer learning training includes:
[0083] S401: Divide the learner part into three parts, including a GAT block, an encoder block and a decoder block.
[0084] S403: Use different training schemes to perform transfer learning training, evaluate the model training effect, and select a better training scheme.
[0085] In one embodiment of the present application, in order to obtain a better distribution network super-resolution perception model in practical applications, and to speed up the training speed while ensuring the performance of the model, the model is considered to be divided into three parts: the first part is a GAT block (BLOCK 1) obtained by stacking N graph attention layers, the second part is an Encoder block (BLOCK 2) formed by stacking N Encoder layers in the transformer, and the third part is a Decoder block (BLOCK 3) formed by stacking N Decoder layers in the transformer. Afterwards, in the training process of transfer learning, different training schemes are set for the pre-trained models for transfer learning training, and the model training effect is evaluated and verified, while ensuring that the pre-trained model can excellently complete new tasks through transfer learning. A better training scheme is selected. Considering that the training process of the deep learning model is a smooth learning process, the bottom layer of the model can learn a deeper feature extraction method, and this feature extraction capability has better generalization, while the upper layer is more associated with the output than the bottom layer. Therefore, in the scheme setting, a hierarchical learning rate setting is performed for the unlocked parts of the model after pre-training, and a bottom-up locking order is adopted for each part of the model in different schemes.
[0086] Specifically, in one embodiment of the present application, the training program includes:
[0087] S501: Update parameters of the GAT block, encoder block and decoder block respectively.
[0088] S503: Lock the GAT block, and update parameters of the encoder block and the decoder block respectively.
[0089] S505: Lock the GAT block and the encoder block, and update parameters of the decoder block.
[0090] S507: Lock the learner part, and update the parameters of the decision maker part.
[0091] In one embodiment of the present application, during the training process of transfer learning, four schemes are set for the pre-trained model: 1. Do not lock any part of the pre-trained model, and use learning rates from small to large (much smaller than the learning rate during the training process of the pre-trained model) to update the parameters of BLOCK1 to BLOCK3. 2. Lock BLOCK1 (do not update its parameters), and use learning rates from small to large to update the parameters of BLOCK2 and BLOCK3. 3. Lock BLOCK1 and BLOCK2, and use a relatively large learning rate to update the parameters of BLOCK3. 4. Lock all parts of the model after pre-training except the linear output layer (decision layer). The scheme setting method is as follows: Figure 5 shown.
[0092] In one embodiment of the present application, the method further includes:
[0093] S601: Perform model training on the original topology and the reconstructed topology when the state of a single reconstructed switch changes.
[0094] S603: adopting a multi-task learning framework and adding a power flow constraint task to update the loss function of the model training.
[0095] In one embodiment of the present application, after the transfer learning process of the pre-trained model is completed, the model can theoretically achieve super-resolution perception for the measurement data of the distribution network of any topological form, thereby effectively reducing the data acquisition cost of the model in actual application. However, during the operation of the distribution network, in most cases the distribution network will frequently undergo small topological reconstruction changes as needed. At this time, if the model is directly applied to the reconstructed topology, the problem of model performance degradation will occur; if the transfer learning method is used to solve this problem, when the topological reconstruction is more frequent, it will lead to a significant increase in workload and data acquisition costs. Therefore, measures need to be taken to enhance the topological generalization performance of the model so that the model can adapt to small topological reconstruction changes of the distribution network.
[0096] Compared with GCN, GAT itself has a stronger ability to process dynamic graphs, but in order to enable the model to adaptively handle small reconstruction changes in the distribution network topology, two measures need to be taken: 1. Train the reconstructed topology based on the original topology so that the model can better adapt to new data features. 2. Add distribution network flow constraints to the model so that the model can enhance the robustness of the model by learning general physical laws with universal applicability.
[0097] First, in the pre-training process and transfer learning process of the model, the topology reconstruction needs to be completed by reconstructing the state control of the switch based on the original topology, and training is performed on the data sets of the original topology and the reconstructed topology. Assume that there are n reconstructed switches in the original topology, and the different state combinations of each reconstructed switch make the system have a total of 2 n If each topology is trained, it will increase the training cost and reduce the training efficiency. In order to balance the training cost and the topological generalization performance of the model, the model can be trained on the original topology and the reconstructed topology when the state of a single reconstructed switch changes, with a total of n topological structures. This allows the model to learn all possible connection states between nodes, thereby adaptively processing the reconstructed topologies when the states of multiple reconstructed switches change.
[0098] Secondly, a multi-task learning framework is adopted to add a power flow constraint task on the basis of the distribution network dense measurement data recovery task, and the loss function of the new task is defined as L flow , the expression is as follows:
[0099] L flow =αE P-node +βE Q-node
[0100] Where α and β are hyperparameters; E P-node and E Q-node are the violations of the power flow constraints respectively. According to the active power balance equation and reactive power balance equation of the distribution network, the expressions of the two are defined as follows:
[0101]
[0102] in, and Active and reactive power injected into the node; V i and V j are the voltage amplitudes at nodes i and j respectively; G ij and B ij are the conductance and susceptance values between nodes i and j respectively; θ ij is the voltage phase angle difference between nodes i and j;
[0103] The mean square error (MSE) is selected as the loss function for the dense measurement restoration task of the distribution network, and the expression is as follows:
[0104]
[0105] Where n is the total amount of data in the calculation sample; y i is the corresponding data in the high-frequency label; The prediction data for the model.
[0106] Therefore, the total loss function is as follows:
[0107] L total =L original +wL flow
[0108] Among them, w is the weight parameter, which is used to control the proportion of power flow constraint tasks in the total tasks.
[0109] In traditional super-resolution perception methods, the Adam optimization algorithm is usually used to complete the model training process. In order to further speed up the convergence speed and enable the model to converge to the optimal solution more accurately in the later stage of training, the Adam optimization algorithm is combined with the strategy of exponential decay of the learning rate for training. The strategy of exponential decay of the learning rate according to the number of iterations (training process) can be expressed as follows:
[0110] α=α0×e -kt
[0111] Among them, α0 is the initial learning rate; k is the decay rate; t is the number of iterations.
[0112] In one embodiment of the present application, the method further includes:
[0113] The weight of the power flow constraint task is dynamically adjusted based on the learning rate.
[0114] In one embodiment of the present application, based on the updated optimization algorithm, the weight of the power flow constraint task can be trained based on the learning rate to dynamically adjust the weight of the weight parameter w. The specific principle is shown in the following formula:
[0115]
[0116] In the formula, W0 is the initial weight parameter, T is the total number of iterations, α t is the learning rate after the tth iteration.
[0117] In the early stage of training, the learning rate is relatively large, W t The decay rate of is relatively slow, so that the model also considers the power flow constraints to a certain extent while exploring the parameter space; as the training progresses, the learning rate gradually decreases, W t The decay will be accelerated, so that the model focuses more on the original objective function L original to avoid limiting the fine-tuning ability of the model on the original task.
[0118] The above solutions for enhancing the model topology generalization performance are applied to both the model pre-training process and the transfer learning process.
[0119] S207: Input the real-time measurement data into the super-resolution perception model to obtain a super-resolution measurement generation result.
[0120] In an embodiment of the present application, real-time measurement data acquired from an actual power distribution network is pre-processed and then sent to a final super-resolution perception model to obtain a super-resolution measurement generation result.
[0121] In the above-mentioned method for super-resolution perception of distribution network measurement data based on transfer learning, first, high-frequency time series are obtained and preprocessed to obtain training sample data; then, a cascade model is constructed based on a graph attention network and a transformer network, and the training sample data and an association matrix are input into the cascade model to pre-train the cascade model, wherein the association matrix represents the topological connection relationship of the distribution network; then, the pre-trained cascade model is divided into a learner part and a decision maker part, and transfer learning training is performed, and the model parameters that achieve the training objectives are retained to obtain the final super-resolution perception model, wherein the learner part includes all layers except the transformer linear output layer, and the decision maker part includes the transformer linear output layer; finally, the real-time measurement data is input into the super-resolution perception model to obtain a super-resolution measurement generation result. In other words, the proposed GAT+transformer cascade deep learning model not only enables the model to deeply mine distribution network information from the two dimensions of time and space, but also further learns the connection between the characteristics of each node in the distribution network by introducing transformer, avoiding the model overfitting problem caused by blindly increasing the number of GAT layers, thereby improving the performance and effect of the hybrid model. At the same time, the transfer learning technology is introduced into the super-resolution perception method. By fine-tuning the pre-trained model, the pre-trained model developed for the source task can be well applied to the target task, which solves the problem of difficulty in obtaining high-quality labeled data in the actual distribution network, reduces the application cost of the distribution network super-resolution perception model, and enhances the practicability of the model.
[0122] The following is a specific example to illustrate the specific implementation steps of a distribution network method based on transfer learning in this application. Figure 6As shown in the figure, first, the high-frequency data set required for model pre-training and transfer learning is obtained through simulation. The data set of the pre-training model is usually obtained by simulation in a smaller system, while the data set of the transfer learning is obtained by simulating the actual distribution network. After that, the data is pre-processed. First, the data is linearly normalized to meet the needs of model training. Secondly, the high-frequency labels are down-sampled to obtain the corresponding low-frequency data. Finally, the high-frequency labels and low-frequency data are classified and sorted to obtain the final training samples. After that, the training samples are sent to the GAT+transformer cascade model for pre-training until the loss function value reaches the predetermined requirements. After that, the transfer learning data set is sent to the pre-training model. By fine-tuning the pre-training model, the model can quickly adapt to the super-resolution perception requirements of the actual distribution network, and the best transfer learning scheme is selected. Finally, the model is applied online, and the real-time measurement data obtained in the actual distribution network is pre-processed and sent to the final model to obtain the super-resolution measurement generation result.
[0123] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0124] Based on the same inventive concept, the embodiment of the present application also provides a device for super-resolution perception of distribution network measurement data based on transfer learning for realizing the above-mentioned method for super-resolution perception of distribution network measurement data based on transfer learning. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the device for super-resolution perception of distribution network measurement data based on transfer learning provided below can be referred to the limitations of the method for super-resolution perception of distribution network measurement data based on transfer learning above, and will not be repeated here.
[0125] In one embodiment, Figure 7 As shown, a distribution network measurement data super-resolution perception device 700 based on transfer learning is provided, comprising: a data set acquisition module 701, a model pre-training module 703, a transfer learning module 705 and a super-resolution perception module 707, wherein:
[0126] The data set acquisition module 701 is used to acquire high-frequency time series and perform preprocessing to obtain training sample data.
[0127] The model pre-training module 703 is used to build a cascade model based on the graph attention network and the transformer network, input the training sample data and the association matrix into the cascade model, and pre-train the cascade model. The association matrix represents the topological connection relationship of the distribution network.
[0128] The transfer learning module 705 is used to divide the pre-trained cascade model into a learner part and a decision maker part, and perform transfer learning training to retain the model parameters that achieve the training objectives to obtain the final super-resolution perception model, wherein the learner part includes all layers except the linear output layer of the transformer, and the decision maker part includes the linear output layer of the transformer.
[0129] The super-resolution perception module 707 is used to input the real-time measurement data into the super-resolution perception model to obtain a super-resolution measurement generation result.
[0130] In one embodiment of the present application, the data set acquisition module is further used to:
[0131] The high frequency time series is linearly normalized and down-sampled.
[0132] In one embodiment of the present application, the model pre-training module is also used to:
[0133] The graph attention network layer is used to calculate the attention coefficient of low-frequency data, the attention coefficient is subjected to softmax normalization processing, and a node feature sequence is output;
[0134] The node feature sequence is input into the embedding layer for feature conversion and finally input into the transformer network. The linear layer of the transformer network outputs the super-resolution measurement result.
[0135] In one embodiment of the present application, the transfer learning module is further used to:
[0136] The learner part is divided into three parts, including a GAT block, an encoder block and a decoder block;
[0137] Use different training schemes for transfer learning training, evaluate the model training effect, and select a better training scheme.
[0138] In one embodiment of the present application, the training program includes:
[0139] Performing parameter updates on the GAT block, the encoder block and the decoder block respectively;
[0140] Locking the GAT block, and updating parameters of the encoder block and the decoder block respectively;
[0141] Locking the GAT block and the encoder block, and updating parameters of the decoder block;
[0142] The learner part is locked, and parameters of the decision maker part are updated.
[0143] In one embodiment of the present application, the method further includes:
[0144] Model training is performed on the original topology and the reconstructed topology when the state of a single reconstructed switch changes;
[0145] A multi-task learning framework is adopted, and a power flow constraint task is added to update the loss function of the model training.
[0146] In one embodiment of the present application, the method further includes:
[0147] The weight of the power flow constraint task is dynamically adjusted based on the learning rate.
[0148] Each module in the above-mentioned distribution network measurement data super-resolution perception device based on transfer learning can be implemented in whole or in part by software, hardware and their combination. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0149] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a super-resolution perception method for distribution network measurement data based on transfer learning is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse.
[0150] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0151] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0152] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0153] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0154] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0155] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0156] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0157] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for super-resolution perception of distribution network measurement data based on transfer learning, characterized in that: The method comprises: Obtain high-frequency time series and preprocess them to obtain training sample data; Building a cascade model based on a graph attention network and a transformer network, inputting the training sample data and the association matrix into the cascade model, and pre-training the cascade model, wherein the association matrix represents the topological connection relationship of the distribution network; The pre-trained cascade model is divided into a learner part and a decision maker part, and transfer learning training is performed to retain the model parameters that achieve the training objectives, so as to obtain the final super-resolution perception model, wherein the learner part includes all layers except the linear output layer of the transformer, and the decision maker part includes the linear output layer of the transformer; The real-time measurement data is input into the super-resolution perception model to obtain a super-resolution measurement generation result.
2. According to the method of claim 1, the method is characterized in that: The pre-processing comprises: The high frequency time series is linearly normalized and down-sampled.
3. According to the method of claim 1, the method is characterized in that: The cascade model includes: The graph attention network layer is used to calculate the attention coefficient of low-frequency data, the attention coefficient is subjected to softmax normalization processing, and a node feature sequence is output; The node feature sequence is input into the embedding layer for feature conversion and finally input into the transformer network. The linear layer of the transformer network outputs the super-resolution measurement result.
4. According to the method of claim 1, the method is characterized in that: The transfer learning training includes: The learner part is divided into three parts, including a GAT block, an encoder block and a decoder block; Use different training schemes for transfer learning training, evaluate the model training effect, and select a better training scheme.
5. According to claim 4, a method for super-resolution perception of distribution network measurement data based on transfer learning is characterized in that: The training program includes: Performing parameter updates on the GAT block, the encoder block and the decoder block respectively; Locking the GAT block, and updating parameters of the encoder block and the decoder block respectively; Locking the GAT block and the encoder block, and updating parameters of the decoder block; The learner part is locked, and parameters of the decision maker part are updated.
6. According to the method of claim 1, the method is characterized in that: The method further comprises: Model training is performed on the original topology and the reconstructed topology when the state of a single reconstructed switch changes; A multi-task learning framework is adopted, and a power flow constraint task is added to update the loss function of the model training.
7. The method for super-resolution perception of distribution network measurement data based on transfer learning according to claim 6 is characterized in that: The method further comprises: The weight of the power flow constraint task is dynamically adjusted based on the learning rate.
8. A super-resolution perception device for distribution network measurement data based on transfer learning, characterized in that: The device comprises: The data set acquisition module is used to acquire high-frequency time series and perform preprocessing to obtain training sample data; A model pre-training module, used for building a cascade model based on a graph attention network and a transformer network, inputting the training sample data and an association matrix into the cascade model, and pre-training the cascade model, wherein the association matrix represents a topological connection relationship of a distribution network; A transfer learning module is used to divide the pre-trained cascade model into a learner part and a decision maker part, and perform transfer learning training to retain the model parameters that achieve the training objectives to obtain the final super-resolution perception model, wherein the learner part includes all layers except the linear output layer of the transformer, and the decision maker part includes the linear output layer of the transformer; The super-resolution perception module is used to input real-time measurement data into the super-resolution perception model to obtain a super-resolution measurement generation result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Deep reinforcement learning-based traveling salesman problem solving method and solving system
CN113420868A
Power distribution network topology identification method based on attention mechanism and convolutional neural network
CN114048819A
Power distribution network super-resolution measurement generation method and system based on graph attention network
CN115544752A
Topology real-time identification method and system based on power distribution network
CN117421571A
Cited By
25Hz phase-sensitive track circuit intelligent fault positioning method and system
CN120559392A
Voltage data expansion method and device, computer equipment, readable storage medium and program product
CN120873597A
Voltage data augmentation method and apparatus, computer device, readable storage medium and program product
CN120873597B
Graph structure representation and model error recognition method and device of BIM model
CN120976673A
Graph structure representation of BIM model and model error identification method and device
CN120976673B