A super-resolution perception method for distribution network measurement data based on transfer learning
By adopting the cascading model of graph attention network and Transformer network in the distribution network, and combining transfer learning and trend constraints, the problem of overfitting and topological reconstruction performance of graph neural networks in the distribution network super-resolution perception is solved, and a more efficient distribution network state perception is achieved.
Patent Information
- Application Number
- CN202411591136.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-11-08
AI Technical Summary
In the prior art, graph neural networks have overfitting problems and insufficient topological generalization capabilities in the super-resolution perception of distribution networks, resulting in a degradation of the model's performance during the topological reconstruction and migration of the actual distribution network.
Using a transfer learning-based method, a cascading model is constructed through the graph attention network and the Transformer network, which is divided into learners and decision makers for transfer learning training. Combining the multi-task learning framework and trend-constrained tasks, the model parameters are optimized, and the topological adaptability and generalization capabilities of the model are enhanced.
It improves the performance and effect of the model, reduces application costs, enhances the practicality of the model in the actual distribution network, and solves the problem of performance degradation in model overfitting and topological reconstruction in traditional methods.
Smart Images

Figure CN119539257B_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 from the distribution network is the basis for achieving precise state estimation of the distribution network. Currently, the collection of distribution network measurement information is mainly completed by a hybrid measurement system consisting of a supervisory control and data acquisition (SCADA) system, a wide area measurement system (WAMS) based on synchronized phasor measurement units (PMUs), and an advanced metering infrastructure (AMI). In this hybrid measurement system, not only is there an incomplete distribution of measurement devices, but the frequency of the collected measurement data is also low, 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 distribution network state perception effect.
[0003] In the existing technology, super-resolution perception methods for distribution network measurement data are mainly divided into two categories: physical-driven and data-driven. Among them, physical-driven mainly achieves perception through the construction of distribution network system models and the calculation of physical parameters. However, this method has many problems compared to data-driven methods: First, physical-driven methods are usually based on ideal physical models. 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. Methods based on traditional physical models are difficult to accurately describe the operating status of the actual distribution network; second, the excessive computational complexity of solving complex distribution network models makes it difficult to ensure the real-time performance of super-resolution perception.
[0004] Data-driven approaches typically involve using pre-trained deep learning models for perception, including convolutional neural networks (CNNs), recurrent neural networks (RNNs), and graph neural networks (GNNs). Because the distribution network is a naturally undirected graph topology, it contains not only the attributes of each node in the system but also spatial information about the connections between them. Graph neural networks (GNNs) can mine this potential information from both temporal and spatial dimensions, thereby improving model prediction accuracy. Traditional deep learning models, however, typically analyze node attributes in the distribution network only from a temporal perspective, resulting in lower prediction accuracy compared to graph neural networks. However, graph neural networks require stacking more layers to expand the scope of node information aggregation, allowing the model to learn the characteristic connections between each node and a wider range of nodes. Simply increasing the number of model layers not only makes the model bulky and significantly increases computational cost, but also easily leads to overfitting. Furthermore, traditional approaches fail to consider the practical application of the model. Because the structure of the actual distribution network differs significantly from the training topology, directly applying the pre-trained model to the actual distribution network can significantly degrade model performance.
[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 address the above technical problems and provide a distribution network measurement data super-resolution perception method based on transfer learning that can solve the overfitting problem caused by traditional methods 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] Constructing 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 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, retaining 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;
[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 normalized by softmax, and the 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, and 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 GAT block, encoder block and decoder block;
[0019] Use different training schemes for transfer learning training, evaluate the model training effect, and select the best training scheme.
[0020] Optionally, in one embodiment of the present application, the training program includes:
[0021] performing parameter updates on the GAT block, encoder block, and decoder block respectively;
[0022] Lock the GAT block and update the 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 the 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 device for super-resolution perception of distribution network measurement data based on transfer learning. The device comprises:
[0031] The data set acquisition module is used to obtain high-frequency time series and perform preprocessing to obtain training sample data;
[0032] A model pre-training module is used to construct a cascade model based on a graph attention network and a transformer network, input the training sample data and an 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;
[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, retaining 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 comprising a memory and a processor, wherein the memory stores a computer program and the processor executes the steps of the method described in each of the above embodiments.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in each of the above embodiments.
[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 the 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, retaining 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; finally, 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 explore 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 transformers, 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, solving the problem of difficulty in obtaining high-quality labeled data in the actual distribution network, reducing the application cost of the distribution network super-resolution perception model, and enhancing the practicality of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is a diagram of an application environment for a method for super-resolution perception of distribution network measurement data based on transfer learning in one embodiment;
[0039] Figure 2 1 is 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 Schematic diagram of search range limitation in transfer learning training in one embodiment;
[0042] Figure 5 Schematic diagram of a transfer learning training scheme in one embodiment;
[0043] Figure 6 1. A flow chart illustrating specific steps of a method for super-resolution perception of distribution network measurement data based on transfer learning in one embodiment;
[0044] Figure 7 1 is a structural block diagram of a device for super-resolution perception of distribution network measurement data based on transfer learning in one embodiment;
[0045] Figure 8 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0047] The embodiment of 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 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 as 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 following steps are used as an example to illustrate the server in the example:
[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, where 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 correlation 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] Currently, the most widely used graph neural networks include the spectral-domain-based graph convolutional neural network (GCN) and the spatial-domain-based graph attention network (GAT). However, GCN can only assign equal weights to neighboring nodes of the same order, and its use of fixed convolution kernels to aggregate neighboring node information makes GCN less capable of processing dynamic graphs. In contrast, GAT, by introducing an attention mechanism, assigns different weights to information transmission parameters, allowing it to learn the varying 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. Transformer networks can capture long-range dependencies through a multi-head self-attention mechanism, thereby exploring 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 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, the graph attention network GAT layer first 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 calculates h i and h j Perform feature extraction, and after the extraction is completed, adhere the information of the two and use the mapping vector α T The vector containing the feature information of both nodes i and j is mapped to a constant, and the mapping result is finally processed nonlinearly through the activation function. For ease of calculation, after the attention coefficients between the central node i and all first-order neighboring nodes are calculated, all attention coefficients need to be softmax normalized. When multiple GAT layers need to be stacked in the model, the input sequence can be first dimensionally increased and then dimensionally reduced, allowing the model to learn more complex feature information and improve model efficiency and performance. Specifically, the number of rows in the weight matrix W of each layer is used to control the length of the feature sequence of each node output by that layer.
[0073] The feature sequence of each node output by the GAT network needs 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 fixed dimension. At the same time, position encoding is added on this basis to represent 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. 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) The output of each attention mechanism 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] Here, W1 and W2 are weight matrices, and b1 and b2 are bias vectors. This part primarily consists of a two-layer neural network. The first layer maps the input to a higher-dimensional space and performs nonlinear processing. The second layer then converts it back to its original dimension through a linear transformation. This completes the encoder's work. The decoder operates similarly to the encoder. Both can be stacked to enable the model to learn more complex feature representations. The model then 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, retaining the model parameters that achieve the training objectives, and obtaining 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 pseudo-measurements generated not only have 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 transformer linear layer; 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 for the random initialization of the decision maker part, the learner part is directly copied from the pre-trained model, and fine-tuning or partial fine-tuning is subsequently performed on this basis.
[0081] During the training phase, the initialized model is assumed to be close to the optimal solution, so the search range of the model during training needs to be controlled. If no restrictions are placed on the training process, since the sample size of the new task during transfer learning is small, the more complex model can often remember the entire training set. Although the error of the model during training 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 dataset. Figure 4 The specific approach is to use a very small learning rate to complete the parameter update, and at the same time 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 for transfer learning training, evaluate the model training effect, and select the best 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 while ensuring model performance, 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 the new task 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 related to the output than the bottom layer. Therefore, in the scheme setting, a hierarchical learning rate setting is performed on 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 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-training model: 1. Do not lock any part of the pre-training model, and use learning rates from small to large (much smaller than the learning rate during the training of the pre-training 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, simultaneously 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 of the measurement data of the distribution network in any topological form, thereby effectively reducing the data acquisition cost when the model is actually applied. 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 topology 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 to GCN, GAT inherently has a stronger ability to process dynamic graphs. However, to enable the model to adaptively handle small changes in the distribution network topology, two measures are required: 1. Training the reconstructed topology based on the original topology allows the model to better adapt to new data characteristics. 2. Incorporating distribution network power flow constraints into the model allows the model to learn universal general physical laws, thereby enhancing its robustness.
[0097] First, in the pre-training process and transfer learning process of the model, the topology reconstruction needs to be completed by controlling the state of the reconstruction 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 reconstruction switches in the original topology, and the different state combinations of each reconstruction switch make the system have a total of 2 n If each topology is trained, the training cost will increase and the training efficiency will decrease. 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, and thus adaptively handle 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. 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 its 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 of 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 the power flow constraint task in the total tasks.
[0109] Traditional super-resolution perception methods usually use the Adam optimization algorithm to complete the model training process. In order to further accelerate the convergence speed and enable the model to converge to the optimal solution more accurately in the later stages of training, the Adam optimization algorithm is combined with the learning rate exponential decay strategy for training. The learning rate exponential decay strategy based on 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; and 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 parameter w can be trained to dynamically adjust the weight of the power flow constraint task based on the learning rate. The specific principle is shown in the following formula:
[0115]
[0116] Where 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 W is relatively slow, which allows the model to consider the power flow constraint to a certain extent while exploring the parameter space. As the training progresses, the learning rate gradually decreases, and W t Will accelerate the decay, 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 fed into 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 the 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, retaining 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; 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 explore 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 transformers, 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, solving the problem of difficulty in obtaining high-quality labeled data in the actual distribution network, reducing the application cost of the distribution network super-resolution perception model, and enhancing the practicality 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, simulation is first used to obtain the high-frequency datasets required for model pre-training and transfer learning. The pre-training model dataset is typically obtained through simulation on a smaller system, while the transfer learning dataset is obtained through simulation of an actual distribution network. Next, the data is pre-processed. First, linear normalization is performed to meet the requirements of model training. High-frequency labels are then down-sampled to obtain corresponding low-frequency data. Finally, the high-frequency labels and low-frequency data are classified and organized to obtain the final training samples. The training samples are then pre-trained in a GAT+transformer cascade model until the loss function reaches the desired value. The transfer learning dataset is then fed into the pre-trained model. Fine-tuning the pre-trained model allows it to quickly adapt to the super-resolution perception requirements of the actual distribution network, while selecting the most effective transfer learning solution. Finally, the model is applied online, pre-processing real-time measurement data from the actual distribution network before feeding it into the final model to generate super-resolution measurements.
[0123] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed 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 portion of steps or stages in other steps.
[0124] Based on the same inventive concept, the embodiments of the present application also provide a device for super-resolution perception of distribution network measurement data based on transfer learning, which is used to implement the above-mentioned method for super-resolution perception of distribution network measurement data based on transfer learning. The implementation solution provided by this device is similar to the implementation solution described in the above-mentioned method. Therefore, the specific limitations of one or more embodiments of the device for super-resolution perception of distribution network measurement data based on transfer learning provided below can be found in the above-mentioned limitations of the method for super-resolution perception of distribution network measurement data based on transfer learning, 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, retaining 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 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 configured 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 further used to:
[0133] The graph attention network layer is used to calculate the attention coefficient of low-frequency data, the attention coefficient is normalized by softmax, and the 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, and 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 configured to:
[0136] The learner part is divided into three parts, including GAT block, encoder block and decoder block;
[0137] Use different training schemes for transfer learning training, evaluate the model training effect, and select the best training scheme.
[0138] In one embodiment of the present application, the training program includes:
[0139] performing parameter updates on the GAT block, encoder block, and decoder block respectively;
[0140] Lock the GAT block and update the 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 aforementioned transfer learning-based super-resolution perception device for distribution network measurement data can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or stored in a computer device memory in software form, allowing the processor to call and execute the corresponding operations of each module.
[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 via a system bus. 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 covering the display screen, or a button, trackball or touchpad provided 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 shown in the figure, or combine certain components, or have a different component arrangement.
[0151] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above 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 will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented 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 memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of 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 the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0156] The technical features of the above embodiments can 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 merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for super-resolution perception of distribution network measurement data based on transfer learning, characterized in that: The method comprises: Obtaining a high-frequency time series and preprocessing it to obtain training sample data, wherein the training sample data includes high-frequency labels and low-frequency data, and the high-frequency time series includes instantaneous values of three-phase voltages, active power injected by nodes, and reactive power; Constructing 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 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, retaining 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; Inputting the real-time measurement data into the super-resolution perception model to obtain a super-resolution measurement generation result; The pretreatment includes: The high-frequency time series is linearly normalized and down-sampled.
2. The method for super-resolution perception of distribution network measurement data based on transfer learning according to claim 1 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 normalized by softmax, and the 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, and the linear layer of the transformer network outputs the super-resolution measurement result.
3. The method for super-resolution perception of distribution network measurement data based on transfer learning according to claim 1 is characterized in that: The transfer learning training includes: The learner part is divided into three parts, including GAT block, encoder block and decoder block; Use different training schemes for transfer learning training, evaluate the model training effect, and select the best training scheme.
4. The method for super-resolution perception of distribution network measurement data based on transfer learning according to claim 3 is characterized in that: The training program includes: performing parameter updates on the GAT block, encoder block, and decoder block respectively; Lock the GAT block and update the 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.
5. The method for super-resolution perception of distribution network measurement data based on transfer learning according to claim 1 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.
6. The method for super-resolution perception of distribution network measurement data based on transfer learning according to claim 5 is characterized in that: The method further comprises: The weight of the power flow constraint task is dynamically adjusted based on the learning rate.
7. A super-resolution perception device for distribution network measurement data based on transfer learning, characterized in that: The device comprises: A data set acquisition module is used to acquire high-frequency time series and perform preprocessing to obtain training sample data. The training sample data includes high-frequency labels and low-frequency data. The high-frequency time series includes instantaneous values of three-phase voltages, active power injected by nodes, and reactive power. A model pre-training module is used to construct a cascade model based on a graph attention network and a transformer network, input the training sample data and an 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; 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, retaining 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; A super-resolution perception module, configured to input real-time measurement data into the super-resolution perception model to obtain a super-resolution measurement generation result; The pretreatment includes: The high-frequency time series is linearly normalized and down-sampled.
8. 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 6 are implemented.
9. 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 6 are implemented.
Citation Information
Patent Citations
Deep reinforcement learning-based traveling salesman problem solving method and solving system
CN113420868A
Power distribution network super-resolution measurement generation method and system based on graph attention network
CN115544752A