Method and device for automatically building edges between different facility layers in infrastructure system

By constructing a spatial index structure and dynamic connection strategy for the facility layer, the efficiency and accuracy issues of cross-layer connections in infrastructure system modeling are solved, enabling efficient and accurate risk analysis.

CN120849669BActive Publication Date: 2025-12-09PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511317811.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-12-09
Estimated Expiration
2045-09-16

AI Technical Summary

Technical Problem

In existing technologies, independent modeling of infrastructure systems cannot reflect the system-level dependency mechanisms and cross-system fault propagation chains in actual operation, resulting in low accuracy of risk analysis. Furthermore, cross-layer connections consume huge amounts of computational resources, making it difficult to meet the needs of efficient modeling and rapid simulation.

Method used

By constructing a spatial index structure based on node location, nodes in the facility layer can be quickly located and associated, connection strategies can be dynamically selected, target connection nodes can be queried in the spatial index structure based on the search strategy, node edges can be established, the construction efficiency of node edges can be improved, and the dependencies between facility layers can be accurately captured.

Benefits of technology

It improves the comprehensiveness and accuracy of infrastructure modeling, preserving the independence of each system layer while fully reflecting inter-layer dependency information, thus enhancing the accuracy and efficiency of risk analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849669B_ABST
    Figure CN120849669B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an automatic edge building method and device between different facility layers in an infrastructure system, and relate to the field of infrastructure modeling. A corresponding spatial index structure in a target layer is obtained, and a search strategy corresponding to a preset connection strategy is determined according to attribute data or a node type of a source node; a target layer node is queried in the spatial index structure based on the search strategy and a position of the source node, at least one target connection node is obtained, and a node edge between the source node and each target connection node is established. The nodes of the corresponding facility layer are quickly positioned and associated based on the spatial index structure, and spatial dimension information is provided for cross-node association analysis. The target connection node is quickly queried in the spatial index structure based on a dynamic connection strategy, a reasonable mapped node edge based on spatial position and functional attribute is established, the construction efficiency and accuracy of the node edge are improved, and the comprehensiveness and accuracy of the model for infrastructure modeling are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of infrastructure modeling, and particularly relates to an automatic edge building method and device between different facility layers in an infrastructure system. BACKGROUND

[0002] With the continuous expansion of the scale of urban critical infrastructure networks, the coupling dependency between key systems such as power, transportation, and communication is increasingly close. In actual operation, a single point of failure can quickly trigger cross-system cascading failures through inter-layer dependencies, thereby causing major systemic risk events such as widespread power outages, traffic paralysis, and communication disruptions. Therefore, in order to effectively prevent various systemic risks, it is necessary to model and analyze potential security risks of critical infrastructure.

[0003] In related technologies, network models are respectively constructed for each layer system, dependencies between corresponding infrastructures are identified, and based on this, cascading failure paths and risk impact ranges that may be triggered by extreme events are evaluated for risk prediction and management. However, independent modeling of each layer system cannot reflect the system-level dependency mechanism and cross-system failure propagation chain in actual operation, making it difficult to support real simulation analysis and vulnerability assessment, resulting in low accuracy of risk analysis based on modeling. SUMMARY

[0004] The main purpose of the embodiments of the present application is to propose an automatic edge building method and device between different facility layers in an infrastructure system, to improve the comprehensiveness and accuracy of infrastructure modeling.

[0005] To achieve the above purpose, a first aspect of the embodiments of the present application proposes an automatic edge building method between different facility layers in an infrastructure system, comprising:

[0006] selecting a target layer from the infrastructure system, and obtaining a corresponding spatial index structure in the target layer, the spatial index structure comprising a plurality of target layer nodes, the target layer nodes constructing the spatial index structure according to node positions;

[0007] determining a preset connection strategy according to attribute data or node types of a source node, and obtaining a search strategy of the source node based on the preset connection strategy;

[0008] obtaining a source node position corresponding to the source node, querying the target layer nodes in the spatial index structure based on the search strategy and the source node position, obtaining at least one target connection node, and establishing a node edge between the source node and each of the target connection nodes, the number of target connection nodes corresponding to the search strategy.

[0009] In some embodiments, the obtaining of the corresponding spatial index structure in the target layer comprises:

[0010] obtaining a node set of the target layer nodes in the target layer;

[0011] obtaining plane coordinates of all the target layer nodes in the node set;

[0012] determining a split dimension, and determining a median corresponding to the split dimension based on all the plane coordinates, and taking the median as an index boundary point;

[0013] constructing the spatial index structure based on the index boundary point and all the plane coordinates.

[0014] In some embodiments, the constructing the spatial index structure based on the index boundary point and all the plane coordinates comprises:

[0015] obtaining a current boundary point and a current node set, dividing the current node set into a left subset and / or a right subset according to the current boundary point, taking the current boundary point as a parent node, the left subset being used to obtain a left sub-tree corresponding to the parent node, the right subset being used to obtain a right sub-tree corresponding to the parent node, an initial value of the current boundary point being the index boundary point, and an initial value of the current node set being the node set;

[0016] updating the split dimension, updating the index boundary point based on all the plane coordinates in the current node set, determining the current boundary point corresponding to the split dimension, and iteratively determining in sequence until all the target layer nodes in the node set are taken as leaf nodes.

[0017] In some embodiments, the determining the preset connection strategy according to the attribute data or the node type of the source node comprises:

[0018] dividing the source node into one of a core area node, a basic area node and an edge area node according to the attribute data of the source node, or dividing the source node into one of a key node, a multi-path demand node and a low-density node according to the node type of the source node;

[0019] for the core area node or the key node, determining the preset connection strategy as one-to-one connection, for the basic area node or the multi-path demand node, determining the preset connection strategy as one-to-many connection, and for the edge area node or the low-density node, determining the preset connection strategy as radius adaptive connection.

[0020] In some embodiments, the querying the target layer node in the spatial index structure based on the search strategy and the source node position to obtain at least one target connection node comprises:

[0021] When the preset connection strategy is one-to-one connection, the search strategy is determined to select one target connection node from the target layer;

[0022] selecting a current judgment node from the spatial index structure, if the current judgment node is not a leaf node, selecting one of the left subtree and the right subtree as a target subtree according to the current judgment node and the source node position, taking the parent node corresponding to the target subtree as the current judgment node in the next query, and continuing the query, the initial value of the current judgment node being the root node of the spatial index structure;

[0023] If the current judgment node is a leaf node, calculating the straight-line distance between the node position of the current judgment node and the source node position of the source node, ending the query, and storing the target layer node corresponding to the leaf node in a candidate node set;

[0024] Taking the target layer node in the candidate node set as the target connection node.

[0025] In some embodiments, before the target layer node in the candidate node set is selected as the target connection node, the method further comprises:

[0026] For the leaf node stored in the candidate node set, obtaining an index demarcation point corresponding to the leaf node, and taking the distance between the source node and the index demarcation point as a split distance;

[0027] If the split distance is less than the straight-line distance corresponding to the leaf node, taking the parent node of another subtree different from the leaf node of the index demarcation point as the current judgment node, continuing the query, and updating the candidate node set according to the query result;

[0028] Backtracking to the last index demarcation point, updating the split distance, continuing the query, until backtracking to the root node of the spatial index structure.

[0029] In some embodiments, the querying the target layer node in the spatial index structure based on the search strategy and the source node position to obtain at least one target connection node comprises:

[0030] When the preset connection strategy is one-to-one connection, the search strategy is determined to select one target connection node from the target layer;

[0031] query the target connection node from the space index structure, after querying the first leaf node, obtain the index demarcation point corresponding to the leaf node, take the parent node of another sub-tree of the index demarcation point different from the leaf node as the current judgment node, continue to query, update the candidate node set according to the query result, continue to backtrack, until the candidate node set contains the preset number of target layer nodes;

[0032] take the distance between the next index demarcation point and the source node as a split distance, update the candidate node set based on the split distance and the maximum straight-line distance in the candidate node set.

[0033] In some embodiments, the querying the target layer node in the space index structure based on the search strategy and the source node position obtains at least one target connection node, including:

[0034] when the preset connection strategy is a radius adaptive connection, determine that the search strategy is a full query;

[0035] query the target connection node from the space index structure, obtain the index demarcation point one by one, calculate the split distance between the index demarcation point and the source node, determine whether to skip the right sub-tree of the index demarcation point based on the split distance, until the traversal ends, and take the target layer node with a straight-line distance from the source node less than or equal to a preset radius as the target connection node.

[0036] To achieve the above object, a second aspect of the embodiment of the present application proposes an automatic edge building device between different facility layers in an infrastructure system, comprising:

[0037] a target layer data acquisition module: configured to select a target layer from the infrastructure system, and acquire a corresponding space index structure in the target layer, the space index structure comprising a plurality of target layer nodes, and the target layer nodes constructing the space index structure according to node positions;

[0038] a strategy selection module: configured to determine a preset connection strategy according to attribute data or node types of a source node, and obtain a search strategy of the source node based on the preset connection strategy;

[0039] a query connection module: configured to acquire a source node position corresponding to the source node, query the target layer node in the space index structure based on the search strategy and the source node position, obtain at least one target connection node, and establish a node edge between the source node and each target connection node, the number of target connection nodes corresponding to the search strategy.

[0040] To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the method of the first aspect when executing the computer program.

[0041] To achieve the above object, a fourth aspect of the embodiments of the present application provides a storage medium, which is a storage medium, the storage medium stores a computer program, and the computer program implements the method of the first aspect when executed by a processor.

[0042] The infrastructure system inter-layer automatic edge building method and device provided by the embodiments of the present application first construct a spatial index structure based on node positions for each facility layer, quickly locate and associate the nodes of the layer, and provide spatial dimension information for cross-node association analysis when cross-layer connection. At the same time, the connection strategy is dynamically selected according to the attribute data or node type of the source node, the target connection nodes are quickly queried in the spatial index structure based on the search strategy and the source node position, and the node edges are established, which improves the construction efficiency of the node edges. The association of the source node and the target connection node is based on the reasonable mapping of the spatial position and the functional attribute, which can accurately capture the actual dependency relationship between different facility layers. The modeling results of the infrastructure system not only retain the independence of each layer system, but also completely reflect the inter-layer dependency information, which improves the comprehensiveness and accuracy of the infrastructure modeling model. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 FIG. 1 is a flowchart of the infrastructure system inter-layer automatic edge building method provided by the embodiments of the present application.

[0044] Figure 2 FIG. 3 is a flowchart of obtaining the corresponding spatial index structure in the target layer provided by the embodiments of the present application.

[0045] Figure 3 FIG. 4 is a schematic diagram of the spatial index structure provided by the embodiments of the present application.

[0046] Figure 4is a flowchart provided by an embodiment of the present application for constructing a spatial index structure based on an index demarcation point and all planar coordinates.

[0047] Figure 5 is a flowchart provided by an embodiment of the present application for determining a preset connection strategy according to attribute data or node type of a source node.

[0048] Figure 6 is a flowchart provided by an embodiment of the present application for querying a target layer node in a spatial index structure based on a search strategy and a source node position to obtain at least one target connection node.

[0049] Figure 7 is a flowchart provided by an embodiment of the present application for further querying.

[0050] Figure 8 is a flowchart provided by an embodiment of the present application for querying a target layer node in a spatial index structure based on a search strategy and a source node position to obtain at least one target connection node.

[0051] Figure 9 is a flowchart provided by an embodiment of the present application for querying a target layer node in a spatial index structure based on a search strategy and a source node position to obtain at least one target connection node.

[0052] Figure 10 is a flowchart provided by an embodiment of the present application for querying a target layer node in a spatial index structure based on a search strategy and a source node position to obtain at least one target connection node.

[0053] Figure 11 is a flowchart provided by an embodiment of the present application for querying a target layer node in a spatial index structure based on a search strategy and a source node position to obtain at least one target connection node.

[0054] Figure 12 is a flowchart provided by an embodiment of the present application for querying a target layer node in a spatial index structure based on a search strategy and a source node position to obtain at least one target connection node.

[0055] Figure 13 is a flowchart provided by an embodiment of the present application for querying a target layer node in a spatial index structure based on a search strategy and a source node position to obtain at least one target connection node. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0057] It should be noted that although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a manner different from the module division in the device or the order in the flowchart.

[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to be limiting of this application.

[0059] With the continuous expansion of the scale of urban critical infrastructure networks, the coupling dependence relationship between power, transportation, communication and other key systems is increasingly close. In actual operation, a single point failure can quickly trigger cross-system cascading failures through inter-layer dependence, thereby causing major systemic risk events such as widespread power outages, traffic paralysis, communication disruptions, and the like. Therefore, in order to efficiently prevent various systemic risks, it is necessary to model and analyze the potential security risks of critical infrastructure.

[0060] In related technologies, critical infrastructure risk modeling refers to constructing network models for each layer of system based on the structural characteristics and functional attributes of multiple key infrastructure industries (such as power networks, communication networks, transportation networks, etc.) in complex systems, identifying the dependence relationship between corresponding infrastructures, and based on this, assessing the cascading failure paths and risk impact range that may be triggered by extreme events (such as network attacks, physical destruction, system failures), and conducting risk prediction and management. However, in critical infrastructure systems, power, communication, transportation and other subsystems do not operate in isolation, but have extensive physical dependence, logical coupling, information exchange and geographical co-disaster relationships. Independent modeling of each layer of system cannot reflect the system-level dependence mechanism and cross-system failure propagation chain in actual operation, making it difficult to support real simulation analysis and vulnerability assessment, resulting in low accuracy of risk analysis based on modeling.

[0061] If cross-layer connection is to be made during modeling, the construction process usually follows the principle of "physical proximity", that is, a node is more likely to establish a connection with other nodes that are geographically adjacent to it. In a multi-layer network, this principle is a key basis for reflecting real physical dependence and spatial coupling relationships. However, in related technologies, if a cross-layer edge is to be selected, an exhaustive traversal method is usually used to match cross-layer node pairs, which requires traversing all node pairs of two layers to determine whether they satisfy the edge condition, resulting in high time complexity and huge consumption of computing resources in large-scale network environments, making it difficult to meet the needs of efficient modeling and rapid simulation. Assuming that the source layer and the target layer contain n and m nodes respectively, the total number of comparisons is O(nm). In large-scale systems such as urban critical infrastructure, the total number of nodes usually reaches tens of thousands to hundreds of thousands. Moreover, when connecting, a fixed connection rule is used, which cannot flexibly adjust the connection strategy according to different application scenarios, making it difficult to filter and select connections based on node attributes.

[0062] Based on this, the embodiment of the present application provides an automatic edge building method and device between different facility layers in an infrastructure system. First, a spatial index structure based on node position is constructed for each facility layer, and the nodes of the layer are quickly positioned and associated. When cross-layer connection is performed, spatial dimension information can be provided for cross-node association analysis. Meanwhile, a connection strategy is dynamically selected according to the attribute data or node type of the source node, the target connection node is quickly queried in the spatial index structure based on the search strategy and the position of the source node, and the node edge is established, so as to improve the construction efficiency of the node edge. The association between the source node and the target connection node is based on the reasonable mapping of the spatial position and the functional attribute, and the actual dependency relationship between different facility layers can be accurately captured. The modeling result of the infrastructure system not only retains the independence of each layer system, but also completely reflects the inter-layer dependency information, so as to improve the comprehensiveness and accuracy of the model for infrastructure modeling.

[0063] The embodiment of the present application provides an automatic edge building method and device between different facility layers in an infrastructure system, which is specifically described as follows. First, an automatic edge building method between different facility layers in an infrastructure system in the embodiment of the present application is described.

[0064] The automatic edge building method between different facility layers in an infrastructure system provided by the embodiment of the present application relates to the field of infrastructure modeling. The automatic edge building method between different facility layers in an infrastructure system provided by the embodiment of the present application can be applied to a terminal, can be applied to a server side, and can also be a computer program running in a terminal or a server side. For example, the computer program can be a native program or a software module in an operating system; can be a native application program (Application, APP), that is, a program that needs to be installed in an operating system to run, such as a client supporting the automatic edge building between different facility layers in an infrastructure system, that is, a program that can run only by being downloaded into a browser environment; and can also be a small program that can be embedded into any APP. In summary, the above computer program can be any form of application program, module or plug-in. The terminal communicates with the server through a network. The automatic edge building method between different facility layers in an infrastructure system can be executed by the terminal or the server, or can be executed by the terminal and the server cooperatively.

[0065] In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch, or the like. The server can be a standalone server, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The server can also be a service node in a blockchain system, and the service nodes in the blockchain system form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on the transmission control protocol (TCP) protocol. The terminal and the server can be connected through a communication connection mode such as Bluetooth, universal serial bus (USB), or a network, and the present embodiment does not limit this.

[0066] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0067] It should be noted that in each specific embodiment of the present application, when relevant processing is required according to user information, user behavior data, user history data, and user location information, and other data related to the identity or characteristics of the user, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the present embodiment needs to obtain sensitive personal information of the user, the user's separate permission or separate consent will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the user's separate permission or separate consent, the necessary user-related data for the normal operation of the present embodiment will be obtained.

[0068] An automatic edge building method between different facility layers in an infrastructure system is described below.

[0069] Figure 1 is an optional flowchart of the automatic edge building method between different facility layers in an infrastructure system provided by the embodiment of the present application, Figure 1 The method in the embodiment can include, but is not limited to, steps 110 to 130. It can be understood that the embodiment does not limit the order of steps 110 to 130 in the embodiment, and the order of steps or some steps can be adjusted, reduced or increased according to actual needs. Figure 1 The order of steps 110 to 130 in the embodiment is not limited, and the order of steps or some steps can be adjusted, reduced or increased according to actual needs.

[0070] Step 110: Select a target layer from the infrastructure system, and obtain the corresponding spatial index structure in the target layer.

[0071] In an embodiment, the infrastructure system includes multiple facility layers, such as power facility layer, water facility layer, communication facility layer, etc., and each facility layer includes a plurality of corresponding physical facilities. For example, the power facility layer includes physical facilities such as substations, power transmission lines, transformers, and power poles, the water facility layer includes physical facilities such as reservoirs, water pipelines, pumping stations, and irrigation channels, and the communication facility layer includes physical facilities such as base stations, optical cable lines, and signal towers.

[0072] At this time, for each facility layer, a spatial index structure is constructed based on the geographical distribution characteristics of the specific physical facilities, wherein the physical facilities are respectively taken as nodes, the spatial positions of the nodes are converted into structured data, the nodes are associated through the node positions, and a hierarchical spatial index structure is formed. Therefore, the spatial index structure includes the node position relationship of multiple nodes.

[0073] In an embodiment, in order to connect nodes across layers, all nodes in the infrastructure system need to be standardized, also known as node data preprocessing, to provide accurate and structured data support for subsequent spatial index structure and connection construction.

[0074] In an embodiment, the information of the infrastructure initially obtained by different facility layers is taken as raw data, and it can be understood that the raw data is multi-source heterogeneous node data. The specific data preprocessing process is described as follows.

[0075] Since the raw data of infrastructure can come from different collection channels, the coordinate systems thereof can be different: for example, the inspection data of power facilities can adopt the WGS84 coordinate system, the engineering drawings of water conservancy facilities can use the GCJ-02 coordinate system, and the communication facilities within the city can adopt the local plane coordinate system. Since the references of these coordinate systems are different, direct calculation of distance or judgment of spatial position relationship will produce significant errors, for example, the deviation of WGS84 and GCJ-02 in the urban area can reach 100-300 meters. Therefore, first, the raw data is subjected to coordinate conversion, and different coordinate systems (such as WGS84, GCJ-02, etc.) are standardized and converted to a unified plane projection coordinate system, so as to ensure the accuracy and consistency of subsequent spatial calculation, distance judgment and the like.

[0076] Then consider the node attribute related field in the original data may exist format confusion, description fuzzy and other problems, for example, "urban 1 number change", "communication hub A", "mountain water pump station" and so on. Therefore, node attribute analysis and type identification are needed, and the function category of the node is determined through structured analysis. This process realizes the automatic label standardization through "keyword matching + rule mapping". The attribute fields of each node, such as node name, type description, layer identification, etc., can be analyzed, and the function category of the node can be automatically identified by combining the preset keyword matching and rule mapping mechanism or the pre-trained large language model, and the standardized label is given. For example, the standardized label of the power facility layer can be: "main substation", "communication main station", "edge node" and so on. In specific implementation, the name and type fields in the node can be extracted, for example, the name of a node in the power facility layer is "city east 220kV substation", and the layer is "power facility layer". Then the typical description is identified through keyword list, regular expression or fuzzy matching technology or large language model feature extraction, such as "urban main transformer", "communication center", "mountain site" and so on. The keywords of the power facility layer include "substation", "transformer", "power transmission tower" and so on, and the keywords of the communication facility layer include "base station", "optical cable", "core network" and so on. The key information in the field is identified through regular expression or fuzzy matching technology, for example, the "substation" keyword is extracted from "city east 220kV substation". Then, the label standardization process is completed by combining the information of the facility layer to which it belongs. For example: the label of the node containing the "substation" keyword in the power facility layer is "main substation", the label of the node containing the "core network" keyword in the communication facility layer is "communication main station", and the label of the general remote area node is "edge node". In this embodiment, the standardized label is used to ensure that the nodes of different sources have unified function description, for example, "urban 1 number change" and "city east substation" are both marked as "main substation", and the label identification result obtained will be used as the basis for subsequent connection strategy, realizing the automatic configuration of differentiated edge rule, and providing support for subsequent strategy distribution. Finally, the structured attribute generation is performed, and the information of each node is organized into a standard structure, which is convenient for unified management and rapid retrieval.

[0077] In an embodiment, the power facility layer is taken as an example for illustration. Referring to Table 1 below, Table 1 shows the typical structured attribute fields of the nodes in the power facility layer, including network ownership, node type, coordinate system and geographic location and other core information.

[0078]

[0079] According to the above process, each node of the facility layer is standardized, and then the construction process of the spatial index structure is carried out based on the standardized result.

[0080] In an embodiment, if a directed connection between two facility layers is to be established, the source layer and the target layer are determined according to the direction, and a node in the source layer is selected as a source node one by one, and a node edge between the source node and a target layer node in the target layer is established. When the node edge is established, the spatial index structure of the target layer needs to be acquired, therefore, the embodiment of the present application takes the target layer as an example to illustrate the construction process of the spatial index structure.

[0081] In an embodiment, referring to Figure 2 , Figure 2 is a flowchart for acquiring the corresponding spatial index structure in the target layer provided by the embodiment of the present application, and specifically includes the following steps:

[0082] Step 210: Acquire a node set of the target layer nodes in the target layer, and update the node set according to the acquired spatial restriction parameter.

[0083] In an embodiment, all the target layer nodes in the target layer are acquired according to the standardized result to constitute the node set. In addition, the node set can also be subjected to corresponding spatial restriction parameters such as city range, region boundary, etc. according to actual modeling requirements, and part of the target layer nodes are removed through spatial restriction screening, so as to update the node set and improve the index construction efficiency.

[0084] Step 220: Acquire the plane coordinates of all the target layer nodes in the node set.

[0085] In an embodiment, for all the target layer nodes in the node set, the two-dimensional plane coordinates after standardization are acquired, such as the x, y axis coordinates under the projection coordinate system. The plane coordinates can be longitude and latitude coordinates, and are expressed as: [(x1, y1), (x2, y2), …, (x n , y n )]. x represents longitude, and y represents latitude.

[0086] Step 230: Determine the segmentation dimension, and determine the median corresponding to the segmentation dimension based on all the plane coordinates, and take the median as an index demarcation point.

[0087] In an embodiment, when the spatial index structure is constructed, one of the x axis and the y axis needs to be selected as the segmentation dimension. For example, the x axis can be selected as the segmentation dimension at the beginning, and then the median of the coordinate value corresponding to the x axis in the plane coordinates of all the nodes in the node set is calculated, and the median is taken as the initial index demarcation point.

[0088] In an embodiment, referring to Figure 3 , Figure 3is a schematic diagram of a space index structure provided by an embodiment of the present application. It is assumed in the diagram that the node set contains 7 target layer nodes, whose two-dimensional plane coordinates are respectively (2, 3), (5, 4), (9, 6), (4, 7), (8, 1), (7, 2) and (6, 3). The median of the coordinate values of the x-axes of the 7 plane coordinates is calculated, and the median is x = 6. Therefore, the initial index demarcation point is x = 6.

[0089] Step 240: constructing a space index structure based on the index demarcation point and all plane coordinates.

[0090] In an embodiment, after the index demarcation point is obtained, the construction of the space index structure can be performed. Referring to Figure 4 Figure 4 is a flowchart of constructing a space index structure based on an index demarcation point and all plane coordinates provided by an embodiment of the present application, and specifically includes the following steps:

[0091] Step 410: obtaining a current demarcation point and a current node set, dividing the current node set into a left subset and / or a right subset according to the current demarcation point, and taking the current demarcation point as a parent node.

[0092] In an embodiment, after the first index demarcation point is determined, the construction of the space index structure is started, and the construction process is layer by layer. In the construction of each layer, a current demarcation point corresponding to the current layer and a current node set are obtained. It can be understood that in the construction of the first layer, the current demarcation point and the current node set are initial values. The initial value of the current demarcation point is the index demarcation point, and the initial value of the current node set is the node set.

[0093] Referring to Figure 3 , in the construction of the first layer, the split dimension is the x-axis, the current demarcation point is x = 6, and the current node set is {(2, 3), (5, 4), (9, 6), (4, 7), (8, 1), (7, 2), (6, 3)}. At this time, according to the x coordinate values of the plane coordinates of the points in the current node set, the x coordinate values less than 6 are taken as the left subset, and the x coordinate values greater than or equal to 6 are taken as the right subset. Therefore, the left subset corresponding to the first layer is {(2, 3), (5, 4), (4, 7)}, and the right subset is {(9, 6), (8, 1), (7, 2), (6, 3)}. Next, the current demarcation point is taken as a parent node, then a left subtree corresponding to the parent node is obtained by using the left subset, and a right subtree corresponding to the parent node is obtained by using the right subset. The construction processes of the left subtree and the right subtree are described below.

[0094] ​Step 420: taking the left subset and the right subset as the current node set respectively, updating the split dimension, updating the index demarcation point based on all the plane coordinates in the current node set, determining the current demarcation point corresponding to the split dimension, and iterating in turn until all the target layer nodes in the node set are taken as leaf nodes.

[0095] In an embodiment, for the left subset, the above steps are iteratively executed by taking it as the current node set, and at this time, the split dimension needs to be updated, and the same or different coordinate axis as the previous split dimension is selected. For example, the split dimension of the first layer is the x axis, and the split dimension of the next layer can be the y axis. Next, the current demarcation point corresponding to the split dimension is determined based on all the plane coordinates in the current node set.

[0096] With reference to Figure 3 , the left subset is {(2, 3), (5, 4), (4, 7)}, at this time, the split dimension is the y axis, the median of the coordinate values of the y axis of the 3 plane coordinates is calculated, the median is y = 4, and therefore the current demarcation point is y = 4. According to the size relationship between the y coordinate values of the plane coordinates and the current demarcation point, the division is continued, and at this time, the left subset obtained is {(2, 3)} and the right subset is {(5, 4), (4, 7)}.

[0097] It can be understood that in the iteration of the same layer, the split dimension is the same. Therefore, for the right subset {(9, 6), (8, 1), (7, 2), (6, 3)}, the split dimension is the y axis, the median of the coordinate values of the y axis of the 4 plane coordinates is calculated, the median is y = 3, and therefore the current demarcation point is y = 3. According to the size relationship between the y coordinate values of the plane coordinates and the current demarcation point, the division is continued, and at this time, the left subset obtained is {(8, 1), (7, 2)} and the right subset is {(9, 6), (6, 3)}.

[0098] For the left subset and the right subset obtained, the iteration is continued according to the rule that the split dimension of the same layer is the same, until all the target layer nodes in the node set are taken as leaf nodes.

[0099] With reference to Figure 3The left subset {(2, 3)} of the third layer is essentially a leaf node, so the iteration of this subset ends. The dimension split in the third layer iteration is the x-axis, so the current split point corresponding to the right subset {(5, 4), (4, 7)} is x = 5, the current split point corresponding to the left subset {(8, 1), (7, 2)} is x = 8, and the current split point corresponding to the right subset {(9, 6), (6, 3)} is x = 9. The left and right subsets are further split. The right subset {(5, 4), (4, 7)} is split into two leaf nodes {(4, 7)} and {(5, 4)}, and the iteration ends. The left subset {(8, 1), (7, 2)} is split into two leaf nodes {(7, 2)} and {(8, 1)}, and the iteration ends. The right subset {(9, 6), (6, 3)} is split into two leaf nodes {(6, 3)} and {(9, 6)}, and the iteration ends.

[0100] At this time, all target layer nodes become leaf nodes, the overall iteration ends, and the spatial index structure corresponding to the target layer is obtained. In this way, the spatial index structure is constructed in advance for each facility layer.

[0101] Step 120: Determine a preset connection strategy according to the attribute data or the node type of the source node, and obtain a search strategy of the source node based on the preset connection strategy.

[0102] In an embodiment, in the cross-layer connection, different preset connection strategies are selected for different nodes, so as to realize a flexible and controllable connection strategy matching mechanism. Referring to Figure 5 , Figure 5 is a flowchart provided by the embodiment of the present application for determining a preset connection strategy according to the attribute data or the node type of the source node, and specifically includes the following steps:

[0103] Step 510: Divide the source node into one of a core area node, a basic area node, and an edge area node according to the attribute data of the source node, or divide the source node into one of a key node, a multi-path demand node, and a low-density node according to the node type of the source node.

[0104] In an embodiment, the attribute data of the nodes includes geographical location, coverage, peripheral facility density, etc. The source nodes can be divided into core area nodes, basic area nodes, or edge area nodes according to the attribute data. The core area nodes are located in a facility-intensive and function-core area, and are usually hub facilities in the area. For example, a 220kV transformer substation in the city center (covering multiple distribution lines in the surrounding area), a core machine room of a communication backbone network (connecting multiple secondary base stations), and the like, have significantly higher indicators such as "coverage" or "peripheral facilities" in the attribute data than other nodes. The basic area nodes are distributed in a regular function area, and are nodes that undertake basic services but are not core hubs. For example, a 10kV distribution transformer in a residential area (covering a single community), a communication base station at the township level (serving a radius of 5-10 kilometers), and the like, have a moderate number of "peripheral facilities" in the attribute data. The edge area nodes are located in a remote area with sparse facilities, and are nodes with a wide service range but low coverage density. For example, a small hydropower station in the mountainous area (serving only the surrounding villages), an emergency communication base station in the desert area (covering a radius of more than 20 kilometers), and the like, have lower indicators such as "distance from peripheral facilities" and "service population density" in the attribute data.

[0105] In an embodiment, the node type of the node reflects the functional importance and connection demand of the node in the infrastructure system, and can be divided into a key node, a multi-path demand node, or a low-density node. The key node plays a decisive role in the operation of the entire facility layer, and once it fails, it will cause a large area of service interruption. For example, a regional transformer substation in the power system (connecting multiple power transmission lines), a main canal gate in the water conservancy system (controlling irrigation of a large area of farmland), and the like, usually contain keywords such as "core" and "main" in the node type. The multi-path demand node is a node that needs multiple connection paths to ensure reliability and avoid single-point failure affecting service. For example, a communication access point of a data center (requiring dual-cable backup), a dedicated power distribution node of a hospital (requiring dual-loop power supply), and the like, usually contain keywords such as "redundancy" and "backup" in the node type. The low-density node refers to a node with sparse facility distribution and simple connection demand, which usually only needs to meet the basic connectivity. For example, a distributed photovoltaic access point in the countryside (single-line connection), a hydrological monitoring station in a remote area (single-link data transmission), and the like, usually contain keywords such as "single point" and "dispersion" in the node type.

[0106] According to the above description, the source nodes are divided into one of a core area node, a basic area node, and an edge area node according to the attribute data of the source nodes, or the source nodes are divided into one of a key node, a multi-path demand node, and a low-density node according to the node type of the source nodes.

[0107] Step 520: For core area nodes or key nodes, determine the preset connection strategy as one-to-one connection, for basic area nodes or multi-path demand nodes, determine the preset connection strategy as one-to-many connection, for edge area nodes or low-density nodes, determine the preset connection strategy as radius adaptive connection.

[0108] In an embodiment, according to the classification result of the source node, the corresponding preset connection strategy is matched for the source node, ensuring that the connection relationship meets the functional requirements and avoids resource waste.

[0109] Among them, when the source node is a core area node or a key node, it needs to establish a dedicated connection with the target layer node to ensure the shortest connection path and efficient communication link, and to guarantee high reliability and low delay. The connection demand of this kind of node is clear and important, and there is no need for redundant paths to disperse resources, so the preset connection strategy is one-to-one connection, which establishes a direct connection between the source node and the nearest target layer node to form a "point-to-point" dedicated link. For example, the key node core room of the communication facility layer needs to establish a one-to-one connection with the nearest power facility layer, and a one-to-one dedicated line connection is adopted to avoid load fluctuation caused by sharing of other nodes, and to guarantee high priority power supply.

[0110] For basic area nodes or multi-path demand nodes, multiple connection paths are needed to improve reliability or cover multiple secondary nodes to meet the demand of distributed services, so the preset connection strategy is one-to-many connection, connecting several nearest nodes to improve redundancy and robustness. For example, the township communication base station (basic area node) is connected to the county core room (main path) and the neighboring township base station (backup path) to realize redundant guarantee of signal transmission.

[0111] For edge area nodes or low-density nodes, since they are distributed and scattered, they need to dynamically match target layer nodes according to spatial distance to avoid long connection paths or resource idling, and their preset connection strategy is radius adaptive connection, which connects all target layer nodes within the set range to improve coverage and accessibility. For example, the rural irrigation pump station (low-density node) is associated with the distribution transformer within a 5-kilometer radius to reduce line loss and construction cost.

[0112] In the above embodiments, the preset connection strategy can realize the "on-demand configuration" of the nodes of the infrastructure system, among which one-to-one connection is suitable for precise coupling between key nodes, the connection path is unique and the cost is minimized, which can guarantee the stability of key services, one-to-many connection is suitable for area nodes that need multi-path support by dynamically adjusting the number of connections, which can balance reliability and resource efficiency, and radius adaptive connection can establish multiple-to-multiple dependency relationship based on physical proximity, which can optimize coverage cost.

[0113] Step 130: obtaining a source node position corresponding to the source node, querying the target layer node in the spatial index structure based on the search strategy and the source node position, obtaining at least one target connection node, and establishing a node edge between the source node and each target connection node.

[0114] In an embodiment, referring to Figure 6 , Figure 6 is a flowchart provided by the embodiment of the application for querying the target layer node in the spatial index structure based on the search strategy and the source node position, obtaining at least one target connection node, and specifically comprising the following steps:

[0115] Step 610: when the preset connection strategy is one-to-one connection, the search strategy is determined to select one target connection node from the target layer.

[0116] Step 620: selecting a current judgment node from the spatial index structure, if the current judgment node is not a leaf node, selecting one of the corresponding left subtree and right subtree as a target subtree according to the current judgment node and the source node position, taking the parent node corresponding to the target subtree as the current judgment node in the next query, and continuing the query.

[0117] In an embodiment, the current judgment node is selected from the spatial index structure, wherein the initial value of the current judgment node is the root node of the spatial index structure. At this time, the current judgment node is analyzed, if the current judgment node is not a leaf node, one of the corresponding left subtree and right subtree is selected as a target subtree according to the current judgment node and the source node position, the parent node corresponding to the target subtree is taken as the current judgment node in the next query, and the query is continued.

[0118] In an embodiment, referring to Figure 3 , assuming that the source node position of the source node is (4, 8), the root node index demarcation point x = 6, the current judgment node is not a leaf node, and according to the current judgment node and the source node position, it is determined that , therefore the left subtree is selected as the target subtree, after entering the left subtree, the parent node (y = 4) corresponding to the left subtree is taken as the current judgment node in the next query, and the query is continued. Next, the current judgment node is not a leaf node, according to the current judgment node and the source node position, it is determined that , therefore the right subtree is selected as the target subtree, after entering the right subtree, the parent node (x = 5) corresponding to the right subtree is taken as the current judgment node in the next query, and the query is continued. Next, the current judgment node is not a leaf node, according to the current judgment node and the source node position, it is determined that , therefore the left subtree is selected as the target subtree, after entering the left subtree, the parent node (4, 7) corresponding to the left subtree is taken as the current judgment node in the next query.

[0119] Step 630: If the current judgment node is a leaf node, a straight-line distance between the node position of the current judgment node and the source node position of the source node is calculated, the query ends, and the target layer node corresponding to the leaf node is stored in the candidate node set.

[0120] In an embodiment, the current judgment node (4, 7) is a leaf node, a straight-line distance between the node position of the current judgment node and the source node position of the source node is 1, the initial stage query ends, and the target layer node (4, 7) corresponding to the leaf node is stored in the candidate node set.

[0121] Next, in order to identify whether there is another target layer node with a smaller distance from the source node, further query needs to be performed. Referring to FIG. 6, Figure 7 , Figure 7 FIG. 6 is a flowchart of the further query provided in the embodiment of the present application, and specifically includes the following steps:

[0122] Step 710: For the leaf node stored in the candidate node set, an index boundary point corresponding to the leaf node is obtained, and a distance between the source node and the index boundary point is taken as a segmentation distance.

[0123] In an embodiment, for the target layer node (4, 7), the index boundary point corresponding thereto is (x=5), at this time, the distance between the source node and the index boundary point is taken as the segmentation distance, and the segmentation distance is 1.

[0124] Step 720: If the segmentation distance is smaller than the straight-line distance corresponding to the leaf node, a parent node of another sub-tree different from the leaf node at the index boundary point is also taken as the current judgment node, the query is continued, and the candidate node set is updated according to the query result.

[0125] Step 730: Backtracking to the last index boundary point, the segmentation distance is updated, the query is continued, and the query is continued until the root node of the spatial index structure is backtracked to.

[0126] In an embodiment, if the segmentation distance is smaller than the straight-line distance corresponding to the leaf node, it is indicated that there is a node in another sub-tree of the index boundary point different from the leaf node, which has a straight-line distance smaller than the target layer node in the candidate node set, therefore, the parent node of another sub-tree different from the leaf node at the index boundary point is also taken as the current judgment node, the query is continued, and the candidate node set is updated according to the query result. Along the direction of the root node, the last index boundary point is backtracked to, the segmentation distance is updated, the query is continued, and the query is continued until the root node of the spatial index structure is backtracked to. During this period, if a leaf node is queried, the target layer node in the candidate node set is compared, and only the target layer node with the smallest straight-line distance is retained, or all the target layer nodes can be retained, and finally the target layer node with the smallest straight-line distance is output.

[0127] For example, in the above example, the split distance is equal to the straight-line distance, the index boundary point is skipped, and the last index boundary point is (y=4). The updated split distance is 4, which is greater than the straight-line distance, so the index boundary point is skipped again. Continue to backtrack, and the obtained index boundary point is x=6. The updated split distance is 2, which is greater than the straight-line distance, so the index boundary point is skipped again. The query ends, and the candidate node set only contains (4, 7).

[0128] Step 640: Take the target layer node in the candidate node set as the target connection node.

[0129] In an embodiment, for one-to-one connection, in the spatial index structure, recursively traverse from the root node to the leaf node, and continuously update the current minimum distance. After the entire tree traversal is completed, return the only target layer node closest in distance. At this time, only one target layer node is retained in the candidate node set, and the target layer node is taken as the target connection node.

[0130] In an embodiment, refer to Figure 8 , Figure 8 is another flowchart provided by the embodiment of the application for querying the target layer node in the spatial index structure based on the search strategy and the source node position, and obtaining at least one target connection node, and specifically includes the following steps:

[0131] Step 810: When the preset connection strategy is many-to-one connection, determine that the search strategy is to select a preset number of target connection nodes from the target layer.

[0132] In an embodiment, the preset number k is set according to actual requirements.

[0133] Step 820: Query the target connection node from the spatial index structure. After the first leaf node is queried, obtain the index boundary point corresponding to the leaf node. The parent node of another sub-tree different from the leaf node is also taken as the current judgment node, the query is continued, the candidate node set is updated according to the query result, and the backtracking is continued until the candidate node set contains the preset number of target layer nodes.

[0134] In an embodiment, if it is many-to-one connection, all target layer nodes obtained in the query process are retained in the candidate node set until the number of nodes in the candidate node set is the preset number. The preset number of target layer nodes are output as the target connection nodes. Or, if the number of nodes in the candidate node set is greater than the preset number, the preset number of all target layer nodes are selected as the target connection nodes in the order of the straight-line distance from small to large from the candidate node set.

[0135] In an embodiment, refer to Figure 3, assuming the source node is (4, 8), the preset number k = 3, and the length of the candidate node set is 3. First, the root node is accessed, the index demarcation point x = 6 is determined, the left sub-tree is selected as the target sub-tree, the query is continued, and the index demarcation point x = 5 is determined. , the right sub-tree is selected as the target sub-tree, the query is continued, and the index demarcation point x = 4 is determined. , the left sub-tree is selected as the target sub-tree, the query is continued, and the index demarcation point x = 5 is determined. , the right sub-tree is selected as the target sub-tree, the query is continued, and the index demarcation point x = 4 is determined.

[0136] Step 830: The entire space index structure is traversed, the distance between the next index demarcation point and the source node is taken as the split distance, and the candidate node set is updated based on the split distance and the maximum straight-line distance in the candidate node set.

[0137] In an embodiment, if the number of target layer nodes in the candidate node set is the preset number, the number of nodes is not increased subsequently, but is updated according to the straight-line distance.

[0138] For example, in the above example, when the candidate node set contains 3 nodes, the maximum straight-line distance contained therein is 5.39, at which point the root node x=6 is backtracked to, and the split distance is 2, which is less than the maximum straight-line distance, so the corresponding right sub-tree needs to be searched. Taking y=3 as the index demarcation point, the corresponding split distance is 5, which is less than the maximum straight-line distance, so the left and right sub-trees corresponding thereto need to be queried. After entering the left sub-tree corresponding to y=3, the parent node (x=8) of the left sub-tree is taken as the index demarcation point in the next query, the corresponding split distance is 0, which is less than the maximum straight-line distance, so the left and right sub-trees corresponding thereto need to be queried. For the leaf node (7, 2) of the left sub-tree, the straight-line distance is 6.7, which is greater than the maximum straight-line distance, so the candidate node set does not need to be updated, and for the leaf node (8, 1) of the right sub-tree, the straight-line distance is 8.06, which is greater than the maximum straight-line distance, so the candidate node set does not need to be updated. After entering the right sub-tree corresponding to y=3, the parent node (x=9) of the right sub-tree is taken as the index demarcation point in the next query, the corresponding split distance is 5, which is less than the maximum straight-line distance, so the left and right sub-trees corresponding thereto need to be queried. For the leaf node (6, 3) of the left sub-tree, the straight-line distance is 5.39, which is greater than the maximum straight-line distance, so the candidate node set does not need to be updated, and for the leaf node (9.6) of the right sub-tree, the straight-line distance is 5.39, which is greater than the maximum straight-line distance, so the candidate node set does not need to be updated.

[0139] It can be understood that if the split distance is greater than the maximum straight-line distance, the corresponding sub-tree does not need to be continuously queried, and if the number of nodes in the final candidate node set is less than the preset number, the actual number of nodes is referred to for output.

[0140] In an embodiment, for a one-to-many connection, the k nearest neighbors are selected, and when queried, the nearest unique node is no longer sought, but the k nodes closest to the query point are sought. After traversing the entire tree, the k closest target layer nodes are returned. When querying the k nearest nodes, the candidate node set dynamically maintains a set of k closest nodes. During the traversal process, if the number of nodes in the candidate node set exceeds k, the node with the maximum straight-line distance is replaced.

[0141] In an embodiment, the search strategy is determined according to the following formula: Figure 9 Figure 9 is another flowchart provided by the embodiment of the present application for querying target layer nodes in a spatial index structure based on a search strategy and a source node position, and obtaining at least one target connection node, and specifically includes the following steps:

[0142] Step 910: When the preset connection strategy is radius adaptive connection, the search strategy is determined to be full-amount query.

[0143] ​In an embodiment, only the target layer nodes with straight line distance less than the preset radius r are stored in the candidate node set, and in order to prevent omission, full amount query needs to be performed.

[0144] Step 920: Query the target connection node from the spatial index structure, acquire the index boundary point one by one, calculate the split distance between the index boundary point and the source node, determine whether to skip the right sub-tree of the index boundary point based on the split distance, until the end of traversal, and take the target layer node with straight line distance less than or equal to the preset radius from the source node as the target connection node.

[0145] In an embodiment, the target connection node is queried from the spatial index structure, the straight line distances corresponding to all leaf nodes are queried, and the target layer node with straight line distance less than or equal to the preset radius from the source node in the candidate node set is taken as the target connection node.

[0146] Referring to Figure 3 , assuming that the source node is (5, 3) and the preset radius is 2, in essence, all the points intersected or contained by the circle are queried. First, the root node x=6 is accessed, the split distance is calculated as 1, which is less than the preset radius, so the left and right sub-trees corresponding to the root node need to be searched. For the left sub-tree corresponding to x=6, the index boundary point is y=4, the split distance is 1, which is less than the preset radius, so the left and right sub-trees corresponding to y=4 need to be searched. For the left sub-tree corresponding to y=4, the leaf node is (2, 3), the straight line distance is 3, which is greater than the preset radius, so the target layer node is not taken as the target connection node. For the right sub-tree corresponding to y=4, the index boundary point is x=5, the split distance is 0, which is less than the preset radius, so the left and right sub-trees corresponding to x=5 need to be searched. For the left sub-tree corresponding to x=5, the leaf node is (4, 7), the straight line distance is greater than the preset radius, so the target layer node is not taken as the target connection node. For the right sub-tree corresponding to x=5, the leaf node is (5, 4), the straight line distance is less than the preset radius, so the target layer node is taken as the target connection node.

[0147] Then, for the right sub-tree corresponding to x = 6, the index demarcation point is y = 3, the split distance is 0, which is less than the preset radius, so the left and right sub-trees corresponding to y = 3 need to be searched. For the left sub-tree corresponding to y = 3, the index demarcation point is x = 8, the split distance is 3, which is greater than the preset radius, so the right sub-tree corresponding to x = 8 can be skipped, but the left sub-tree thereof still needs to be queried. For the left sub-tree of x = 8, the leaf node is (7, 2), the straight-line distance is greater than the preset radius, and the target layer node is not taken as a target connection node. For the right sub-tree corresponding to y = 3, the index demarcation point is x = 9, the split distance is 4, which is greater than the preset radius, so the right sub-tree corresponding to x = 9 can be skipped, but the left sub-tree thereof still needs to be queried. For the left sub-tree of x = 9, the leaf node is (6, 3), the straight-line distance is less than the preset radius, and the target layer node is taken as a target connection node.

[0148] As can be seen from the above, the target connection node is queried from the spatial index structure, starting from the root node, the index demarcation points are obtained one by one, the split distance between the index demarcation point and the source node is calculated, and it is determined whether to skip the right sub-tree of the index demarcation point based on the split distance. The skip logic is as follows: if the split distance is greater than the preset distance, but only the right sub-tree of the index demarcation point is ensured not to be a target connection node, and the leaf node of the corresponding left sub-tree may still be within the preset radius, so the right sub-tree can be skipped. Until the end of the traversal, finally, the target layer nodes with a straight-line distance less than or equal to the preset radius from the source node are taken as target connection nodes.

[0149] In the radius adaptive connection in the embodiments of the present application, all leaf nodes need to be queried, and after traversing the whole tree, all target layer nodes with a straight-line distance less than the preset radius r are returned. In the traversal process, the number of queries can be reduced in combination with the split distance. If the split distance between the queried index demarcation point and the source node is greater than the preset radius, the traversal of the corresponding right sub-tree is skipped.

[0150] In an embodiment, after at least one target connection node corresponding to the source node is obtained, a node edge between the source node and the target connection node is established, and the number of target connection nodes corresponds to the search strategy.

[0151] As can be seen from the above, since the nodes have clear geographic longitude and latitude information, in order to improve the utilization of spatial features, the embodiments of the present application perform fast spatial proximity search based on the spatial proximity principle and in combination with an efficient spatial index structure, thereby improving the connection construction efficiency and rationality. Through the combination of the standardization process and the flexible division of the preset connection strategy, the cross-layer automatic edge connection process based on the spatial index structure for accelerating the proximity search, the large-scale facility layer connection construction efficiency can be effectively improved, and diversified and controllable connection rules are supported, the spatial rationality and functional adaptability are taken into account, and the automation and efficiency of the cross-layer connection construction are realized.

[0152] In an embodiment, referring to Figure 10 , Figure 10 is a whole flow chart of the query process provided by the embodiment of the application.

[0153] Firstly, the root node of the spatial index structure is accessed, and traversal is started from the root node of the constructed spatial index structure. If the node is not a leaf node, it is an index boundary point, containing the corresponding split dimension and split distance. Then, leaf node judgment is performed to determine whether the current accessed node is a leaf node. If it is a leaf node, straight-line distance calculation is performed, and the candidate node set is updated in real time according to the preset connection strategy. If it is not a leaf node, according to the division of the coordinate axis, it is determined whether to access the left subtree or the right subtree, and according to the relationship between the split distance and the maximum straight-line distance or the preset radius, pruning judgment is performed on the relevant index boundary point to determine whether to query the subtree. If the split distance is less than the maximum straight-line distance, it means that the source node may also have more optimal adjacent nodes in the other subtree. Therefore, the subtree should be continuously accessed to ensure that the possible optimal solution is not missed. If there is no need to query, the parent node is backtracked to, and other potential nodes are continuously searched. This process helps to avoid invalid calculation and improve search efficiency, and ensures that more suitable candidate nodes can be found in other parts of the tree. If the whole tree traversal has been completed, the query result is returned. If the traversal has not been completed, the current node is recursively transmitted to the subtree where the node is located, and the query is continuously performed. Finally, at least one target connection node is output according to the preset connection strategy, and the efficient retrieval of the adjacent node is completed.

[0154] In an embodiment, referring to Figure 11 , Figure 11 is a whole schematic diagram of the automatic edge building method between different facility layers in the infrastructure system provided by the embodiment of the application.

[0155] First, node data preprocessing is carried out, and the information of the infrastructure initially obtained by different facility layers is taken as the original data. The original data is subjected to coordinate conversion, node attribute analysis and type identification, and structured attribute generation process. Then, according to the actual situation, the source node and the target layer node are selected. Then, the spatial index structure is constructed. The node set of the target layer node is obtained, and then the index construction is carried out. After the construction is completed, the spatial index structure is obtained. When establishing the node edge, according to the attribute data or node type of the source node, the preset connection strategy is determined. According to the attribute data of the source node, the source node is divided into one of the core area node, the basic area node and the edge area node, or according to the node type of the source node, the source node is divided into one of the key node, the multi-path demand node and the low-density node. For the core area node or the key node, the preset connection strategy is determined as one-to-one connection. For the basic area node or the multi-path demand node, the preset connection strategy is determined as one-to-many connection. For the edge area node or the low-density node, the preset connection strategy is determined as radius adaptive connection. Then, based on the preset connection strategy, the efficient spatial query process is carried out, and the node edge is constructed according to the query result.

[0156] The above process is cooperated by each part, and can realize automatic and efficient cross-layer connection construction. Based on the spatial position (longitude and latitude) of the node, the cross-layer dependent connection is automatically reasoned according to the principle of "physical proximity", and combined with the flexible connection strategy, the multi-scene application and dynamic adaptation are supported, which has the advantages of strong universality, high expansibility, friendly engineering deployment, etc., and can be widely embedded in the upper system such as cascade failure simulation, risk propagation modeling, linkage response scheduling, etc.

[0157] The embodiment of the application sets up the node pair template that can establish the dependent relationship according to the function type of different network layers through node data preprocessing, and determines which nodes have connection possibility. Then, the construction process of the spatial index structure will combine the spatial coordinates of the nodes, and screen the potential cross-layer node pairs according to the physical proximity. On this basis, the preset radius, the preset number and other constraints are introduced to accurately screen the appropriate edge construction objects. Finally, based on the preset connection strategy, the cross-layer node edge is automatically generated for the node pairs that meet the conditions, and the dependent type, direction and weight and other attributes are labeled, forming a multi-layer coupled network with structure semantics. It can solve the problems of low computational efficiency, single connection strategy and insufficient use of spatial information in the cross-layer connection construction process of the current multi-layer network of key infrastructure, realize efficient proximity search in a large-scale node environment, significantly speed up the calculation speed of connection reasoning, support dynamic selection of multiple connection modes according to different application scenarios and user needs, and screen and constrain combined with the type and function attributes of the nodes, improve the adaptability and accuracy of cross-layer connection construction.

[0158] The technical scheme provided in the embodiments of the present application comprises the following steps: selecting a target layer from an infrastructure system, and obtaining a corresponding spatial index structure in the target layer, wherein the spatial index structure comprises a plurality of target layer nodes, and the target layer nodes construct the spatial index structure according to node positions; determining a preset connection strategy according to attribute data or a node type of a source node, and obtaining a search strategy of the source node based on the preset connection strategy; obtaining a source node position corresponding to the source node, and querying the target layer nodes in the spatial index structure based on the search strategy and the source node position, to obtain at least one target connection node, and establishing a node edge between the source node and each target connection node, wherein the number of target connection nodes corresponds to the search strategy. The embodiments of the present application firstly construct a spatial index structure based on node positions for each facility layer, and quickly locate and associate the nodes in the layer, and when cross-layer connection is performed, spatial dimension information can be provided for cross-node association analysis. Meanwhile, a connection strategy is dynamically selected according to the attribute data or the node type of the source node, the target connection nodes are quickly queried in the spatial index structure based on the search strategy and the source node position, and the node edge is established, so that the construction efficiency of the node edge is improved, and the association between the source node and the target connection node is based on reasonable mapping of spatial positions and functional attributes, so that actual dependency relationships between different facility layers can be accurately captured. The modeling result of the infrastructure system can not only retain the independence of each layer system, but also completely reflect the dependency information between layers, and the model comprehensiveness and accuracy for infrastructure modeling are improved.

[0159] The embodiments of the present application also provide an automatic edge building device between different facility layers in an infrastructure system, which can implement the automatic edge building method between different facility layers in the infrastructure system, and refer to Figure 12 The device comprises:

[0160] The target layer data obtaining module 1210 is configured to select a target layer from an infrastructure system, and obtain a corresponding spatial index structure in the target layer, wherein the spatial index structure comprises a plurality of target layer nodes, and the target layer nodes construct the spatial index structure according to node positions.

[0161] The strategy selecting module 1220 is configured to determine a preset connection strategy according to attribute data or a node type of a source node, and obtain a search strategy of the source node based on the preset connection strategy.

[0162] The query connecting module 1230 is configured to obtain a source node position corresponding to the source node, query the target layer nodes in the spatial index structure based on the search strategy and the source node position, obtain at least one target connection node, and establish a node edge between the source node and each target connection node, wherein the number of target connection nodes corresponds to the search strategy.

[0163] The specific implementation of the automatic edge building device between different facility layers in the infrastructure system of the embodiment is basically the same as the specific implementation of the automatic edge building method between different facility layers in the infrastructure system, and will not be repeated here.

[0164] The embodiment of the present application also provides an electronic device, comprising:

[0165] at least one memory;

[0166] at least one processor;

[0167] at least one program;

[0168] The program is stored in the memory, and the processor executes the at least one program to implement the automatic edge building method between different facility layers in the infrastructure system provided in the embodiment of the present application. The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a vehicle-mounted computer, etc.

[0169] Please refer to Figure 13 , Figure 13 The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device comprises:

[0170] The processor 1301 can be implemented in the form of a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided in the embodiments of the present application;

[0171] The memory 1302 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 1302 can store an operating system and other application programs, and when the technical solutions provided in the embodiments of the present application are implemented by software or firmware, the related program codes are saved in the memory 1302 and are called and executed by the processor 1301 to implement the automatic edge building method between different facility layers in the infrastructure system of the embodiment of the present application;

[0172] The input / output interface 1303 is used to realize information input and output;

[0173] The communication interface 1304 is configured to realize the communication interaction between the device and other devices. The communication can be realized in a wired manner (for example, a USB, a network cable, or the like) or in a wireless manner (for example, a mobile network, WIFI, Bluetooth, or the like).

[0174] The bus 1305 is configured to transmit information between various components (for example, the processor 1301, the memory 1302, the input / output interface 1303, and the communication interface 1304) of the device.

[0175] The processor 1301, the memory 1302, the input / output interface 1303, and the communication interface 1304 are connected to each other in the device through the bus 1305.

[0176] The embodiment of the present application further provides a storage medium. The storage medium is a storage medium, and the storage medium stores a computer program. The computer program is executed by a processor to implement the automatic edge building method between different facility layers in the infrastructure system.

[0177] The memory is a non-transitory storage medium, and can be used to store a non-transitory software program and a non-transitory computer executable program. In addition, the memory can include a high-speed random access memory, and can further include a non-transitory memory, for example, at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor. The remote memory can be connected to the processor through a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0178] The infrastructure system automatic edge building method and device between different facility layers provided by the embodiment of the present application are described through a technical solution + beneficial effect.

[0179] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It can be understood by those skilled in the art that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0180] Those skilled in the art can understand that the technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than the figure, or combine certain steps, or different steps.

[0181] The apparatus embodiments described above are merely exemplary, and the units described as separate units can or can not be physically separate, i.e., can be located in one place, or can be distributed over multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purposes of the embodiments.

[0182] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functional modules / units in the system and the device can be implemented as software, firmware, hardware or appropriate combinations thereof.

[0183] The terms "first", "second", "third", "fourth" and the like in the description of the application and in the claims of the foregoing drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so construed can be interchanged, such that the embodiments of the application described herein can be carried out in other than the order discussed herein without departing from the scope of the application. Further, the terms "comprise" and "comprising" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, product or apparatus that comprises a list of steps or units does not necessarily comprise only those steps or units but can include other not expressly listed steps or units. The terms "include" and "have" and variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, product or apparatus that includes a list of steps or units does not necessarily include only those steps or units but can include other not expressly listed steps or units.

[0184] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases: only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c, can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0185] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms. The units described above as separate components can be or can not be physically separated, and the components shown as units can be or can not be physical units, that is, can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0186] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit. When the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0187] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. An automatic edge building method between different facility layers in an infrastructure system, characterized in that, The method comprises the following steps: selecting a target layer from the infrastructure system and obtaining a corresponding spatial index structure in the target layer, wherein the spatial index structure comprises a plurality of target layer nodes, and the target layer nodes construct the spatial index structure according to node positions; determining a preset connection strategy according to attribute data or a node type of a source node, and obtaining a search strategy of the source node based on the preset connection strategy; obtaining a source node position corresponding to the source node, and determining that the search strategy is to select one target connection node from the target layer when the preset connection strategy is one-to-one connection; selecting a current judgment node from the spatial index structure, and if the current judgment node is not a leaf node, selecting one target sub-tree from a corresponding left sub-tree and right sub-tree according to the current judgment node and the source node position, taking a parent node corresponding to the target sub-tree as the current judgment node in next query, and continuing the query, wherein the initial value of the current judgment node is a root node of the spatial index structure; if the current judgment node is a leaf node, calculating a straight-line distance between a node position of the current judgment node and the source node position of the source node, ending the query, storing the target layer node corresponding to the leaf node into a candidate node set, taking the target layer nodes in the candidate node set as target connection nodes, and establishing node edges between the source node and each target connection node, wherein the number of the target connection nodes corresponds to the search strategy.

2. The method according to claim 1, wherein the method is characterized by, The method further comprises the following steps of obtaining the spatial index structure in the target layer: obtaining a node set of the target layer nodes in the target layer; obtaining plane coordinates of all the target layer nodes in the node set; determining a split dimension, and determining a median corresponding to the split dimension based on all the plane coordinates, and taking the median as an index demarcation point; constructing the spatial index structure based on the index demarcation point and all the plane coordinates.

3. The method of claim 2, wherein the method further comprises: The method further comprises the following steps of constructing the spatial index structure based on the index demarcation point and all the plane coordinates: obtaining a current demarcation point and a current node set, dividing the current node set into a left subset and / or a right subset according to the current demarcation point, taking the current demarcation point as a parent node, the left subset being used to obtain a left sub-tree corresponding to the parent node, the right subset being used to obtain a right sub-tree corresponding to the parent node, the initial value of the current demarcation point being the index demarcation point, and the initial value of the current node set being the node set; updating the split dimension, updating the index demarcation point based on all the plane coordinates in the current node set, determining the current demarcation point corresponding to the split dimension, and iteratively determining in sequence until all the target layer nodes in the node set are leaf nodes.

4. The method according to claim 3, wherein the method is used for automatic edge construction between different facility layers in an infrastructure system, and the method comprises the following steps: The method further comprises the following steps of determining the preset connection strategy according to the attribute data or the node type of the source node: According to the attribute data of the source node, the source node is divided into one of a core area node, a basic area node, and an edge area node, or according to the node type of the source node, the source node is divided into one of a key node, a multi-path demand node, and a low-density node; For the core area node or the key node, the preset connection strategy is determined as one-to-one connection, for the basic area node or the multi-path demand node, the preset connection strategy is determined as one-to-many connection, and for the edge area node or the low-density node, the preset connection strategy is determined as radius adaptive connection.

5. The method of claim 1, wherein the method further comprises: Before the target layer node in the candidate node set is selected as the target connection node, the method further comprises: For the leaf node stored in the candidate node set, the index demarcation point corresponding to the leaf node is obtained, and the distance between the source node and the index demarcation point is taken as a split distance; If the split distance is less than the straight line distance corresponding to the leaf node, the parent node of another sub-tree different from the leaf node of the index demarcation point is also taken as the current judgment node, and the query is continued, and the candidate node set is updated according to the query result; Backtracking to the last index demarcation point, the split distance is updated, the query is continued, and the root node of the spatial index structure is backtracked to.

6. The method of claim 1, wherein the method is used for automatic edge construction between different facility layers in an infrastructure system. The query of the target layer node in the spatial index structure based on the search strategy and the source node position comprises: When the preset connection strategy is many-to-one connection, the search strategy is determined as selecting a preset number of target connection nodes from the target layer; After the first leaf node is queried from the spatial index structure, the index demarcation point corresponding to the leaf node is obtained, the parent node of another sub-tree different from the leaf node of the index demarcation point is also taken as the current judgment node, the query is continued, the candidate node set is updated according to the query result, and the backtracking is continued until the candidate node set contains the preset number of target layer nodes; The distance between the next index demarcation point and the source node is taken as a split distance, and the candidate node set is updated based on the split distance and the maximum straight line distance in the candidate node set.

7. The method of claim 1, wherein the method is used for automatic edge construction between different facility layers in an infrastructure system. The query of the target layer node in the spatial index structure based on the search strategy and the source node position comprises: When the preset connection strategy is radius adaptive connection, the search strategy is determined as full-quantity query; The target connection nodes are queried from the spatial index structure, the index demarcation points are obtained one by one, the split distance between the index demarcation point and the source node is calculated, whether to skip the right sub-tree of the index demarcation point is determined based on the split distance, and until the traversal ends, the target layer node with a straight line distance less than or equal to a preset radius from the source node is taken as the target connection node.

8. An automatic edge building device between different facility layers in an infrastructure system, characterized by, Comprise: The target layer data acquisition module is configured to select a target layer from the infrastructure system and acquire a corresponding spatial index structure in the target layer, wherein the spatial index structure comprises a plurality of target layer nodes, and the target layer nodes construct the spatial index structure according to node positions; The strategy selection module is configured to determine a preset connection strategy according to attribute data or a node type of a source node, and obtain a search strategy of the source node based on the preset connection strategy; The query connection module is configured to acquire a source node position corresponding to the source node, determine that the search strategy is to select one target connection node from the target layer when the preset connection strategy is one-to-one connection, select a current judgment node from the spatial index structure, and select one target sub-tree from left and right sub-trees according to the current judgment node and the source node position if the current judgment node is not a leaf node, take a parent node corresponding to the target sub-tree as the current judgment node in next query, and continue the query, wherein an initial value of the current judgment node is a root node of the spatial index structure. If the current judgment node is a leaf node, a straight-line distance between a node position of the current judgment node and the source node position of the source node is calculated, the query is ended, the target layer node corresponding to the leaf node is stored in a candidate node set, the target connection nodes in the candidate node set are taken as target connection nodes, and node edges between the source node and each target connection node are established, and a number of the target connection nodes corresponds to the search strategy. The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the automatic edge building method between different infrastructure layers in the infrastructure system according to any one of claims 1 to 7 when executing the computer program.

9. An electronic device, comprising: The computer program is executed by the processor to implement the automatic edge building method between different infrastructure layers in the infrastructure system according to any one of claims 1 to 7.

10. A storage medium storing a computer program, characterized by ​

Citation Information

Patent Citations

  • Method and system for generating network topological graph

    CN119316300A

  • Existing building three-dimensional model reconstruction system based on point cloud data

    CN120635350A