A method and system for calculating the impact of switch position change on the energized state of equipment
The grid current pattern model is constructed through the graph database and memory engine, and the breadth-first traversal search is used to analyze the impact of switch displacement on the live state of the equipment, solving the problems of slow response speed and poor accuracy in traditional methods, and achieving efficient and accurate power grid Analysis of the live state of the equipment.
Patent Information
- Application Number
- CN202411055054.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-08-02
AI Technical Summary
The analysis method of switching displacement operation in traditional power grid services leads to slow system response speed and it is difficult to accurately capture complex electrical connection relationships, resulting in inaccurate or omission of calculation results.
By using graph database and memory engine, by constructing a grid current pattern model, using breadth priority traversal search to analyze the impact of switch displacement on the live state of the device, reduce disk I/O operations, and improve analysis accuracy and real-time.
It improves data processing speed and analysis accuracy, reduces system storage and query overhead, and adapts to changes in grid scale and business needs.
Smart Images

Figure CN118568311B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of power grid monitoring and management, and in particular relates to a method and system for calculating the influence of switch displacement on the energized state of equipment. Background Art
[0002] In the power grid business, the topology of the power grid is complex and the electrical connection relationship between devices is changeable. Using a graph database can intuitively represent the structure of the power grid, and using the efficient query capability of the graph database, you can quickly obtain the adjacent devices of the device, calculate the electrical path, and analyze the impact of switch position changes on the power state of the device. A graph database is a non-relational database that stores and queries data in the form of a graph structure. Using efficient graph traversal and query algorithms, it can quickly find paths between nodes, calculate adjacent nodes of nodes, or find a set of nodes that meet specific conditions.
[0003] In the power grid business, the analysis of switch position change operations requires a quick response and real-time judgment of the energized state of the equipment. Using the memory engine, data such as the power grid topology, equipment information, and current direction diagram can be loaded into the memory, and the impact of switch position change on the energized state of the equipment can be analyzed in real time through memory calculation, thus achieving efficient real-time monitoring and early warning.
[0004] However, the analysis methods of switch position change operations in traditional power grid services usually involve a large amount of data storage and query. This not only leads to slow system response, but also may miss critical analysis opportunities due to query delays. In addition, the topology of the power grid is complex and changeable, and the electrical connections between devices are close and dynamically changing. Traditional analysis methods often have difficulty accurately capturing such complex relationships, resulting in inaccurate calculation results or omissions. Summary of the invention
[0005] In order to address the deficiencies in the prior art, the present invention provides a method and system for calculating the impact of switch position change on the energized state of equipment, so as to solve the technical problem of calculating the frequency of switch position change operations in power grid services and their direct impact on the energized state of equipment.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions.
[0007] The present invention first discloses a method for calculating the influence of switch displacement on the energized state of equipment, the method comprising the following steps:
[0008] Based on the point entity and edge entity information of the predefined graph model, the grid equipment information, connection information and current direction information are obtained from the real-time database of the entire grid, and a grid current direction graph model is constructed and stored in the memory of the graph database;
[0009] Receive the user's switch position input parameters, use the memory engine of the graph database to perform a breadth-first traversal search on the grid current direction graph model, determine the change in the power state of the device to be queried, analyze and calculate the impact of the switch position on the power state of the device, and output the calculation results.
[0010] The present invention further includes the following preferred embodiments:
[0011] The point entity and edge entity information of the predefined graph model are used to obtain grid equipment information, connection information and current direction information from the full real-time database of the grid, and construct a grid current direction graph model, further comprising:
[0012] Each device is represented as a node in the graph, and the electrical connection between the devices is represented as an edge in the graph. The edge also has a direction attribute to identify the direction of current flow. The Schema Json file of the point entity and the edge entity is defined and imported into the memory storage of the graph database in batches.
[0013] The method further comprises: using the memory engine of the graph database to perform a breadth-first traversal search on the grid current direction graph model to determine the change in the energized state of the device to be queried, so as to analyze and calculate the impact of the switch position change on the energized state of the device.
[0014] For each switch, determine the current state of the current switch and the device to be queried, determine whether there is current flowing into the current switch, and the charged state of the device to be queried. If there is no current flowing into the current switch in any direction, determine that this switch change operation will not affect the charged state of the device to be queried; if there is current flowing into the current switch and the switch changes from closed to open, check the current charged state of the device to be queried. If there is no current flowing in, determine that this switch change operation will not affect the charged state of the device to be queried; if there is current flowing into the current switch and the switch changes from open to closed, check the current charged state of the device to be queried. If there is current flowing in, determine that this switch change operation will not affect the charged state of the device to be queried;
[0015] For each switch, after the current switch is disconnected, a bidirectional breadth-first traversal search is performed concurrently from the current switch and the queried device respectively. The first breadth-first traversal search is performed starting from the current switch. During the traversal process, the edges with incoming current direction are filtered out, and according to the business scenario of the actual power grid, the points that meet the predefined filtering conditions are filtered out. If the traversed point has only one incoming edge, the traversed point is stored in a hashmap structure that can be accessed concurrently. The key key is the node identifier and the value value is 1. Otherwise, further search for the point is stopped and the corresponding edge is stored in an edge hashmap that can be accessed concurrently. The second breadth-first traversal search is performed concurrently starting from the queried device. During the traversal process, the edges with outgoing current direction and the edge hash are filtered out. The edges in the map are filtered out, and the points that meet the preset filtering conditions are also stored in the hashmap structure, where the key is the node identifier and the value is 2; when storing data in the hashmap in the concurrent bidirectional breadth-first traversal search process, it is determined whether the point to be inserted already exists in the hashmap, and if so, the point is filtered out;
[0016] If a power source point is traversed in the second breadth-first traversal search, the second breadth-first traversal search is terminated to determine that the current switch disconnection operation will not affect the current power state of the device;
[0017] If the bidirectional breadth-first traversal search ends and the power source point is not traversed in the second breadth-first traversal search, it is determined that the current switch disconnection operation will cause the current device to be powered off;
[0018] For each switch, after the current switch is closed, a bidirectional breadth-first traversal search is concurrently performed from the current switch and the queried device, respectively, and a third breadth-first traversal search is performed starting from the switch to filter out points that meet the preset filtering conditions, and then the traversed points are stored in the hashmap structure, where the key is the node identifier and the value is 1; a fourth breadth-first traversal search is concurrently performed starting from the queried device to filter out points that meet the preset filtering conditions, and the traversed points are also stored in the hashmap structure, where the key is the node identifier and the value is 2;
[0019] In the third breadth-first traversal search process, when storing data in the hashmap, it is determined whether the point to be inserted already exists in the hashmap and the value is 2. If it does, the traversal is terminated to determine that the current device power state changes from off to on;
[0020] In the fourth breadth-first traversal search, when storing data in the hashmap, it is determined whether the point to be inserted already exists in the hashmap and the value is 1. If so, the traversal is terminated to determine whether the current device power-on state changes from power-off to power-on;
[0021] If both bidirectional breadth-first traversal searches are completed and not terminated, it is determined that the current power-on state of the device does not change.
[0022] Outputting the calculation result further includes:
[0023] The calculation results are output in the form of visualization or report, so that users can customize the result return according to business needs.
[0024] The present invention also discloses a system for calculating the effect of switch displacement on the energized state of a device using the above-mentioned method for calculating the effect of switch displacement on the energized state of a device, comprising:
[0025] The current direction graph model building module is used to obtain the grid equipment information, connection information and current direction information from the full real-time database of the grid based on the point entity and edge entity information of the predefined graph model, build the grid current direction graph model, and store it in the memory of the graph database;
[0026] The device power-on state impact calculation module is used to receive the user's switch change input parameters, use the memory engine of the graph database to perform a breadth-first traversal search on the grid current direction diagram model, determine the change in the power-on state of the device to be queried, analyze and calculate the impact of the switch change on the power-on state of the device, and output the calculation results.
[0027] Accordingly, the present application also discloses a terminal, including a processor and a storage medium;
[0028] The storage medium is used to store instructions;
[0029] The processor is used to operate according to the instructions to execute the steps of the calculation method based on the influence of the switch position change on the power state of the device.
[0030] Correspondingly, the present application also discloses a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method for calculating the impact of the aforementioned switch displacement on the power state of the device are implemented.
[0031] The beneficial effect of the present invention lies in that, compared with the prior art, the present invention provides a method and system for calculating the impact of switch position changes on the power status of equipment. Through memory calculation, disk I / O operations are reduced, data processing speed is improved, and the topological structure and electrical connection relationship of the power grid are intuitively represented by a graph database, which improves the accuracy and real-time performance of the analysis, reduces the system's storage and query overhead, and flexibly adapts to changes in the scale of the power grid and the ever-changing analysis business needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flow chart of a method for calculating the influence of switch displacement on the energized state of equipment in the present invention.
[0033] Figure 2 and Figure 3 It is a circuit topology diagram of the influence of switch displacement on the power-on state of the equipment in the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present invention more clear, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0035] The embodiments described in this application are only some embodiments of the present invention, not all embodiments. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without creative work are all within the protection scope of the present invention.
[0036] In view of the shortcomings of the prior art, the present invention proposes a method and system for calculating the impact of switch position change on the energized state of equipment. In view of the frequency of switch position change operations in power grid business and its direct impact on the energized state of equipment, the powerful relationship processing capability of the graph database is used to store and represent the topological structure of the power grid and the electrical connection relationship between devices in the form of a graph in the memory of the graph database. On this basis, combined with the analysis method of the current direction diagram, the change of the current path after the switch position change is calculated through real-time memory, so as to accurately determine whether the energized state of any device is affected, so as to improve the accuracy and real-time performance of the analysis, reduce the storage and query overhead of the system, and adapt to the changes in the scale of the power grid and the continuous changes in business needs.
[0037] See also Figure 1 As shown, the calculation method of the influence of switch displacement on the energized state of the equipment disclosed in the present invention comprises the following steps:
[0038] Step 1: Based on the point entity and edge entity information of the predefined graph model, the grid equipment information, connection information and current direction information are obtained from the full real-time database of the power grid, and a grid current direction graph model is constructed and stored in the memory of the graph database.
[0039] According to different equipment types and connection types, the present invention defines point entities and edge entities of the graph model, which cover topological equipment, topological connection relationships, and current direction relationships, thereby comprehensively reflecting the structure and operating status of the power grid.
[0040] The grid current direction graph model represents the various components in the power system and their interrelationships. In this model, various devices (such as switches, transformers, power supplies, poles, etc.) are represented as nodes in the grid current direction graph, and the electrical connections between devices (such as cables, wires, etc.) are represented as edges in the grid current direction graph. In addition, the edges in the grid current direction graph also have a direction attribute to identify the direction of current flow.
[0041] Figure 2 and Figure 3 It is a circuit topology diagram of the influence of switch displacement on the power-on state of the device in the present invention, wherein S1~S3 are switches and L1~L7 are target devices.
[0042] like Figure 2 As shown, the switch (S3) is closed and the target device (L3) is traced back to the power source, which is energized. Figure 3 As shown, the switch (S3) is open, the target device (L3) collides with L4, and the search is no longer continued, and L3 is energized.
[0043] Based on the defined point entities and edge entities, the present invention exports relevant data from the full real-time database of the power grid, ensures the accuracy and completeness of the data, and provides a reliable data basis for subsequent analysis.
[0044] In a specific embodiment, a graph database management system designed for the original power grid current direction graph model library is used. According to actual application requirements, the Schema Json files of the Vertex and Edge entities are defined to accurately describe the data structure of the power grid equipment information, connection information and current direction, and are imported into the memory storage of the graph database in batches, and the exported data is preprocessed to meet the storage format and requirements of the graph database. The point and edge information of the current direction graph is stored in a csv file, the graph database is imported into the current direction graph, and then the data is stored in the memory of the graph database to achieve fast access and efficient analysis.
[0045] Step 2: Receive the user's switch position input parameters, use the memory engine of the graph database to perform a breadth-first traversal search on the grid current direction graph model, determine the change in the power state of the device to be queried, analyze and calculate the impact of the switch position on the power state of the device, and output the calculation results.
[0046] When performing a query calculation on the impact of a switch position change on a certain device, the impact of the switch position change on the current path is analyzed based on the data in the memory and the current direction diagram. By obtaining the user's input parameters (switch ID and its position change operation, target device ID, upstream switch power state, and target device power state), and using the memory engine of the graph database, the algorithm for the impact of switch position change on the device power state is executed through the current path and direction to determine the change in the power state of the device to be queried, and then the calculation results are output in the form of visualization or report for reference by power grid managers. Users can customize the result return according to business needs to improve information availability and operability. Visual display of results facilitates intuitive understanding by managers. The calculation results of the impact on the power state of the equipment reflect the changes in the power state of the equipment in a timely manner, which helps to respond quickly.
[0047] The memory engine loads data into memory so that data access and calculation are performed in memory, which greatly reduces the number of disk I / O operations and improves the speed of data processing. At the same time, the memory engine also provides a variety of memory computing optimization technologies, such as parallel computing and vectorized computing, to further improve computing performance.
[0048] The present invention utilizes bidirectional breadth-first search (BFS) combined with current direction pruning to significantly reduce the search space and improve computational efficiency. Based on the analysis of the current direction diagram, the impact of switch displacement on the energized state of the equipment can be accurately determined. The algorithm of the present invention is adaptable to different power grid structures and analysis requirements, the pruning strategy can be flexibly adjusted, and other strategies can be integrated to adapt to changes in power grid scale and expansion of business needs.
[0049] In a preferred embodiment, the calculation process of the effect of switch displacement on the power state of the device specifically includes:
[0050] Step 2.1: For each switch, determine the current state of the current switch and the device to be queried, determine whether current flows into the current switch, and the energized state of the device to be queried.
[0051] If no current flows into the switch in any direction, it is determined that the switch change operation will not affect the power status of the device to be queried.
[0052] If current flows into the current switch and the switch changes from closed to open, check the current power-on status of the device to be queried. If no current flows into the current switch, it is determined that this switch change operation will not affect the power-on status of the device to be queried.
[0053] If current flows into the current switch and the switch changes from open to closed, check the current power-on status of the device to be queried. If current flows in, it is determined that this switch change operation will not affect the power-on status of the device to be queried.
[0054] Step 2.2: For each switch, after the current switch is disconnected, a bidirectional breadth-first traversal search is concurrently performed starting from the current switch and the queried device.
[0055] The first breadth-first traversal search is performed starting from the current switch. During the traversal process, the edges with incoming current are filtered out. According to the actual business scenarios of the power grid, the points that meet the predefined filtering conditions are filtered out, such as disconnected switches, faulty equipment, etc. The traversed points are then stored in a concurrently accessible hashmap structure, with the key being the node identifier and the value being 1.
[0056] Concurrently, a second breadth-first traversal search is performed starting from the queried device. During the traversal process, edges with outgoing current directions are filtered out, and points that meet the preset filtering conditions are filtered out. The traversed points are also stored in the hashmap structure, with the key being the node identifier and the value being 2.
[0057] In the concurrent bidirectional breadth-first traversal search process, when storing data in the hashmap, it is determined whether the point to be inserted already exists in the hashmap. If so, the point is filtered out.
[0058] If a power source point is traversed in the second breadth-first traversal search, the second breadth-first traversal search is terminated to determine that the current switch disconnection operation will not affect the current power state of the device.
[0059] If the bidirectional breadth-first traversal search ends and the power source point is not traversed in the second breadth-first traversal search, it is determined that the current switch disconnection operation will cause the current device to be de-energized from being energized.
[0060] Step 2.3: For each switch, after closing the current switch, a bidirectional breadth-first traversal search is concurrently performed starting from the current switch and the queried device.
[0061] The third breadth-first traversal search is performed starting from the switch to filter out points that meet the preset filtering conditions, and then the traversed points are stored in the hashmap structure, where the key is the node identifier and the value is 1.
[0062] Concurrently, a fourth breadth-first traversal search is performed starting from the queried device to filter out points that meet the preset filtering conditions, and the traversed points are also stored in the hashmap structure, with the key being the node identifier and the value being 2.
[0063] In the third breadth-first traversal search process, when storing data in the hashmap, it is determined whether the point to be inserted already exists in the hashmap and the value is 2. If it does, the traversal is terminated to determine whether the current power-on state of the device has changed from off to on.
[0064] In the fourth breadth-first traversal search, when storing data in the hashmap, it is determined whether the point to be inserted already exists in the hashmap and the value is 1. If so, the traversal is terminated to determine whether the current power-on state of the device has changed from off to on.
[0065] If both bidirectional breadth-first traversal searches are completed and not terminated, it is determined that the current power-on state of the device does not change.
[0066] The beneficial effect of the present invention lies in that, compared with the prior art, the present invention provides a method and system for calculating the impact of switch position changes on the power status of equipment. Through memory calculation, disk I / O operations are reduced, data processing speed is improved, and the topological structure and electrical connection relationship of the power grid are intuitively represented by a graph database, which improves the accuracy and real-time performance of the analysis, reduces the storage and query overhead of the system, and flexibly adapts to changes in the scale of the power grid and the ever-changing analysis business needs.
[0067] The present invention may be a system, a method and / or a computer program product. The present invention also discloses a system for calculating the effect of switch displacement on the device power state based on the aforementioned method for calculating the effect of switch displacement on the device power state, comprising:
[0068] The current direction graph model building module is used to obtain the grid equipment information, connection information and current direction information from the full real-time database of the grid based on the point entity and edge entity information of the predefined graph model, build the grid current direction graph model, and store it in the memory of the graph database;
[0069] The device power-on state impact calculation module is used to receive the user's switch change input parameters, use the memory engine of the graph database to perform a breadth-first traversal search on the grid current direction diagram model, determine the change in the power-on state of the device to be queried, analyze and calculate the impact of the switch change on the power-on state of the device, and output the calculation results.
[0070] Based on the spirit of the present invention, those skilled in the art can easily think that a computer program product can be obtained based on the aforementioned method for calculating the effect of the switch displacement on the device's charged state. The computer program product may include a computer-readable storage medium, which carries computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure. That is, the present application also includes a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method for calculating the effect of the switch displacement on the device's charged state.
[0071] Computer readable storage medium can be a tangible device that can keep and store the instructions used by the instruction execution device. Computer readable storage medium can be, for example, - but not limited to - electrical storage device, magnetic storage device, optical storage device, electromagnetic storage device, semiconductor storage device or any suitable combination of the above. More specific examples (non-exhaustive list) of computer readable storage medium include: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as punch card or groove protrusion structure with instructions stored thereon and any suitable combination of the above. Computer readable storage medium used here is not interpreted as instantaneous signal itself, such as radio wave or other free propagating electromagnetic wave, electromagnetic wave propagated by waveguide or other transmission medium (for example, light pulse by optical fiber cable) or electrical signal transmitted by wire.
[0072] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0073] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for calculating the effect of switch displacement on the energized state of equipment, characterized in that: The following steps are involved: Based on the point entity and edge entity information of the predefined graph model, the grid equipment information, connection information and current direction information are obtained from the real-time database of the entire grid, and a grid current direction graph model is constructed and stored in the memory of the graph database; Receive the switch position change input parameter of the user, use the memory engine of the graph database to perform a breadth-first traversal search on the grid current direction graph model, determine the change of the energized state of the device to be queried, analyze and calculate the impact of the switch position change on the energized state of the device, and output the calculation result; The switch position change input parameters include the switch ID and its position change operation, the target device ID, the switch upstream power state and the target device power state; The method further comprises: using the memory engine of the graph database to perform a breadth-first traversal search on the grid current direction graph model to determine the change in the energized state of the device to be queried, so as to analyze and calculate the impact of the switch position change on the energized state of the device. For each switch, determine the current state of the current switch and the device to be queried, determine whether there is current flowing into the current switch, and the charged state of the device to be queried. If there is no current flowing into the current switch in any direction, determine that this switch change operation will not affect the charged state of the device to be queried; if there is current flowing into the current switch and the switch changes from closed to open, check the current charged state of the device to be queried. If there is no current flowing in, determine that this switch change operation will not affect the charged state of the device to be queried; if there is current flowing into the current switch and the switch changes from open to closed, check the current charged state of the device to be queried. If there is current flowing in, determine that this switch change operation will not affect the charged state of the device to be queried; For each switch, after the current switch is disconnected, a bidirectional breadth-first traversal search is performed concurrently from the current switch and the queried device respectively. The first breadth-first traversal search is performed starting from the current switch. During the traversal process, the edges with the incoming current direction are filtered out, and according to the actual business scenario of the power grid, the points that meet the predefined filtering conditions are filtered out, and then the traversed points are stored in a hashmap structure that can be accessed concurrently, with the key key being the node identifier and the value value being 1; a second breadth-first traversal search is performed concurrently starting from the queried device, and during the traversal process, the edges with the outgoing current direction are filtered out, and the points that meet the preset filtering conditions are filtered out, and the traversed points are also stored in the hashmap structure, with the key being the node identifier and the value being 2; in the process of performing the bidirectional breadth-first traversal search concurrently, when storing data in the hashmap, it is determined whether the point to be inserted already exists in the hashmap, and if so, the point is filtered out; If a power source point is traversed in the second breadth-first traversal search, the second breadth-first traversal search is terminated to determine that the current switch disconnection operation will not affect the current power state of the device; If the bidirectional breadth-first traversal search ends and the power source point is not traversed in the second breadth-first traversal search, it is determined that the current switch disconnection operation will cause the current device to be powered off; For each switch, after the current switch is closed, a bidirectional breadth-first traversal search is concurrently performed from the current switch and the queried device, respectively, and a third breadth-first traversal search is performed starting from the switch to filter out points that meet the preset filtering conditions, and then the traversed points are stored in the hashmap structure, where the key is the node identifier and the value is 1; a fourth breadth-first traversal search is concurrently performed starting from the queried device to filter out points that meet the preset filtering conditions, and the traversed points are also stored in the hashmap structure, where the key is the node identifier and the value is 2; In the third breadth-first traversal search process, when storing data in the hashmap, it is determined whether the point to be inserted already exists in the hashmap and the value is 2. If it does, the traversal is terminated to determine that the current device power state changes from off to on; In the fourth breadth-first traversal search, when storing data in the hashmap, it is determined whether the point to be inserted already exists in the hashmap and the value is 1. If so, the traversal is terminated to determine whether the current device power-on state changes from power-off to power-on; If both bidirectional breadth-first traversal searches are completed and not terminated, it is determined that the current power-on state of the device does not change.
2. The method for calculating the effect of switch displacement on the energized state of equipment according to claim 1, characterized in that: The point entity and edge entity information of the predefined graph model are used to obtain grid equipment information, connection information and current direction information from the full real-time database of the grid, and construct a grid current direction graph model, further comprising: Each device is represented as a node in the grid current direction graph, and the electrical connection between devices is represented as an edge in the grid current direction graph. The edge also has a direction attribute to identify the direction of current flow. The SchemaJson file of the point entity and edge entity is defined and imported into the memory storage of the graph database in batches.
3. The method for calculating the effect of switch displacement on the energized state of equipment according to claim 2, characterized in that: Outputting the calculation result further includes: The calculation results are output in the form of visualization or report, so that users can customize the result return according to business needs.
4. A system for calculating the effect of switch displacement on the power-on state of equipment, characterized in that: include: The current direction graph model building module is used to obtain the grid equipment information, connection information and current direction information from the full real-time database of the grid based on the point entity and edge entity information of the predefined graph model, build the grid current direction graph model, and store it in the memory of the graph database; The device power-on state impact calculation module is used to receive the switch position change input parameters of the user, use the memory engine of the graph database to perform a breadth-first traversal search on the grid current direction graph model, determine the change of the power-on state of the device to be queried, analyze and calculate the impact of the switch position change on the power-on state of the device, and output the calculation result; The switch position change input parameters include the switch ID and its position change operation, the target device ID, the switch upstream power state and the target device power state; The device power-on state impact calculation module is further used to: For each switch, determine the current state of the current switch and the device to be queried, determine whether there is current flowing into the current switch, and the charged state of the device to be queried. If there is no current flowing into the current switch in any direction, determine that this switch change operation will not affect the charged state of the device to be queried; if there is current flowing into the current switch and the switch changes from closed to open, check the current charged state of the device to be queried. If there is no current flowing into the current switch, determine that this switch change operation will not affect the charged state of the device to be queried; If there is current flowing into the current switch and the switch changes from open to closed, check the current power-on status of the device to be queried. If there is current flowing in, it is determined that this switch change operation will not affect the power-on status of the device to be queried; For each switch, after the current switch is disconnected, a bidirectional breadth-first traversal search is performed concurrently from the current switch and the queried device. The first breadth-first traversal search is performed starting from the current switch. During the traversal process, the edges with the incoming current direction are filtered out, and according to the actual power grid business scenario, the points that meet the predefined filtering conditions are filtered out. Then, the traversed points are stored in a hashmap structure that can be accessed concurrently, with the key being the node identifier and the value being 1. Taking the queried device as the starting point, a second breadth-first traversal search is concurrently performed. During the traversal process, the edges with outgoing current direction are filtered out, and the points that meet the preset filtering conditions are filtered out. The traversed points are also stored in the hashmap structure, with the key being the node identifier and the value being 2. In the concurrent bidirectional breadth-first traversal search process, when storing data in the hashmap, determine whether the point to be inserted already exists in the hashmap. If so, filter out the point; If a power source point is traversed in the second breadth-first traversal search, the second breadth-first traversal search is terminated to determine that the current switch disconnection operation will not affect the current power state of the device; If the bidirectional breadth-first traversal search ends and the power source point is not traversed in the second breadth-first traversal search, it is determined that the current switch disconnection operation will cause the current device to be powered off; For each switch, after the current switch is closed, a bidirectional breadth-first traversal search is concurrently performed from the current switch and the queried device, and a third breadth-first traversal search is performed starting from the switch to filter out points that meet the preset filtering conditions, and then the traversed points are stored in the hashmap structure, where the key is the node identifier and the value is 1; Taking the queried device as the starting point, the fourth breadth-first traversal search is performed concurrently to filter out the points that meet the preset filtering conditions, and the traversed points are also stored in the hashmap structure, where the key is the node identifier and the value is 2; In the third breadth-first traversal search process, when storing data in the hashmap, it is determined whether the point to be inserted already exists in the hashmap and the value is 2. If it does, the traversal is terminated to determine that the current device power state changes from off to on; In the fourth breadth-first traversal search, when storing data in the hashmap, it is determined whether the point to be inserted already exists in the hashmap and the value is 1. If so, the traversal is terminated to determine whether the current device power-on state changes from power-off to power-on; If both bidirectional breadth-first traversal searches are completed and not terminated, it is determined that the current power-on state of the device does not change.
5. The system for calculating the effect of switch displacement on the power-on state of equipment according to claim 4, characterized in that: Current pattern model building blocks, further used for: Each device is represented as a node in the grid current direction graph, and the electrical connection between devices is represented as an edge in the grid current direction graph. The edge also has a direction attribute to identify the direction of current flow. The SchemaJson file of the point entity and edge entity is defined and imported into the memory storage of the graph database in batches.
6. The system for calculating the effect of switch displacement on the power-on state of equipment according to claim 5, characterized in that: The device power-on state impact calculation module is further used to: The calculation results are output in the form of visualization or report, so that users can customize the result return according to business needs.
7. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instruction to execute the steps of the method for calculating the influence of switch displacement on the power-on state of the equipment according to any one of claims 1 to 3.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for calculating the influence of switch displacement on the power-on state of the equipment as described in any one of claims 1 to 3 are implemented.
