Power system security situation awareness method and device based on self-attention large model
By adopting a large self-attention model in the safety situation awareness of the power system, combining the state probability and electrical data of each node, the problem of low accuracy in the existing technology is solved, and a higher accuracy safety situation awareness is achieved.
Patent Information
- Application Number
- CN202510116751.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-06-13
AI Technical Summary
In the safety situation awareness of power systems, the prior art fails to fully consider the mutual influence between each node, resulting in low accuracy of safety situation awareness and difficult to meet the safety protection needs of the power grid.
The power system safety situation awareness method based on the self-attention big model is adopted. By obtaining the state probability and electrical data of the abnormal state node and its associated node, it is input into the pre-trained self-attention safety situation awareness model to determine the state of the power system.
The mutual influence between the nodes of the power system is fully considered, the accuracy of safety situation awareness is improved, and the safety threats in the power system can be more accurately identified and deal with.
Smart Images

Figure CN120145180A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power information system security, and particularly to a power system security situation awareness method and device based on a self-attention large model. Background Art
[0002] With the deepening of the informatization process, a highly informatized power system is more vulnerable to external threats such as viruses, Trojans, and network attacks, resulting in internal data leakage and further affecting the stable operation of the power system. Currently, the operation data of the power system is mainly identified through a pre-trained machine learning model to achieve the security monitoring of the power system; however, due to the lack of consideration of the mutual influence between nodes in the power system, the accuracy of the existing technology for power system security situation awareness is not high, making it difficult to meet the security protection requirements of the power grid. Summary of the Invention
[0003] The present invention provides a power system security situation awareness method and device based on a self-attention large model, which is used to solve the problem of low accuracy of large-scale power system security situation awareness.
[0004] To solve the above technical problems, a first aspect of this document provides a power system security situation awareness method based on a self-attention large model, and the method includes:
[0005] Obtain the abnormal state nodes and their abnormal states of the power system, the associated nodes of the abnormal state nodes, and the electrical data of each node in the power system;
[0006] Predict the state probabilities of the associated nodes in various states according to the abnormal states of the abnormal state nodes, and the state types include normal state and multiple abnormal states;
[0007] Input the state probabilities of each node and the electrical data of each node into a pre-trained self-attention security situation awareness large model to determine the state of the power system.
[0008] Further, the associated nodes include directly associated nodes and indirectly associated nodes;
[0009] Predicting the state probabilities of the associated nodes in various states according to the abnormal states of the abnormal state nodes includes:
[0010] Predict the state probabilities of the directly associated nodes in various states according to the abnormal states of the abnormal state nodes;
[0011] Predict the state probabilities of the indirectly associated nodes in various states according to the state probabilities of the directly associated nodes in various states.
[0012] Further, predicting the state probabilities of the associated nodes in various states based on the abnormal states of the abnormal state nodes further includes:
[0013] Predicting the influence state probabilities of the indirectly associated nodes in various states according to the abnormal states of the abnormal state nodes;
[0014] Updating the state probabilities of the indirectly associated nodes in various states according to the influence state probabilities of the indirectly associated nodes in various states.
[0015] Further, the abnormal states include physical failures, being attacked, and abnormal loads;
[0016] The electrical data includes voltage data, current data, and power data.
[0017] Further, obtaining the electrical data of each node in the power system at each time step within a preset time period;
[0018] According to the relationship between each time step and the target time step within the preset time period of each node, the preset attenuation coefficient, and the electrical data of each time step, determining the electrical characteristic data of each node at each time step within the preset time period;
[0019] Inputting the state probabilities of the nodes and the electrical characteristic data of the nodes into a pre-trained self-attention security situation awareness large model to determine the state of the power system.
[0020] Further, according to the relationship between each time step and the target time step within the preset time period of each node, the preset attenuation coefficient, and the electrical data of each time step, determining the electrical characteristic data of each node at each time step within the preset time period, including:
[0021] Determining the weighting coefficients of each time step at the target time step according to the time span between each time step and the target time step within the preset time period of each node and the preset attenuation coefficient;
[0022] According to the weighting coefficients of each time step at the target time step and the electrical data of each time step, determining the electrical characteristic data of each node at each time step within the preset time period.
[0023] Further, according to the weighting coefficients of each time step at the target time step and the electrical data of each time step, determining the electrical characteristic data of each node at each time step within the preset time period, including:
[0024] Performing weighted summation on the electrical data of each time step according to the weighting coefficients of each time step at the target time step to obtain the weighted electrical data of each time step;
[0025] Determine the electrical characteristic data of the target time step based on the electrical data of the target time step and the weighted electrical data of each time step;
[0026] Determine the electrical characteristic data of each target time step under each node as the electrical characteristic data of each time step of each node within the preset period.
[0027] The second aspect of this article provides a power system security situation awareness device based on a self-attention large model, and the device includes:
[0028] An acquisition module for acquiring the abnormal state nodes of the power system and their abnormal states, the associated nodes of the abnormal state nodes, and the electrical data of each node of the power system;
[0029] A prediction module for predicting the state probabilities of the associated nodes in various states according to the abnormal states of the abnormal state nodes, and the state types include normal state and multiple abnormal states;
[0030] A determination module for inputting the state probabilities of the nodes and the electrical data of the nodes into a pre-trained self-attention security situation awareness large model to determine the state of the power system.
[0031] The third aspect of this article provides a computer device, including a memory, a processor, and a computer program stored on the memory. When the computer program is run by the processor, it executes the instructions of the power system security situation awareness method based on the self-attention large model described in any of the foregoing embodiments.
[0032] The fourth aspect of this article provides a computer storage medium, on which a computer program is stored. When the computer program is run by the processor of a computer device, it executes the instructions of the power system security situation awareness method based on the self-attention large model described in any of the foregoing embodiments.
[0033] The fifth aspect of this article provides a computer program product, which includes a computer program. When the computer program is run by the processor of a computer device, it executes the instructions of the power system security situation awareness method based on the self-attention large model described in any of the foregoing embodiments.
[0034] The power system security situation awareness method and device based on the self-attention large model provided in this article, when there are abnormal state nodes in the power system, predict the state probabilities of their associated nodes according to the abnormal states of the abnormal state nodes, and input the state probabilities and electrical data of all nodes of the power system into the self-attention security situation awareness large model to determine the state of the power system, fully considering the mutual influence between each node of the power system, thereby improving the accuracy of power system security situation awareness.
[0035] To make the above and other purposes, features, and advantages of this article more obvious and understandable, the following provides preferred embodiments and, in conjunction with the accompanying drawings, detailed descriptions are as follows. Description of the Drawings
[0036] To more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of this article. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0037] Figure 1 Shows the first flowchart of the power system security situation awareness method based on the self-attention large model in the embodiments of this article;
[0038] Figure 2 Shows the first flowchart of predicting the state probability of state nodes in the embodiments of this article;
[0039] Figure 3 Shows the second flowchart of predicting the state probability of state nodes in the embodiments of this article;
[0040] Figure 4 Shows the second flowchart of the power system security situation awareness method based on the self-attention large model in the embodiments of this article;
[0041] Figure 5 Shows the first flowchart of determining electrical characteristic data in the embodiments of this article;
[0042] Figure 6 Shows the second flowchart of determining electrical characteristic data in the embodiments of this article;
[0043] Figure 7 Shows the structural diagram of the power system security situation awareness device based on the self-attention large model in the embodiments of this article;
[0044] Figure 8 Shows the structural diagram of the computer device in the embodiments of this article.
[0045] Description of the Reference Numerals in the Drawings:
[0046] 710, Acquisition Module;
[0047] 720, Prediction Module;
[0048] 730, Determination Module;
[0049] 802, Computer Device;
[0050] 804, Processor;
[0051] 806, Memory;
[0052] 808. Driving mechanism;
[0053] 810. Input / output module;
[0054] 812. Input device;
[0055] 814. Output device;
[0056] 816. Rendering device;
[0057] 818. Graphical user interface;
[0058] 820. Network interface;
[0059] 822. Communication link;
[0060] 824. Communication bus. Detailed implementation manners
[0061] Next, the technical solutions in the embodiments of this article will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this article. Obviously, the described embodiments are only a part of the embodiments of this article, rather than all the embodiments. Based on the embodiments in this article, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this article.
[0062] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned accompanying drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product, or equipment that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or equipment.
[0063] This specification provides method operation steps as described in the embodiments or flowcharts, but based on routine or non-creative labor, it may include more or fewer operation steps. The order of steps listed in the embodiments is only one way among the execution orders of many steps, and does not represent the only execution order. When the actual system or device product is executed, it can be executed in the order shown in the embodiments or the accompanying drawings or executed in parallel.
[0064] It should be noted that in the technical solutions of the embodiments of this specification, the acquisition, storage, use, processing, etc. of data all comply with the relevant provisions of national laws and regulations.
[0065] It should be noted that in the embodiments of this application, some industry-existing solutions such as certain software, components, models, etc. may be mentioned. They should be regarded as exemplary. The purpose is only to illustrate the feasibility in the implementation of the technical solutions of this application, but it does not mean that the applicant has already or necessarily used this solution.
[0066] In one embodiment of this article, a power system security situation awareness method based on a self-attention large model is provided to solve the problem of low accuracy in power system security situation awareness.
[0067] Specifically, as Figure 1 shown, the power system security situation awareness method based on the self-attention large model includes:
[0068] Step 110, obtaining the abnormal state nodes and their abnormal states of the power system, the associated nodes of the abnormal state nodes, and the electrical data of each node of the power system;
[0069] Step 120, predicting the state probabilities of the associated nodes in various states according to the abnormal states of the abnormal state nodes, and the state types include normal state and multiple abnormal states;
[0070] Step 130, inputting the state probabilities of each node and the electrical data of each node into a pre-trained self-attention security situation awareness large model to determine the state of the power system.
[0071] In this embodiment, when there are abnormal state nodes in the power system, the state probabilities of the associated nodes are predicted according to the abnormal states of the abnormal state nodes, and the state probabilities and electrical data of all nodes of the power system are input into the self-attention security situation awareness large model to determine the state of the power system, fully considering the mutual influence between the nodes of the power system, thereby improving the accuracy of power system security situation awareness.
[0072] In the embodiments of this article, different nodes of the power system can be divided according to the service areas of the power distribution companies to ensure that the nodes of the power system can cover all power supply areas.
[0073] When this embodiment is specifically implemented, the abnormal states of each node can be simulated first, and the state changes of each node in the power system and the overall state of the power system can be recorded. For example, a power system model can be established through simulation software. The power system model includes multiple nodes, and the association relationships between the nodes are established. For example, when node A becomes an abnormal state node, under the influence of node A, there is a possibility that node B associated with node A becomes an abnormal state node. Through multiple experimental simulations using the power system model (such as simulating network attacks of different intensities to make node A become an abnormal state node), the number of times node B becomes abnormal when node A is abnormal can be recorded, and based on the recorded information, the abnormal state probability of node B under the influence of node A's abnormality can be determined. The simulation software for power system operation can use PSS / E, RTDS, MATPOWER, etc., which is not limited in this article. Then, when it is determined that there are abnormal nodes in the power system, according to the recorded data, the abnormal state probabilities of the nodes associated with the abnormal state nodes under the influence of the abnormal state nodes can be determined.
[0074] The state types of the nodes in the power system include normal state and multiple abnormal states. Among them, the state types of the abnormal states include physical faults, being attacked, and load abnormalities; among them, the state of being attacked can be further divided into the states of being slightly attacked, moderately attacked, and severely attacked, and the state of load abnormality can be further divided into the states of excessive load and low load.
[0075] The electrical data of the nodes includes voltage data, current data, and power data. After preprocessing the electrical data of each node and combining it with the state probability of each node, the overall state of the power system can be obtained by inputting it into the pre-trained self-attention security situation awareness large model. The self-attention security situation awareness large model used in this embodiment of the article is a self-attention large model with a structure of an LSTM module, a self-attention mechanism module, and an output layer module. The data set for training this model includes the electrical data and state probabilities of each node in the power system, and the corresponding label represents the overall state of the power system. The label reflects the different states shown by the power system under the influence of the electrical data and state probabilities of each node. The LSTM module is used to extract the long-term and short-term dependence relationships between the electrical data of the nodes at different times, and the self-attention mechanism module is used to capture the dependence relationships between different nodes. Through this structure, the trained self-attention security situation awareness large model can perform security situation awareness efficiently and accurately to determine the state of the power system.
[0076] The associated nodes of a node include directly associated nodes and indirectly associated nodes. A directly associated node is a node that has a direct influence relationship with the associated node, and an indirectly associated node is a node that has an indirect influence relationship with the current node. For example, the directly associated node of node A is node B, and the directly associated nodes of node B are node A and node C. At this time, node A and node C are indirectly associated nodes with each other.
[0077] In one embodiment of the present invention, as Figure 2 shown, predicting the state probabilities of the associated nodes in various states according to the abnormal state of the abnormal state node includes:
[0078] Step 210, predicting the state probabilities of the directly associated nodes in various states according to the abnormal state of the abnormal state node;
[0079] Step 220, predicting the state probabilities of the indirectly associated nodes in various states according to the state probabilities of the directly associated nodes in various states.
[0080] In this embodiment, according to the abnormal state of the abnormal state node, the state probabilities of the directly associated node and the indirectly associated node are predicted in sequence, so as to determine the state probabilities of each node in the power system, that is, the input data of the self-attention security situation awareness large model.
[0081] In some embodiments of the present invention, the state type of the node is represented by a state identifier, and the state identifier is represented by 0-6. Among them, the normal state probability is -0, the physical failure probability is -1, the probability of being slightly attacked is -2, the probability of being moderately attacked is -3, the probability of being severely attacked is -4, the probability of being overloaded is -5, and the probability of being underloaded is -6. When node A is an abnormal state node and its state identifier is 2, it can be determined that its state probability is (0, 0, 1, 0, 0, 0, 0). At this time, the state probabilities of the nodes that have no association with node A are all (1, 0, 0, 0, 0, 0, 0). According to the state statistics of the directly associated node B when node A is slightly attacked (that is, counting the number of abnormalities of node B when node A is slightly attacked), the state probability of node B is predicted to be (0.0673, 0.0896, 0.6332, 0.1725, 0.0224, 0.0091, 0.0059). At this time, the state probability of the node C directly associated with node B can be obtained according to the state statistics of node C when node B is abnormal; for example, [B(x), C(y)] represents the probability that when the state identifier of node B is x, the state identifier of node C is y. At this time, the probability of identifying the state identifier 2 of node C
[0082] = 0.0673·[B(0), C(2)] + 0.0896·[B(1), C(2)] + 0.6332·[B(2), C(2)] + 0.1725·[B(3), C(2)] + 0.0224·[B(4), C(2)] + 0.0091·[B(5), C(2)] + 0.0059·[B(6), C(2)]; Through the above method, the state probabilities corresponding to each state identifier of node C can be obtained.
[0083] In one embodiment of the present invention, as Figure 3As shown, predicting the state probabilities of the associated nodes in various states based on the abnormal states of the abnormal state nodes further includes:
[0084] Step 310, predicting the influence state probabilities of the indirect associated nodes in various states according to the abnormal states of the abnormal state nodes;
[0085] Step 320, updating the state probabilities of the indirect associated nodes in various states according to the influence state probabilities of the indirect associated nodes in various states.
[0086] This embodiment further combines the comprehensive influence of the abnormal state nodes on the indirect associated nodes to more comprehensively predict the state probabilities of each node in the power system, thereby obtaining the input data of the self-attention security situation awareness large model.
[0087] In some embodiments of this article, considering the comprehensive influence of node A on node C when node A is abnormal, the state probabilities of node C in various abnormal states indirectly associated with node A in the abnormal state, that is, the influence state probabilities, are statistically calculated, and a certain weight is assigned, and the state probabilities of node C in the abnormal state of node B obtained previously are summed to determine the final state probability of node C.
[0088] In one embodiment of this article, as Figure 4 shown, the power system security situation awareness method based on the self-attention large model further includes:
[0089] Step 410, obtaining the electrical data of each node in the power system at each time step within a preset time period;
[0090] Step 420, determining the electrical characteristic data of each node at each time step within the preset time period according to the relationship between each time step and the target time step within the preset time period, the preset attenuation coefficient, and the electrical data of each time step;
[0091] Step 430, inputting the state probabilities of each node and the electrical characteristic data of each node into the pre-trained self-attention security situation awareness large model to determine the state of the power system.
[0092] This embodiment comprehensively considers the electrical data of multiple time steps within a preset time period, as well as the mutual influence between the electrical data of different time steps, and combines the state probabilities of each node and the electrical data of each node at different time steps as the input of the self-attention security situation awareness large model, improving the prediction accuracy of the model.
[0093] In one embodiment of this article, as Figure 5 shown, determining the electrical characteristic data of each node at each time step within the preset time period according to the relationship between each time step and the target time step within the preset time period, the preset attenuation coefficient, and the electrical data of each time step includes:
[0094] Step 510: Determine the weighting coefficients of each time step at the target time step according to the time span between each time step and the target time step within a preset time period and the preset attenuation coefficient.
[0095] Step 520: Determine the electrical characteristic data of each time step of each node within a preset time period according to the weighting coefficients of each time step at the target time step and the electrical data of each time step.
[0096] In this embodiment, the weighting coefficients of each time step at the target time step are determined according to the time span between each time step and the target time step and the preset attenuation coefficient. The attenuation coefficient is adjusted by the time span between each time step and the target time step, and the influence degree of each time step on the target time step is determined from the time dimension, so as to determine the weighting coefficients.
[0097] In one embodiment of this article, as Figure 6 shown, determining the electrical characteristic data of each time step of each node within a preset time period according to the weighting coefficients of each time step at the target time step and the electrical data of each time step includes:
[0098] Step 610: Perform weighted summation on the electrical data of each time step according to the weighting coefficients of each time step at the target time step to obtain the weighted electrical data of each time step.
[0099] Step 620: Determine the electrical characteristic data of the target time step according to the electrical data of the target time step and the weighted electrical data of each time step.
[0100] Step 630: Determine the electrical characteristic data of each target time step under each node as the electrical characteristic data of each time step of each node within a preset time period.
[0101] In this embodiment, the weighted electrical data of each time step is further obtained according to the weighting coefficients, and the electrical characteristic data is determined according to the weighted electrical data and the electrical data of the target time step. By comprehensively considering the influence of the weighted electrical data of each time step on the target time step, the feature quality is improved, and thus the model prediction accuracy is improved.
[0102] In the embodiment of this article, after obtaining the electrical data of each time step of node A, the following preprocessing steps are performed:
[0103]
[0104] Among them, V n,t represents the voltage data corresponding to node n at time step t, and I n,t represents the current data corresponding to node n at time step t, and P n,trepresents the power data corresponding to node n at time step t, and T represents the total number of time steps. represents the average voltage of node n over the total number of time steps T. represents the average current of node n over the total number of time steps T. represents the average power of node n over the total number of time steps T. represents the voltage variance of node n over the total number of time steps T. represents the current variance of node n over the total number of time steps T. represents the power variance of node n over the total number of time steps T;
[0105]
[0106] where X n,t is the electrical data after standardized preprocessing.
[0107] The weighted electrical data for each time step is obtained through the following formula:
[0108]
[0109] w t = e -δ(t'-t) , w′ t = e -δ(T-t') ;
[0110] where S n,t' represents the weighted electrical data at time step t' (i.e., the target time step), w t and w t ' both represent the weighting coefficients, δ represents the preset attenuation coefficient, δ The value of can be determined according to the actual situation and is not limited in this article.
[0111] w t reflects the influence degree of the time steps before time step t' on t', and w′ t reflects the influence degree of time step t' on the time steps after t'.
[0112] The electrical characteristic data for each time step is obtained through the following formula:
[0113]
[0114] where M t represents the electrical characteristic data at time step t, ||X n,t || is the parameter for normalization, and N represents the total number of nodes.
[0115] After that, the electrical characteristic data M 1 , M 2 ,..., MT The existing or predicted state probabilities of each node are input into the self-attention security situation awareness large model, and the state of the power system can be determined.
[0116] The state of the power system also includes the normal state probability -0, the physical fault probability -1, the probability of being slightly attacked -2, the probability of being moderately attacked -3, the probability of being severely attacked -4, the probability of over-high load -5, and the probability of under-low load -6. Among them, the state with the highest predicted state probability is determined as the state of the power system, and relevant measures are reminded to the staff according to the state of the power system.
[0117] Based on the same inventive concept, this article also provides a power system security situation awareness device as described in the following embodiments. Since the principle of the power system security situation awareness device to solve problems is similar to the power system security situation awareness method based on the self-attention large model, the implementation of the power system security situation awareness device can refer to the power system security situation awareness method based on the self-attention large model, and the repeated parts will not be elaborated.
[0118] Specifically, as Figure 7 shown, the power system security situation awareness device based on the self-attention large model includes:
[0119] An acquisition module 710, configured to acquire the abnormal state nodes of the power system, their abnormal states, the associated nodes of the abnormal state nodes, and the electrical data of each node of the power system;
[0120] A prediction module 720, configured to predict the state probabilities of the associated nodes in various states according to the abnormal states of the abnormal state nodes, and the state types include the normal state and multiple abnormal states;
[0121] A determination module 730, configured to input the state probabilities of the nodes and the electrical data of the nodes into a pre-trained self-attention security situation awareness large model to determine the state of the power system.
[0122] The power system security situation awareness method and device based on the self-attention large model provided in this article, when there are abnormal state nodes in the power system, predict the state probabilities of the associated nodes according to the abnormal states of the abnormal state nodes, and input the state probabilities and electrical data of all nodes of the power system into the self-attention security situation awareness large model to determine the state of the power system, fully considering the mutual influence among the nodes of the power system, thereby improving the accuracy of power system security situation awareness.
[0123] In an embodiment of this article, a computer device is also provided for implementing the method described in any of the above embodiments, as Figure 8The following is a schematic structural diagram of a computer device according to an embodiment of the present disclosure. The computer device 802 may include one or more processors 804, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 802 may also include any memory 806 for storing any kind of information such as code, settings, data, etc. Non-limiting examples include any combination of the following: any type of RAM, any type of ROM, flash memory devices, hard disks, optical discs, etc. More generally, any memory may store information using any technology. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 802. In one case, when the processor 804 executes the associated instructions stored in any memory or combination of memories, the computer device 802 may perform any operation of the associated instructions. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any memory, such as a hard disk drive mechanism, an optical disc drive mechanism, etc.
[0124] The computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via an input device 812) and for providing various outputs (via an output device 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), the input device 810, and the output device 814 may not be included, and the computer device may only act as a computer device in a network. The computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.
[0125] The communication link 822 may be implemented in any manner, for example, via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0126] Corresponding to Figures 1 to 6 the method described above, an embodiment of the present disclosure also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is run by a processor, it executes the steps of the above method.
[0127] An embodiment of the present disclosure also provides a computer-readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute as Figures 1 to 6The method shown
[0128] It should be understood that in various embodiments herein, the sequence numbers of the above processes do not imply the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments herein.
[0129] It should also be understood that in the embodiments herein, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.
[0130] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this article.
[0131] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0132] In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces, devices, or units, and can also be electrical, mechanical, or other forms of connection.
[0133] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments herein.
[0134] In addition, each functional unit in the various embodiments of this document can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0135] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the essence of the technical solution in this document, or the part that contributes to the prior art, or all or part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this document. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0136] Specific embodiments are used in this document to elaborate on the principles and implementation manners of this document. The descriptions of the above embodiments are only used to help understand the method and its core idea in this document; at the same time, for those of ordinary skill in the art, according to the idea of this document, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this document.
Claims
1. A power system security situation awareness method based on a self-attention large model, characterized in that: The method comprises: Acquire abnormal state nodes of the power system and their abnormal states, associated nodes of the abnormal state nodes, and electrical data of each node of the power system; Predicting the state probabilities of the associated nodes being in various states according to the abnormal state of the abnormal state node, where the state types include normal states and multiple abnormal states; The state probability of each node and the electrical data of each node are input into a pre-trained self-attention safety situation awareness large model to determine the state of the power system.
2. The method according to claim 1, characterized in that The associated nodes include directly associated nodes and indirectly associated nodes; Predicting the state probabilities of the associated nodes being in various states according to the abnormal state of the abnormal state node includes: According to the abnormal state of the abnormal state node, predict the state probability of the directly associated node being in various states; The state probabilities of the indirectly associated nodes being in various states are predicted according to the state probabilities of the directly associated nodes being in various states.
3. The method according to claim 2, characterized in that Predicting the state probabilities of the associated nodes being in various states according to the abnormal state of the abnormal state node also includes: According to the abnormal state of the abnormal state node, predict the probability of the indirectly associated node being in various states; According to the influence state probabilities of the indirectly associated nodes being in various states, the state probabilities of the indirectly associated nodes being in various states are updated.
4. The method according to claim 1, characterized in that The abnormal state includes physical failure, attack and load abnormality; The electrical data includes voltage data, current data and power data.
5. The method according to claim 1, characterized in that The method further comprises: Obtain electrical data of each node of the power system at each time step within a preset period of time; Determine the electrical characteristic data of each node at each time step within the preset period according to the relationship between each time step of each node within the preset period and the target time step, the preset attenuation coefficient, and the electrical data of each time step; The state probability of each node and the electrical characteristic data of each node are input into a pre-trained self-attention safety situation awareness large model to determine the state of the power system.
6. The method according to claim 5, characterized in that According to the relationship between each time step of each node in the preset time period and the target time step, the preset attenuation coefficient, and the electrical data of each time step, the electrical characteristic data of each node in each time step in the preset time period is determined, including: Determine the weighting coefficient of each time step under the target time step according to the time span of each time step and the target time step of each node within the preset time period and the preset attenuation coefficient; The electrical characteristic data of each node at each time step within a preset time period is determined according to the weighted coefficient of each time step at the target time step and the electrical data of each time step.
7. The method according to claim 6, characterized in that Determining electrical characteristic data of each node at each time step within a preset time period according to the weighted coefficient of each time step at the target time step and the electrical data of each time step, including: According to the weighted coefficients of the time steps at the target time step, weighted summation is performed on the electrical data of the time steps to obtain weighted electrical data of the time steps; Determine electrical characteristic data of the target time step according to the electrical data of the target time step and the weighted electrical data of each time step; The electrical characteristic data of each target time step under each node is determined as the electrical characteristic data of each node at each time step within a preset time period.
8. A power system security situation awareness device based on a self-attention large model, characterized in that: The device comprises: An acquisition module, used for acquiring abnormal state nodes of the power system and their abnormal states, associated nodes of the abnormal state nodes, and electrical data of each node of the power system; A prediction module, used for predicting the state probability of the associated node being in various states according to the abnormal state of the abnormal state node, where the state types include normal state and multiple abnormal states; The determination module is used to input the state probability of each node and the electrical data of each node into a pre-trained self-attention safety situation awareness large model to determine the state of the power system.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor of a computer device, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor of a computer device, the method according to any one of claims 1 to 7 is implemented.