Multi-physical-quantity spatial-temporal feature tracking method and device based on graph neural network
Through the multi-physical quantum spatiotemporal feature tracking method based on graph neural network, the problem of multi-physical quantum tracking of power system under new energy access in the existing technology is solved, and adaptive learning of the spatial and temporal characteristics and association relationships of physical quantum is realized, and the evaluation accuracy is improved. and robustness.
Patent Information
- Application Number
- CN202410998421.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-12-27
AI Technical Summary
The existing multi-physical quantum online tracking method based on digital twin network is difficult to capture physical quantum operation changes and background changes in the power system after new energy access, resulting in a degradation in the performance of evaluation and online tracking analysis, lack of online adaptability and space-time appearance construction. mold.
Using multi-physical quantum spatiotemporal feature tracking method based on graph neural network, extract frequency characteristics of historical and real-time data through shared convolutional networks and spatiotemporal graph attention networks, generate adaptive features, combine with associated feature networks to perform multi-physical quantum tracking, and use attention The mechanism focuses on important nodes and improves evaluation accuracy.
Adaptive learning of spatial and temporal characteristics and correlation relationships of physical quantities in the power system under the access of new energy is realized, the accuracy and robustness of multi-physical quantities' spatiotemporal characteristics evaluation and online tracking are improved, and the adaptability of evaluation results is enhanced.
Smart Images

Figure CN119202652A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of online safety and stability assessment and analysis of power systems, and more specifically, to a method and device for tracking spatiotemporal characteristics of multiple physical quantities based on graph neural networks. Background Art
[0002] In order to realize my country's energy transformation and achieve China's goal of "carbon peak and carbon neutrality", the scale of renewable energy power generation and grid connection will reach a new peak in the next 3-5 years. The scale of renewable energy installed capacity is expected to reach more than 1.2 billion kilowatts in 2030. The randomness, volatility and low anti-interference of renewable energy power generation pose great challenges to the safe and stable operation of the power system. As the proportion of installed capacity gradually increases, the impact of renewable energy power generation characteristics on power grid operation becomes increasingly prominent. It is difficult to evaluate, analyze and continuously track the multi-physical state of high-proportion renewable energy power systems during online operation.
[0003] The online safety and stability operation feature analysis and state tracking of multiple physical quantities is one of the key tasks of online safety and stability assessment and analysis of power systems, and is widely used in the field of online safety and stability assessment and analysis of power systems. This task starts with the input of a continuous grid time series operation data set sequence, and after processing the grid time series operation data set, the target tracking results are output, including the bounding box of the physical quantity and the corresponding ID number. Traditional multi-physical quantity tracking methods such as tracking methods based on probability density distribution and tracking methods based on particle filtering methods are unable to handle and adapt to complex tracking changes, and their robustness and accuracy are surpassed by cutting-edge algorithms. With the development of deep learning, deep learning technology has also been successfully applied to the tracking field. In the context of big data, the convolution feature output obtained by training the network model using deep learning has stronger expression ability, thereby obtaining better tracking results.
[0004] In recent years, the online operation status assessment and synchronous tracking of multi-physical quantities based on the digital twin network architecture of power systems have attracted more and more attention in the field of online evaluation and analysis of power systems. The digital twin network learns the similarity measurement between candidate patches of multi-physical quantities of power systems and current operation mode data of power grids in an end-to-end framework. With a powerful deep network and a large-scale labeled power grid time series operation data set for offline training, the tracker based on the digital twin network achieves good performance and efficiency. The network converts the tracking task into a template matching problem instead of a common binary classification problem. The digital twin structure network is a special structure in the convolutional neural network. It consists of two sub-networks with the same structure. The input of the network is two data, one of which is called template data, which usually selects the first operation data of the sequence, and the other is called operation mode data, which selects the subsequent operation data. Each sub-network is responsible for processing one piece of data. Through the forward calculation of the sub-network, the features of the data can be extracted. Finally, the features of the two are passed through the similarity measurement function, and finally a heat map is calculated, which represents the similarity value of each position in the operation mode data with the template data. There is no need to update the template during the entire tracking process, which greatly improves the speed of the algorithm. This is also a key point that has been difficult for neural networks in the field of deep learning to track multiple physical quantities in power systems. Until the digital twin network was applied to physical quantity tracking, it achieved good real-time performance under the condition of high tracking accuracy. When faced with challenges such as real-time performance, small fluctuations in the safe operation of the power grid, and low access ratio of new energy, the feature evaluation and tracking analysis methods of digital twin networks have advantages over other evaluation and analysis methods.
[0005] However, when a high proportion of renewable energy is connected to the power system, the multi-physical quantities in the power system operation process will often experience large unexpected oscillations due to the uncertainty of renewable energy output, which will cause large differences between the candidate boxes of the multi-physical quantities and the baseline templates, resulting in failures in feature evaluation and online tracking analysis. In addition, once rapid fluctuations and similar operating conditions occur under the access of renewable energy, the size of the operating mode data may not cover the physical quantities, and the result obtained by the final similarity measurement function is wrong. As the errors that occur during the evaluation process accumulate, the evaluation becomes unrecoverable, so the evaluation and online tracking analysis performance of the digital twin structure network will decline in complex backgrounds.
[0006] The reason for the above problems is that most existing methods do not fully utilize the spatiotemporal appearance modeling of physical quantities in different situations and the interaction between physical quantities. Most existing digital twin network-based methods ignore the search for correlation information between physical quantities to guide the adaptation of physical quantity models. Due to the lack of online adaptability, it is difficult for them to capture the changes in the operation, background or situation of physical quantities in the power system operation mode data, which may lead to the failure of evaluation and online tracking analysis. Summary of the invention
[0007] In view of the shortcomings of the prior art, the present invention provides a method and device for tracking spatiotemporal features of multiple physical quantities based on graph neural networks.
[0008] According to one aspect of the present invention, a method for tracking spatiotemporal features of multiple physical quantities based on a graph neural network is provided, comprising:
[0009] The acquired historical sample data and current operation mode data of the power system are respectively input into the feature extraction network to obtain the change frequency characteristics of the historical data and the change frequency characteristics of the real-time data, wherein the feature extraction network includes an interconnected shared convolutional network and a spatiotemporal graph attention network;
[0010] The current operation mode data is sequentially input into the shared convolutional network, the maximum pooling layer, and the deconvolution layer to obtain the associated features;
[0011] By using the correlation feature network, adaptive features are generated according to the frequency characteristics of historical data changes, the frequency characteristics of real-time data changes and the correlation features, the predicted position of each physical quantity in the current operating mode data is obtained, and multi-physical quantity tracking is completed.
[0012] Optionally, the acquired historical sample data and current operation mode data of the power system are respectively input into a feature extraction network to obtain the historical data change frequency characteristics and the real-time data change frequency characteristics, including:
[0013] Input historical sample data into the shared convolutional network to obtain a set of historical features;
[0014] Construct a historical feature undirected graph based on the historical feature set;
[0015] Input the historical feature undirected graph into the spatiotemporal graph attention network to obtain a refined historical feature set;
[0016] Aggregate the refined historical feature set to obtain the frequency characteristics of historical data changes;
[0017] Input the current operation mode data into the shared convolutional network to obtain the current feature set;
[0018] Construct the current feature undirected graph according to the current feature set;
[0019] Input the current feature undirected graph into the spatiotemporal graph attention network to obtain a refined current feature set;
[0020] Aggregate the refined current feature set to obtain real-time data change frequency characteristics.
[0021] Optionally, the historical sample data includes a number of continuous power grid time series operation data sets, and the historical sample data is input into a shared convolutional network to obtain a historical feature set, including:
[0022] Based on several continuous power grid time series operation data sets and the physical quantity detection features in the physical quantities in each operation data set, a shared convolutional network is used to embed features of the input physical quantity objects in different physical quantity areas in all power grid time series operation data sets to obtain a historical feature set.
[0023] Optionally, the historical feature undirected graph includes a node set and an edge set, wherein the node set is composed of all physical quantity parts in the embedded sequence of the historical feature set, and the edge set includes first-category edges and second-category edges, the first-category edges are spatial edges, representing intra-sample connections of physical quantities in each running data set; the second-category edges are temporal edges, obtained by connecting parts of continuous running data with the same position as the temporal edges.
[0024] Optionally, the refined historical feature set includes vertex features and neighbor features, and the refined historical feature set is aggregated to obtain historical data change frequency features, including:
[0025] Calculate the similarity coefficient between vertex features and neighbor features in the refined historical feature set;
[0026] Normalizing the attention coefficient of the refined historical feature set according to the similarity coefficient to obtain the normalized attention coefficient;
[0027] The node features to be aggregated are weighted and summed according to the normalized attention coefficient, and enhanced through the multi-head attention mechanism to obtain enhanced new node features;
[0028] New node features enhanced by aggregation features along the time axis are used to obtain the frequency characteristics of historical data changes.
[0029] Optionally, the similarity coefficient is calculated as:
[0030]
[0031] In the formula, is the vertex feature, is the neighbor feature, w is the shared parameter, || is the feature concatenation operation, A() is the feature mapping operation, N iis the set of node features adjacent to vertex i, j is the sequence number of the node feature;
[0032] Normalized attention coefficient a ij The calculation formula is:
[0033]
[0034] In the formula, e ik is the attention coefficient, LeakReLU() is the activation function, and k is the serial number of the neighbor node adjacent to vertex i;
[0035] New node features The calculation formula is:
[0036]
[0037] In the formula, || is the connection operation, K is the total number of node features associated with vertex i, and θ() is the nonlinear activation function;
[0038] The calculation formula of the historical data change frequency feature V1 is:
[0039]
[0040] In the formula, MaxP() is the maximum pooling, To enhance the historical trajectory of node features, is the enhanced node feature located at tK running data in the historical trajectory, is the enhanced node feature of the running data at t-T+1 in the historical trajectory, It is the enhanced node feature of the running data at t-1 in the historical trajectory.
[0041] Optionally, the calculation formula of the real-time data change frequency characteristic is:
[0042]
[0043] In the formula, is the combination of all enhanced physical quantity node features in the t operation data, is the first enhanced node feature of the t-th running data, is the second enhanced node feature of the t-th running data, The n-th enhanced node feature for the t-th run data.
[0044] Optionally, the current operation mode data is sequentially input into the shared convolutional network, the maximum pooling layer, and the deconvolution layer to obtain associated features, including:
[0045] Input the current operation mode data into the shared convolutional network to obtain the instance embedding of the current operation mode data;
[0046] The instance embedding of the current operation mode data is input into the convolution layer and the maximum pooling layer in sequence to obtain the global features of the current operation mode data, where the size of the global feature is m×1, the convolution layer sets m filters, the kernel size is S1×S1, the step size is 1, and the size of the maximum pooling layer is T;
[0047] The global features are input into the deconvolution layer to obtain the associated features.
[0048] Optionally, using the correlation feature network, adaptive features are generated according to the historical data change frequency features, the real-time data change frequency features and the correlation features to obtain the predicted position of each physical quantity in the current operation mode data and complete multi-physical quantity tracking, including:
[0049] The historical data change frequency feature, the real-time data change frequency feature and the correlation feature are fused by element addition to obtain the fusion feature;
[0050] Generate an adaptive graph based on the fused features;
[0051] Input the adaptive graph and the historical data change frequency features into the associated feature network to obtain the adaptive features;
[0052] Based on the adaptive features and the instance embedding of the current operating mode data, through correlation analysis, the predicted position of each physical quantity in the current operating mode data is obtained, and multi-physical quantity tracking is completed.
[0053] Optionally, the adjacency matrix of the adaptive graph is expressed as:
[0054]
[0055] Where N n Indicates the number of physical quantities in the current running data, V x,n is the fusion feature V x The nth column vector, V x,m is the fusion feature V x The m-th column vector of , g() and n() are both convolutional layers with m filters.
[0056] According to another aspect of the present invention, a multi-physical quantity spatiotemporal feature tracking device based on a graph neural network is provided, comprising:
[0057] A first acquisition module is used to input the acquired historical sample data and current operation mode data of the power system into a feature extraction network respectively to obtain the historical data change frequency characteristics and the real-time data change frequency characteristics, wherein the feature extraction network includes an interconnected shared convolutional network and a spatiotemporal graph attention network;
[0058] The second acquisition module is used to input the current operation mode data into the shared convolutional network, the maximum pooling layer and the deconvolution layer in sequence to obtain the associated features;
[0059] The third acquisition module is used to use the associated feature network to generate adaptive features based on the frequency characteristics of historical data changes, the frequency characteristics of real-time data changes and the associated features, obtain the predicted position of each physical quantity in the current operating mode data, and complete multi-physical quantity tracking.
[0060] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the method described in any one of the above aspects of the present invention.
[0061] According to another aspect of the present invention, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of the above aspects of the present invention.
[0062] Therefore, the present invention provides a method for tracking spatiotemporal characteristics of multiple physical quantities in an electric power system based on a graph neural network. The spatiotemporal graph attention network and the correlation feature network are added to the network architecture, and the spatiotemporal characteristics of the physical quantities in the online operation of the electric power system under the access of new energy sources and the adaptive learning of the correlation relationship between multiple physical quantities can be combined to realize the evaluation, analysis and online tracking of the spatiotemporal characteristics of multiple physical quantities. In addition, according to the characteristic that the degree of correlation between different targets is different, the attention mechanism is used to make the model focus on important nodes when processing power grid operation data, thereby improving the accuracy of the evaluation. At the same time, the interaction and spatiotemporal characteristics between multiple physical quantities in the power grid operation data are considered, and the evaluation results are more robust. The present invention considers using the relationship between physical quantities to learn the correlation feature information in the current operation data. In the feature adaptation guided by correlation, the current operation mode data provides useful historical background information, which is helpful for feature adaptive learning and realizing the scale adaptation of physical quantities. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:
[0064] Figure 1 It is a flowchart of a method for tracking spatiotemporal features of multiple physical quantities based on a graph neural network provided by an exemplary embodiment of the present invention;
[0065] Figure 2 It is a network principle diagram of a multi-physical quantity spatiotemporal feature tracking method based on a graph neural network provided by an exemplary embodiment of the present invention;
[0066] Figure 3It is another network principle diagram of a multi-physical quantity spatiotemporal feature tracking method based on a graph neural network provided by an exemplary embodiment of the present invention;
[0067] Figure 4 It is a schematic diagram of the structure of a multi-physical quantity spatiotemporal feature tracking device based on a graph neural network provided by an exemplary embodiment of the present invention;
[0068] Figure 5 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0069] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.
[0070] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0071] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0072] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0073] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0074] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0075] It should also be understood that the description of the various embodiments of the present invention focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0076] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0077] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0078] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0079] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0080] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0081] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0082] Exemplary Methods
[0083] Figure 1 is a flow chart of a method for tracking spatiotemporal features of multiple physical quantities based on a graph neural network provided by an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the multi-physical quantity spatiotemporal feature tracking method 100 based on graph neural network includes the following steps:
[0084] Step 101, inputting the acquired historical sample data and current operation mode data of the power system into a feature extraction network respectively, obtaining the historical data change frequency feature and the real-time data change frequency feature, wherein the feature extraction network includes an interconnected shared convolutional network and a spatiotemporal graph attention network;
[0085] Step 102, inputting the current operation mode data into the shared convolutional network, the maximum pooling layer and the deconvolution layer in sequence to obtain associated features;
[0086] Step 103, using the correlation feature network, generating adaptive features according to the historical data change frequency features, the real-time data change frequency features and the correlation features, obtaining the predicted position of each physical quantity in the current operation mode data, and completing multi-physical quantity tracking.
[0087] Specifically, the present invention proposes a method for tracking spatiotemporal characteristics of multiple physical quantities of a power system based on a graph neural network, comprising the following steps:
[0088] S1. Obtain historical sample data and current operation mode data, input the historical sample data and the current operation mode data into a feature extraction network respectively, and obtain HFP features and RTFC features; wherein the feature extraction network includes an interconnected shared convolutional network and a spatiotemporal graph attention network;
[0089] S2, input the current operation mode data into the shared convolutional network, the maximum pooling layer and the deconvolution layer in sequence to obtain the associated features;
[0090] S3. Generate adaptive features based on HFP features, RTFC features and associated features through the associated feature network to obtain the predicted position of each physical quantity in the current operating mode data and complete multi-physical quantity tracking.
[0091] The network architecture of the present invention is as follows Figure 2-3 As shown in the figure, the architecture jointly incorporates the spatiotemporal graph attention network and the associated feature network into the twin network framework of physical quantity appearance modeling, and uses the spatiotemporal graph attention network to structure the historical sample data and model the physical quantity sample representation that fully considers the interaction between physical quantities. In addition, by setting up an associated graph convolutional network, the associated learning adaptive features of the current framework are used to locate the physical quantity, thereby achieving high-performance, safe and stable evaluation, analysis and tracking.
[0092] In S1, the method for the feature extraction network to process the historical sample data and the current operation mode data is the same, wherein the method for the feature extraction network to process the historical sample data is specifically:
[0093] S11, inputting historical sample data into the shared convolutional network to obtain a feature set;
[0094] S12. Construct an undirected graph based on the feature set, input the undirected graph into the spatiotemporal graph attention network to obtain a refined feature set, and aggregate the refined feature set to obtain HFP features.
[0095] like Figure 2-3 As shown, historical sample data is input into a shared convolutional network, and the generated feature set is specifically cross-run data sample embedding. In order to perform spatiotemporal modeling of physical quantity objects, the present invention constructs an undirected graph on a sample embedding sequence of Nz nodes in continuous T run data, where each run data contains Nz nodes.
[0096] In said S11, the historical sample data includes a number of continuous power grid time series operation data sets;
[0097] The method for obtaining the feature set is as follows:
[0098] Based on several continuous power grid timing operation data sets and the spatiotemporal characteristics of physical quantities in each operation data set, a shared convolutional network is used to embed features of different physical quantity regions of the input target object in all power grid timing operation data sets to obtain a feature set.
[0099] In S12, the undirected graph includes a node set and an edge set, wherein the node set is composed of all physical quantity parts in the embedded sequence of the feature set, and the edge set includes first and second type edges, the first type of edge is a spatial edge, which represents the intra-sample connection of the physical quantity in each running data set; the method for obtaining the second type of edge is: connecting through the parts in the continuous running data with the same position as the time edge.
[0100] In this embodiment, considering that the edge set includes the first and second types of edges, the present invention uses the attention mechanism to limit each node to only select Nz nodes with the largest weight, so that the constructed spatiotemporal graph is sparse, reducing the computational cost of graph convolution operations.
[0101] In S12, the refined feature set includes vertex features and neighbor features, and the method for obtaining the HFP feature is specifically as follows:
[0102] S121. Calculate vertex features With neighbor characteristics The similarity coefficient e ij ;
[0103]
[0104] In the formula, w is a shared parameter, || is a feature concatenation operation, A() is a feature mapping operation, and N i is the set of node features adjacent to vertex i, j is the sequence number of the node feature;
[0105] In S121, the linear mapping of the shared parameter W increases the dimension of the vertex features, || concatenates the transformed features of the vertex features, and A() maps the concatenated high-dimensional features to a real number.
[0106] S122, normalize the attention coefficient according to the similarity coefficient to obtain a normalized attention coefficient a ij ;
[0107]
[0108] In the formula, e ik is the attention coefficient, LeakReLU() is the activation function, and k is the serial number of the neighbor node adjacent to vertex i;
[0109] S123: perform weighted summation of the node features to be aggregated according to the normalized attention coefficient, and enhance them through the multi-head attention mechanism to obtain enhanced new node features.
[0110]
[0111] In the formula, || is the connection operation, K is the total number of node features associated with vertex i, and θ() is the nonlinear activation function;
[0112] S124, aggregating the new node features enhanced by features along the time axis to obtain HFP features V1;
[0113]
[0114] In the formula, MaxP() is the maximum pooling, To enhance the historical trajectory of node features, is the enhanced node feature located at tK running data in the historical trajectory, is the enhanced node feature of the running data at t-T+1 in the historical trajectory, It is the enhanced node feature of the running data at t-1 in the historical trajectory.
[0115] In this embodiment, in order to reduce the computational burden of subsequent layers, the present invention aggregates features along the time axis to obtain a compact feature V1.
[0116] In S1, the expression of feature V3 is obtained as follows:
[0117]
[0118] In the formula, is the combination of all enhanced physical quantity node features in the t operation data, is the first enhanced node feature of the t-th running data, is the second enhanced node feature of the t-th running data, The n-th enhanced node feature for the t-th run data.
[0119] The S2 comprises the following sub-steps:
[0120] S21, inputting the current operation mode data into the shared convolutional network to obtain instance embedding of the current operation mode data;
[0121] S22, embedding the instance of the current operation mode data into the convolution layer and the maximum pooling layer in sequence to obtain a global feature;
[0122] S23. Input the global features into the deconvolution layer to obtain the associated features.
[0123] like Figure 2-3 As shown, the network framework of the present invention not only models the spatiotemporal structure between target samples, but also combines the temporal characteristics of the physical quantity of the current operation mode to guide the adaptive feature learning. In order to make full use of the spatiotemporal information of physical quantities, a graph learning model is integrated into the framework, which generates an adaptive graph to guide the physical quantity feature network.
[0124] In S22, the size of the global feature is m×1, the convolution layer sets m filters, the kernel size is S1×S1, the step size is 1, and the size of the maximum pooling layer is T. In this patent, m is 256, S1 is 3, and T is 484.
[0125] The S3 comprises the following sub-steps:
[0126] S31, fusing the HFP feature, the RTFC feature and the associated feature by element addition to obtain a fused feature;
[0127] S32, generating an adaptive graph according to the fusion features;
[0128] S33, inputting the adaptive graph and the HFP feature into the associated feature network to obtain the adaptive feature;
[0129] S34. Obtain the predicted position of each physical quantity in the current operation mode data through correlation analysis based on the adaptive features and the instance embedding of the current operation mode data.
[0130] In S31, the fusion feature V is obtained. x The specific expression is:
[0131] V x =V1+V3+ψ t (n)
[0132] In the formula, ψ t(n) is the temporal correlation characteristic of physical quantity.
[0133] In S32, the expression of the adjacency matrix of the adaptive graph is:
[0134]
[0135] Where N n Indicates the number of physical quantities in the current running data, V x,n is the fusion feature V x The nth column vector, V x,m is the fusion feature V x The m-th column vector of , g() and n() are both convolutional layers with m filters.
[0136] The beneficial effects of the present invention are:
[0137] (1) The present invention provides a method for tracking the spatiotemporal characteristics of multiple physical quantities in a power system based on a graph neural network. By adding a spatiotemporal graph attention network and a correlation feature network to the network architecture, the spatiotemporal characteristics of physical quantities in the online operation of the power system under the access of new energy sources and the adaptive learning of the correlation relationship between multiple physical quantities can be combined to achieve the evaluation, analysis and online tracking of the spatiotemporal characteristics of multiple physical quantities. In addition, based on the characteristic that the degree of correlation between different targets is different, the attention mechanism is used to enable the model to focus on important nodes when processing power grid operation data, thereby improving the evaluation accuracy.
[0138] (2) The present invention simultaneously considers the interaction and spatiotemporal characteristics between multiple physical quantities of power grid operation data, and the evaluation results are more robust. The present invention considers using the relationship between physical quantities to learn the associated feature information in the current operation data. In the feature adaptation guided by association, the current operation mode data provides useful historical background information, which is helpful for feature adaptive learning and realizes the scale adaptation of physical quantities.
[0139] (3) In view of the situation where different nodes in the graph have no weights, the present invention aggregates the spatiotemporal features of physical quantities using a graph neural network with an attention mechanism, so that the nodes in the graph can fully utilize the topological structure information of the graph and obtain more robust feature analysis results.
[0140] Exemplary Devices
[0141] Figure 4 Schematic diagram of a multi-physical quantity spatiotemporal feature tracking device based on a graph neural network provided by an exemplary embodiment of the present invention. Figure 4 As shown, the device 400 includes:
[0142] A first acquisition module 410 is used to input the acquired historical sample data and current operation mode data of the power system into a feature extraction network respectively to obtain the historical data change frequency feature and the real-time data change frequency feature, wherein the feature extraction network includes a shared convolutional network and a spatiotemporal graph attention network connected to each other;
[0143] A second acquisition module 420 is used to input the current operation mode data into the shared convolutional network, the maximum pooling layer and the deconvolution layer in sequence to obtain associated features;
[0144] The third acquisition module 430 is used to use the correlation feature network to generate adaptive features according to the historical data change frequency characteristics, the real-time data change frequency characteristics and the correlation features, obtain the predicted position of each physical quantity in the current operation mode data, and complete multi-physical quantity tracking.
[0145] Optionally, the first acquisition module 410 includes:
[0146] Input historical sample data into the shared convolutional network to obtain a set of historical features;
[0147] Construct a historical feature undirected graph based on the historical feature set;
[0148] Input the historical feature undirected graph into the spatiotemporal graph attention network to obtain a refined historical feature set;
[0149] Aggregate the refined historical feature set to obtain the frequency characteristics of historical data changes;
[0150] Input the current operation mode data into the shared convolutional network to obtain the current feature set;
[0151] Construct the current feature undirected graph according to the current feature set;
[0152] Input the current feature undirected graph into the spatiotemporal graph attention network to obtain a refined current feature set;
[0153] Aggregate the refined current feature set to obtain real-time data change frequency characteristics.
[0154] Optionally, the historical sample data includes a number of continuous power grid time series operation data sets, and the historical sample data is input into a shared convolutional network to obtain a historical feature set, including:
[0155] Based on several continuous power grid time series operation data sets and the physical quantity detection features in the physical quantities in each operation data set, a shared convolutional network is used to embed features of the input physical quantity objects in different physical quantity areas in all power grid time series operation data sets to obtain a historical feature set.
[0156] Optionally, the historical feature undirected graph includes a node set and an edge set, wherein the node set is composed of all physical quantity parts in the embedded sequence of the historical feature set, and the edge set includes first-category edges and second-category edges, the first-category edges are spatial edges, representing intra-sample connections of physical quantities in each running data set; the second-category edges are temporal edges, obtained by connecting parts of continuous running data with the same position as the temporal edges.
[0157] Optionally, the refined historical feature set includes vertex features and neighbor features, and the refined historical feature set is aggregated to obtain historical data change frequency features, including:
[0158] Calculate the similarity coefficient between vertex features and neighbor features in the refined historical feature set;
[0159] Normalizing the attention coefficient of the refined historical feature set according to the similarity coefficient to obtain the normalized attention coefficient;
[0160] The node features to be aggregated are weighted and summed according to the normalized attention coefficient, and enhanced through the multi-head attention mechanism to obtain enhanced new node features;
[0161] New node features enhanced by aggregation features along the time axis are used to obtain the frequency characteristics of historical data changes.
[0162] Optionally, the similarity coefficient is calculated as:
[0163]
[0164] In the formula, is the vertex feature, is the neighbor feature, w is the shared parameter, || is the feature concatenation operation, A() is the feature mapping operation, N i is the set of node features adjacent to vertex i, j is the sequence number of the node feature;
[0165] Normalized attention coefficient a ij The calculation formula is:
[0166]
[0167] In the formula, e ik is the attention coefficient, LeakReLU() is the activation function, and k is the serial number of the neighbor node adjacent to vertex i;
[0168] New node features The calculation formula is:
[0169]
[0170] In the formula, || is the connection operation, K is the total number of node features associated with vertex i, and θ() is the nonlinear activation function;
[0171] The calculation formula of the historical data change frequency feature V1 is:
[0172]
[0173] In the formula, MaxP() is the maximum pooling, To enhance the historical trajectory of node features, is the enhanced node feature located at tK running data in the historical trajectory, is the enhanced node feature of the running data at t-T+1 in the historical trajectory, It is the enhanced node feature of the running data at t-1 in the historical trajectory.
[0174] Optionally, the calculation formula of the real-time data change frequency characteristic is:
[0175]
[0176] In the formula, is the combination of all enhanced physical quantity node features in the t operation data, is the first enhanced node feature of the t-th running data, is the second enhanced node feature of the t-th running data, The n-th enhanced node feature for the t-th run data.
[0177] Optionally, the second acquisition module 420 includes:
[0178] Input the current operation mode data into the shared convolutional network to obtain the instance embedding of the current operation mode data;
[0179] The instance embedding of the current operation mode data is input into the convolution layer and the maximum pooling layer in sequence to obtain the global features of the current operation mode data, where the size of the global feature is m×1, the convolution layer sets m filters, the kernel size is S1×S1, the step size is 1, and the size of the maximum pooling layer is T;
[0180] The global features are input into the deconvolution layer to obtain the associated features.
[0181] Optionally, the third acquisition module 430 includes:
[0182] The historical data change frequency feature, the real-time data change frequency feature and the correlation feature are fused by element addition to obtain the fusion feature;
[0183] Generate an adaptive graph based on the fused features;
[0184] Input the adaptive graph and the historical data change frequency features into the associated feature network to obtain the adaptive features;
[0185] Based on the adaptive features and the instance embedding of the current operating mode data, through correlation analysis, the predicted position of each physical quantity in the current operating mode data is obtained, and multi-physical quantity tracking is completed.
[0186] Optionally, the adjacency matrix of the adaptive graph is expressed as:
[0187]
[0188] Where N n Indicates the number of physical quantities in the current running data, V x,n is the fusion feature V x The nth column vector, V x,m is the fusion feature V x The m-th column vector of , g() and n() are both convolutional layers with m filters.
[0189] Exemplary Electronic Devices
[0190] Figure 5 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. Figure 5 As shown, the electronic device 50 includes one or more processors 51 and a memory 52 .
[0191] The processor 51 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0192] The memory 52 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 51 may run the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above and / or other desired functions. In one example, the electronic device may also include: an input device 53 and an output device 54, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0193] In addition, the input device 53 may also include, for example, a keyboard, a mouse, etc.
[0194] The output device 54 can output various information to the outside. The output device 54 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto.
[0195] Of course, to simplify, Figure 5 Only some of the components related to the present invention in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application conditions.
[0196] Exemplary computer program products and computer-readable storage media
[0197] In addition to the above-mentioned methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above-mentioned "Exemplary Method" section of this specification.
[0198] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present invention, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0199] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0200] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, system or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0201] The basic principle of the present invention is described above in conjunction with specific embodiments. However, it should be pointed out that the advantages, strengths, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present invention. In addition, the specific details disclosed above are only for the purpose of illustration and facilitation of understanding, rather than limitation, and the above details do not limit the present invention to being implemented by adopting the above specific details.
[0202] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0203] The block diagrams of the devices, systems, equipment, and systems involved in the present invention are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, systems, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0204] The method and system of the present invention may be implemented in many ways. For example, the method and system of the present invention may be implemented by software, hardware, firmware or any combination of software, hardware, firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
[0205] It should also be noted that in the system, device and method of the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present invention. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined here can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown here, but in accordance with the widest range consistent with the principles and novel features disclosed here.
[0206] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A multi-physical quantity spatiotemporal feature tracking method based on graph neural network, characterized in that: include: Inputting the acquired historical sample data and current operation mode data of the power system into a feature extraction network respectively to obtain the historical data change frequency characteristics and the real-time data change frequency characteristics, wherein the feature extraction network includes an interconnected shared convolutional network and a spatiotemporal graph attention network; Inputting the current operation mode data into the shared convolutional network, the maximum pooling layer and the deconvolution layer in sequence to obtain associated features; By using the correlation feature network, adaptive features are generated according to the frequency characteristics of historical data changes, the frequency characteristics of real-time data changes and the correlation features, the predicted position of each physical quantity in the current operating mode data is obtained, and multi-physical quantity tracking is completed.
2. The method according to claim 1, characterized in that: The acquired historical sample data and current operation mode data of the power system are respectively input into the feature extraction network to obtain the frequency characteristics of historical data changes and the frequency characteristics of real-time data changes, including: Inputting the historical sample data into the shared convolutional network to obtain a historical feature set; Constructing a historical feature undirected graph according to the historical feature set; Inputting the historical feature undirected graph into the spatiotemporal graph attention network to obtain a refined historical feature set; Aggregating the refined historical feature set to obtain the historical data change frequency feature; Inputting the current operation mode data into the shared convolutional network to obtain a current feature set; Constructing a current feature undirected graph according to the current feature set; Inputting the current feature undirected graph into the spatiotemporal graph attention network to obtain a refined current feature set; Aggregation processing is performed on the refined current feature set to obtain the real-time data change frequency feature.
3. The method according to claim 2, characterized in that The historical sample data includes a plurality of continuous power grid time series operation data sets, and the historical sample data is input into the shared convolutional network to obtain a historical feature set, including: Based on the several continuous power grid timing operation data sets and the physical quantity detection features in the physical quantities in each operation data set, the shared convolutional network is used to perform feature embedding on different physical quantity areas of the input physical quantity object in all power grid timing operation data sets to obtain the historical feature set.
4. The method according to claim 2, characterized in that: The historical feature undirected graph includes a node set and an edge set, wherein the node set is composed of all physical quantity parts in the embedded sequence of the historical feature set, and the edge set includes first-type edges and second-type edges, the first-type edges are spatial edges, representing the intra-sample connection of the physical quantities in each running data set; the second-type edges are time edges, which are obtained by connecting the parts of the continuous running data with the same position as the time edges.
5. The method according to claim 2, characterized in that: The refined historical feature set includes vertex features and neighbor features, and the refined historical feature set is aggregated to obtain the historical data change frequency feature, including: Calculating similarity coefficients between vertex features and neighbor features in the refined historical feature set; Normalizing the attention coefficient of the refined historical feature set according to the similarity coefficient to obtain a normalized attention coefficient; Performing weighted summation of the node features to be aggregated according to the normalized attention coefficient, and enhancing them through a multi-head attention mechanism to obtain enhanced new node features; The new node features enhanced by feature aggregation are performed along the time axis to obtain the frequency characteristics of changes in the historical data.
6. The method according to claim 5, characterized in that The calculation formula of the similarity coefficient is: In the formula, is the vertex feature, is the neighbor feature, w is the shared parameter, || is the feature concatenation operation, A() is the feature mapping operation, N i is the set of node features adjacent to vertex i, j is the sequence number of the node feature; The normalized attention coefficient a ij The calculation formula is: In the formula, e ik is the attention coefficient, LeakReLU() is the activation function, and k is the serial number of the neighbor node adjacent to vertex i; The new node features The calculation formula is: In the formula, || is the connection operation, K is the total number of node features associated with vertex i, and θ() is the nonlinear activation function; The calculation formula of the historical data change frequency characteristic V1 is: In the formula, MaxP() is the maximum pooling, To enhance the historical trajectory of node features, is the enhanced node feature located at tK running data in the historical trajectory, is the enhanced node feature of the running data at t-T+1 in the historical trajectory, It is the enhanced node feature of the running data at t-1 in the historical trajectory.
7. The method according to claim 2, characterized in that The calculation formula of the real-time data change frequency characteristic is: In the formula, is the combination of all enhanced physical quantity node features in the t operation data, is the first enhanced node feature of the t-th running data, is the second enhanced node feature of the t-th running data, The n-th enhanced node feature for the t-th run data.
8. The method according to claim 1, characterized in that The current operation mode data is sequentially input into the shared convolutional network, the maximum pooling layer and the deconvolution layer to obtain associated features, including: Inputting the current operation mode data into the shared convolutional network to obtain instance embedding of the current operation mode data; Embed the instance of the current operation mode data into a convolution layer and a maximum pooling layer in sequence to obtain a global feature of the current operation mode data, wherein the size of the global feature is m×1, the convolution layer is provided with m filters, the kernel size is S1×S1, the step size is 1, and the size of the maximum pooling layer is T; The global features are input into the deconvolution layer to obtain the associated features.
9. The method according to claim 8, characterized in that By using the correlation feature network, adaptive features are generated based on the frequency characteristics of historical data changes, the frequency characteristics of real-time data changes, and the correlation features, and the predicted position of each physical quantity in the current operation mode data is obtained to complete multi-physical quantity tracking, including: The historical data change frequency feature, the real-time data change frequency feature and the association feature are fused by element addition to obtain a fused feature; generating an adaptive graph according to the fused features; Inputting the adaptive graph and the historical data change frequency feature into a correlation feature network to obtain an adaptive feature; According to the adaptive features and the instance embedding of the current operation mode data, a predicted position of each physical quantity in the current operation mode data is obtained through correlation analysis, thereby completing multi-physical quantity tracking.
10. The method according to claim 9, characterized in that: The expression of the adjacency matrix of the adaptive graph is: Where N n Indicates the number of physical quantities in the current running data, V x,n is the fusion feature V x The nth column vector, V x,m is the fusion feature V x The m-th column vector of , g() and n() are both convolutional layers with m filters.
11. A multi-physical quantity spatiotemporal feature tracking device based on graph neural network, characterized in that: include: A first acquisition module is used to input the acquired historical sample data and current operation mode data of the power system into a feature extraction network respectively to obtain the historical data change frequency characteristics and the real-time data change frequency characteristics, wherein the feature extraction network includes an interconnected shared convolutional network and a spatiotemporal graph attention network; A second acquisition module is used to input the current operation mode data into the shared convolutional network, the maximum pooling layer and the deconvolution layer in sequence to obtain associated features; The third acquisition module is used to use the associated feature network to generate adaptive features based on the frequency characteristics of historical data changes, the frequency characteristics of real-time data changes and the associated features, obtain the predicted position of each physical quantity in the current operating mode data, and complete multi-physical quantity tracking.
12. The device according to claim 11, characterized in that The first acquisition module includes: Inputting the historical sample data into the shared convolutional network to obtain a historical feature set; Constructing a historical feature undirected graph according to the historical feature set; Inputting the historical feature undirected graph into the spatiotemporal graph attention network to obtain a refined historical feature set; Aggregating the refined historical feature set to obtain the historical data change frequency feature; Inputting the current operation mode data into the shared convolutional network to obtain a current feature set; Constructing a current feature undirected graph according to the current feature set; Inputting the current feature undirected graph into the spatiotemporal graph attention network to obtain a refined current feature set; Aggregation processing is performed on the refined current feature set to obtain the real-time data change frequency feature.
13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 10.
14. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1-10.
