A dynamic multi-scale rendering and interactive method and system for power grid geographic wiring diagrams
By constructing a topological polyline assembly, establishing a mapping relationship table, performing multi-scale spatial clustering and dynamic LOD control, and combining batch rendering and precise hit detection, the memory usage and rendering performance bottlenecks in the power grid geographical wiring diagram were solved, and the collaborative optimization of dynamic multi-scale rendering and interaction was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-03
AI Technical Summary
Existing methods for rendering and interacting with power grid geographic wiring diagrams suffer from problems such as memory consumption increasing linearly with data volume, rendering performance bottlenecks, and difficulty in balancing interaction granularity and performance. In particular, there is a lack of solutions for dynamically adjusting rendering granularity in visualization scenarios of large-scale power grid geographic wiring diagrams.
By constructing a topological polyline assembly, establishing a mapping relationship table, performing multi-scale spatial clustering and dynamic LOD control, and combining batch rendering and precise hit detection, dynamic multi-scale rendering and interaction are achieved.
While maintaining interactive accuracy, it significantly reduces memory consumption and rendering load, ensuring a smooth user experience and visual continuity, thus resolving the contradiction between rendering and interactive performance in large-scale power grid geographic wiring diagrams.
Smart Images

Figure CN121437792B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer graphics and geographic information systems, and in particular to a dynamic multi-scale rendering and interactive method and system for power grid geographic wiring diagrams. Background Technology
[0002] As the power grid continues to expand, the number of operational elements such as poles and lines included in geographical wiring diagrams has increased significantly. In engineering practice, traditional rendering and interactive methods mainly suffer from the following problems:
[0003] First, memory usage increases linearly with data volume. Conventional implementations typically manage each pole and line segment as an independent geometric object. When the number of elements reaches tens of thousands or more, memory consumption rises sharply, easily reaching the resource limits of terminal devices and affecting system stability.
[0004] Secondly, rendering performance is a bottleneck. A large number of independent objects means frequent drawing calls, and the GPU needs to process a massive number of instructions. Especially when users perform view transformation operations such as zooming and panning, the frame rate drops significantly, resulting in stuttering and affecting the visualization experience.
[0005] Third, it's difficult to balance interaction granularity and rendering performance. To support precise clicks and attribute queries, object independence needs to be preserved; however, to improve rendering efficiency, objects need to be merged or simplified. Existing solutions often require trade-offs between the two, and there is still a lack of feasible paths that can balance performance and interaction granularity in dynamic views.
[0006] In existing technologies, while static LOD (Level of Detail) techniques can reduce rendering load, their adaptability to view changes is limited. Simple object merging methods, although reducing the number of draws, often lose the relationships between original business objects, leading to difficulties in interactive positioning or missing information. Therefore, in the visualization scenario of large-scale power grid geographical wiring diagrams, there is still a lack of a solution that can dynamically adjust the rendering granularity according to the view state and maintain complete business interaction capabilities at any scale.
[0007] Therefore, there is an urgent need for a dynamic multi-scale rendering and interactive method and system for power grid geographic wiring diagrams, which can dynamically adjust the rendering granularity according to the view status while maintaining complete interactive capabilities. Summary of the Invention
[0008] In view of the above-mentioned defects in the prior art, the purpose of this invention is to provide a dynamic multi-scale rendering and interaction method and system for power grid geographic wiring diagrams, aiming to solve the technical problems of memory and performance bottlenecks and the contradiction between interaction granularity and performance in the rendering of existing power grid geographic wiring diagrams.
[0009] To achieve the above objectives, in a first aspect, the present invention provides a dynamic multi-scale rendering and interactive method for a power grid geographic wiring diagram, the steps of which include:
[0010] S1. Perform topology analysis on the power grid line data. Based on the electrical connection relationship of the line segments and the information of the circuit to which they belong, connect adjacent line segments belonging to the same circuit in topological order to construct the topology polyline assembly of the corresponding circuit.
[0011] S2. While constructing the topology polyline assembly, establish a mapping relationship table between each line segment in the polyline and the original line service object to record the correspondence between the polyline line segment index and the line service attribute;
[0012] S3. Perform multi-scale spatial clustering on the geographic coordinate data of the poles and towers, and build a spatial index structure based on the clustering results to support fast spatial queries at different scaling levels.
[0013] S4. Obtain the current view state parameters in real time, determine the level of detail for the current rendering based on the view state parameters, and select the corresponding rendering strategy accordingly.
[0014] S5. During the rendering process, the topological polyline assembly is geometrically simplified or fully presented according to the level of detail, and the graphics are rendered in a batch manner.
[0015] S6. When a user interaction occurs, the interaction location is mapped to a geographic coordinate space. The corresponding line service object is determined through the mapping relationship table and the geometric hit judgment mechanism, and the corresponding interaction response is triggered.
[0016] As a further improvement to the above scheme, in step S1, the topology polyline assembly is a continuous polyline object formed by sequentially connecting the geographical coordinates of the towers corresponding to multiple line segments connected end to end in the same electrical circuit.
[0017] As a further improvement to the above scheme, in step S2, the mapping relationship table includes at least the line service identifier, starting tower identifier, ending tower identifier, and line electrical attribute information corresponding to each line segment in the polyline.
[0018] As a further improvement to the above scheme, in step S3, the multi-scale spatial clustering process adopts a clustering method based on a regular grid, and the grid size is dynamically adjusted according to the view zoom level, so as to aggregate and display multiple towers at a low zoom level.
[0019] The spatial index structure is a quadtree structure, which is used to accelerate the querying and filtering of geographic objects within the viewport.
[0020] As a further improvement to the above scheme, in step S4, the level of detail includes at least aggregated display mode, simplified display mode and full display mode, and is dynamically switched according to the relationship between the current view zoom level and a preset threshold.
[0021] As a further improvement to the above scheme, in step S5, in the simplified display mode, the topological polyline assembly is subjected to geometric simplification processing based on viewport size and pixel tolerance to reduce the number of rendering vertices.
[0022] As a further improvement to the above scheme, in step S5, geometric objects of the same type are merged into a unified rendering batch to reduce the number of graphics drawing calls and improve rendering efficiency.
[0023] As a further improvement to the above scheme, in step S6, the geometric hit determination includes calculating the spatial distance between the user interaction position and each line segment in the topological polyline, and determining the corresponding line segment as the target object when the distance is less than a preset hit threshold.
[0024] As a further improvement to the above scheme, in step S6, during the view scaling or detail level switching process, the geometric state before and after the switching is interpolated to achieve a gradual and smooth transition of the rendering effect.
[0025] In a second aspect, the present invention also provides a dynamic multi-scale rendering and interactive system for power grid geographic wiring diagrams, employing a dynamic multi-scale rendering and interactive method for power grid geographic wiring diagrams as described in the first aspect, comprising:
[0026] The data preprocessing module is used to construct the topology polyline assembly and mapping relationship table;
[0027] The view state analysis module is used to obtain view parameters and determine the level of detail.
[0028] The dynamic rendering module is used to generate corresponding rendering geometry based on the level of detail and perform batch rendering.
[0029] The interaction processing module is used to perform geometric hit detection and trigger business object interactions.
[0030] Thirdly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a dynamic multi-scale rendering and interactive method for a power grid geographic wiring diagram as provided in the first aspect.
[0031] Because the present invention adopts the above technical solutions, the beneficial effects of this application are as follows:
[0032] This invention provides a dynamic multi-scale rendering and interactive method for power grid geographic wiring diagrams. By organically combining the technical route of "topology polyline assembly construction, mapping relationship maintenance, dynamic LOD control and accurate hit detection", it achieves synergistic optimization of memory efficiency, rendering performance and interactive accuracy, providing a feasible technical solution for real-time visualization of large-scale power grid geographic wiring diagrams.
[0033] Specifically, firstly, the topology polyline assembly constructed in step S1 merges a large number of discrete line segment objects within the same loop into a single continuous geometric object, achieving extreme simplification of data representation. This technical feature transforms the original memory consumption pattern, which grew linearly with the number of towers and lines, into an approximately constant-level pattern related to the number of power grid loops. Combined with the multi-scale spatial clustering processing in step S3, only the aggregated data visible in the current view needs to be loaded at different scaling levels, rather than all the original data, thereby significantly reducing memory consumption from the data source.
[0034] Secondly, the synergistic effect of steps S4 and S5 addresses the rendering performance bottleneck. Through a dynamic level of detail (LOD) decision-making mechanism based on view state, appropriate geometric complexity is automatically selected according to the current zoom level. A highly simplified geometric representation is used in the macro view; full detail is only presented in the micro view. This adaptive detail control significantly reduces the amount of vertex data that needs to be transferred to the GPU. Simultaneously, the batch rendering strategy employed in step S5 merges similar geometric objects into a single draw call, greatly reducing the GPU's drawing instruction overhead and thus ensuring smoothness during user zooming, panning, and other operations.
[0035] Furthermore, this invention innovatively resolves the contradiction between simplified rendering and refined interaction through the mapping table established in step S2 and the geometric hit judgment mechanism in step S6. Even on highly simplified geometric models, the original business object can still be located in reverse through the mapping relationship. When a user interacts with seemingly "simplified" graphics, the actual interaction path can be determined through precise geometric calculations (such as point-to-line distance judgment), and complete business attribute information can be retrieved through the mapping table. This technical approach enables the achievement of ultimate rendering performance without sacrificing the granularity and accuracy of business interaction.
[0036] Furthermore, the dynamic LOD decision in step S4, combined with the adaptive geometric simplification in step S5, ensures visual continuity during transitions between different scaling levels. By using appropriate threshold settings (such as scaling levels Z1 and Z2) and gradual detail transitions, the system avoids the "detail judder" phenomenon common in traditional static LOD technology, providing users with a smooth and natural browsing experience. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating a dynamic multi-scale rendering and interaction method for a power grid geographic wiring diagram disclosed in Embodiment 1 of the present invention.
[0039] The realization of the objective, functional characteristics and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] It should be noted that the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0042] Example 1
[0043] See Figure 1 This invention provides a dynamic multi-scale rendering and interactive method for power grid geographic wiring diagrams, the steps of which include:
[0044] S100, Data Preprocessing and Topology Polyline Assembly Construction:
[0045] First, the power grid topology is analyzed to identify electrical connections. Based on the electrical properties and topological connectivity of the lines, the power grid is divided into different feeder circuits. Adjacent line segments belonging to the same circuit are connected in topological order to construct the corresponding circuit's topological polygonal assembly. Specifically, this is determined by whether adjacent line segments are connected end-to-end and belong to the same circuit; the formula for this determination is shown below:
[0046] Connected(L1,L2)=(L1.EndTower=L2.StartTower)∧(L1.CircuitID=L2.CircuitID);
[0047] Among them, L1 and L2 are adjacent line segment objects, L1.EndTower is the termination tower ID of line segment L1; L2.StartTower is the starting tower ID of line segment L2; L1.CircuitID is the loop number to which line segment L1 belongs, and L2.CircuitID is the loop number to which line segment L2 belongs; Connected(L1,L2) is the result of judging the connectivity of line segments, and returns true when the two line segments are connected end to end and belong to the same loop.
[0048] For each electrical loop, in accordance with the topological connection order, the coordinates of all towers are concatenated to construct a complete polyline assembly.
[0049] While constructing the topological polyline assembly, a mapping relationship table between each line segment in the polyline and the original line service object is established to record the corresponding relationship between the line segment index of the polyline and the line service attributes.
[0050] Perform multi-scale spatial clustering processing on the tower geographic coordinate data, and construct a spatial index structure based on the clustering results to support fast spatial queries at different zoom levels.
[0051] S200, View state analysis and LOD decision:
[0052] S210, Real-time acquisition of view parameters:
[0053] Continuously monitor the map view state and obtain the rendering parameters in real time. The rendering parameters obtained in real time include the current viewport geographic boundary, the current zoom level, the rendering canvas size, and the device pixel ratio; specifically, the rendering parameter set is specifically represented as follows:
[0054] ViewParams = {Bounds, ZoomLevel, CanvasSize, PixelRatio};
[0055] Bounds is the current viewport geographic boundary [west, south, east, north]; ZoomLevel is the current zoom level Z; CanvasSize is the rendering canvas size [width, height] (pixels); PixelRatio is the device pixel ratio.
[0056] S220, Dynamic LOD decision:
[0057] Determine the rendering detail level based on the current zoom level. The specific logic is as follows:
[0058] If Z < Z1, LOD = 0, macroscopic view, and the aggregation mode is adopted;
[0059] If Z1 ≤ Z < Z2, LOD = 1, medium view, using simplified mode;
[0060] If Z ≥ Z2, LOD = 2, micro view, full detail mode;
[0061] Where LOD is the level of detail, Z is the current zoom level, Z1 is the aggregation threshold, usually set to 10, and Z2 is the detail threshold, usually set to 15.
[0062] S230: Viewport adaptive geometry simplification:
[0063] During the rendering process, geometric simplification or complete rendering of the topological polyline assembly is performed according to the level of detail, and batch rendering is used for graphics rendering.
[0064] Geometric simplification of the polyline assembly is performed according to the LOD level,
[0065] Specifically, an improved Douglas - Peucker algorithm is used for geometric simplification, and the simplification tolerance is calculated as:
[0066] ;
[0067] Parameter description: ε is the distance tolerance used in the simplification algorithm, ViewportWidth is the geographical width of the viewport (degrees), CanvasWidth is the pixel width of the canvas, and PixelTolerance is the pixel - level tolerance parameter, which is adjusted according to the LOD level, 。
[0068] S300, Viewport - driven rendering:
[0069] S310, Efficient spatial query:
[0070] Use a quadtree index to quickly find visible objects within the viewport. The spatial query optimization formula is:
[0071] VisibleObjects = QuadtreeRangeQuery(QuadtreeRoot, ViewportBounds);
[0072] Where VisibleObjects is the set of visible objects within the viewport, QuadtreeRoot is the root node of the quadtree, and ViewportBounds is the geographical boundary of the viewport.
[0073] S320, Dynamic geometry instantiation:
[0074] Generate geometric data of the corresponding level of detail according to the LOD decision result, and the instantiation logic is:
[0075] ;
[0076] Geometry refers to the final rendered geometric data. Simplify(Polyline,ε) simplifies the polyline assembly using a tolerance ε, where ε0 is the simplification tolerance for the macro view and ε1 is the simplification tolerance for the meso view.
[0077] S330, batch rendering optimization:
[0078] Similar geometric objects are grouped into a single rendering batch to reduce the number of graphics drawing calls and improve rendering efficiency. Specifically, the batch building algorithm formula is shown below:
[0079] Batch={Type:"line",Geometry:mergedGeometry,Style:style,Count:vertexCount}
[0080] Among them, Type is the geometry type (line, point, etc.), Geometry is the merged geometry data, Style is the rendering style, and Count is the number of vertices, which is used for performance monitoring.
[0081] S400, Intelligent Interactive Processing:
[0082] S410, Precision Hit Test:
[0083] The interaction location is mapped to geographic coordinate space, and the matched geographic objects are located. The specific coordinate transformation formula is shown below:
[0084] ;
[0085] ;
[0086] , These are the converted geographic coordinates. , These are screen pixel coordinates. , , , For the viewport geographic boundary, , This refers to the canvas size.
[0087] S420, Segment-level Precise Hit Judgment:
[0088] The geometric hit determination includes calculating the spatial distance between the user's interaction location and each line segment in the topological polyline, and determining the corresponding line segment as the target object when the distance is less than a preset hit threshold.
[0089] Calculate the distance between the clicked location and each line segment in the polyline assembly to find the best match. The formula for the point-to-line segment distance is:
[0090] ;
[0091] Where D is the vertical distance from point P0 to line segment P1P2, (x0,y0) are the geographic coordinates of the clicked location, and (x1,y1) and (x1,y2) are the coordinates of the two endpoints of the line segment, respectively.
[0092] The preset dynamic hit threshold is HitThreshold, which is adjusted according to the current zoom level Z:
[0093] When Z < 10, HitThreshold = 15 meters, macro view, loose tolerance;
[0094] When 10≤Z<15, HitThreshold = 8 meters, mid-view view, moderate tolerance;
[0095] When Z≥15, HitThreshold = 3 meters, microscopic view, precise tolerance.
[0096] Find the one that satisfies D k For all line segments < HitThreshold, the one with the smallest distance is the best match. The formula for finding the best match is:
[0097] ;
[0098] For the best matching line segment index, D k The distance from the clicked location to the k-th line segment is represented by HitThreshold, which is the hit threshold and is dynamically adjusted based on the zoom level.
[0099] S430, Business Object Activation and View Synchronization:
[0100] The corresponding line service object is determined through the mapping table and geometric hit determination mechanism, and the corresponding interactive response is triggered. The object activation process is as follows:
[0101] pass The system searches for the corresponding SegmentID in the Mapping table to obtain the complete business attributes of the line segment. If the current view is not detailed, it automatically triggers a transition to the detailed view, highlighting the selected line segment and associated towers.
[0102] S440, progressive detail transition:
[0103] During view zooming or detail level switching, a gradual and smooth transition in rendering is achieved by interpolating the geometric states before and after the switch. Specifically, the transition animation parameters are as follows:
[0104] Transition(t)=Lerp(Geometry0,Geometry1,f(t)),t∈[0,1];
[0105] Where Transition(t) represents the geometric state during the transition process, Geometry0 represents the initial geometric state, Geometry1 represents the target geometric state, and f(t) is the easing function, which uses a cubic Bézier curve to achieve smooth acceleration and deceleration effects, such as f(t) = 3t. 2 -2t 3 Lerp is a linear interpolation function.
[0106] By organically combining the technical approach of "topology polyline assembly construction, mapping relationship maintenance, dynamic LOD control, and accurate hit detection", the synergistic optimization of memory efficiency, rendering performance, and interactive accuracy is achieved, providing a feasible technical solution for real-time visualization of large-scale power grid geographical wiring diagrams.
[0107] Specifically, firstly, by constructing a topological polyline assembly, a large number of discrete line segment objects within the same loop are merged into a single continuous geometric object, achieving extreme simplification of data representation. This technical feature transforms the original memory consumption pattern, which grew linearly with the number of towers and lines, into an approximately constant-level pattern related to the number of power grid loops. Combined with multi-scale spatial clustering processing, only the aggregated data visible in the current view needs to be loaded at different scaling levels, rather than all the original data, thus significantly reducing memory consumption from the data source.
[0108] Secondly, through a dynamic Level of Detail (LOD) decision-making mechanism based on view state, the appropriate geometric complexity can be automatically selected according to the current zoom level. A highly simplified geometric representation is used in the macro view; full detail is only presented in the micro view. This adaptive detail control significantly reduces the amount of vertex data that needs to be transferred to the GPU. Simultaneously, the batch rendering strategy merges similar geometric objects into a single draw call, greatly reducing the GPU's drawing instruction overhead, thus ensuring smoothness when the user performs zooming, panning, and other operations.
[0109] Furthermore, this invention innovatively resolves the contradiction between simplified rendering and refined interaction through the established mapping table and geometric hit judgment mechanism. Even on highly simplified geometric models, the original business object can still be located in reverse through the mapping relationship. When a user interacts with seemingly "simplified" graphics, the actual interaction path can be determined through precise geometric calculations (such as point-to-line distance judgment), and complete business attribute information can be retrieved through the mapping table. This technical approach enables the achievement of ultimate rendering performance without sacrificing the granularity and accuracy of business interaction.
[0110] Furthermore, the combination of dynamic LOD decision-making and adaptive geometric simplification ensures visual continuity during transitions between different scaling levels. By using appropriate threshold settings (such as scaling levels Z1 and Z2) and gradual detail transitions, the system avoids the "detail judder" phenomenon common in traditional static LOD technology, providing users with a smooth and natural browsing experience.
[0111] As a preferred embodiment, the steps for constructing the topology polyline assembly are as follows:
[0112] First, based on the results of power grid topology analysis, identify the set of line segments belonging to the same electrical circuit;
[0113] For each independent electrical circuit, the geographical coordinates of the towers corresponding to all line segments in the circuit are sequentially connected in series according to the order of electrical connections.
[0114] The specific construction process is as follows: Suppose an electrical circuit includes n+1 towers, whose geographical coordinates are P0(x0,y0), P1(x1,y1), ..., P... n (x n ,y n ), where for any ,exist , indicating tower P i With P i+1 There is a direct electrical connection between them, that is, condition P is satisfied. i .EndTower = P i+1 .StartTower. The constructed topological polyline assembly can then be represented as a vertex sequence: Polyline=[P0,P1,P2,...,P n ]. Where P i Let P be the geographical coordinates of the i-th tower. i =(x i ,y i ), x i Let y be the longitude coordinate of tower i. i Let be the latitude coordinate of tower i. Let n be the total number of towers in this loop.
[0115] By merging multiple discrete line segment objects within the same loop into a single continuous polyline object, the data representation is greatly simplified. This improvement reduces the number of graphical objects to be managed from tens of thousands at the line segment level to tens at the loop level, significantly reducing the management overhead of independent objects in memory. During the series connection process, the electrical connection sequence between towers is strictly followed, ensuring that the geometry of the polyline assembly is completely consistent with the actual power grid topology. This feature effectively avoids the topological distortion problem that may result from simple geometric merging, providing an accurate data foundation for subsequent analysis and calculations based on topological relationships. Since all lines in a single loop are integrated into a single polyline object, only one drawing call is needed to complete the rendering of the entire loop, significantly reducing the number of GPU drawing instructions. Although object merging is performed at the rendering level, the system can still accurately track the business attributes of each original line segment through the corresponding mapping table (Mapping[k]). This design simplifies the rendering model while maintaining the same interactive accuracy and capabilities as the original independent object model.
[0116] In a preferred embodiment, the mapping table is constructed using a key-value pair structure, where the key is the index number k (k∈[0, n-1]) of the line segment in the polyline assembly, and the value is the complete set of business attributes corresponding to the line segment. Specifically, each record in the mapping table contains the following core fields:
[0117] SegmentID records the unique service identifier S of the original line segment. k This is used for querying related data in the business database;
[0118] StartTower, the business identifier (TID) for recording the starting tower of a line segment. k , represents the unique business identifier of the starting tower of the k-th line segment, and maintains the correspondence with the tower asset database;
[0119] EndTower, the business identifier (TID) for the end tower of a line segment. k+1 To ensure the accuracy of topology connections;
[0120] Voltage, record the line voltage level V k Used for differentiated display and security analysis;
[0121] LineType, records the line type. k Used for current carrying capacity calculation and fault analysis;
[0122] Other extended business attributes, such as the affiliated operation and maintenance unit, commissioning time, design load, etc.;
[0123] The mathematical expression of the mapping relationship is as follows:
[0124] .
[0125] By establishing a precise mapping between line segment indices and original business identifiers, all business attributes are fully preserved while maintaining a highly simplified geometric model. This design allows the system to use a simplified polyline assembly during rendering, while accurately reconstructing complete business information through a mapping table during interactive queries, effectively resolving the contradiction between simplified rendering and refined business requirements. Recording the starting and ending tower identifiers maintains the accuracy of the power grid topology connections. Combined with P in the polyline assembly... i →P i+1 The geometric connections form a dual guarantee mechanism of geometric topology and business topology, providing a reliable data foundation for advanced applications such as power flow calculation and fault location.
[0126] Taking a 110kV line loop as an example, this line loop is simplified into a single geometric object with 35 vertices in the polygonal assembly. Simultaneously, a mapping table with 34 records is established, corresponding to 34 line segments. When the user clicks on any segment of this loop:
[0127] The system first calculates the geometric distance between the clicked location and each line segment;
[0128] Find the business identifier S corresponding to the nearest line segment k using the mapping table. k ;
[0129] According to S k Retrieve complete line attributes from the business database, such as voltage level 110kV, model LGJ-240, commissioning time 2018.06, etc.
[0130] Display detailed business information on the interface;
[0131] This implementation method, by establishing a precise mapping relationship, achieves ultimate rendering performance while fully maintaining business interaction capabilities, effectively solving the technical challenge of "performance and functionality being mutually exclusive" in large-scale power grid data visualization.
[0132] In a preferred embodiment, the multi-scale spatial clustering processing adopts a clustering method based on a regular grid, and the grid size is dynamically adjusted according to the view zoom level to aggregate and display multiple towers at a low zoom level;
[0133] The rule-based grid clustering process is implemented in the following manner:
[0134] Dynamic grid division mechanism: Set a base grid size S0, such as the grid size when the map zoom level is 1, and dynamically calculate the actual grid size based on the current view zoom level Z.
[0135] ;
[0136] Where k is the baseline zoom level coefficient. This design ensures that the grid size decreases by a power of 2 as the view zoom level increases, achieving adaptive adjustment of the clustering granularity.
[0137] Tower clustering algorithm: For each tower T i Its geographical coordinates are (x i , y i The corresponding grid cell is determined through the following calculations:
[0138] ;
[0139] in As a floor function, the set of towers within grid cell (i,j) is:
[0140] ;
[0141] in, For the tower cluster within grid cell (i,j), For a single tower data object, , For the data object of this tower The geographic coordinate attribute.
[0142] The multi-scale display strategy is as follows:
[0143] Macro view (Z < 10): Uses a larger grid size to aggregate multiple adjacent towers into a single marker point for display;
[0144] Mid-view (10 ≤ Z < 15): Appropriately reduce the grid size to show the distribution density of poles and towers in the area;
[0145] Micro view (Z ≥ 15): Uses the minimum grid size to maintain the independent display of individual towers.
[0146] The spatial index structure is a quadtree structure, which is used to accelerate the querying and filtering of geographic objects within the viewport.
[0147] Specifically, the implementation method for constructing a quadtree spatial index is as follows:
[0148] The index structure design uses the following data structure for the quadtree nodes:
[0149] Node = {
[0150] Bounds: [minX, minY, maxX, maxY], / / Geographical range of the node
[0151] Objects: Array, / / Geographic objects contained in this node
[0152] Children: [4], / / pointers to four child nodes
[0153] Level: Number / / The level of the node
[0154] }
[0155] The steps for building an index are as follows:
[0156] The entire map range is used as the root node boundary;
[0157] The recursive process divides the current node into four equal-sized sub-regions until the number of objects in the node is below a threshold (e.g., ≤10) or the maximum depth is reached.
[0158] A top-down segmentation strategy is adopted to ensure the balance of spatial division.
[0159] Spatial query optimization: The following optimization algorithm is used for viewport range queries:
[0160] function QuadtreeRangeQuery(node, range) {
[0161] if (!intersect(node.Bounds, range)) return []
[0162] if (isLeaf(node)) return node.Objects.filter(obj =>inRange(obj,range))
[0163] Returnnode.Children.flatMap(child=>QuadtreeRangeQuery(child,range))
[0164] }
[0165] This invention utilizes dynamic grid clustering to aggregate thousands of pole and tower objects into hundreds of cluster points at low zoom levels, significantly reducing the number of rendered objects and effectively solving the rendering performance bottleneck problem in macroscopic views. Simultaneously, clustering avoids visual overlap caused by excessively dense poles and towers, reflecting pole and tower distribution density through cluster point size and color intensity, maintaining visual clarity while conveying spatial distribution information. The quadtree index optimizes the time complexity of spatial queries from O(n) to O(logn), significantly improving viewport clipping query speed in 100,000-level pole and tower data, ensuring smooth zooming and panning operations. The clustering results and quadtree index employ a lazy construction strategy, processing only data within the current view scope, reducing memory usage by more than half compared to a full index, achieving an optimal balance between storage efficiency and query performance.
[0166] In a preferred embodiment, the level of detail (LOD) includes at least a converged display mode, a simplified display mode, and a full display mode, and dynamically switches based on the relationship between the current view zoom level and a preset threshold. Specifically, in this embodiment, a three-level LOD system is adopted, and dynamic switching is performed based on the comparison between the current view zoom level Z and preset thresholds Z1 and Z2.
[0167] Aggregated display mode (LOD 0):
[0168] Activation condition: Z < Z1, usually Z1 = 10;
[0169] Display characteristics: In this mode, the system performs spatial clustering on the tower data, aggregating adjacent towers into a single marker point for display. Line rendering uses a highly simplified geometric representation, retaining only the main route outline.
[0170] Technical parameters: Geometric simplification tolerance ε0 = (ViewportWidth / CanvasWidth) × 8px;
[0171] Simplified display mode (LOD 1):
[0172] Activation condition: Z1 ≤ Z < Z2, usually Z2 = 15;
[0173] Display features: Shows the location of individual towers, but with moderate simplification of the line geometry, retaining key inflection points and connections. Secondary details are hidden to maintain visual clarity.
[0174] Technical parameters: Geometric simplification tolerance ε1 = (ViewportWidth / CanvasWidth) × 3px;
[0175] Full display mode (LOD 2):
[0176] Activation condition: Z ≥ Z2;
[0177] Display features: Fully presents the geometric details of all towers and lines, displays all business attributes and labeling information, and supports precise spatial queries and interactive operations.
[0178] Technical parameters: Geometric simplification tolerance ε2 = 0, no simplification is performed.
[0179] The dynamic switching is achieved through the following algorithm:
[0180] function updateLOD() {let currentZoom=getCurrentZoomLevel();
[0181] if (currentZoom <Z1) {
[0182] setRenderMode(LOD_AGGREGATE);
[0183] setSimplifyTolerance(ε0);
[0184] } else if (currentZoom <Z2) {
[0185] setRenderMode(LOD_SIMPLIFIED);
[0186] setSimplifyTolerance(ε1);
[0187] } else {
[0188] setRenderMode(LOD_FULL);
[0189] setSimplifyTolerance(ε2);}}.
[0190] By dynamically switching between three levels of Level of Detail (LOD), tens of thousands of pole objects are aggregated into hundreds of clusters in the macro view, significantly reducing the rendering load and effectively solving the rendering performance bottleneck problem under large-scale data. The display details are automatically adjusted according to different scaling levels, avoiding the contradiction between information overload and lack of detail. It highlights the overall structure at the macro level, showcases regional features at the meso level, and provides complete details at the micro level, achieving optimal allocation of visual information.
[0191] Example 2
[0192] This invention also provides a dynamic multi-scale rendering and interactive system for power grid geographic wiring diagrams, employing a dynamic multi-scale rendering and interactive method for power grid geographic wiring diagrams as described in Example 2. The system includes:
[0193] The data preprocessing module, as the system's foundational data layer, is responsible for the structured processing of raw power grid data. Its specific implementation includes:
[0194] Topology Analysis Unit: Analyzes the power grid SCD model or GIS data, establishes the electrical connection relationship between towers and lines, and verifies the topology integrity using the connectivity judgment formula Connected(L1,L2);
[0195] Polyline Assembly Building Unit: This unit combines discrete line segments into a continuous polyline (Polyline=[P0,P1,...,P)) based on electrical circuits. n This can significantly reduce the number of independent graphic objects;
[0196] Mapping Relationship Management Unit: Constructs and maintains the vertex-line segment mapping table Mapping[k] to ensure the correspondence between simplified geometry and original business attributes;
[0197] Spatial index building unit: Generates a quadtree spatial index, optimizing the time complexity of spatial queries from O(n) to O(log n).
[0198] The view state analysis module monitors the interaction state in real time and dynamically adjusts the rendering strategy. Specific implementations include:
[0199] Parameter acquisition unit: Continuously acquires ViewParams={Bounds,ZoomLevel,CanvasSize,
[0200] View parameters such as PixelRatio;
[0201] LOD Decision Unit: Based on the comparison results between the current scaling level Z and the thresholds Z1=10 and Z2=15, determine the LOD level: 0-aggregate mode, 1-simplify mode, 2-full mode;
[0202] Tolerance calculation unit: Dynamically calculates the geometrically simplified tolerance based on the formula ε=(ViewportWidth / CanvasWidth)×PixelTolerance;
[0203] An adaptive decision-making mechanism enables the system to automatically maintain optimal rendering performance at different scaling levels, with a stable frame rate of 45-60fps.
[0204] The dynamic rendering module is responsible for graphics generation and rendering optimization. Its specific implementation includes:
[0205] Geometric processing unit: The polyline assembly is simplified according to the LOD level, with macro view ε0=8px and meso view ε1=3px;
[0206] Batch management unit: merges geometric objects of the same type into batch drawing instructions, which can significantly reduce the number of GPU drawing calls;
[0207] Transition animation unit: The smooth visual transition is achieved using Transition(t) = Lerp(Geometry0, Geometry1, f(t)).
[0208] Batch rendering and detailed control improve rendering performance by 2-3 times while ensuring visual continuity.
[0209] The interaction processing module is used to handle user interactions and maintain business functions. Its specific implementation includes:
[0210] Coordinate transformation unit: transforms screen coordinates (x) screen ,y screen Convert to geographic coordinates (X) geo ,Y geo );
[0211] Hit detection unit: Calculates the spatial relationship between the interaction position and geometric elements using the point-to-line distance formula;
[0212] Business mapping unit: Uses a mapping table to reverse-associate the geometric hit results to the original business object;
[0213] View synchronization unit: Automatically triggers the transition to the detail view when the view is not in detail view;
[0214] Ensure 100% accuracy of business interactions on the simplified rendering model, with an interaction response time of <100ms.
[0215] The data preprocessing module processes raw power grid data offline to generate an optimized set of rendering data; the view status analysis module monitors user operations in real time and dynamically triggers LOD level switching; the dynamic rendering module generates corresponding geometric data based on the current LOD decision and performs batch rendering; the interaction processing module captures user interaction intent and achieves precise business response through a mapping mechanism.
[0216] This system effectively solves the performance bottlenecks and interaction problems in rendering large-scale power grid geographical wiring diagrams through a modular technical architecture and optimized collaboration mechanism, providing reliable technical support for intelligent operation and maintenance of power grids.
[0217] Example 3
[0218] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein, when the program is executed, it controls the device on which the storage medium is located to perform some or all of the steps in Embodiment 1.
[0219] The computer-readable storage medium may include high-speed RAM memory and may also include nonvolatile memory (NVM), such as at least one disk storage device. It is understood that the storage medium can be any machine-readable medium capable of storing program code, such as random access memory (RAM), magnetic disk, hard disk, solid state disk (SSD), or nonvolatile memory.
[0220] Those skilled in the art will understand that embodiments of the present invention can be provided as methods or storage media. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0221] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings under the inventive concept of the present invention, or direct or indirect applications in other related technical fields, are within the patent protection scope of the present invention.
Claims
1. A dynamic multi-scale rendering and interactive method for power grid geographic wiring diagrams, characterized in that, Includes the following steps: S1. Perform topology analysis on the power grid line data. Based on the electrical connection relationship of the line segments and the information of the circuit to which they belong, connect adjacent line segments belonging to the same circuit in topological order to construct the topology polyline assembly of the corresponding circuit. The topology polyline assembly is a continuous polyline object formed by connecting the geographical coordinates of the towers corresponding to multiple line segments connected end to end in the same electrical circuit in the electrical connection order. S2. While constructing the topology polyline assembly, establish a mapping relationship table between each line segment in the polyline and the original line service object to record the correspondence between the polyline line segment index and the line service attribute; S3. Perform multi-scale spatial clustering processing on the geographic coordinate data of the poles and build a spatial index structure based on the clustering results to support fast spatial queries at different zoom levels. The multi-scale spatial clustering processing adopts a clustering method based on a regular grid, and the grid size is dynamically adjusted with the view zoom level to aggregate and display multiple poles at low zoom levels. The spatial index structure is a quadtree structure, used to accelerate the querying and filtering of geographic objects within the viewport range; S4. Obtain the current view status parameters in real time. The view status parameters obtained in real time include the current viewport geographic boundary, the current zoom level, the rendering canvas size and the device pixel ratio. Determine the current level of detail for rendering based on the view status parameters, and select the corresponding rendering strategy accordingly. The level of detail includes at least aggregated display mode, simplified display mode and full display mode. The level of detail is dynamically switched according to the relationship between the current view zoom level and a preset threshold. S5. During the rendering process, the topological polyline assembly is geometrically simplified or fully rendered according to the level of detail, and batch rendering is performed. In the simplified display mode, the topological polyline assembly is geometrically simplified based on the viewport size and pixel tolerance, wherein the simplification algorithm uses a distance tolerance. ; ε is the distance tolerance used to simplify the algorithm, ViewportWidth is the viewport geographic width, CanvasWidth is the canvas pixel width, and PixelTolerance is a pixel-level tolerance parameter to reduce the number of rendering vertices; S6. When a user interaction occurs, the interaction location is mapped to a geographic coordinate space. The corresponding line service object is determined through the mapping relationship table and the geometric hit judgment mechanism, and the corresponding interaction response is triggered. The geometric hit judgment includes calculating the spatial distance between the user interaction location and each line segment in the topology polyline, and determining the corresponding line segment as the target object when the distance is less than a preset hit threshold.
2. The dynamic multi-scale rendering and interactive method for a power grid geographic wiring diagram according to claim 1, characterized in that, In step S2, the mapping table includes at least the line service identifier, starting tower identifier, ending tower identifier, and line electrical attribute information corresponding to each line segment in the polyline.
3. A dynamic multi-scale rendering and interactive method for a power grid geographic wiring diagram according to claim 1 or 2, characterized in that, In step S6, during the view zooming or detail level switching process, the geometric state before and after the switching is interpolated to achieve a progressive and smooth transition of the rendering effect.
4. A dynamic multi-scale rendering and interactive system for power grid geographic wiring diagrams, used to implement the method as described in any one of claims 1-3, characterized in that, include: The data preprocessing module is used to construct the topology polyline assembly and mapping relationship table; The view state analysis module is used to obtain view parameters and determine the level of detail. The dynamic rendering module is used to generate corresponding rendering geometry based on the level of detail and perform batch rendering. The interaction processing module is used to perform geometric hit detection and trigger business object interactions.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements a dynamic multi-scale rendering and interaction method for a power grid geographic wiring diagram as described in any one of claims 1-3.
Citation Information
Patent Citations
Intelligent map data system modeling method and application thereof in electric power auditing operation
CN111325841A
High-speed rendering method and system for three-dimensional large-scale dynamic net rack of one graph of power grid
CN120894525A