Equipment connection analysis method and device, computer equipment and storage medium

By traversing the connection structure of the power system, the device connection diagram is generated based on the device identification matching relationship, which solves the problem of inefficient equipment connection analysis in the prior art, and realizes more efficient device connection status identification.

CN119127934AActive Publication Date: 2024-12-13CHINA SOUTHERN POWER GRID ARTIFICIAL INTELLIGENCE TECHNOLOGY CO LTD

Patent Information

Application Number
CN202410974281.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-12-13
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

The existing equipment connectivity analysis methods are inefficient in power systems, and repeated cross-table queries through relational tables lead to a decrease in query efficiency.

Method used

By obtaining the connection structure of the power system, traversing each end device, determining the identification of the switch device based on the device identification and connection relationship, and matching the relationship pairs to generate a device connection diagram, the efficiency of identification of the device connection situation is improved.

Benefits of technology

It improves the recognition efficiency of equipment connectivity in the power system, and significantly improves the query efficiency compared with traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127934A_ABST
    Figure CN119127934A_ABST
Patent Text Reader

Abstract

The invention relates to an equipment connectivity analysis method and device, computer equipment and a storage medium. The method comprises the following steps: traversing a connection structure of a to-be-determined power system by taking each end device as a starting point, determining identifiers of switch devices according to identifiers of each end device and a connection relationship between the devices, and combining two switch devices having a connection relationship with the same connection point into a target relationship pair, and matching the relation pair formed by the identifiers of every two switch devices with the target relation pair, and determining the device connected graph in the to-be-determined power system according to a matching result. Compared with a traditional mode of repeated cross-table query through a relation table, the scheme has the advantages that the connection structure of the power system is traversed by taking each end device as a starting point, and the identifier of each switch device is determined based on the identifier of the end device, so that the device connection graph in the power system is determined through matching between the identifier pairs; and the efficiency of identifying the equipment connection condition in the power system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric power technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for analyzing device connectivity. Background Art

[0002] The scale of power systems is becoming increasingly large, and operation adjustments are becoming more frequent, which puts higher requirements on the real-time analysis and calculation. In the field of power system network analysis, judging whether the power grid equipment is connected is the basis for power system network analysis. How to quickly aggregate physical devices to form electrical nodes through the relationship between the two devices is a key link in improving power system network analysis. At present, the way to determine whether the various devices in the power system are connected is usually through repeated cross-table queries in the relationship table. However, repeated cross-table queries through the relationship table will lead to a decrease in query efficiency.

[0003] Therefore, the current device connectivity analysis method has the defect of low efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide a device connectivity analysis method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve determination efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a device connectivity analysis method. The method comprises:

[0006] Acquire a connection structure of the power system to be determined; the connection structure includes a plurality of terminal devices, a plurality of switch devices, identifiers corresponding to each terminal device, and connection points between each device in the power system;

[0007] Taking each end device as a starting point, traversing the connection structure, and determining the identification of each switch device in the connection structure according to the device identification of each end device and the connection relationship between each end device, each switch device and each connection point;

[0008] Determine a target relationship pair according to the identifiers of each two target switch devices; each of the two target switch devices is a switch device that has a connection relationship with the same connection point; the target relationship pair indicates that there is a connectivity relationship between two end devices corresponding to the identifiers of each of the two target switch devices;

[0009] Match a relationship pair consisting of identifiers of every two switch devices with the target relationship pair, and determine at least one device connectivity graph corresponding to the multiple terminal devices and the multiple switch devices in the power system to be determined based on the matching result.

[0010] In one embodiment, taking each end device as a starting point, traversing the connection structure, and determining the identification of each switch device in the connection structure according to the device identification of each end device and the connection relationship between each end device, each switch device and each connection point, includes:

[0011] For each end device, query at least one first connection point connected to the end device in the connection structure, and query at least one switching device connected to each first connection point and in a closed state in the connection structure, and use the identifier corresponding to the end device as the identifier of the at least one switching device.

[0012] In one embodiment, determining the target relationship pair according to the identifiers of every two target switch devices includes:

[0013] Searching the connection structure for a target connection point that is in connection with at least two target switch devices, and using an identifier corresponding to any one of the at least two target switch devices as an identifier of the target connection point;

[0014] Taking the target connection point as the starting point, query at least one other target switch device among the at least two target switch devices in the connection structure, and determine at least one target relationship pair based on the identifier of the at least one other target switch device and the identifier of the target connection point; the identifier of the at least one other target switch device is different from the identifier of the target connection point.

[0015] In one embodiment, matching the relationship pair consisting of identifiers of each two switch devices with the target relationship pair includes:

[0016] Generate a graph data structure according to the target identification pair in the target relationship pair;

[0017] For each relationship pair, the similarity between the relationship pair and the target identification pair in the graph data structure is obtained to obtain a matching result of the relationship pair.

[0018] In one of the embodiments, determining at least one device connectivity diagram corresponding to the plurality of terminal devices and the plurality of switch devices in the to-be-determined power system according to the matching result includes:

[0019] For each relationship pair consisting of the identifiers of each two switch devices, according to the matching result, each identifier in the relationship pair is stored in a preset number of content blocks; the number of the content blocks is inversely proportional to the similarity;

[0020] Determining the number of device connectivity graphs according to the number of content blocks, and determining the end devices and / or switch devices included in the device connectivity graph corresponding to each content block according to the identifiers stored in each content block;

[0021] At least one device connectivity graph is obtained according to the number of the device connectivity graphs and the end devices and / or switch devices included in the device connectivity graphs.

[0022] In one of the embodiments, for each relationship pair consisting of identifiers of each two switch devices, storing each identifier in the relationship pair in a preset number of content blocks according to the matching result includes:

[0023] For each relationship pair consisting of identifiers of each two switch devices, if each identifier in the relationship pair does not match the target identifier pair in the graph data structure, each identifier in the relationship pair is stored in a content block with a different pointer address;

[0024] For each relationship pair consisting of the identifiers of each two switch devices, if there is a matching identifier in the relationship pair that matches at least one identifier in the target identifier pair in the graph data structure, the identifiers in the relationship pair other than the matching identifier are stored in the content block corresponding to the pointer address of the matching identifier;

[0025] For each relationship pair consisting of the identifiers of each two switch devices, if each identifier in the relationship pair matches each identifier in any target identifier pair in the graph data structure, the content blocks corresponding to the pointer addresses of each identifier in the relationship pair are merged.

[0026] In one of the embodiments, for each relationship pair consisting of identifiers of each two switch devices, if each identifier in the relationship pair does not match the target identifier pair in the graph data structure, after storing each identifier in the relationship pair in content blocks with different pointer addresses, the method further includes:

[0027] Generate a new target relationship pair for each identifier in the relationship pair, add the new target relationship pair to the graph data structure, and obtain an updated graph data structure;

[0028] The similarity between each other relationship pair and the target identification pair in the updated graph data structure is obtained to obtain the matching result of each other relationship pair.

[0029] In a second aspect, the present application further provides a device connectivity analysis apparatus, the apparatus comprising:

[0030] An acquisition module, used to acquire a connection structure of the power system to be determined; the connection structure includes a plurality of terminal devices, a plurality of switch devices, an identifier corresponding to each terminal device, and a connection point between each device in the power system;

[0031] A traversal module, used to traverse the connection structure starting from each end device, and determine the identification of each switch device in the connection structure according to the device identification of each end device and the connection relationship between each end device, each switch device and each connection point;

[0032] A determination module, configured to determine a target relationship pair according to the identifiers of each two target switch devices; the each two target switch devices are switch devices that have a connection relationship with the same connection point; the target relationship pair indicates that there is a connectivity relationship between the two end devices corresponding to the identifiers of the each two target switch devices;

[0033] A matching module is used to match a relationship pair consisting of identifiers of every two switch devices with the target relationship pair, and determine at least one device connectivity diagram corresponding to the multiple terminal devices and multiple switch devices in the power system to be determined based on the matching result.

[0034] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0036] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0037] The above-mentioned device connectivity analysis method, apparatus, computer equipment, storage medium and computer program product, by traversing the connection structure of the power system to be determined with each end device as the starting point, determines the identification of the switch device according to the identification of each end device and the connection relationship between each device, combines two switch devices that have a connection relationship with the same connection point into a target relationship pair, matches the relationship pair consisting of the identification of each two switch devices with the above-mentioned target relationship pair, and determines the device connectivity graph in the power system to be determined according to the matching result. Compared with the traditional method of repeatedly querying across tables through relationship tables, this solution traverses the connection structure of the power system with each end device as the starting point, and determines the identification of each switch device based on the identification of the end device, thereby determining the device connectivity graph in the power system by matching between identification pairs, thereby improving the efficiency of identifying the connectivity of devices in the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] FIG1 is a schematic diagram of a flow chart of a device connectivity analysis method in one embodiment;

[0039] FIG2 is a schematic diagram of a device connectivity diagram in one embodiment;

[0040] FIG3 is a schematic diagram of a flow chart of a traversal step in one embodiment;

[0041] FIG4 is a block diagram of a content block in one embodiment;

[0042] FIG5 is a structural block diagram of a device connectivity analysis apparatus in one embodiment;

[0043] FIG. 6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] In one embodiment, as shown in FIG. 1 , a device connectivity analysis method is provided. This embodiment is described by taking the method applied to a terminal as an example. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server, and includes the following steps:

[0046] Step S202, obtaining a connection structure of the power system to be determined; the connection structure includes a plurality of terminal devices, a plurality of switch devices, identifiers corresponding to each terminal device, and connection points between each device in the power system.

[0047] The power system to be determined may be a system in which the connectivity of the equipment in the power system needs to be determined, and the power system to be determined may include multiple end devices and switch devices. The end device refers to the equipment at the edge of the power system, which is used to realize the corresponding power function, such as low-end winding, generator, etc. The switch device may be a device between the end devices in the power system, which is used to control the connectivity between the circuits in the end power system, such as switches, knife switches, etc. Each end device may have a corresponding identifier, which may be pre-set according to the actual situation, and the identifier of each end device may be different. In addition, there may be connection points between the devices in the power system, and the connection points indicate that there is a connection relationship between the two adjacent devices. For example, it may include connection points between end devices, connection points between end devices and switch devices, and connection points between switch devices, etc., and each connection point may also be set with a corresponding identifier.

[0048] The terminal can obtain the connection structure of the power system to be determined in advance. The connection structure includes multiple terminal devices, multiple switch devices, identifiers of each terminal device and connection points between each device in the power system. Specifically, the connection structure can be a power grid CIM (Common Information Model) model. The CIM model is a standard framework for describing the power system model defined in the IEC 61970 standard. It is an abstract model that is independent of specific things, including the main model elements and attributes in the power system, and is a conceptual model that can be used to describe management information. CIM consists of two parts: CIM specification and CIM model. The CIM specification provides a formal definition of the model and describes the mapping technology of language, naming, meta-mode and other management models. The terminal can analyze the physical association between devices based on the CIM model of the power grid and the measurement data of the power system; and the terminal can also determine whether the switch and / or knife switch between the two terminal devices is closed according to the remote signaling data of the power grid, so that the terminal can select the terminal devices connected to each other in the power system according to the device type.

[0049] Step S204, starting from each end device, traverse the connection structure, and determine the identification of each switch device in the connection structure according to the device identification of each end device and the connection relationship between each end device, each switch device and each connection point.

[0050] After obtaining the above connection structure, the terminal can traverse the connection structure to determine the identification of each device in the connection structure. The terminal can traverse the connection structure starting from each end device. Since each end device has a corresponding identification, the terminal can determine the identification of each switch device in the connection structure according to the device identification of each end, the connection relationship between each switch device and each connection point. For example, the terminal can assign the identification of each end device to the switch device and the connection point that have a connection relationship with each end device.

[0051] Step S206, determining a target relationship pair according to the identifiers of each two target switch devices; each two target switch devices are switch devices that have a connection relationship with the same connection point; the target relationship pair indicates that there is a connectivity relationship between the two end devices corresponding to the identifiers of each two target switch devices.

[0052] Among them, after the terminal determines the identifier of each device in the above-mentioned connection structure, it can also determine the target relationship pair based on the adjacent connection relationship in the connection structure. For example, the terminal can obtain at least two switch devices that have a connection relationship with the same connection point as the target switch devices in the above-mentioned traversal. The terminal can combine the identifiers of the at least two target switch devices with the identifiers of their same connection points to obtain at least one set of target relationship pairs, and since the identifiers of each switch device and connection point are the same as the identifiers of their corresponding end devices, the target relationship pair indicates that there is a connectivity relationship between the two end devices corresponding to the identifiers in the target relationship pair. In addition, there may be more than one set of at least two switch devices that have a connection relationship with the same connection point in the above-mentioned connection structure, so there may be multiple target relationship pairs.

[0053] Step S208, matching the relationship pair consisting of the identifiers of each two switch devices with the target relationship pair, and determining at least one device connectivity graph corresponding to the multiple terminal devices and the multiple switch devices in the power system to be determined according to the matching result.

[0054] Among them, the terminal can combine the identifiers of each switch device in the above connection structure to obtain multiple groups of relationship pairs, each group of relationship pairs represents a combination of two different switch devices, and the terminal can match these relationship pairs with the above target relationship pairs respectively. And obtain the matching result, the terminal can determine whether there is a connection relationship between the multiple end devices and the multiple switch devices in the above power system to be determined according to the matching result, so that the terminal can form at least one corresponding device connectivity graph between the end devices and the switch devices that have a connectivity relationship.

[0055] Specifically, as shown in FIG2 , FIG2 is a schematic diagram of a device connectivity graph in an embodiment. The terminal searches for the device connectivity graph from the above connection structure, which can be understood as searching for a connectivity subgraph from an undirected graph, for example, three connectivity subgraphs are determined from the undirected graph in FIG2 . The device connectivity graph determined by the terminal from the connection structure of the power system may include connectivity relationships between end devices and between end devices and between switch devices, that is, connectivity exists between the devices that can form the device connectivity graph.

[0056] In addition, the terminal can match the above-mentioned relationship pairs in the graph data structure. For example, in one embodiment, the terminal can generate a graph data structure according to the target identification pair in the target relationship pair. Among them, the target identification pair represents a combination of the identifications contained in each pair of the above-mentioned target relationship pairs. Since there can be multiple relationship pairs, for each relationship pair, the terminal can obtain the similarity between the relationship pair and the target identification pair in the graph data structure to obtain the matching result of the relationship pair. Specifically, the terminal can first construct a map (graph) data structure, in which the key stores the device identification, such as the identification of each device in the above-mentioned power system, and the value can be a pointer to a pointer. Thus, the terminal can match the similarity between the relationship pair and the target identification pair in the graph data structure, and determine the storage method of the relationship pair according to the corresponding similarity matching result. The above method can be a method for analyzing the connectivity of terminal devices based on the union-find algorithm. The union-find algorithm is a concise and elegant data structure, which is mainly used to solve some element grouping problems. It manages a series of disjoint sets and supports two operations: merge, merging two disjoint sets into one set; query: query whether two elements are in the same set.

[0057] In the above-mentioned device connectivity analysis method, the connection structure of the power system to be determined is traversed from each end device as a starting point, the identification of the switch device is determined according to the identification of each end device and the connection relationship between each device, and two switch devices that have a connection relationship with the same connection point are combined into a target relationship pair, and the relationship pair consisting of the identification of each two switch devices is matched with the above-mentioned target relationship pair, and the device connectivity graph in the power system to be determined is determined according to the matching result. Compared with the traditional method of repeatedly querying across tables through relationship tables, this solution traverses the connection structure of the power system from each end device as a starting point, and determines the identification of each switch device based on the identification of the end device, thereby determining the device connectivity graph in the power system through matching between identification pairs, thereby improving the efficiency of identifying the connectivity of devices in the power system.

[0058] In one embodiment, taking each end device as a starting point, the connection structure is traversed, and the identification of each switching device in the connection structure is determined according to the device identification of each end device and the connection relationship between each end device, each switching device and each connection point, including: for each end device, querying at least one first connection point connected to the end device in the connection structure, and querying at least one switching device connected to each first connection point and in a closed state in the connection structure, and using the identification corresponding to the end device as the identification of at least one switching device.

[0059] In this embodiment, the terminal can traverse the connection structure of the power system to determine the identifiers of each switch device and connection point in the connection structure. For each terminal device in the connection structure, the terminal can query at least one first connection point connected to the terminal device in the connection structure, and query at least one switch device connected to each first connection point and in a closed state in the connection structure. The terminal can use the identifier corresponding to the terminal device as the identifier of the at least one switch device. The traversal can be a deep traversal algorithm, which can eventually form a connectivity relationship between the terminal devices.

[0060] Specifically, as shown in FIG3, FIG3 is a flow chart of the traversal steps in an embodiment. The above-mentioned identifier can be a temporary ID variable, and the terminal can be triggered from all terminal devices, find the connection point connected thereto, that is, the CN point in FIG3, and pass the temporary ID variable to the CN point; as shown in FIG3, the bus terminal device passes the temporary ID variable 3 to its CN point, the generator passes its temporary ID variable 2 to its CN point, and the low-end winding passes its temporary ID variable 4 to its CN point; the terminal is then triggered from each CN point, finds the switch device connected thereto and closed, and passes the temporary ID variable to the switch device, as shown in FIG3, each CN point passes the temporary ID variable to each connected switch device.

[0061] Through this embodiment, the terminal can pass the identification of the end device to the connected switching device step by step through a deep traversal method, so that the terminal can determine the connectivity of the equipment in the power system based on the identification of each switching device, thereby improving the efficiency of determining the connectivity of the equipment.

[0062] In one embodiment, a target relationship pair is determined based on the identifier of every two target switch devices, including: querying a target connection point that has a connection relationship with at least two target switch devices in a connection structure, and using the identifier corresponding to any one of the at least two target switch devices as the identifier of the target connection point; taking the target connection point as a starting point, querying at least one other target switch device among the at least two target switch devices in the connection structure, and determining at least one target relationship pair based on the identifier of at least one other target switch device and the identifier of the target connection point; the identifier of at least one other target switch device is different from the identifier of the target connection point.

[0063] In this embodiment, after the terminal determines the identifiers of each switch device and connection point, it can also determine the connection point that has a connection relationship with at least two target switch devices in the connection structure through traversal, as the target connection point. For example, the terminal can query the target connection point that has a connection relationship with at least two target switch devices in the above connection structure through deep traversal, and the terminal can use the identifier corresponding to any one of the above at least two target switch devices as the identifier of the above target connection point. After the terminal determines the identifier of the target connection point, it can query at least one other target switch device among the at least two target switch devices of the connection interface with the target connection point as the starting point, and determine at least one target relationship pair based on the identifier of at least one other target switch device and the identifier of the target connection point. Among them, the identifier of the above at least one other target switch device is different from the identifier of the target connection point. That is, the terminal can combine the identifier of the target connection point with the identifier of the target switch device that is connected to it and has a different identifier, so as to obtain the target relationship pair.

[0064] Specifically, as shown in part ③ of Figure 3, the terminal can find the same CN point for the switch devices at the same time, and pass the ID temporary variable of any switch device to the CN point; for example, 4 is passed to the CN point in Figure 3; the terminal is triggered from the CN point, queries the switch devices connected to it, and the ID temporary variable values ​​are not zero and are not equal, and combines the ID temporary variable value of the CN point with the ID temporary variable value of the queried switch device, and stores them as a tuple in the list. For example, as shown in part ④ of Figure 3, the terminal combines the ID temporary variable 4 of the CN point with the ID temporary variable 3 of the switch device and the ID temporary variable 2 of the knife switch, respectively, to form a tuple and store it in @@devicePair as a list. Among them, each element in the above list is a tuple, and the tuple stores the id attribute values ​​of the two connected end devices.

[0065] Through this embodiment, the terminal can combine the identifiers of switching devices with the same connection points to obtain a target relationship pair, so that the terminal can determine the connectivity of each device in the power system through matching based on the target relationship pair, thereby improving the efficiency of device connectivity analysis.

[0066] In one embodiment, at least one device connectivity diagram corresponding to multiple end devices and multiple switch devices in the power system to be determined is determined based on the matching results, including: for each relationship pair consisting of identifiers of every two switch devices, storing each identifier in the relationship pair in a preset number of content blocks based on the matching results; the number of content blocks is inversely proportional to the similarity; the number of device connectivity diagrams is determined based on the number of content blocks, and the end devices and / or switch devices included in the device connectivity diagram corresponding to each content block are determined based on the identifiers stored in each content block; at least one device connectivity diagram is obtained based on the number of device connectivity diagrams and the end devices and / or switch devices included in the device connectivity diagrams.

[0067] In this embodiment, the terminal can match the relationship pair formed by every two switch devices with each target relationship pair, which can be specifically a similarity match. For example, for each relationship pair composed of the identifiers of every two switch devices, the terminal can obtain the similarity matching results of the relationship pair and each target relationship pair, and store each identifier in the relationship pair in a preset number of content blocks according to the matching results. Among them, the similarity matching can have multiple matching results, such as one identifier in the relationship pair corresponds to an identifier in the target relationship pair, no identifier in the relationship pair corresponds to an identifier in the target relationship pair, and both identifiers in the relationship pair correspond to an identifier in the target relationship pair, etc. The above-mentioned content blocks can be content blocks in a graph data structure, and the number of content blocks is inversely proportional to the similarity. For example, the higher the similarity, the more concentrated the storage of the identifiers will be, and the fewer content blocks will be generated.

[0068] After the terminal stores the above-mentioned identifications in the corresponding content blocks, multiple content blocks can be obtained. The terminal can also determine the number of device connectivity diagrams according to the number of content blocks, and determine the end devices, switch devices, etc. contained in the device connectivity diagrams corresponding to each content block according to the identifications stored in each content block. For example, each identification can correspond to a device, and the terminal can determine the end devices, switch devices, etc. corresponding to each identification of the content block based on the identification in each content block, and the devices corresponding to the same content block have a connectivity relationship. Therefore, the terminal can obtain at least one device connectivity diagram according to the number of device connectivity diagrams determined above and the end devices, switch devices, etc. contained in the device connectivity diagrams.

[0069] Specifically, the above-mentioned content block can be a memory block. The terminal can use the number of memory blocks storing content as the number of device connectivity graphs. The content in each memory block is the device node contained in the device connectivity graph corresponding to the memory block. Thus, the terminal can generate a corresponding device connectivity graph for the device nodes contained in each content block, and obtain a connectivity graph containing the connectivity relationship between every two end devices and the switch devices between every two end devices. Among them, the internal data organization of the content block identified by the above-mentioned storage device can be a sorted binary tree, which can be used for searching, merging, and speeding up efficiency.

[0070] Through this embodiment, the terminal can determine the device connectivity diagram in the power system based on the number of content blocks and the node identifiers in each content block, thereby improving the efficiency of device connectivity analysis.

[0071] In one embodiment, for each relationship pair consisting of the identifiers of every two switch devices, based on the matching results, each identifier in the relationship pair is stored in a preset number of content blocks, including: for each relationship pair consisting of the identifiers of every two switch devices, if each identifier in the relationship pair does not match the target identifier pair in the graph data structure, each identifier in the relationship pair is stored in a content block with a different pointer address; for each relationship pair consisting of the identifiers of every two switch devices, if there is a matching identifier in the relationship pair that matches at least one identifier in the target identifier pair in the graph data structure, the other identifiers in the relationship pair except the matching identifier are stored in the content block corresponding to the pointer address of the matching identifier; for each relationship pair consisting of the identifiers of every two switch devices, if each identifier in the relationship pair matches each identifier in any target identifier pair in the graph data structure, the content blocks corresponding to the pointer addresses of each identifier in the relationship pair are merged.

[0072] In this embodiment, the terminal can perform similarity matching on each relationship pair consisting of the identifiers of each two switch devices with the target identifier pairs in each target relationship pair, and obtain multiple results. For example, for each of the above relationship pairs, if the terminal detects that each identifier in the relationship pair does not match the target identifier pair in the graph data structure, it means that the devices corresponding to each identifier in the relationship pair are not connected to the end device corresponding to the target identifier pair, then the terminal can store each identifier in the relationship pair in content blocks with different pointer addresses. Specifically, if the terminal determines that each target relationship pair does not contain the node ID of the relationship pair, the terminal can apply for two blocks of memory, i.e., two content blocks, to store the pointer address and the identifier content of the two device nodes respectively. In addition, in some embodiments, after the terminal stores each identifier in the relationship pair in different content blocks, it can also generate new target relationship pairs for each identifier in the relationship pair, for example, generate two new target relationship pairs, each new target relationship pair contains an identifier in the relationship pair, and add the new target relationship pair to the graph data structure to obtain an updated graph data structure. Specifically, the terminal can insert each identifier in the relationship pair into the graph data structure to form two nodes, the key of each node is the identifier of the terminal device, and the value of each node is the pointer address. Therefore, based on the updated graph data structure, the terminal can obtain the similarity between each other relationship pair except the above relationship and the target identifier pair in the updated graph data structure, and obtain the matching result of each other relationship pair.

[0073] For each of the above relationship pairs, if the terminal detects that there is a matching identifier in the relationship pair that matches at least one identifier in the target identifier pair in the graph data structure, it means that the switch device corresponding to the matching identifier in the relationship pair is connected to the corresponding end device, and since the devices corresponding to the two identifiers in the relationship pair are connected, the terminal can obtain the pointer address of the above matching identifier, and store the other identifiers in the relationship pair except the matching identifier in the content block corresponding to the pointer address of the matching identifier. Specifically, if the terminal detects that there is an identifier in the above target identifier pair that matches the identifier in the above relationship pair, the terminal writes the node of the identifier in the relationship pair that is not included in the target identifier pair into the content block pointed to by the pointer address of the matching identifier, and the terminal can use the identifier of the unmatched node in the relationship pair as the key and determine the value as the pointer address of the above matching identifier, thereby realizing the merging of the node content blocks.

[0074] For each of the above relationship pairs, if the terminal detects that each identifier in the relationship pair matches a target identifier pair in the graph data structure, it indicates that the devices corresponding to the identifiers in the relationship pair are all connected to the end device corresponding to the target identifier pair. At this time, the terminal can merge the content blocks corresponding to the pointer addresses of each identifier in the relationship pair. Specifically, if the terminal detects that the two nodes in the relationship pair are both included in a target identifier pair and the pointer addresses of the two nodes in the relationship pair are different, the terminal can merge the content of the content blocks pointed to by the pointer addresses of the two nodes in the relationship pair.

[0075] Among them, as shown in Figure 4, Figure 4 is a structural block diagram of a content block in an embodiment. The above data organization method of the content block is a sorted binary tree, which can also be called a red-black tree. For the above three matching results, assume that the end device relationship pairs are as follows: <1000200>1, 10002024>, <1000202>4, 10002041>, <1000800>2, 10008003>, <1000800>6, 10008007>, <1000800>7, 10008012>, <1000800>3, 10008012>. The above relationship pairs can be target relationship pairs. For the relationship pair <1000202>4, 10002041>, since there is a matching identifier 10002024 in this relationship pair and the relationship pair <1000200>1, 10002024>, the terminal can point the pointer address of 10002041 to the pointer address of 10002024 to achieve the merger of the content block. At this time, the generated content block is one. Since the relationship pair <1000202>4, 10008002> cannot find a matching target relationship pair in the target relationship pairs, the terminal stores each identifier in the relationship pair in different content blocks. At this time, the generated content blocks are two. For the relationship pair <1000800>3, 10008012>, there is a completely matching relationship pair in the target relationship pairs, but the addresses of the two node identifiers in this relationship pair are different. Therefore, the terminal can merge the content in the content block of node 10008012 into the content block of node 10008003 to achieve the merger of the content block. At this time, the generated content block is one.

[0076] Through the above embodiments, the terminal can store each identifier in the relationship pair in the corresponding content block based on different matching results, so that the terminal can determine the device connectivity diagram of the power system based on the number of content blocks and the type and number of nodes corresponding to the identifiers in the content blocks, thereby improving the efficiency of device connectivity analysis. In addition, the terminal simplifies the connection mode of the device through device-terminal-connection point-terminal-device to device-connection point-device based on the main network CIM model analysis and topology construction method, simplifies the topological connection relationship, and provides a basis for forming a pair of terminal device and terminal device connectivity relationships. In addition, the terminal uses an improved union-find algorithm, with the help of computer C++ pointers and pointer characteristics of pointers to pointers, to quickly compress the efficiency of terminal device searches on the connectivity path, thereby achieving ultra-large-scale power grid device connectivity judgment in seconds.

[0077] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0078] Based on the same inventive concept, the embodiment of the present application also provides a device connectivity analysis device for implementing the device connectivity analysis method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more device connectivity analysis device embodiments provided below can refer to the limitations of the device connectivity analysis method above, and will not be repeated here.

[0079] In one embodiment, as shown in FIG. 5 , a device connectivity analysis apparatus is provided, including: an acquisition module 500, a traversal module 502, a determination module 504, and a matching module 506, wherein:

[0080] The acquisition module 500 is used to acquire the connection structure of the power system to be determined; the connection structure includes multiple terminal devices, multiple switch devices, identifiers corresponding to each terminal device and connection points between each device in the power system.

[0081] The traversal module 502 is used to traverse the connection structure starting from each end device, and determine the identification of each switch device in the connection structure according to the device identification of each end device and the connection relationship between each end device, each switch device and each connection point.

[0082] The determination module 504 is used to determine a target relationship pair according to the identifiers of each two target switch devices; each two target switch devices are switch devices that have a connection relationship with the same connection point; the target relationship pair indicates that there is a connectivity relationship between the two end devices corresponding to the identifiers of each two target switch devices.

[0083] The matching module 506 is used to match the relationship pair consisting of the identifiers of each two switch devices with the target relationship pair, and determine at least one device connectivity diagram corresponding to multiple terminal devices and multiple switch devices in the power system to be determined according to the matching result.

[0084] In one embodiment, the traversal module 502 is used to query, for each end device, at least one first connection point connected to the end device in the connection structure, and to query, in the connection structure, at least one switching device connected to each first connection point and in a closed state, and use the identifier corresponding to the end device as the identifier of at least one switching device.

[0085] In one embodiment, the above-mentioned determination module 504 is used to query a target connection point that has a connection relationship with at least two target switch devices in the connection structure, and use the identifier corresponding to any one of the at least two target switch devices as the identifier of the target connection point; taking the target connection point as the starting point, query at least one other target switch device among the at least two target switch devices in the connection structure, and determine at least one target relationship pair based on the identifier of at least one other target switch device and the identifier of the target connection point; the identifier of at least one other target switch device is different from the identifier of the target connection point.

[0086] In one embodiment, the matching module 506 is used to generate a graph data structure based on the target identification pair in the target relationship pair; for each relationship pair, the similarity between the relationship pair and the target identification pair in the graph data structure is obtained to obtain the matching result of the relationship pair.

[0087] In one embodiment, the matching module 506 is used to store, for each relationship pair consisting of identifiers of every two switch devices, each identifier in the relationship pair in a preset number of content blocks according to the matching result; the number of content blocks is inversely proportional to the similarity; the number of device connectivity graphs is determined according to the number of content blocks, and the end devices and / or switch devices included in the device connectivity graph corresponding to each content block are determined according to the identifiers stored in each content block; at least one device connectivity graph is obtained according to the number of device connectivity graphs and the end devices and / or switch devices included in the device connectivity graphs.

[0088] In one embodiment, the matching module 506 is used to store, for each relationship pair consisting of the identifiers of every two switch devices, the identifiers in the relationship pair in content blocks with different pointer addresses if the identifiers in the relationship pair do not match the target identifier pair in the graph data structure; for each relationship pair consisting of the identifiers of every two switch devices, if there is a matching identifier in the relationship pair that matches at least one identifier in the target identifier pair in the graph data structure, the identifiers in the relationship pair except the matching identifier are stored in the content block corresponding to the pointer address of the matching identifier; for each relationship pair consisting of the identifiers of every two switch devices, if the identifiers in the relationship pair match the identifiers in any target identifier pair in the graph data structure, the content blocks corresponding to the pointer addresses of the identifiers in the relationship pair are merged.

[0089] In one embodiment, the above-mentioned device also includes: an updating module, which is used to generate a new target relationship pair for each identifier in the relationship pair, add the new target relationship pair to the graph data structure, and obtain an updated graph data structure; obtain the similarity between each other relationship pair and the target identifier pair in the updated graph data structure, and obtain the matching result of each other relationship pair.

[0090] Each module in the above-mentioned device connectivity analysis apparatus can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0091] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a device connectivity analysis method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0092] Those skilled in the art will understand that the structure shown in FIG. 6 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0093] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above-mentioned device connectivity analysis method when executing the computer program.

[0094] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned device connectivity analysis method is implemented.

[0095] In one embodiment, a computer program product is provided, including a computer program, which implements the above-mentioned device connectivity analysis method when executed by a processor.

[0096] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0097] 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 the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0098] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0099] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A device connectivity analysis method, characterized in that: The method comprises: Acquire a connection structure of the power system to be determined; the connection structure includes a plurality of terminal devices, a plurality of switch devices, identifiers corresponding to each terminal device, and connection points between each device in the power system; Taking each end device as a starting point, traversing the connection structure, and determining the identification of each switch device in the connection structure according to the device identification of each end device and the connection relationship between each end device, each switch device and each connection point; Determine a target relationship pair according to the identifiers of each two target switch devices; each of the two target switch devices is a switch device that has a connection relationship with the same connection point; the target relationship pair indicates that there is a connectivity relationship between two end devices corresponding to the identifiers of each of the two target switch devices; Match a relationship pair consisting of identifiers of every two switch devices with the target relationship pair, and determine at least one device connectivity graph corresponding to the multiple terminal devices and the multiple switch devices in the power system to be determined based on the matching result.

2. The method according to claim 1, characterized in that The method of traversing the connection structure with each end device as a starting point and determining the identification of each switch device in the connection structure according to the device identification of each end device and the connection relationship between each end device, each switch device and each connection point includes: For each end device, query at least one first connection point connected to the end device in the connection structure, and query at least one switching device connected to each first connection point and in a closed state in the connection structure, and use the identifier corresponding to the end device as the identifier of the at least one switching device.

3. The method according to claim 2, characterized in that The step of determining a target relationship pair according to the identifiers of every two target switch devices includes: Searching the connection structure for a target connection point that is in connection with at least two target switch devices, and using an identifier corresponding to any one of the at least two target switch devices as an identifier of the target connection point; Taking the target connection point as the starting point, query at least one other target switch device among the at least two target switch devices in the connection structure, and determine at least one target relationship pair based on the identifier of the at least one other target switch device and the identifier of the target connection point; the identifier of the at least one other target switch device is different from the identifier of the target connection point.

4. The method according to claim 1, characterized in that: The matching of the relation pair consisting of the identifiers of each two switch devices with the target relation pair includes: Generate a graph data structure according to the target identification pair in the target relationship pair; For each relationship pair, the similarity between the relationship pair and the target identification pair in the graph data structure is obtained to obtain a matching result of the relationship pair.

5. The method according to claim 4, characterized in that The determining, according to the matching result, at least one device connectivity diagram corresponding to the plurality of terminal devices and the plurality of switch devices in the to-be-determined power system comprises: For each relationship pair consisting of the identifiers of each two switch devices, according to the matching result, each identifier in the relationship pair is stored in a preset number of content blocks; the number of the content blocks is inversely proportional to the similarity; Determining the number of device connectivity graphs according to the number of content blocks, and determining the end devices and / or switch devices included in the device connectivity graph corresponding to each content block according to the identifiers stored in each content block; At least one device connectivity graph is obtained according to the number of the device connectivity graphs and the end devices and / or switch devices included in the device connectivity graphs.

6. The method according to claim 5, characterized in that For each relationship pair consisting of the identifiers of each two switch devices, storing each identifier in the relationship pair in a preset number of content blocks according to the matching result includes: For each relationship pair consisting of identifiers of each two switch devices, if each identifier in the relationship pair does not match the target identifier pair in the graph data structure, each identifier in the relationship pair is stored in a content block with a different pointer address; For each relationship pair consisting of the identifiers of each two switch devices, if there is a matching identifier in the relationship pair that matches at least one identifier in the target identifier pair in the graph data structure, the identifiers in the relationship pair other than the matching identifier are stored in the content block corresponding to the pointer address of the matching identifier; For each relationship pair consisting of the identifiers of each two switch devices, if each identifier in the relationship pair matches each identifier in any target identifier pair in the graph data structure, the content blocks corresponding to the pointer addresses of each identifier in the relationship pair are merged.

7. The method according to claim 6, characterized in that For each relationship pair consisting of the identifiers of each two switch devices, if each identifier in the relationship pair does not match the target identifier pair in the graph data structure, after storing each identifier in the relationship pair in content blocks with different pointer addresses, the method further includes: Generate a new target relationship pair for each identifier in the relationship pair, add the new target relationship pair to the graph data structure, and obtain an updated graph data structure; The similarity between each other relationship pair and the target identification pair in the updated graph data structure is obtained to obtain the matching result of each other relationship pair.

8. A device connectivity analysis device, characterized in that: The device comprises: An acquisition module, used to acquire a connection structure of the power system to be determined; the connection structure includes a plurality of terminal devices, a plurality of switch devices, an identifier corresponding to each terminal device, and a connection point between each device in the power system; A traversal module, used to traverse the connection structure starting from each end device, and determine the identification of each switch device in the connection structure according to the device identification of each end device and the connection relationship between each end device, each switch device and each connection point; A determination module, configured to determine a target relationship pair according to the identifiers of each two target switch devices; the each two target switch devices are switch devices that have a connection relationship with the same connection point; the target relationship pair indicates that there is a connectivity relationship between the two end devices corresponding to the identifiers of the each two target switch devices; A matching module is used to match a relationship pair consisting of identifiers of every two switch devices with the target relationship pair, and determine at least one device connectivity diagram corresponding to the multiple terminal devices and multiple switch devices in the power system to be determined based on the matching result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Static-topological-island-based power grid connectivity analysis method

    CN107169646A

  • Topology coloring method and system for urban rail transit electric power

    CN110955947A

  • Novel power distribution network topology coupling method and device, electronic equipment and storage medium

    CN116316592A

  • Equipment incremental topology analysis method and device, computer equipment and storage medium

    CN116613892A

  • Information merging method, transaction query method and apparatus, computer and storage medium

    WO2020177450A1

Cited By

  • Intelligent substation secondary equipment configuration file management and control method and system

    CN120011313A