Power grid abnormity monitoring method, device, equipment, medium and program product
By constructing a two-level topological structure and graph network model of the power grid to evaluate power grid anomalies, the complexity problem of power grid monitoring caused by large-scale renewable energy access is solved, and power grid monitoring with lower complexity and higher reliability is achieved.
Patent Information
- Application Number
- CN202510613879.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-09-16
AI Technical Summary
With the large-scale access of renewable energy, grid operation has become complex and unpredictable. The existing grid monitoring system is highly complex and has a large amount of data, which leads to increased maintenance costs and interruptions in central server processing, affecting system operation.
A two-level topology structure is adopted, and the pre-divided microgrid is used to build global and local topology maps for nodes. The grid anomalies are evaluated through a graph network model, which reduces the amount of data in a single evaluation process, reduces the system complexity, and locally summarizes the status data of microgrid nodes, reducing dependence on the central server.
It reduces system complexity and maintenance costs, improves the model's robustness to noise and system reliability, can better process heterogeneous data, adapt to power grid changes, and enhances the system's fault tolerance.
Smart Images

Figure CN120657943A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of power grid security technology, and in particular to a power grid anomaly monitoring method, device, equipment, medium, and program product. Background Art
[0002] With the large-scale integration of renewable energy into the power grid, the operation of the power grid has become more complex and unpredictable. Therefore, monitoring the power grid status has become a necessary means to ensure the safe and stable operation of the power grid.
[0003] Currently, the status data of the corresponding equipment during operation is mainly collected by sensors deployed on key power grid equipment, and the collected status data is analyzed and calculated using cloud computing, big data analysis, and artificial intelligence algorithms. Based on the results of analysis and calculation, a comprehensive assessment of the power grid status is carried out, thereby realizing the monitoring of the power grid status.
[0004] However, as the scale of the power grid increases, the amount of collected status data inevitably increases, and accordingly, the number of algorithm parameters and steps involved in data analysis and calculation also increases. This approach inevitably leads to increased complexity in the power grid monitoring system, rising maintenance costs, and increasing the challenges of data fusion and processing. Moreover, the huge amount of data can easily cause processing interruptions in the central server, thus affecting the operation of the entire system. Summary of the Invention
[0005] In order to solve the above technical problems, the present disclosure provides a power grid anomaly monitoring method, device, equipment, medium and program product.
[0006] In a first aspect, the present disclosure provides a method for monitoring power grid anomalies, comprising:
[0007] A global topology map corresponding to the power grid is constructed with pre-divided microgrids as nodes, and a local topology map corresponding to the microgrid is constructed with physical devices as nodes; a first adjacency matrix and a first characteristic matrix corresponding to the global topology map are obtained, and a second adjacency matrix and a second characteristic matrix corresponding to the local topology map are obtained; the first adjacency matrix and the first characteristic matrix are input into a pre-trained first graph network model to obtain a first evaluation sequence, which includes a first evaluation value corresponding to each microgrid; the second adjacency matrix and the second characteristic matrix are input into a pre-trained second graph network model to obtain a second evaluation sequence, which includes a second evaluation value corresponding to each physical device; and anomalies in the power grid are monitored based on the first evaluation value and the second evaluation value.
[0008] In some optional implementations, obtaining a first adjacency matrix and a first characteristic matrix corresponding to the global topology graph, and obtaining a second adjacency matrix and a second characteristic matrix corresponding to the local topology graph include:
[0009] A first adjacency matrix is constructed based on the connection relationships between the microgrids in the power grid, and a second adjacency matrix is constructed based on the connection relationships between the physical devices in the microgrid. First state data of each microgrid at a preset operating time and second state data of each physical device in each microgrid at a preset operating time are obtained. A first characteristic matrix is constructed based on all the first state data in the power grid, and a second characteristic matrix is constructed based on all the second state data in the microgrid.
[0010] In some optional implementations, the first graph network model and the second graph network model are both dynamic graph convolutional network models.
[0011] In some optional implementations, the pre-trained first graph network model is obtained by:
[0012] A training set, a validation set, and a test set are obtained; a pre-constructed first graph network model is trained using the training set; when the training is completed, the trained first graph network model is evaluated using the validation set, so as to readjust the training strategy based on the evaluation result to optimize the first graph network model; when the optimization is completed, the optimized first graph network model is tested using the test set, and when the test accuracy reaches a preset accuracy threshold, the pre-trained first graph network model is obtained.
[0013] In some optional implementations, during the training process of the pre-built first graph network model, microgrid nodes in the global topology graph are randomly shielded with a preset probability.
[0014] In some optional implementations, monitoring anomalies in the power grid according to the first evaluation value and the second evaluation value includes:
[0015] The microgrid corresponding to the first evaluation value higher than the first preset threshold is determined as an abnormal microgrid; the second evaluation value higher than the second preset threshold is searched from the second evaluation sequence corresponding to the abnormal microgrid, and the physical device corresponding to the second evaluation value higher than the second preset threshold is determined as an abnormal device; the abnormal microgrid and the abnormal device are fed back to the client.
[0016] In a second aspect, the present disclosure provides a power grid anomaly monitoring device, comprising:
[0017] A construction module is used to construct a global topology map corresponding to the power grid with pre-divided microgrids as nodes, and to construct a local topology map corresponding to the microgrid with physical devices as nodes; an acquisition module is used to obtain a first adjacency matrix and a first characteristic matrix corresponding to the global topology map, and to obtain a second adjacency matrix and a second characteristic matrix corresponding to the local topology map; a first evaluation module is used to input the first adjacency matrix and the first characteristic matrix into a pre-trained first graph network model to obtain a first evaluation sequence, wherein the first evaluation sequence includes a first evaluation value corresponding to each microgrid; a second evaluation module is used to input the second adjacency matrix and the second characteristic matrix into a pre-trained second graph network model to obtain a second evaluation sequence, wherein the second evaluation sequence includes a second evaluation value corresponding to each physical device; a monitoring module is used to monitor abnormalities in the power grid based on the first evaluation value and the second evaluation value.
[0018] In a third aspect, the present disclosure provides a computer device, comprising:
[0019] The memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the power grid anomaly monitoring method described in the first aspect and any corresponding embodiment thereof by executing the computer instructions.
[0020] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the power grid anomaly monitoring method described in the first aspect and any corresponding embodiment thereof.
[0021] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the power grid anomaly monitoring method described in the first aspect and any corresponding embodiment thereof.
[0022] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art:
[0023] The power grid anomaly monitoring method provided by this embodiment uses pre-divided microgrids as nodes to construct a global topology map corresponding to the power grid, and uses physical devices as nodes to construct a local topology map corresponding to the microgrid; obtains a first adjacency matrix and a first characteristic matrix corresponding to the global topology map, and obtains a second adjacency matrix and a second characteristic matrix corresponding to the local topology map; inputs the first adjacency matrix and the first characteristic matrix into a pre-trained first graph network model to obtain a first evaluation sequence, which includes a first evaluation value corresponding to each microgrid; inputs the second adjacency matrix and the second characteristic matrix into a pre-trained second graph network model to obtain a second evaluation sequence, which includes a second evaluation value corresponding to each physical device; and monitors anomalies in the power grid based on the first evaluation value and the second evaluation value. The present disclosure hierarchically processes the power grid so that the topology networks of the two levels can be evaluated separately in the future. Compared with a single-level topology map, the dual-level setting reduces the amount of data in a single evaluation process, reduces the number of model parameters of the evaluation model, and thus makes the system less complex and easier to maintain. Furthermore, the dual-layer setup can capture finer local features at the local level and integrate more comprehensive information at the global level. This multi-layered feature extraction approach helps improve the model's robustness to noise and better handles heterogeneous data. Furthermore, the dual-layer setup allows for local aggregation and processing of microgrid node status data, reducing reliance on central servers and improving system reliability and fault tolerance. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0025] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0026] Figure 1 A flowchart of a power grid anomaly monitoring method according to an embodiment of the present disclosure;
[0027] Figure 2 A structural connection diagram of a power grid anomaly monitoring device provided in an embodiment of the present disclosure;
[0028] Figure 3 This is a structural connection diagram of the computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0030] The following description sets forth many specific details to facilitate a full understanding of the present disclosure. However, the present disclosure may also be implemented in other ways than those described herein. It is apparent that the embodiments described in the specification are only a portion of the embodiments of the present disclosure, not all of them. All other embodiments derived by those skilled in the art based on the embodiments of the present disclosure without inventive effort are intended to fall within the scope of protection of the present disclosure.
[0031] According to an embodiment of the present disclosure, an embodiment of a method for monitoring anomalies in a power grid is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0033] In this embodiment, a power grid anomaly monitoring method is provided, which is applied to power grid security monitoring scenarios and can be used in power grid anomaly monitoring devices. Figure 1 is a flow chart of a method for monitoring abnormality of a power grid according to an embodiment of the present disclosure. Figure 1 As shown, the process includes the following steps:
[0034] S101 , using pre-divided microgrids as nodes, constructing a global topology map corresponding to the power grid, and using physical devices as nodes, constructing a local topology map corresponding to the microgrid.
[0035] Among them, a microgrid refers to a small power generation and distribution system composed of distributed power sources, energy storage devices, energy conversion devices, loads, monitoring and protection devices, etc. Before executing S101, the power grid to be monitored (i.e., the power grid) is divided into at least two microgrids based on at least one factor among the tightness of electrical connections in the power grid to be detected (i.e., the power grid), operation requirements, deployment of monitoring equipment, geographical and management boundaries, functional independence, new energy and load characteristics, data availability, and dynamic adjustment capabilities, and the junction point of multiple collector lines in the microgrid is simulated as the external node of the microgrid. The external node of the microgrid can be understood as the interface of the electrical connection between the microgrid and the main power grid or other microgrids, which is subsequently used to summarize and output the status data of the microgrid nodes. The embodiment of the present disclosure does not limit the division method of the microgrid, such as it can be divided manually or by an algorithm.
[0036] Specifically, after determining that the power grid to be detected (i.e., the power grid) has been divided, the power grid anomaly monitoring device first constructs a global topology map corresponding to the power grid with the pre-divided microgrids as nodes. Then, for each microgrid, a local topology map corresponding to the microgrid is constructed with the physical devices in the microgrid as nodes. Therefore, the power grid will correspond to a global topology map and multiple local topology maps, and the number of local topology maps is the same as the number of pre-divided microgrids in the power grid. The embodiment of the present disclosure constructs the power grid into a two-level topology network so that the two levels of topology networks can be processed separately in the subsequent process. The hierarchical processing method reduces the amount of data in a single processing process, thereby reducing the system complexity and maintenance costs.
[0037] S102: Obtain a first adjacency matrix and a first characteristic matrix corresponding to the global topology graph, and obtain a second adjacency matrix and a second characteristic matrix corresponding to the local topology graph.
[0038] The first adjacency matrix is used to represent the connection relationship between microgrids in the power grid. The first characteristic matrix is used to represent the state information of each microgrid node in the power grid. The second adjacency matrix is used to represent the connection relationship between physical devices in the microgrid. The second characteristic matrix is used to represent the state information of each physical node in the microgrid.
[0039] Specifically, the acquisition method of the first adjacency matrix, the first characteristic matrix, the second adjacency matrix, and the second characteristic matrix corresponds to the user's monitoring needs. If the user only wants to determine the state of the power grid at a specific moment, then the first adjacency matrix, the first characteristic matrix, the second adjacency matrix, and the second characteristic matrix can be acquired when the user initiates the monitoring request. If the user wants to know the changes in the state of the power grid over a period of time, then the first adjacency matrix, the first characteristic matrix, the second adjacency matrix, and the second characteristic matrix need to be acquired in real time or periodically. In actual scenarios, the first adjacency matrix, the first characteristic matrix, the second adjacency matrix, and the second characteristic matrix are constructed based on the collected data and stored in the power grid security monitoring system after construction. The power grid anomaly monitoring device obtains them from the power grid security monitoring system according to the acquisition method corresponding to the user's needs (such as at least one of a specific moment, real time, or periodic). In addition, the first adjacency matrix, the first characteristic matrix, the second adjacency matrix, and the second characteristic matrix can also be directly constructed by the power grid anomaly monitoring device.
[0040] In some optional embodiments, obtaining a first adjacency matrix and a first characteristic matrix corresponding to a global topology graph, and obtaining a second adjacency matrix and a second characteristic matrix corresponding to a local topology graph include: constructing a first adjacency matrix based on the connection relationship between microgrids in the power grid, and constructing a second adjacency matrix based on the connection relationship between physical devices in the microgrid; obtaining first state data of each microgrid at a preset operating time and second state data of each physical device in each microgrid at a preset operating time; constructing a first characteristic matrix based on all first state data in the power grid, and constructing a second characteristic matrix based on all second state data in the microgrid.
[0041] The preset operating time may be the time when the user initiates the monitoring demand, or may be each time within the monitoring period of the power grid.
[0042] Specifically, after both the global and local topology maps are constructed, the grid anomaly monitoring device constructs a first adjacency matrix corresponding to the global topology map based on the electrical connections between the microgrids within the grid. A second adjacency matrix corresponding to each microgrid is constructed based on the electrical connections between the physical devices within each microgrid. It should be noted that due to equipment replacement or upgrades within the grid, the corresponding global topology map and the local topology maps corresponding to its subordinate microgrids are in dynamic change, and accordingly, the first and second adjacency matrices will change accordingly.
[0043] The grid anomaly monitoring device receives first status data transmitted by external nodes of each microgrid, reflecting the overall operating status of the microgrid, and second status data transmitted by sensors deployed on each physical device, reflecting the operating status of the physical device. The device constructs a first characteristic matrix corresponding to the global topology map based on the first status data corresponding to each microgrid, and a second characteristic matrix corresponding to the local topology map based on the second status data of each physical device. It should be noted that the first status data includes both real-time and historical status data of the microgrid. Real-time status data of the microgrid refers to the state data of the microgrid at the current operating moment, including but not limited to active power, reactive power, current load, voltage level, current voltage, current, frequency, harmonic components, and temperature and humidity. Historical status data of the microgrid refers to the state data of the microgrid at each historical moment within a preset historical period ending at the current moment, including but not limited to historical voltage and current values. Similarly, the second status data also includes both real-time and historical status data of the physical devices. Real-time status data of the physical devices refers to data reflecting the state of the physical devices at the current operating moment, while historical status data of the physical devices refers to data that clearly reflects changes in the physical device's state. The historical status data can be determined by those skilled in the art based on the type of physical device. The second status data corresponds to the type of physical device. For example, when the physical device is a generator, the real-time status data of the physical device includes, but is not limited to, maximum output power and fuel type, and the historical status data of the physical device includes, but is not limited to, maximum output power; when the physical device is an energy storage system, the real-time status data of the physical device includes, but is not limited to, capacity and charge / discharge rate, and the historical status data of the physical device includes, but is not limited to, charge / discharge rate; when the physical device is a transformer, the real-time status data of the physical device includes, but is not limited to, voltage conversion ratio, and the historical status data of the physical device includes, but is not limited to, voltage conversion ratio.
[0044] S103: Input the first adjacency matrix and the first feature matrix into a pre-trained first graph network model to obtain a first evaluation sequence.
[0045] The first evaluation sequence includes a first evaluation value corresponding to each microgrid. The first graph network model is a graph-based neural network model used to evaluate the status of each microgrid in the power grid. The first graph network model can be a static graph convolutional network model or a dynamic graph convolutional network model. The type of the first graph network model corresponds to the user's monitoring needs. If the user only wants to determine the status of the power grid at a specific moment, then the first graph network model is a static graph convolutional network model. If the user wants to know the changes in the status of the power grid over a period of time, then the first graph network model is a dynamic graph convolutional network model.
[0046] Specifically, the first adjacency matrix and the first characteristic matrix are input into a pre-trained first graph network model. The pre-trained first graph network model analyzes the status of each microgrid based on the connection relationship between the microgrids provided by the first adjacency matrix and the status data of each microgrid provided by the first characteristic matrix, and obtains a first evaluation value corresponding to each microgrid. A first evaluation sequence is formed by the first evaluation values corresponding to all microgrids in the power grid.
[0047] In some optional embodiments, the pre-trained first graph network model is obtained by: obtaining a training set, a validation set, and a test set; using the training set to train the pre-constructed first graph network model; when the training is completed, using the validation set to evaluate the trained first graph network model, so as to readjust the training strategy based on the evaluation results to optimize the first graph network model; when the optimization is completed, using the test set to test the optimized first graph network model, and when the test accuracy reaches a preset accuracy threshold, the pre-trained first graph network model is obtained.
[0048] Specifically, the dataset provided by the user is divided into a training set, a validation set, and a test set according to a certain ratio. First, the training data in the training set is input into the pre-built first graph network model to obtain the evaluation data output by the model. The evaluation data output by the model and the label data in the training set are input into the loss function to calculate the loss value. When the loss value does not reach the preset loss range, the backpropagation algorithm and ADAM strategies are used to continuously iterate the model parameters until the calculated loss value reaches the preset loss range, at which point the training ends.
[0049] Then, the verification data in the verification set is input into the first graph network model that has completed training. The model performance of the first graph network model that has completed training is evaluated based on the evaluation data output by the model and the label data in the verification set. The adjustment direction of the training strategy (such as hyperparameters, early stopping, model selection, etc.) is determined according to the evaluation results, so as to re-train and optimize the model based on the adjusted training strategy.
[0050] Finally, after the optimization process is complete, the test data from the test set is fed into the optimized first graph network model. The model's accuracy is determined based on the evaluation data output by the model and the labeled data from the test set. When the accuracy reaches a preset accuracy threshold, the pre-trained first graph network model is obtained.
[0051] In some optional embodiments, to address the issue of microgrid failures within the power grid, during the training of the pre-built first-graph network model, microgrid nodes in the global topology graph are randomly masked with a preset probability. This disclosed embodiment employs the concept of random dropout, which randomly discards microgrids from the global topology graph. This improves the generalization capability of the model and the adaptability of the first-graph network model to power grid changes.
[0052] S104: Input the second adjacency matrix and the second feature matrix into a pre-trained second graph network model to obtain a second evaluation sequence.
[0053] The second evaluation sequence includes a second evaluation value corresponding to each physical device. The second graph network model is a graph-based neural network model used to evaluate the status of each physical device in the microgrid. The second graph network model is of the same type as the first graph network model.
[0054] Specifically, the second adjacency matrix and the second characteristic matrix are input into a pre-trained second graph network model. The pre-trained second graph network model combines the connection relationship between the physical devices in the microgrid provided by the second adjacency matrix and the status data of each physical device provided by the second characteristic matrix to analyze the status of each physical device in the microgrid, and obtain a second evaluation value corresponding to each physical device. The second evaluation values corresponding to all physical devices in the microgrid form a second evaluation sequence.
[0055] The training process of the second graph network model is similar to that of the first graph network model and will not be repeated here.
[0056] It's also worth noting that because physical devices within a microgrid, such as generators, energy storage systems, load points, and transformers, frequently experience failures or planned downtime, the training of the second network model can also involve randomly masking physical device nodes in the local topology. This random masking method is similar to that used in the first network model and will not be further described here.
[0057] S105 , monitoring abnormalities in the power grid according to the first evaluation value and the second evaluation value.
[0058] The first evaluation value is used to characterize the state of the microgrid, and the second evaluation value is used to characterize the state of the physical device in the microgrid.
[0059] In some optional embodiments, anomalies in the power grid are monitored based on the first evaluation value and the second evaluation value, including: determining a microgrid corresponding to a first evaluation value higher than a first preset threshold as an abnormal microgrid; searching for a second evaluation value higher than a second preset threshold from a second evaluation sequence corresponding to the abnormal microgrid, and determining a physical device corresponding to the second evaluation value higher than the second preset threshold as an abnormal device; and feeding back the abnormal microgrid and the abnormal device to the client.
[0060] The first preset threshold is the maximum evaluation value of the microgrid in normal operation, and the second preset threshold is the maximum evaluation value of the physical device in normal operation.
[0061] Specifically, after obtaining the first evaluation sequence, each first evaluation value in the first evaluation sequence is compared with the first preset threshold value, and the microgrid corresponding to the first evaluation value that is higher than (i.e., greater than or equal to) the first preset threshold value is determined to be an abnormal microgrid. Similarly, after obtaining the second evaluation sequence, each second evaluation value in the second evaluation sequence is compared with the second preset threshold value, and the physical device corresponding to the second evaluation value that is higher than the second preset threshold value is determined to be an abnormal device. The abnormal microgrid and the abnormal device are fed back to the client, and specifically, the identification information of the abnormal microgrid and the identification information of the abnormal device can be fed back to the client, so that the client can accurately locate the abnormal location based on the identification information of the abnormal microgrid and the identification information of the abnormal device, and perform subsequent maintenance and equipment replacement.
[0062] The power grid anomaly monitoring method provided by this embodiment uses pre-divided microgrids as nodes to construct a global topology map corresponding to the power grid, and uses physical devices as nodes to construct a local topology map corresponding to the microgrid; obtains a first adjacency matrix and a first characteristic matrix corresponding to the global topology map, and obtains a second adjacency matrix and a second characteristic matrix corresponding to the local topology map; inputs the first adjacency matrix and the first characteristic matrix into a pre-trained first graph network model to obtain a first evaluation sequence, which includes a first evaluation value corresponding to each microgrid; inputs the second adjacency matrix and the second characteristic matrix into a pre-trained second graph network model to obtain a second evaluation sequence, which includes a second evaluation value corresponding to each physical device; and monitors anomalies in the power grid based on the first evaluation value and the second evaluation value. The present disclosure hierarchically processes the power grid so that the topology networks of the two levels can be evaluated separately in the future. Compared with a single-level topology map, the dual-level setting reduces the amount of data in a single evaluation process, reduces the number of model parameters of the evaluation model, and thus makes the system less complex and easier to maintain. Furthermore, the dual-layer setup can capture finer local features at the local level and integrate more comprehensive information at the global level. This multi-layered feature extraction approach helps improve the model's robustness to noise and better handles heterogeneous data. Furthermore, the dual-layer setup allows for local aggregation and processing of microgrid node status data, reducing reliance on central servers and improving system reliability and fault tolerance.
[0063] In some optional embodiments, the first graph network model and the second graph network model are both dynamic graph convolutional network models, wherein the dynamic graph convolutional network model includes several convolutional layers and one fully connected layer.
[0064] Specifically, when the first graph network model is a dynamic graph convolutional network model, the first adjacency matrix and the first feature matrix are input into the pre-trained first graph network model to obtain the first evaluation sequence. The implementation process is:
[0065] The first adjacency matrix and the first feature matrix are input into a pre-trained first graph network model (i.e., a dynamic graph convolutional network model used to evaluate the status of each microgrid in the power grid). First, the convolutional layer aggregates the neighbor features of the microgrid nodes through graph convolution operations based on the connectivity between the microgrids represented in the first adjacency matrix. Deep temporal and spatial features of the microgrid nodes are extracted from the first feature matrix to capture the dynamic changes in the microgrid topology and the complex patterns of the operating status. Then, after multiple convolution operations, the fully connected layer integrates and maps the features extracted by the convolutional layer into a first evaluation value corresponding to each microgrid node. The first evaluation value is used to represent the probability of microgrid anomaly. Finally, a first evaluation sequence is generated based on the first evaluation values corresponding to all microgrid nodes in the power grid.
[0066] Similarly, when the second graph network model is a dynamic graph convolutional network model, the second adjacency matrix and the second feature matrix are input into the pre-trained second graph network model to obtain the implementation process of the second evaluation sequence:
[0067] The second adjacency matrix and the second feature matrix are input into a pre-trained second graph network model (i.e., a dynamic graph convolutional network model used to evaluate the status of each physical device in the microgrid). First, the convolutional layer extracts the spatiotemporal feature information of each physical device node from the second adjacency matrix and the second feature matrix; then, the fully connected layer maps the extracted feature information into a second evaluation value corresponding to each physical device node; finally, a second evaluation sequence is generated based on the second evaluation values corresponding to all physical device nodes in the microgrid.
[0068] The first evaluation value represents the probability that the microgrid state is abnormal, and the second evaluation value represents the probability that the physical device state is abnormal. In this embodiment, the first and second evaluation values range from 0 to 1. Therefore, values closer to 1 indicate a higher probability of abnormality, while values closer to 0 indicate a higher probability of normality.
[0069] As an example, the data processing process of the convolutional layer in the dynamic graph convolutional network model (i.e., the dynamic graph convolutional network model used to evaluate the status of each microgrid in the power grid) will be illustrated here using the global topology graph as an example. The dynamic graph convolutional network model used to evaluate the status of each physical device in the microgrid uses a similar method to process the second adjacency matrix and second characteristic matrix corresponding to the local topology graph, and will not be repeated here.
[0070] For example, if a power grid includes T pre-divided microgrids, then the first adjacency matrix constructed based on the connection relationships between the microgrids in the grid is denoted as A, and the dimension of the first adjacency matrix A is T*T. The dimension of the first state data corresponding to each microgrid node collected in real time is denoted as D, and the first characteristic matrix constructed based on the first state data corresponding to all microgrids is denoted as H, and the dimension of the first characteristic matrix H is T*D.
[0071] After the first adjacency matrix and the first feature matrix are input into the dynamic graph convolutional network model for evaluating the status of each microgrid in the power grid, the convolutional layer of the dynamic graph convolutional network model for evaluating the status of each microgrid in the power grid extracts features based on the first adjacency matrix and the first feature matrix as follows:
[0072] f(H l+1 ,A)=σ(AH l W l )
[0073] Among them, l represents the number of layers corresponding to the current graph convolution layer; A represents the adjacency matrix, which is used to guide the graph convolution operation; H lRepresents the characteristic value of the input layer l, when l = 1, H l is the first characteristic matrix, W l H represents the convolution kernel of the l-th layer graph convolution; l+1 represents the eigenvalue of the input layer l+1 after the l-th layer graph convolution kernel operation; σ represents the activation function.
[0074] After the characteristic values of each microgrid are obtained through graph convolution layer processing, the first evaluation sequence can be obtained through mapping of the fully connected layer.
[0075] The disclosed embodiments take into account the time-varying characteristics of microgrid nodes and physical device nodes, and introduce a dynamic graph convolutional network model into the process of power grid anomaly monitoring to ensure that the power grid can still be accurately monitored in real time even when the microgrid structure and status data change. It can be seen that the method provided by the disclosed embodiments can adapt to anomaly monitoring when the large-scale access of new energy sources such as wind power and photovoltaics causes changes in the power grid. It can also solve the problem of security status monitoring when some nodes are missing from the power grid network topology in special circumstances such as natural disasters, human control, or main grid failures, thereby enhancing the robustness of the system.
[0076] This embodiment also provides a power grid anomaly monitoring device for implementing the above-described embodiments and preferred implementations. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0077] This embodiment provides a power grid abnormality monitoring device, such as Figure 2 As shown, including:
[0078] The construction module 201 is used to construct a global topology map corresponding to the power grid using pre-divided microgrids as nodes, and to construct a local topology map corresponding to the microgrid using physical devices as nodes.
[0079] The acquisition module 202 is configured to acquire a first adjacency matrix and a first characteristic matrix corresponding to the global topology graph, and acquire a second adjacency matrix and a second characteristic matrix corresponding to the local topology graph.
[0080] The first evaluation module 203 is configured to input the first adjacency matrix and the first feature matrix into a pre-trained first graph network model to obtain a first evaluation sequence, where the first evaluation sequence includes a first evaluation value corresponding to each microgrid.
[0081] The second evaluation module 204 is configured to input the second adjacency matrix and the second feature matrix into a pre-trained second graph network model to obtain a second evaluation sequence, where the second evaluation sequence includes a second evaluation value corresponding to each physical device.
[0082] The monitoring module 205 is configured to monitor abnormalities in the power grid according to the first evaluation value and the second evaluation value.
[0083] In some optional implementations, the acquisition module 202 includes:
[0084] The first construction submodule is used to construct a first adjacency matrix based on the connection relationship between each microgrid in the power grid, and to construct a second adjacency matrix based on the connection relationship between each physical device in the microgrid; the first acquisition submodule is used to obtain the first state data of each microgrid at a preset operating time and the second state data of each physical device in each microgrid at a preset operating time; the second construction submodule is used to construct a first characteristic matrix based on all the first state data in the power grid, and to construct a second characteristic matrix based on all the second state data in the microgrid.
[0085] In some optional implementations, the first graph network model and the second graph network model are both dynamic graph convolutional network models.
[0086] In some optional embodiments, the apparatus further includes a training module, wherein the training module is configured to obtain a pre-trained first graph network model in the following manner, wherein the training module includes:
[0087] The second acquisition submodule is used to obtain a training set, a validation set and a test set; the training submodule is used to train the pre-constructed first graph network model using the training set; the optimization submodule is used to evaluate the trained first graph network model using the validation set when the training is completed, so as to readjust the training strategy to optimize the first graph network model based on the evaluation result; the testing submodule is used to test the optimized first graph network model using the test set when the optimization is completed, and when the test accuracy reaches a preset accuracy threshold, the pre-trained first graph network model is obtained.
[0088] In some optional implementations, the training submodule further includes: a random shielding unit for randomly shielding the microgrid nodes in the global topology graph with a preset probability during the training of the pre-constructed first graph network model.
[0089] In some optional embodiments, the monitoring module 205 includes:
[0090] The first determination submodule is used to determine that the microgrid corresponding to the first evaluation value higher than the first preset threshold is an abnormal microgrid; the second determination submodule is used to search for a second evaluation value higher than the second preset threshold from the second evaluation sequence corresponding to the abnormal microgrid, and determine the physical device corresponding to the second evaluation value higher than the second preset threshold as an abnormal device; the feedback submodule is used to feed back the abnormal microgrid and the abnormal device to the client.
[0091] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0092] The power grid anomaly monitoring device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0093] The present disclosure also provides a computer device having the above Figure 2 The power grid abnormality monitoring device shown.
[0094] See also Figure 3 , Figure 3 is a structural diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 3 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 3 A processor 10 is taken as an example.
[0095] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0096] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0097] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0098] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0099] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0100] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0101] In addition to the above-mentioned computer device and computer-readable storage medium, an embodiment of the present application may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes the steps of the sound source localization method provided by any embodiment of the present application.
[0102] The computer program product may be written in any combination of one or more programming languages to implement the program code for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0103] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A method for monitoring abnormality in a power grid, characterized in that: include: Using pre-divided microgrids as nodes, a global topology map corresponding to the power grid is constructed, and using physical devices as nodes, a local topology map corresponding to the microgrid is constructed; Obtaining a first adjacency matrix and a first characteristic matrix corresponding to the global topology graph, and obtaining a second adjacency matrix and a second characteristic matrix corresponding to the local topology graph; Inputting the first adjacency matrix and the first feature matrix into a pre-trained first graph network model to obtain a first evaluation sequence, wherein the first evaluation sequence includes a first evaluation value corresponding to each of the microgrids; Inputting the second adjacency matrix and the second feature matrix into a pre-trained second graph network model to obtain a second evaluation sequence, wherein the second evaluation sequence includes a second evaluation value corresponding to each of the physical devices; Anomalies in the power grid are monitored according to the first evaluation value and the second evaluation value.
2. The method according to claim 1, characterized in that The obtaining of the first adjacency matrix and the first characteristic matrix corresponding to the global topology graph, and the obtaining of the second adjacency matrix and the second characteristic matrix corresponding to the local topology graph, includes: Constructing the first adjacency matrix according to the connection relationship between the microgrids in the power grid, and constructing the second adjacency matrix according to the connection relationship between the physical devices in the microgrid; Acquire first state data of each microgrid at a preset operating time and second state data of each physical device in each of the microgrids at the preset operating time; The first characteristic matrix is constructed according to all the first state data in the power grid, and the second characteristic matrix is constructed according to all the second state data in the microgrid.
3. The method according to claim 1 or 2, characterized in that The first graph network model and the second graph network model are both dynamic graph convolutional network models.
4. The method according to claim 3, characterized in that The pre-trained first graph network model is obtained by: Get the training set, validation set, and test set; Training the pre-constructed first graph network model using the training set; When the training is completed, the trained first graph network model is evaluated using the validation set, so as to readjust the training strategy based on the evaluation result to optimize the first graph network model; When the optimization is completed, the optimized first graph network model is tested using the test set, and when the test accuracy reaches a preset accuracy threshold, the pre-trained first graph network model is obtained.
5. The method according to claim 4, characterized in that During the training process of the pre-constructed first graph network model, random shielding processing is performed on the microgrid nodes in the global topology graph with a preset probability.
6. The method according to claim 1, characterized in that The monitoring of anomalies in the power grid according to the first evaluation value and the second evaluation value includes: Determining a microgrid corresponding to a first evaluation value higher than a first preset threshold as an abnormal microgrid; Searching for a second evaluation value higher than a second preset threshold from a second evaluation sequence corresponding to the abnormal microgrid, and determining a physical device corresponding to the second evaluation value higher than the second preset threshold as an abnormal device; Feedback the abnormal microgrid and the abnormal device to the client.
7. A power grid anomaly monitoring device, characterized in that: include: A construction module is used to construct a global topology map corresponding to the power grid using pre-divided microgrids as nodes, and to construct a local topology map corresponding to the microgrid using physical devices as nodes; An acquisition module, configured to acquire a first adjacency matrix and a first characteristic matrix corresponding to the global topology graph, and acquire a second adjacency matrix and a second characteristic matrix corresponding to the local topology graph; A first evaluation module is configured to input the first adjacency matrix and the first feature matrix into a pre-trained first graph network model to obtain a first evaluation sequence, wherein the first evaluation sequence includes a first evaluation value corresponding to each of the microgrids; a second evaluation module, configured to input the second adjacency matrix and the second feature matrix into a pre-trained second graph network model to obtain a second evaluation sequence, wherein the second evaluation sequence includes a second evaluation value corresponding to each of the physical devices; A monitoring module is used to monitor anomalies in the power grid according to the first evaluation value and the second evaluation value.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the power grid anomaly monitoring method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the power grid anomaly monitoring method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the power grid anomaly monitoring method according to any one of claims 1 to 6 are implemented.