A method and system for calculating the live state of an electrical network
Through the electrical network live state calculation method based on the attribute graph model, the breadth-first traversal and concurrent data structures are used to solve the problems of high complexity and insufficient adaptability in the existing technology, and efficient live state initialization and update are achieved, which is suitable for Large-scale electrical network.
Patent Information
- Application Number
- CN202411370711.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-09-29
AI Technical Summary
The existing methods for live state calculation of electrical networks have problems such as high complexity, insufficient adaptability and low computing efficiency, especially in large-scale complex electrical networks, which are difficult to effectively deal with topological changes and abnormal situations.
Using the method based on the attribute graph model, by obtaining the electrical network topology diagram and live state update information of the initial live state, using breadth-first traversal and concurrent data structures, recalculate the live state, and only partial updates of the affected topology subgraphs. Implement accurate initialization and efficient update of live state.
It improves the flexibility, memory execution efficiency and response speed of the live state calculation of electrical networks, can better adapt to the changes in power grid structure and abnormal situations, and is suitable for topological analysis and topological coloring applications of large-scale electrical networks.
Smart Images

Figure CN118889417B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of power systems, and in particular, relates to a method and system for calculating the energized state of an electrical network. Background Art
[0002] The calculation of the live state of the electrical network is an important issue in the operation and management of the power system, and is widely used in electrical network topology analysis and topology coloring. With the continuous expansion of the scale and complexity of the power system, more and more equipment topology data, attribute data and geographic data are stored, and higher requirements are put forward for the correctness, reliability, stability and efficiency of the live state calculation.
[0003] At present, the traditional methods for calculating the charged state mainly include:
[0004] (1) System configuration personnel or dispatchers manually set the energized state of related equipment according to the real-time status of fuses, switches, and switches in the system. This method is labor-intensive and inefficient.
[0005] (2) Through graph theory and mathematical model methods, the electrical network is regarded as a directed or undirected graph, and the power grid topology is mapped into the adjacency matrix. According to the actual situation of the power grid, the nodes in the power grid topology are assigned initial states. According to the real-time monitoring data and sensor information, the node states of the power grid topology are updated through iterative calculations. In practice, the power system is composed of a large number of components and the topology structure is very complex. This method faces the challenges of high complexity and large-scale calculations.
[0006] For example, the invention patent with authorization number CN105226647B and publication date September 5, 2017 discloses a high-performance real-time topology analysis method for electrical networks. Its topology analysis of electrical networks is based on specific switching actions. By monitoring the switching actions of the electrical system, it fully utilizes the calculation results of the adjacency matrix and the fully connected matrix before the switching action to obtain a new adjacency matrix and fully connected matrix, so that the data that has been calculated can be effectively utilized, reducing a large number of repeated calculation processes.
[0007] (3) Calculate the charged state of the electrical network based on the topological structure and node voltage information of the electrical network. Specifically, this method calculates the current and voltage relationship between nodes to obtain the voltage value of the node, and then judges the charged state of the node based on the obtained voltage value. This method requires topological structure analysis of the entire electrical network, which is computationally intensive and relies on node voltage information. It cannot directly obtain the charged state of the node. Therefore, this method is suitable for small-scale electrical networks, but not for large-scale complex electrical networks.
[0008] Based on the above, the research on the initialization and update algorithm of the live state of the power grid topology mainly focuses on static methods based on graph analysis and mathematical model establishment, as well as dynamic methods based on real-time monitoring data and sensor information. However, the existing methods have some problems, such as insufficient adaptability to changes in the power grid structure, high computational complexity, and insufficient ability to handle abnormal situations. Summary of the invention
[0009] Purpose of the invention: In order to overcome the above-mentioned deficiencies of the prior art, the present invention provides a method for calculating the energized state of an electrical network, and the present invention also provides a system for calculating the energized state of an electrical network.
[0010] Technical solution: According to a first aspect of the present invention, a method for calculating the energized state of an electrical network is provided, the method comprising:
[0011] Acquire an electrical network topology diagram in an initial energized state, wherein the electrical network topology diagram includes a plurality of network nodes and edges connecting the network nodes, the network nodes represent electrical equipment and terminals, and the edges represent connection relationships between the equipment and the terminals;
[0012] Acquire power-on status update information, wherein the power-on status update information includes network nodes and edges whose information needs to be updated;
[0013] Matching the live state update information with the electrical network topology graph of the initial live state to obtain at least one initial electrical network topology subgraph, wherein the initial electrical network topology subgraph represents a topology subgraph consisting of a plurality of network nodes and a plurality of edges with a linkage relationship and attribute data changes;
[0014] According to the power-on status update information, the power-on status of the network nodes in the initial electrical network topology subgraph is recalculated to obtain a target electrical network topology subgraph.
[0015] Further, including:
[0016] The obtaining of the electrical network topology diagram in the initial energized state specifically includes:
[0017] Initializing the charged state, traversing the original electrical network topology diagram, and obtaining the original electrical network topology diagram with the initial charged state;
[0018] Obtain electrical devices and terminals from an original electrical network topology diagram with an initial energized state as network nodes, and obtain connection relationships between devices and terminals as edges;
[0019] According to the connection relationship between electrical equipment, the relationship between network nodes and edges is obtained;
[0020] The attribute graph model is used to model the relationship between network nodes and edges to obtain the corresponding electrical network topology diagram.
[0021] Further, including:
[0022] The initialization according to the energized state, traversing the electrical network topology diagram, and obtaining an original electrical network topology diagram with an initial energized state, includes:
[0023] When the power-on state is initialized, starting from the preset power supply list, the original electrical network topology diagram is expanded in parallel through a breadth-first traversal method, and the access state of each network node and the power-on state of the electrical equipment corresponding to the network node are recorded in a concurrent data structure sharing manner.
[0024] The network nodes are maintained and updated during the traversal process. After the traversal, the power status of the network nodes is updated to the corresponding power status attributes of the network nodes. The power status attributes include current inflow, current outflow and no current.
[0025] Further, including:
[0026] The control method of the charged state includes:
[0027] The energized state of the corresponding electrical device is obtained through the direct or indirect connection relationship between each electrical device and the power supply in the electrical network topology diagram, and the on / off state of the electrical device on the topological path.
[0028] Further, including:
[0029] When the power-on state is initialized, starting from the preset power supply list, the original electrical network topology map is expanded in parallel through a breadth-first traversal method, and the access state of each network node and the power-on state of the electrical device corresponding to the network node are recorded in a concurrent data structure sharing manner, including:
[0030] Start from all power supply points in parallel and perform breadth-first traversal. If a disconnected switch, fuse or switch is encountered, stop expanding. According to the graph model structure of electrical equipment-terminal, when traversing and expanding from the power supply point electrical equipment, the odd-numbered degrees are terminals, and the even-numbered degrees are electrical equipment.
[0031] For odd degrees, a set data structure is maintained to record the primary keys of all terminals of the current degree;
[0032] For even degrees, the live state calculation is performed for each electrical device;
[0033] Specifically, for electrical devices with even degrees, an array marking the access status is maintained. If the electrical device has been accessed, the state corresponding to the terminal in the power state array is set to current inflow, and the traversal of this network node is terminated; if the current electrical device has not been accessed, the access mark position of the electrical device in the array is set, and the following steps are performed:
[0034] Traverse all the terminals connected to the electrical equipment to determine whether the terminal exists in the set maintained by the last odd degree. If so, set the state corresponding to the terminal in the power state array to current inflow; if not, set it to no power;
[0035] If the traversed electrical device is not a disconnected switch, the ports whose power state array is set to no current are set to current outflow, and the primary key of the corresponding terminal is inserted into the set to be traversed next time;
[0036] The above traversal process is repeated until the set traversed according to the breadth-first traversal method is empty, at which time the obtained power-on state mapping data structure contains the final power-on state information of each electrical device and initializes the attributes assigned to each electrical device.
[0037] Further, including:
[0038] Matching the live state update information with the electrical network topology diagram of the initial live state to obtain at least one initial electrical network topology sub-diagram, including:
[0039] According to a number of network nodes, the corresponding terminals are determined, and according to the corresponding terminal topological relationship, the terminals that can be affected are obtained, and the terminals that can be affected are combined to form an electrical network topology subgraph;
[0040] Among them, if the several network nodes included in the power-on status update information include nodes corresponding to terminals belonging to two different electrical devices, two initial electrical network topology subgraphs are formed according to the terminals that can be affected by the nodes corresponding to the terminals of different electrical devices.
[0041] Further, including:
[0042] According to the live state update information, after recalculating the live state of the network nodes in the initial electrical network topology subgraph to obtain the target electrical network topology subgraph, the method further includes:
[0043] According to the target electrical network topology subgraph, obtaining a topological structure and attribute data change of the target electrical network topology subgraph relative to the initial electrical network topology subgraph;
[0044] According to the topological structure and attribute data changes of the target electrical network topology subgraph relative to the initial electrical network topology subgraph, obtaining the power source in the affected network topology subgraph;
[0045] According to the affected power source, the power status of the corresponding electrical equipment is adjusted.
[0046] Further, including:
[0047] The step of adjusting the power state of the corresponding electrical equipment according to the affected power source includes:
[0048] According to the power-on status update information, the on-off adjustment of the on-off switch devices corresponding to the network nodes in the initial electrical network topology subgraph is utilized to realize the passage between several of the network nodes in the initial electrical network topology subgraph, so as to adjust the power-on status of the corresponding electrical equipment.
[0049] On the other hand, the present invention also provides a system for calculating the live state of an electrical network, the system comprising:
[0050] An acquisition unit, configured to acquire an electrical network topology diagram in an initial energized state, wherein the electrical network topology diagram includes a plurality of network nodes and edges connecting the network nodes, the network nodes represent electrical equipment and terminals, and the edges represent connection relationships between the equipment and the terminals;
[0051] The acquisition unit is further used to acquire the power-on status update information, wherein the power-on status update information includes the network nodes and edges whose information needs to be updated;
[0052] A matching unit, used for matching the live state update information with the electrical network topology graph of the initial live state to obtain at least one initial electrical network topology subgraph, wherein the initial electrical network topology subgraph represents a topology subgraph consisting of a plurality of network nodes and a plurality of edges with a linkage relationship and attribute data changes;
[0053] An updating unit is used to recalculate the power status of the network nodes in the initial electrical network topology subgraph according to the power status update information to obtain a target electrical network topology subgraph.
[0054] Finally, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method for calculating the energized state of an electrical network when executing the computer program.
[0055] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0056] The present application provides a method and system for calculating the live state of an electrical network. First, an electrical network topology diagram of an initial live state is obtained. The initialization calculation of the live state of the present invention only needs to input a list of power points to complete the initial assignment of the live state of the whole diagram. Next, the live state update information is obtained, wherein the live state update information includes the network nodes and edges that need to be updated. Then, the live state update information is matched with the electrical network topology diagram of the initial live state to obtain at least one initial electrical network topology subgraph, wherein the initial electrical network topology subgraph represents a topology subgraph composed of a plurality of network nodes and a plurality of edges with a linkage relationship and attribute data changes. Finally, according to the live state update information, the live state of the network nodes in the initial electrical network topology subgraph is recalculated to obtain the target electrical network topology subgraph. Therefore, when the topology structure and attribute information in the electrical network diagram change, the corresponding topology structure and attribute data change information are input, and the live state update method only traverses the affected subgraph to complete the assignment update of the live state.
[0057] Therefore, compared with the traditional method for calculating the power state, the present application has a more flexible abstract interface, lower memory execution overhead and faster response speed. The power state initialization traverses the entire graph and calculates the initial power state of the nodes of each electrical network topology graph. The power state update only recalculates the local power state of the affected related electrical network subgraphs according to the given topological structure and attribute data change information, which has extremely high execution efficiency. Therefore, the present invention can be widely used in various applications such as electrical network topology analysis and topology coloring based on attribute graph models. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0059] Figure 1 A schematic flow chart of a method for calculating the energized state of an electrical network in one embodiment of the present invention;
[0060] Figure 2 A schematic diagram of an electrical network topology structure with a terminal model of a method for calculating a live state of an electrical network in one embodiment of the present invention;
[0061] Figure 3A flowchart of an electrical network electrical state initialization method in accordance with an embodiment of the present invention;
[0062] Figure 4 The present invention is a flowchart of updating the live state of an electrical network live state calculation method in one embodiment of the present invention. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] First, in order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are given in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all couplings of one or more related listed items.
[0066] It can be understood that the terms "first", "second", etc. used in the present application can be used in this article to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
[0067] Some terms involved in this application are explained below to facilitate understanding of this application:
[0068] A network node refers to the basic unit in a graph and can be represented as an entity or a data point.
[0069] Edge refers to the connection relationship between nodes, which is used to represent the direct relationship or connection between nodes. In a topological graph, this connection relationship can be undirected (indicating a bidirectional connection) or directed (indicating a unidirectional connection).
[0070] The Property Graph Model is an important data model in the field of graph theory and graph databases, which is used to represent and store graph structures with rich properties. Compared with the traditional simple graph structure (composed of nodes and edges), it is more flexible and richer, and can more accurately describe complex relationships and structures in the real world.
[0071] Breadth-First Search (BFS), also known as breadth-first search, is a graph traversal or search algorithm that starts from a specified node in the graph and visits all of its neighbor nodes layer by layer until all reachable nodes are visited.
[0072] The calculation of the energized state of the electrical network includes two processes: energized state initialization and energized state update. The energized state initialization refers to the calculation and initialization of the energized state of each node of the power grid given the topological structure of the power grid. The energized state update of the power grid topology refers to the update of the energized state of the affected power grid nodes according to the changes in the power grid state and external disturbance factors during the operation of the power grid.
[0073] Based on the above description, the present invention provides a method for calculating the energized state of an electrical network, based on a graph model of electrical equipment-terminals. In a power system, the graph model of electrical equipment-terminals abstracts electrical equipment and terminals connected to the electrical equipment as nodes, and abstracts the connection relationship between the electrical equipment and the terminals as edges, and uses a point-and-edge method to describe the topological structure of the power grid. Each network node of an electrical device has zero to multiple terminals connected to it, and a topological structure is established between electrical equipment and electrical equipment through the connection relationship with the terminals.
[0074] By considering the terminals of electrical equipment in the graphical model, the topological structure of the power grid and the connection mode between electrical equipment can be described more accurately, including the actual connection relationship, physical grounding, electrical connection and logical relationship between electrical equipment, so as to model and analyze the power grid more accurately.
[0075] This graphical model can more accurately reflect the actual situation of the power grid, provide more accurate input data for the grid power state initialization and update algorithm, and can better adapt to grid structure changes and abnormal situations, thereby improving the reliability and efficiency of grid operation management.
[0076] like Figure 1 As shown, the corresponding specific methods include:
[0077] S100, obtaining an electrical network topology diagram in an initial energized state.
[0078] The electrical network topology diagram includes a plurality of network nodes and edges connecting the network nodes, wherein the network nodes represent electrical equipment and terminals, and the edges represent connection relationships between the equipment and the terminals.
[0079] Specifically, according to the energized state initialization, the electrical network topology diagram is traversed to obtain the electrical network topology diagram with the initial energized state.
[0080] After the electrical network topology diagram is obtained, the electrical network topology diagram needs to be initialized, that is, after the electrical network topology diagram is initialized, the electrical network topology diagram with an initial energized state is obtained.
[0081] Furthermore, when the power-on state is initialized, starting from the preset power supply list, the electrical network topology diagram is expanded in parallel through a breadth-first traversal method, and the access status of each network node and the power-on state of the electrical equipment corresponding to the network node are recorded in a concurrent data structure sharing manner.
[0082] The network nodes are maintained and updated during the traversal process, and after the traversal, the power status of the network nodes is updated to the corresponding power status attributes of the network nodes.
[0083] Specifically, a breadth-first traversal method is used to traverse from a preset power supply list (starting from all power supply points), so that the power status of each network node can be recorded using this method. When the endpoint corresponding to the network node is reflected on the electrical equipment, the power status of the electrical equipment, that is, the power status attribute of the electrical equipment, can be known.
[0084] It should be noted that, S100, the step of obtaining the electrical network topology diagram in the initial energized state, further includes:
[0085] The electrical equipment and terminals are obtained as network nodes, and the connection relationship between the equipment and the terminals is obtained as an edge.
[0086] According to the connection relationship between electrical equipment, the relationship between network nodes and edges is obtained.
[0087] The relationship between network nodes and edges is modeled using an attribute graph model to obtain the electrical network topology graph.
[0088] Specifically, the connection between electrical devices is realized through devices and terminals, that is, the terminals are compared to network nodes, and the connection relationship between devices and terminals is compared to edges. In this way, the electrical network topology diagram of electrical equipment can be formed using network nodes and edges.
[0089] Next, when controlling the electrical network topology, the following methods can be included:
[0090] For each electrical device in the electrical network topology diagram, the energized state of the corresponding electrical device is obtained through the direct or indirect connection relationship with the power supply and the on / off state of the electrical device on the topological path.
[0091] like Figure 2 The topological structure of the electrical network with terminal model is given. For each electrical equipment node of the electrical network, it contains the terminal array attribute connected to it and the power-on state attribute corresponding to the terminal one by one. The power-on state attribute is divided into three conditions: current inflow, current outflow and no current, which represents the current state at the terminal connected to the electrical equipment.
[0092] That is to say, in the electrical network topology diagram, the direct or indirect connection relationship between the electrical equipment corresponding to the terminal represented by the network node and the power supply, and the on-off state of the electrical equipment on the topological path represent the energized state of the corresponding electrical equipment, that is, opening the switch and closing the switch will produce different energized states. The open switch and the closed switch can be connected to the terminal, so that when the switch between the terminals is in the closed state, the terminals are in the connected state, forming a energized area; when the switch between the terminals is in the open state, the terminals are in the disconnected state, forming a non-energized area. Similarly, when the terminals are in the connected state, the terminals of the corresponding topology, whether closed or disconnected, will still form energized areas and non-energized areas.
[0093] like Figure 3 As shown, when the power-on state is initialized, starting from the preset power supply list, the original electrical network topology diagram is expanded in parallel through the breadth-first traversal method, and the access state of each network node and the power-on state of the electrical device corresponding to the network node are recorded in a concurrent data structure sharing manner. The following steps are included:
[0094] A global high-concurrency mapping data structure is maintained for all electrical devices to record the power-on status of each electrical device.
[0095] Perform BFS traversal from all power supply points in parallel, and stop expanding when encountering a disconnected switch, fuse or switch. According to the graph model structure of electrical equipment-terminal, when traversing and expanding from the power supply point electrical equipment, the odd-numbered degrees are terminals, and the even-numbered degrees are electrical equipment;
[0096] For odd degrees, a set data structure is maintained to record the primary keys of all terminals of the current degree;
[0097] For even degrees, the energized state calculation is performed for each electrical device.
[0098] Specifically, an array marking the access status is maintained for electrical devices with even degrees. If the electrical device has been accessed, the state corresponding to the terminal in the power state array is set to current inflow, and the traversal of this network node is terminated.
[0099] If the current electrical device has not been accessed, the algorithm is executed after the access mark position of the electrical device in the array: traverse all the terminals connected to the electrical device to determine whether this terminal exists in the set maintained by the previous odd degree. If it exists, the state corresponding to the terminal in the power state array is set to current inflow; if it does not exist, it is set to no power.
[0100] Furthermore, if the electrical device is not a disconnected switch, the ports whose power state array is set to no current are set to current outflow, and the primary key of the corresponding terminal is inserted into the set of the next BFS traversal;
[0101] The above traversal process is repeated until the set traversed by BFS is empty. At this time, the obtained power-on state mapping data structure contains the final power-on state information of each electrical device and initializes the attributes assigned to each electrical device.
[0102] S200, obtaining updated information of the power-on status.
[0103] The power status update information includes the network nodes and edges whose information needs to be updated.
[0104] It should be noted that the power-on status update information may be an acquired instruction, which may be formed by manual operation or automatically by a computer. The present application does not limit how to form the power-on status update information. After the present application acquires the power-on status update information, it further obtains the network nodes and edges included in the power-on status update information, that is, the power-on status update information carries the network nodes and edges that need to be updated.
[0105] S300, matching the power-on state update information with the electrical network topology diagram of the initial power-on state to obtain at least one initial electrical network topology sub-diagram.
[0106] The initial electrical network topology subgraph represents a topological structure with a linkage relationship and a topological subgraph consisting of a plurality of network nodes and a plurality of edges whose attribute data changes.
[0107] Specifically, the several network nodes included in the live state update information may belong to different electrical devices, that is, according to the several network nodes, the corresponding devices and terminals are determined, and according to the corresponding device and terminal topological relationship, the terminals that can be affected are obtained, and the devices and terminals that can be affected are combined to form an electrical network topology subgraph. In addition, if the several network nodes included in the live state update information have nodes corresponding to two different electrical devices and terminals, two initial electrical network topology subgraphs can be formed according to the devices and terminals that can be affected by the nodes corresponding to the different electrical devices and terminals. In other words, the initial electrical network topology subgraph is not established in advance, but the initial electrical network topology subgraph is obtained by obtaining the live state update information, and then the initial electrical network topology subgraph is adjusted according to the live state update information.
[0108] S400, recalculating the energized states of the network nodes in the initial electrical network topology subgraph according to the energized state update information to obtain a target electrical network topology subgraph.
[0109] Specifically, obtaining the target electrical network topology subgraph also includes the following steps:
[0110] According to the target electrical network topology subgraph, obtaining a topological structure and attribute data change of the target electrical network topology subgraph relative to the initial electrical network topology subgraph;
[0111] According to the topological structure and attribute data changes of the target electrical network topology subgraph relative to the initial electrical network topology subgraph, obtaining the power source in the affected network topology subgraph;
[0112] According to the affected power source, the power status of the corresponding electrical equipment is adjusted.
[0113] It should be noted that after obtaining the target electrical network topology subgraph, the topology structure and attribute data changes compared with the initial electrical network topology subgraph can be obtained. Next, according to the topology structure and attribute data changes, the affected power supply is found, and then the power supply is adjusted to adjust the corresponding electrical equipment's charged state, that is, the charged state of the edge corresponding to the terminal is adjusted.
[0114] Further, adjusting the affected power supply may include the following steps:
[0115] According to the power-on status update information, the on-off adjustment of the on-off switch devices corresponding to the network nodes in the initial electrical network topology subgraph is utilized to realize the passage between several of the network nodes in the initial electrical network topology subgraph, so as to adjust the power-on status of the corresponding electrical equipment.
[0116] Among them, the on-off switching devices may include switches, fuses, knife switches and other devices that can affect the on-off of the circuit.
[0117] The above-mentioned high-performance electrical network live state update method based on attribute graph model, such as Figure 4 As shown, the following steps are included:
[0118] According to the changes in the topological structure and attribute information in the electrical network diagram, the corresponding network nodes and edges are added, modified and deleted;
[0119] Find the set of network nodes directly affected by the update operation, including: newly added network nodes, two endpoints of newly added edges, modified network nodes, two endpoints of modified edges, neighboring network nodes of deleted nodes, and two endpoints of deleted edges;
[0120] Starting from the set of network nodes directly affected by the update operation, the set is expanded through BFS traversal. When a disconnected switch, fuse or switch is encountered, the expansion is stopped. After the traversal is completed, all power supplies in the subgraph affected by the update operation are obtained, and all network nodes traversed by BFS are recorded to obtain set S1;
[0121] Perform a power-on initialization from these power supplies in parallel, and record all network nodes traversed during the initialization process to obtain a set S2;
[0122] The set S3 is obtained by taking the difference between the set S1 and the set S2, and all the powered states of the network nodes in S3 are reset to be unpowered.
[0123] In summary, the high-performance electrical network power state calculation method based on the attribute graph model proposed in the present invention can traverse the entire graph in parallel and calculate the initial power state of each electrical network node. When the topology structure and attribute information in the electrical network graph change, only the local power state of the affected related electrical network subgraph is recalculated, which has extremely high execution efficiency.
[0124] Based on the same inventive concept, the embodiment of the present application also provides a system for calculating the live state of an electrical network. The implementation scheme for solving the problem provided by the system is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments provided below can refer to the limitations of the method above, and will not be repeated here.
[0125] In one embodiment, a system for calculating the live state of an electrical network is provided, comprising:
[0126] An acquisition unit, configured to acquire an electrical network topology diagram in an initial energized state, wherein the electrical network topology diagram includes a plurality of network nodes and edges connecting the network nodes, the network nodes represent electrical equipment and terminals, and the edges represent connection relationships between the equipment and the terminals;
[0127] The acquisition unit is further used to acquire the power-on status update information, wherein the power-on status update information includes the network nodes and edges whose information needs to be updated;
[0128] A matching unit, used for matching the live state update information with the electrical network topology graph of the initial live state to obtain at least one initial electrical network topology subgraph, wherein the initial electrical network topology subgraph represents a topology subgraph consisting of a plurality of network nodes and a plurality of edges with a linkage relationship and attribute data changes;
[0129] An updating unit is used to recalculate the power status of the network nodes in the initial electrical network topology subgraph according to the power status update information to obtain a target electrical network topology subgraph.
[0130] In one embodiment, the step of obtaining the electrical network topology diagram in the initial energized state includes:
[0131] The acquisition unit is used to traverse the electrical network topology diagram according to the power-on state initialization to obtain the electrical network topology diagram with the initial power-on state.
[0132] In one embodiment, the step of obtaining the electrical network topology diagram in the initial energized state includes:
[0133] An acquisition unit, used to acquire terminals of electrical equipment as network nodes, and to acquire connection relationships between equipment and terminals as edges;
[0134] An acquisition unit, used for obtaining the relationship between network nodes and edges according to the connection relationship between electrical devices;
[0135] The acquisition unit is used to model the relationship between network nodes and edges using an attribute graph model to obtain the electrical network topology graph.
[0136] In one embodiment, the step of obtaining the electrical network topology diagram in the initial energized state includes:
[0137] The acquisition unit is used for each electrical device in the electrical network topology diagram to obtain the power status of the corresponding electrical device through the direct or indirect connection relationship with the power supply and the on / off status of the electrical device on the topological path.
[0138] In one embodiment, the step of traversing the electrical network topology diagram according to the energized state initialization to obtain the electrical network topology diagram with the initial energized state includes:
[0139] An acquisition unit, used for, when the power-on state is initialized, starting from a preset power supply list, expanding in parallel in the electrical network topology map by a breadth-first traversal method, and recording the access state of each network node and the power-on state of the electrical device corresponding to the network node by a concurrent data structure sharing method;
[0140] The network nodes are maintained and updated during the traversal process, and after the traversal, the power status of the network nodes is updated to the corresponding power status attributes of the network nodes.
[0141] In one embodiment, the step of recalculating the energized state of the network nodes in the initial electrical network topology subgraph according to the energized state update information to obtain the target electrical network topology subgraph includes:
[0142] An updating unit is used to update the power-on status information and utilize the on-off adjustment of the on-off switch devices corresponding to the network nodes in the initial electrical network topology subgraph to realize the path between several of the network nodes in the initial electrical network topology subgraph, so as to adjust the power-on status of the corresponding electrical equipment.
[0143] In one embodiment, after the step of recalculating the energized state of the network nodes in the initial electrical network topology subgraph according to the energized state update information to obtain the target electrical network topology subgraph, the step further includes:
[0144] An updating unit, configured to obtain, according to the target electrical network topology subgraph, a topological structure and attribute data changes of the target electrical network topology subgraph relative to the initial electrical network topology subgraph;
[0145] An updating unit, configured to obtain a power source in an affected network topology subgraph according to a change in the topology structure and attribute data of the target electrical network topology subgraph relative to the initial electrical network topology subgraph;
[0146] The updating unit is used to adjust the power status of the corresponding electrical equipment according to the affected power supply.
[0147] A third aspect of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the aforementioned method for calculating the energized state of an electrical network when executing the computer program.
[0148] A fourth aspect of the present application provides a computer program, which, when executed by a processor, implements the steps of the aforementioned method for calculating the energized state of an electrical network.
[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0150] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0151] The protection scope of the present disclosure is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.
Claims
1. A method for calculating the charged state of an electrical network, characterized in that: The method comprises: Acquire an electrical network topology diagram in an initial energized state, wherein the electrical network topology diagram includes a plurality of network nodes and edges connecting adjacent network nodes, the network nodes represent electrical devices and terminals, and the edges represent connection relationships between the electrical devices and the terminals; Acquire power-on status update information, wherein the power-on status update information includes network nodes and edges whose information needs to be updated; Matching the live state update information with the electrical network topology graph of the initial live state to obtain at least one initial electrical network topology subgraph, wherein the initial electrical network topology subgraph represents a topology subgraph consisting of a plurality of network nodes and a plurality of edges with a linkage relationship and attribute data changes; Recalculating the energized states of the network nodes in the initial electrical network topology subgraph according to the energized state update information to obtain a target electrical network topology subgraph; The step of obtaining the electrical network topology diagram in the initial energized state specifically includes: Initializing the charged state, traversing the original electrical network topology diagram, and obtaining the original electrical network topology diagram with the initial charged state; Obtain electrical devices and terminals from an original electrical network topology diagram with an initial energized state as network nodes, and obtain connection relationships between devices and terminals as edges; According to the connection relationship between electrical equipment, the relationship between network nodes and edges is obtained; The relationship between network nodes and edges is modeled using the attribute graph model, so as to obtain the corresponding electrical network topology diagram in the initial energized state; The initialization according to the energized state, traversing the original electrical network topology diagram, and obtaining the original electrical network topology diagram with the initial energized state, includes: When the power-on state is initialized, starting from the preset power supply list, the original electrical network topology diagram is expanded in parallel through a breadth-first traversal method, and the access state of each network node and the power-on state of the electrical device corresponding to the network node are recorded in a concurrent data structure sharing manner; During the traversal process, the network nodes are maintained and updated, and after the traversal, the power status of the network nodes is updated to the corresponding power status attributes of the network nodes, where the power status attributes include current inflow, current outflow, and no current; When the power-on state is initialized, starting from the preset power supply list, the original electrical network topology map is expanded in parallel through a breadth-first traversal method, and the access state of each network node and the power-on state of the electrical device corresponding to the network node are recorded in a concurrent data structure sharing manner, including: Starting from all power sources in parallel, traverse using a breadth-first traversal method. If a disconnected switch, fuse, or switch is encountered, stop expanding. According to the graph model structure of electrical equipment-terminals, when traversing and expanding from the power source, the odd-numbered degrees are recorded as terminals, and the even-numbered degrees are recorded as electrical equipment. For odd degrees, it maintains a set data structure to record the primary keys of all terminals of the current degree; For even degrees, it is used to calculate the energized state of each electrical device; Specifically, the even degree maintains an array marking the access status of the electrical device. If the electrical device has been accessed, the state corresponding to the terminal in the power state array is set to current inflow, and the traversal of this network node is terminated; if the current electrical device has not been accessed, the access mark position of the electrical device in the array is set, and the following steps are performed: Traverse all the terminals connected to the electrical equipment to determine whether the terminal exists in the set maintained by the last odd degree. If so, set the state corresponding to the terminal in the power state array to current inflow; if not, set it to no power; If the traversed electrical device is not a disconnected switch, the ports in the power state array that are set to no current are set to current outflow, and the primary key of the corresponding terminal is inserted into the next traversed set; The above traversal process is repeated until the set traversed according to the breadth-first traversal method is empty, at which time the obtained power-on state mapping data structure contains the final power-on state information of each electrical device and initializes the attributes assigned to each electrical device.
2. The method for calculating the charged state of an electrical network according to claim 1, characterized in that: The control methods corresponding to the charged state include: The energized state of the corresponding electrical device is obtained through the direct or indirect connection relationship between each electrical device and the power supply in the original electrical network topology diagram, and the on / off state of the electrical device on the topological path.
3. The method for calculating the charged state of an electrical network according to claim 1, characterized in that: Matching the live state update information with the electrical network topology diagram of the initial live state to obtain at least one initial electrical network topology sub-diagram, including: Determine corresponding terminals according to a number of network nodes, obtain affected terminals according to the topological relationship of the corresponding terminals, and combine the affected terminals to form an electrical network topology subgraph; Among them, if the several network nodes included in the power-on status update information include nodes corresponding to two different electrical devices and terminals, two initial electrical network topology subgraphs are formed according to the devices and terminals that can be affected by the nodes corresponding to the different electrical devices and terminals.
4. The method for calculating the charged state of an electrical network according to claim 1, characterized in that: According to the live state update information, after recalculating the live state of the network nodes and edges in the initial electrical network topology subgraph to obtain the target electrical network topology subgraph, the method further includes: According to the target electrical network topology subgraph, obtaining a topological structure and attribute data change of the target electrical network topology subgraph relative to the initial electrical network topology subgraph; According to the topological structure and attribute data changes of the target electrical network topology subgraph relative to the initial electrical network topology subgraph, obtaining the power source in the affected network topology subgraph; According to the power supply in the affected network topology sub-graph, the power status of the corresponding electrical equipment is adjusted.
5. The method for calculating the charged state of an electrical network according to claim 4, characterized in that: The step of adjusting the power state of the corresponding electrical equipment according to the power source in the affected network topology sub-graph includes: According to the power-on status update information, the on-off adjustment of the switch devices corresponding to the network nodes in the initial electrical network topology subgraph is utilized to realize the passages between the several network nodes in the initial electrical network topology subgraph so as to adjust the power-on status of the corresponding electrical devices.
6. A computing system implemented by the method for calculating the energized state of an electrical network according to claim 1, characterized in that: The system includes: An acquisition unit, configured to acquire an electrical network topology diagram in an initial energized state, wherein the electrical network topology diagram includes a plurality of network nodes and edges connecting the network nodes, the network nodes represent electrical equipment and terminals, and the edges represent connection relationships between the equipment and the terminals; The acquisition unit is further used to acquire the power-on status update information, wherein the power-on status update information includes the network nodes and edges whose information needs to be updated; A matching unit, used for matching the live state update information with the electrical network topology graph of the initial live state to obtain at least one initial electrical network topology subgraph, wherein the initial electrical network topology subgraph represents a topology subgraph consisting of a plurality of network nodes and a plurality of edges with a linkage relationship and attribute data changes; An updating unit is used to recalculate the power status of the network nodes in the initial electrical network topology subgraph according to the power status update information to obtain a target electrical network topology subgraph.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method for calculating the energized state of an electrical network according to any one of claims 1 to 5 are implemented.
