Visualization method of power grid map, electronic equipment and storage medium
By grouping points of interest based on spatial indexes and performing batch rendering, the problem of rendering lag and crashes of power grid maps in Unreal Engine 5 was solved, realizing large-scale spatial object visualization of power grid scenes and improving user experience.
Patent Information
- Application Number
- CN202511041804.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-07
AI Technical Summary
Existing digital twin systems suffer from performance bottlenecks when handling a large number of points of interest, especially in Unreal Engine 5, leading to rendering stutters, delays, and crashes, making it difficult to meet the needs of power grid scenarios for large-scale spatial object visualization.
By grouping interest points based on spatial indexes, aggregated and non-aggregated visual interest points are identified, and batch visualization rendering is performed using the rendering engine, reducing the number of drawing calls and lowering the burden on the graphics processor.
It improves the visualization efficiency of power grid maps, reduces rendering lag and crashes, meets the visualization needs of large-scale spatial objects, and enhances the user experience.
Smart Images

Figure CN120912801A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of electric power, and in particular to a power grid map visualization method, an electronic device, and a storage medium. BACKGROUND
[0002] The current digital twin system has a performance bottleneck when processing a large number of points of interest, especially in a three-dimensional engine such as Unreal Engine 5 (UE5), the number of default supported actors is limited, and when the number of points of interest exceeds several thousand, the rendering will be stuck, delayed, or even crashed, which is difficult to meet the demand of the power grid scene for large-scale space object visualization. SUMMARY
[0003] Embodiments of the present application provide a power grid map visualization method, an electronic device, and a storage medium, which realize the visualization function of the power grid map, to solve the problem that the prior art is difficult to meet the demand of the power grid scene for large-scale space object visualization.
[0004] In a first aspect, embodiments of the present application provide a power grid map visualization method, which includes: in response to a current map viewing operation of a user, determining a current field of view range based on the current map viewing operation; determining aggregated visual points of interest and non-aggregated visual points of interest within the current field of view range based on a spatial index; the spatial index is obtained by grouping a plurality of points of interest based on attribute information of the plurality of points of interest in a preset area and constructing an index according to the grouping result; determining attribute information of a representative point of the aggregated visual points of interest in the same group, determining preset aggregated rendering attribute information and the attribute information of the representative point as rendering attribute information of the corresponding representative point, and instantiating based on the rendering attribute information of the representative point to obtain an aggregated instance of the corresponding representative point; using a rendering engine to perform batch visualization rendering on the aggregated instance of the representative point and individual instances of the non-aggregated visual points of interest, the individual instances being obtained by instantiating corresponding points of interest based on rendering attribute information of the points of interest.
[0005] In a second aspect, the embodiments of the present application provide a power grid map visualization device, which comprises: a first determining module configured to determine a current field of view range based on a current map viewing operation of a user in response to the current map viewing operation; a second determining module configured to determine aggregated visual interest points and non-aggregated visual interest points in the current field of view range based on a spatial index; the spatial index is obtained by grouping a plurality of interest points in a preset area based on attribute information of the plurality of interest points and constructing an index according to a grouping result; an instantiation module configured to determine attribute information of a representative point of the aggregated visual interest points in a same group, determine preset aggregated rendering attribute information and the attribute information of the representative point as rendering attribute information of the corresponding representative point, and perform instantiation based on the rendering attribute information of the representative point to obtain an aggregated instance of the corresponding representative point; and a rendering module configured to perform batch visualization rendering on the aggregated instance of the representative point and individual instances of the non-aggregated visual interest points by using a rendering engine, the individual instances being obtained by instantiating corresponding interest points based on rendering attribute information of the interest points.
[0006] In a third aspect, the embodiments of the present application provide an electronic device, which comprises: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the power grid map visualization method of any of the embodiments of the present application.
[0007] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the power grid map visualization method of any of the embodiments of the present application.
[0008] In the technical scheme provided in the embodiments of the present application, the current field of view range can be determined based on the current map viewing operation of the user, and then the aggregated visible interest points and the non-aggregated visible interest points in the current field of view range can be determined based on the spatial index. The spatial index can improve the screening efficiency of the visible interest points, and can avoid rendering the interest points outside the current field of view range. Meanwhile, the visible interest points are divided into the aggregated visible interest points and the non-aggregated visible interest points, the aggregated rendering can be performed on the visible interest point dense area, thereby avoiding visual confusion and reducing the rendering lag, delay and even crash phenomenon in the scene with a large number of visible interest points, and providing an accurate data basis for subsequent batch visualization rendering. Then, the attribute information of the representative points of the aggregated visible interest points in the same group is determined, the preset aggregated rendering attribute information and the attribute information of the representative points are determined as the rendering attribute information of the corresponding representative points, and the representative points are instantiated based on the rendering attribute information of the representative points to obtain the aggregated instances of the corresponding representative points. Then, the rendering engine is used to perform batch visualization rendering on the aggregated instances of the representative points and the individual instances of the non-aggregated visible interest points. Through the batch visualization rendering, the number of drawing calls can be reduced, thereby reducing the burden of the graphic processor and improving the efficiency of the graphic processor, so as to effectively reduce the rendering lag, delay and even crash phenomenon, especially in the scene with a large number of interest points, thereby meeting the demand of the power grid scene for large-scale spatial object visualization and improving the user experience. BRIEF DESCRIPTION OF DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0010] Figure 1 is a flow diagram of the visualization method of the power grid map provided by the embodiments of the present application;
[0011] Figure 2 is another flow diagram of the visualization method of the power grid map provided by the embodiments of the present application;
[0012] Figure 3 is a structural diagram of the visualization device of the power grid map provided by the embodiments of the present application;
[0013] Figure 4 is a structural diagram of the electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0014] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort should fall within the protection scope of the present application.
[0015] It should be noted that the terms "first", "second", "target" and "original" and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include", "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0016] Figure 1 is a flowchart of a visualization method of a power grid map provided by the embodiments of the present application. The embodiments can be applied to a scenario in which a plurality of points of interest in a power grid map need to be visualized. The visualization method of the power grid map provided by the embodiments of the present application can be executed by a visualization device of the power grid map provided by the embodiments of the present application. The device can be realized by software and / or hardware. In a specific embodiment, the visualization device of the power grid map can be integrated in an electronic device, for example, the electronic device can be a computer or the like. The execution subject executing the method can be an electronic device. Referring to Figure 1 , the visualization method of the power grid map of the embodiments includes but is not limited to the following steps:
[0017] S110, in response to a current map viewing operation of a user, determining a current field of view range based on the current map viewing operation.
[0018] The current map viewing operation is a map viewing operation at a current time, which is a real-time interactive behavior of the user on the power grid map through an input device (such as a mouse, a keyboard, a touch screen or a handle, etc.), and the purpose is to adjust the display perspective, range or details of the power grid map to meet the map viewing requirements. The power grid map is used to display various power devices in the power grid. The current field of view range is a spatial region of the power grid map that needs to be presented on the display screen of the electronic device under the current map viewing operation of the user, i.e., the range that needs to be displayed by the power grid map at the current time.
[0019] Specifically, the behavior of the user can be detected in real time. When it is detected that the display screen of the electronic device is at the display interface of the power grid map, or when it is detected that the user adjusts the field of view of the display interface of the power grid map through an input device (such as a mouse, a keyboard, a touch screen, or a handle) to view the power grid map in different fields of view, it can be determined that the user triggers a map viewing operation. At this time, the current map viewing operation of the user can be responded to. The current map viewing operation can be an operation in which the user views the power grid map for the first time, or can be an operation in which the user views the power grid map for the first time.
[0020] If the current map viewing operation is an operation in which the user views the power grid map for the first time, the current position of the electronic device can be obtained, and a spatial range at a preset initial display distance from the current position can be determined as the current field of view range, where the preset initial display distance is an initial display distance that is set in advance and can be adjusted and set by the user according to actual use requirements.
[0021] If the current map viewing operation is an operation in which the user views the power grid map for the first time, the rendering state at the last time, such as the aggregation state, can be cleared. Then, the current field of view range can be determined based on the current map viewing operation, that is, the current position information and the current angle information of the virtual camera in the rendering engine can be determined based on the current map viewing operation. The virtual camera is a core component for simulating an observation angle in the rendering engine, that is, a core component for simulating the function of a real-world camera, and is used to define an angle from which a three-dimensional scene is observed, and is a “window” connecting the three-dimensional world and the two-dimensional screen. The current position information is the coordinate of the virtual camera at the current time, which is the coordinate in the world coordinate system corresponding to the rendering engine. The current angle information includes the field of view angle (that is, the horizontal field of view angle and the vertical field of view angle), the Euler angle (that is, the yaw angle, the pitch angle, and the roll angle), and the direction vector (that is, the orientation of the camera) of the virtual camera at the current time. Then, the current field of view range is calculated based on the current position information and the current angle information of the virtual camera. The current field of view range at this time is a coordinate range in the world coordinate system. The calculation steps of the current field of view range are not improved in the embodiments of the present application, and can be referred to the implementation in the prior art, which will not be described here.
[0022] S120, determining the aggregated visible interest points and the non-aggregated visible interest points in the current field of view range based on the spatial index.
[0023] The spatial index is a data structure for efficiently querying and filtering spatial objects (such as interest points). By preprocessing and organizing the position information and other information of the spatial objects, the invalid traversal during querying is greatly reduced, so that the objects in the current field of view range can be quickly located.
[0024] Optionally, the spatial index is obtained by grouping the multiple points of interest based on attribute information of the multiple points of interest in a preset region and constructing an index according to a grouping result; the preset region is a spatial region corresponding to the power grid map, i.e., a spatial region that needs to be displayed according to actual business requirements; the point of interest is a power equipment that needs to be displayed in the power grid map in the preset region, and which power equipment is the point of interest can be determined according to actual business requirements; the attribute information of the point of interest can include position information, and the position information at this time includes coordinates of the point of interest in a world coordinate system. That is, the multiple points of interest in the preset region can be grouped based on the position information of the multiple points of interest by using a hierarchical grid, so as to divide multiple points of interest with similar positions into one grid, wherein one grid is a group, each grid includes multiple points of interest, and one grid corresponds to a spatial range for representing a range in which all points of interest in the grid are located, so as to obtain the grouping result, and construct an index according to the grouping result, so as to obtain the spatial index, such as the jth grid of the ith level, to realize multi-level partition management of the multiple points of interest in the preset region. It should be noted that the construction process of the spatial index is pre-constructed, i.e., before S110, the multiple points of interest are grouped based on the attribute information of the multiple points of interest in the preset region and an index is constructed according to a grouping result, to obtain the spatial index.
[0025] The aggregated visible points of interest are points of interest that need to be aggregated and rendered, and the number of the aggregated visible points of interest is multiple; the non-aggregated visible points of interest are points of interest that do not need to be aggregated and rendered, and the number of the non-aggregated visible points of interest is multiple.
[0026] Specifically, after obtaining the current field of view range, the aggregated visible points of interest and the non-aggregated visible points of interest in the current field of view range can be determined based on the spatial index, i.e., the visible groups in the current field of view range can be determined based on the spatial index, and the number of the visible groups is one or multiple, and the aggregated visible points of interest and the non-aggregated visible points of interest are determined based on the position information of the points of interest in the visible groups; wherein the visible group is a group in the current field of view range, i.e., a group that needs to be displayed at the current time (i.e., the current frame).
[0027] Specifically, the visible grids in the current field of view range can be determined based on the spatial range corresponding to each grid, the visible grids at this time are the visible groups, the visible interest points can be determined based on the position information of the interest points in the visible grids, then the number of the visible interest points in each visible grid is determined, the number of the visible interest points in the corresponding visible grid is obtained, and when the number of the visible interest points exceeds the preset aggregation threshold, it is indicated that the interest points to be displayed inside the grid are relatively dense, at this time, in order to avoid visual confusion, the visible interest points in the corresponding visible grid can be determined as the aggregated visible interest points; when the number of the visible interest points does not exceed the preset aggregation threshold, it is indicated that the interest points to be displayed inside the grid are relatively sparse, at this time, the visible interest points in the corresponding visible grid can be determined as the non-aggregated visible interest points. The visible grid is a grid in the current field of view range, that is, a grid that needs to be displayed at the current moment (that is, the current frame); the visible interest point is an interest point in the current field of view range, that is, a grid that needs to be displayed at the current moment; and the preset aggregation threshold is a number set in advance, which is used to represent a critical value that needs to be aggregated and displayed in order to avoid visual confusion.
[0028] In S130, attribute information of a representative point of the aggregated visible interest points in the same group is determined, the preset aggregation rendering attribute information and the attribute information of the representative point are determined as rendering attribute information of the corresponding representative point, and the rendering attribute information of the representative point is instantiated to obtain an aggregated instance of the corresponding representative point.
[0029] The representative point is a representative point obtained by merging the aggregated visible interest points in the same group, and the representative point can correspond to a real interest point or can not correspond to a real interest point; and the number of the representative points is the same as the number of the visible groups that need to be aggregated and displayed, and one visible group that needs to be aggregated and displayed corresponds to one representative point. The attribute information of the representative point can include position information and aggregation identification.
[0030] The preset aggregation rendering attribute information is rendering attribute information set in advance for the representative point according to an actual business scenario, and all the representative points correspond to the same preset aggregation rendering attribute information. The rendering attribute information is a set of visual feature parameters used to define how a spatial object is displayed on a screen, and is the core basis for rendering engines to draw objects; for example, the rendering attribute information can include position information, status code, color, icon type, and layer information. The rendering engine is a core software component for converting three-dimensional digital scene data into visual images, and is the "visual center" in the fields of computer graphics, game development, film animation, and map visualization. Through a series of complex algorithms and pipeline processes, abstract geometric data, material information, lighting conditions, and the like are converted into images that can be perceived by humans, and finally displayed on the display screen of an electronic device.
[0031] The aggregated instance is an instantiation object of the representative point in the rendering engine, and is a specific existence form of the representative point. The number of the aggregated instances is the same as the number of the representative points, and one representative point corresponds to one aggregated instance.
[0032] Specifically, after obtaining the aggregated visual interest points and the non-aggregated visual interest points, the attribute information of the representative points of the aggregated visual interest points in the same group can be determined, that is, for a current visual group in a plurality of visual groups that need to be aggregated and displayed, a center point of a spatial range corresponding to the current visual group can be calculated, and the center point is determined as a representative point of the aggregated visual interest points in the current visual group. Then, the position information corresponding to the representative point is determined, and the aggregated identifier of the representative point is generated, so as to obtain the attribute information of the representative point.
[0033] Then, the preset aggregated rendering attribute information is obtained, and the preset aggregated rendering attribute information and the attribute information of the representative point are determined as the rendering attribute information of the corresponding representative point. Then, instantiation is performed based on the rendering attribute information of the representative point to obtain the aggregated instance corresponding to the representative point, that is, for a current representative point in a plurality of representative points, the instantiation component can be used to perform instantiation based on the rendering attribute information of the current representative point to obtain the aggregated instance corresponding to the current representative point, and the instance index of the aggregated instance corresponding to the current representative point is generated. At this time, the instance index is a unique identifier of the aggregated instance. Then, the rendering attribute information of the current representative point is packaged and stored in the cache area of the graphics processing unit (GPU) based on the instance index in a preset format, for subsequent visualization rendering. The instantiation component can be an instanced static mesh (ISM) component or a hierarchical instanced static mesh (HISM) component.
[0034] S140, batch visualization rendering of the aggregated instances of the representative points and the individual instances of the non-aggregated visual interest points is performed by using the rendering engine.
[0035] The individual instance is an instantiation object of the interest point in the rendering engine, and is a specific existence form of the interest point. Optionally, the individual instance is obtained by instantiating the corresponding interest point based on the rendering attribute information of the interest point. It should be noted that the individual instance is generated in advance, that is, before S110, after the spatial index is constructed, the corresponding interest point is instantiated based on the rendering attribute information of the interest point to obtain the individual instance of the corresponding interest point.
[0036] Specifically, after obtaining the aggregated instance corresponding to the representative point, the aggregated instance of the representative point and the individual instance of the non-aggregated visual interest point can be batch visualized and rendered by using the rendering engine. For example, the aggregated instance of multiple representative points and the individual instance of multiple non-aggregated visual interest points can be batch drawn by using the instantiation rendering component in the rendering engine, that is, all the visual instances can be drawn by one or a small number of draw calls, so as to realize batch visualized rendering and reduce the number of draw calls.
[0037] The technical solution of the embodiment of the application can respond to the current map viewing operation of the user, determine the current field of view range based on the current map viewing operation, then determine the aggregated visual interest point and the non-aggregated visual interest point in the current field of view range based on the spatial index. The spatial index can improve the screening efficiency of the visual interest point, and can avoid rendering the interest points outside the current field of view range. Meanwhile, the visual interest points are divided into the aggregated visual interest points and the non-aggregated visual interest points, the aggregated rendering can be performed on the dense area of the visual interest points, thereby avoiding visual confusion and reducing the rendering lag, delay, and even crash phenomenon in the scene with a large number of visual interest points, and providing an accurate data basis for subsequent batch visualized rendering. Then, the attribute information of the representative point of the aggregated visual interest point in the same group is determined, the preset aggregated rendering attribute information and the attribute information of the representative point are determined as the rendering attribute information of the corresponding representative point, and the representative point is instantiated based on the rendering attribute information of the representative point to obtain the aggregated instance of the corresponding representative point. Subsequently, the aggregated instance of the representative point and the individual instance of the non-aggregated visual interest point are batch visualized and rendered by using the rendering engine. Through batch visualized rendering, the number of draw calls can be reduced, thereby reducing the burden of the graphic processor and improving the efficiency of the graphic processor, effectively reducing the rendering lag, delay, and even crash phenomenon, especially in the scene with a large number of interest points, meeting the demand of the power grid scene for large-scale spatial object visualization, and improving the user experience.
[0038] The method for visualizing a power grid map provided in the embodiment of the application is further described below. Figure 2 is another flowchart of the method for visualizing a power grid map provided in the embodiment of the application. The embodiment of the application is optimized on the basis of the above-mentioned embodiments. Referring to Figure 2 The method of the embodiment includes but is not limited to the following steps:
[0039] S210, in response to the current map viewing operation of the user, determining the current field of view range based on the current map viewing operation.
[0040] Optionally, the attribute information of the interest point can include position information and an identifier, and the spatial index is an octree. The construction process of the spatial index includes S a1-S a3.
[0041] Sai, establish an octree based on a spatial range of a preset region.
[0042] The bounding box of the root node of the octree is the spatial range of the preset region; the bounding box is a cuboid-shaped spatial range capable of containing all spatial objects (such as interest points) associated with a corresponding node; and the bounding box can be a cuboid.
[0043] Specifically, the spatial range of the preset region can be acquired, then a center point of the spatial range is determined as the root node, and the spatial range is determined as the bounding box of the root node, so as to construct the octree. At this time, the octree has only one root node, and the root node is a leaf node at this time.
[0044] Sa2, split nodes in the octree according to a preset splitting standard, and determine a leaf node to which a corresponding interest point belongs based on position information of each interest point.
[0045] The preset splitting standard can include that the number of interest points in a leaf node does not exceed a corresponding preset capacity threshold; the preset capacity threshold is a preset numerical value, used to represent the maximum number of interest points that a leaf node can include, and can be adjusted and set according to an actual business scenario, and the preset capacity thresholds corresponding to leaf nodes at different node depths are different.
[0046] Specifically, the preset capacity thresholds corresponding to different node depths can be set in advance according to an actual business scenario, and the larger the node depth is, the smaller the corresponding preset capacity threshold is, and there are multiple adjacent node depths corresponding to the same preset capacity threshold, then the corresponding relationship between the node depth and the preset capacity threshold is stored in the preset capacity relationship.
[0047] Thus, after the octree is established, for a current interest point in the plurality of interest points in the preset area, it is determined, based on position information of the current interest point, in which bounding box of which leaf node the current interest point is located, to obtain a leaf node corresponding to the current interest point, denoted as a current leaf node, and a preset capacity threshold corresponding to the current leaf node is obtained based on a node depth of the current leaf node by querying the preset capacity relationship. Then, it is determined whether the number of interest points in the current leaf node (i.e., the number of interest points stored in the current leaf node) exceeds the preset capacity threshold. If the number of interest points in the current leaf node does not exceed the preset capacity threshold, the current leaf node is determined as the leaf node to which the current interest point belongs. If the number of interest points in the current leaf node exceeds the preset capacity threshold, the current leaf node is taken as a parent node, denoted as a current parent node, and the bounding box of the current parent node is split into eight child cuboids of equal size. Then, the center point of each child cuboid is determined as a leaf node, and the spatial range corresponding to each child cuboid is determined as the bounding box of the corresponding leaf node, so as to split the current parent node into eight leaf nodes. Then, the interest points stored in the current parent node are redistributed into the eight leaf nodes. If the number of interest points in a leaf node exceeds the corresponding preset capacity threshold, node splitting is continuously performed until the leaf node to which the current interest point belongs is determined.
[0048] Then, other interest points in the plurality of interest points in the preset area are selected as the current interest point, and the above process is repeated, so as to determine the leaf node to which each interest point belongs.
[0049] Sa3, the position information and the identifier of each interest point are inserted into the leaf node to which the corresponding interest point belongs.
[0050] In the embodiments of the present application, the spatial index is set as an octree, and the position information and the identifier of each interest point in the preset area are inserted into the corresponding leaf node in the octree. The division level can be dynamically adjusted according to the spatial density and the node depth, the subdivision degree of the octree can be accurately controlled according to the actual business requirement, the calculation efficiency can be improved, and the implementation complexity can be reduced, thereby realizing multi-level partition management of the plurality of interest points in the preset area, improving the construction efficiency and the construction accuracy of the spatial index, adapting the spatial index to the actual business scenario, and realizing fast query to provide an accurate data basis for subsequent determination of the visible interest point.
[0051] S220, obtaining a previous field of view range corresponding to a previous map viewing operation of the user.
[0052] The previous map viewing operation is the map viewing operation of the user at the previous time; and the previous field of view range is a spatial area of the power grid map presented on the display screen of the electronic device under the previous map viewing operation of the user, i.e., the display range of the power grid map at the previous time.
[0053] S230, determine whether the deviation amount of the current field of view range and the previous field of view range exceeds a preset deviation threshold.
[0054] The preset deviation threshold is a numerical standard preset for measuring the difference degree of two field of view ranges, and is used to determine whether the change of the current field of view range compared with the previous field of view range reaches a degree that needs to update the rendering content. Optionally, the preset deviation threshold can include a preset position deviation threshold and a preset angle deviation threshold. The preset position deviation threshold is a numerical standard preset for measuring the position difference degree of the virtual camera at adjacent moments. The preset angle deviation threshold is a numerical standard preset for measuring the angle difference degree of the virtual camera at adjacent moments.
[0055] Specifically, the deviation amount of the current field of view range and the previous field of view range can be determined, that is, the position information and the angle information of the virtual camera at the current moment can be obtained to obtain the current position information and the current angle information, and the position information and the angle information of the virtual camera at the previous moment can be obtained to obtain the previous position information and the previous angle information. If the deviation amount between the current position information and the previous position information exceeds the preset position deviation threshold, and the deviation amount between the current angle information and the previous angle information exceeds the preset angle deviation threshold, it indicates that the rendering content on the display screen needs to be updated at the current moment. At this time, it can be determined that the deviation amount of the current field of view range and the previous field of view range exceeds the preset deviation threshold, and then the rendering state such as the aggregation state at the previous moment is emptied, and S240 is executed. Otherwise, it indicates that the rendering content on the display screen does not need to be updated at the current moment, and the rendering content of the display screen at the previous moment can be used, at this time, any aggregation state does not need to be updated, and S210 is executed to continue responding to the subsequent map viewing operation of the user.
[0056] S240, when the deviation amount of the current field of view range and the previous field of view range exceeds the preset deviation threshold, determining a plurality of visible leaf nodes in the current field of view range based on the bounding box of each node in the octree.
[0057] The visible leaf node is a leaf node in the current field of view range, that is, a leaf node that needs to be displayed at the current moment.
[0058] Specifically, when the deviation amount of the current field of view range and the previous field of view range exceeds the preset deviation threshold, each node in the octree can be traversed, the current field of view range is compared with the bounding box of each node, and the leaf node in the current field of view range is determined as the visible leaf node.
[0059] S250, determining a plurality of visible interest points in each visible leaf node based on the position information of the interest points in the current field of view range and each visible leaf node.
[0060] Specifically, for a current visible leaf node in the plurality of visible leaf nodes, position information of a plurality of interest points stored in the current visible leaf node can be acquired, and then the current field of view range is compared with the position information of the interest points, and the interest points within the current field of view range are determined as visible interest points, so as to determine the plurality of visible interest points in the current visible leaf node, and the identification of the visible interest points is acquired from the corresponding visible leaf node.
[0061] S260, determining the aggregated visible interest points and the non-aggregated visible interest points based on the number of visible interest points in each visible leaf node.
[0062] Specifically, the current rendering threshold can be determined based on the current map viewing operation, that is, the corresponding rendering threshold, that is, the current rendering threshold, can be obtained by querying the preset rendering threshold relationship based on the current position information and the current angle information of the virtual camera under the current map viewing operation; wherein the rendering threshold is a pre-set value, which is used to represent the critical value that needs to be aggregated for display in order to avoid visual confusion; the preset rendering threshold relationship is a mapping relationship pre-set according to actual business requirements, which is used to store the corresponding relationship between the position information, the angle information of the virtual camera and the rendering threshold; and the current rendering threshold is the rendering threshold at the current moment.
[0063] Then, for a current visible leaf node in the plurality of visible leaf nodes, the number of visible interest points in the current visible leaf node can be determined, and the number of visible interest points in the current visible leaf node is obtained. When the number of visible interest points in the current visible leaf node exceeds the current rendering threshold, it indicates that the interest points to be displayed inside the current visible leaf node are relatively dense, and at this time, in order to avoid visual confusion, the visible interest points in the current visible leaf node can be determined as aggregated visible interest points. When the number of visible interest points in the current visible leaf node does not exceed the current rendering threshold, it indicates that the interest points to be displayed inside the current visible leaf node are relatively sparse, and at this time, the visible interest points in the current visible leaf node can be determined as non-aggregated visible interest points. This can improve the calculation efficiency and reduce the implementation complexity, thereby improving the division accuracy and division efficiency of the aggregated visible interest points and the non-aggregated visible interest points, so as to avoid visual confusion and improve the user's use experience.
[0064] S270, determining the attribute information of the representative point of the aggregated visible interest points in the same group, determining the preset aggregated rendering attribute information and the attribute information of the representative point as the rendering attribute information of the corresponding representative point, and instantiating based on the rendering attribute information of the representative point to obtain the aggregated instance of the corresponding representative point.
[0065] Optionally, after instantiation based on the representative point-based rendering attribute information, the aggregated instance corresponding to the representative point is obtained, and a corresponding relationship between an instance index of the aggregated instance of the representative point and an associated identifier list of the corresponding representative point is written into a second preset relationship, wherein the associated identifier list includes identifiers of a plurality of visible interest points in a visible leaf node to which the corresponding representative point belongs; the second preset relationship includes the corresponding relationship between the instance index of the representative point and the associated identifier list. By saving the corresponding relationship between the instance index of the representative point and the associated identifier list, the representative point can be associated with the plurality of visible interest points in the visible leaf node to which the representative point belongs, thereby providing an accurate data basis for subsequent information viewing operations.
[0066] Optionally, the attribute information of each interest point is stored in a memory cache area, that is, the attribute information of each interest point in a preset area can be packaged and stored in the memory cache area according to a preset format based on the identifier. At this time, the attribute information includes all attribute information of the interest point, including the identifier, the position information, the state code, the layer identifier, the animation control code, and the device type and the like. The generation process of the individual instance includes Sb1-Sb3 as follows:
[0067] Sb1, the rendering attribute information in the attribute information of each interest point is obtained from the memory cache area based on the identifier of each interest point.
[0068] Specifically, the corresponding attribute information stored in the memory cache area is accessed based on the identifier of each interest point, and the rendering required attribute information is extracted from the corresponding attribute information, thereby obtaining the rendering attribute information of the corresponding interest point.
[0069] Sb2, instantiation is performed based on the rendering attribute information of each interest point, thereby obtaining the individual instance corresponding to the interest point, generating an instance index of each individual instance, and writing a corresponding relationship between the instance index of each interest point and the identifier into a first preset relationship.
[0070] The first preset relationship is used to store the corresponding relationship between the instance index of the interest point and the identifier.
[0071] Specifically, for a current interest point in each interest point, instantiation can be performed based on the rendering attribute information of the current interest point by using an instantiation component, thereby obtaining the individual instance corresponding to the current interest point, generating an instance index of the individual instance corresponding to the current interest point, and writing a corresponding relationship between the instance index of the current interest point and the identifier into the first preset relationship, thereby providing an accurate data basis for subsequent visualization rendering and information viewing operations.
[0072] Sb3, the rendering attribute information of the corresponding interest point is packaged and stored in the cache area of the graphics processor based on the instance index.
[0073] Specifically, for a current interest point in each interest point, rendering attribute information of the current interest point can be packaged and stored in a buffer area of a graphics processor based on an instance index in a preset format for subsequent visual rendering.
[0074] In the embodiments of the present application, each interest point is instantiated, and rendering attribute information of each interest point is stored in a buffer area of a graphics processor, which provides a data basis for subsequent merging of drawing calls of multiple visual interest points into one or a small number of times, reduces the overhead of frequent communication between a central processor and a graphics processor, and avoids redundant business attribute information (i.e., attribute information other than rendering attribute information) in an Actor component occupying the video memory of the graphics processor, thereby effectively utilizing the parallel computing capability of the graphics processor and providing an accurate data basis for subsequent batch visual rendering, so as to improve the rendering efficiency of large-scale interest points.
[0075] S280, querying a first preset relationship based on the identifiers of the multiple non-aggregated visual interest points to obtain a to-be-rendered instance index list.
[0076] The to-be-rendered instance index list is a collection of instance indexes of the multiple non-aggregated visual interest points.
[0077] Specifically, after obtaining the aggregated instances of the multiple representative points, the instance index of each non-aggregated visual interest point can be queried based on the first preset relationship to obtain the instance index of the corresponding non-aggregated visual interest point, and the instance indexes of the multiple non-aggregated visual interest points can be combined to obtain the to-be-rendered instance index list.
[0078] S290, using a rendering engine to obtain corresponding rendering attribute information from the buffer area of the graphics processor based on the instance index of the aggregated instances of the representative points and each instance index in the to-be-rendered instance index list, and performing batch visual rendering based on the rendering attribute information.
[0079] Specifically, the instantiation rendering component in the rendering engine can be used to obtain the rendering attribute information of the corresponding representative points from the buffer area of the graphics processor based on the instance index of the aggregated instances of the representative points, and obtain the rendering attribute information of the corresponding non-aggregated visual interest points from the buffer area of the graphics processor based on each instance index in the to-be-rendered instance index list, and then perform batch drawing of the aggregated instances of the multiple representative points and the individual instances of the multiple non-aggregated visual interest points based on the obtained rendering attribute information, i.e., all visual instances can be drawn by one or a small number of drawing calls, thereby realizing batch visual rendering and reducing the number of drawing calls.
[0080] Optionally, the rendering attribute information can further include an aggregation flag, i.e., setting the aggregation flag of the representative point as True and the aggregation flag of the visual interest point as False, thereby providing an accurate data basis for subsequent information viewing operations.
[0081] Optionally, after batch visualization rendering of the aggregated instance of the representative point and the individual instance of the non-aggregated visual interest point is performed by using the rendering engine, Sc1-Sc4 are further included:
[0082] Sc1, in response to a current information viewing operation of a user, determining a to-be-viewed instance index based on the current information viewing operation.
[0083] The current information viewing operation is an information viewing operation at a current time, which is a real-time interaction behavior of the user on the power grid map through an input device (such as a mouse, a keyboard, or a touch screen, etc.), and the purpose is to view detailed information of a specific point in the power grid map. The to-be-viewed instance index is an instance index corresponding to a point that the user wants to view detailed information at the current time, i.e., an instance index corresponding to the current information viewing operation of the user.
[0084] Specifically, the behavior of the user can be detected in real time, and when it is detected that the user clicks a point (i.e., a representative point or a non-aggregated visual interest point) in the display interface of the power grid map through an input device (such as a mouse, a keyboard, or a touch screen, etc.), it can be determined that the user triggers an information viewing operation, at this time, the current information viewing operation of the user can be responded to, and a screen coordinate corresponding to the current information viewing operation is determined, then a picking algorithm is used to determine an instance index corresponding to the screen coordinate, and the to-be-viewed instance index is obtained; the picking algorithm can be a color picking algorithm, a depth buffer picking algorithm, or a ray picking algorithm, etc., and the embodiments of the present application do not make specific limitations thereon, as long as the to-be-viewed instance index corresponding to the current information viewing operation can be obtained.
[0085] Sc2, determining whether the point corresponding to the to-be-viewed instance index is an interest point.
[0086] Specifically, after the to-be-viewed instance index is determined, the rendering attribute information corresponding to the to-be-viewed instance index can be obtained from the cache area of the graphics processor based on the to-be-viewed instance index, and whether the point corresponding to the to-be-viewed instance index is an interest point can be determined based on the aggregation flag in the rendering attribute information. If the aggregation flag in the rendering attribute information is True, it is determined that the point corresponding to the to-be-viewed instance index is a representative point, and Sc4 is executed. If the aggregation flag in the rendering attribute information is False, it is determined that the point corresponding to the to-be-viewed instance index is an interest point, and Sc3 is executed.
[0087] Sc3, when the point corresponding to the instance index to be viewed is a point of interest, obtaining the first detail information by querying the first preset relationship based on the instance index to be viewed, and obtaining the attribute information of the point of interest corresponding to the instance index to be viewed from the memory cache area based on the instance index to be viewed, and displaying the first detail information.
[0088] The instance index to be viewed is an identifier of the point of interest corresponding to the instance index to be viewed; and the first detail information is attribute information of the point of interest corresponding to the instance index to be viewed.
[0089] Sc4, when the point corresponding to the instance index to be viewed is a representative point, obtaining the second detail information by querying the second preset relationship based on the instance index to be viewed, and obtaining the attribute information of the point of interest corresponding to each identifier in the list of associated identifiers to be viewed from the memory cache area based on the list of associated identifiers to be viewed, and displaying the second detail information.
[0090] The list of associated identifiers to be viewed is a list of associated identifiers of the representative point corresponding to the instance index to be viewed; and the second detail information is a set of attribute information of all points of interest included in the list of associated identifiers to be viewed.
[0091] In the embodiments of the present application, the information viewing function can be implemented, the computing efficiency can be improved, the implementation complexity can be reduced, and thus the efficiency and accuracy of information viewing are improved, thereby improving the user experience.
[0092] Optionally, when the deviation amount between the current field of view and the previous field of view exceeds a preset deviation threshold, the second preset relationship at the previous moment is deleted, and the aggregated instance and the rendering attribute information corresponding to the representative point at the previous moment are deleted to clear the aggregation state at the previous moment and avoid misrendering.
[0093] Optionally, the current highlight selection operation of the user can be responded to, the instance index to be highlighted is determined based on the current highlight selection operation, and the rendering engine is used to update the rendering effect of the point corresponding to the instance index to be highlighted based on the preset highlight rendering attribute, wherein the preset highlight rendering attribute can include a preset highlight color value and a preset highlight self-luminous intensity, such as modifying the color value of the point corresponding to the instance index to be highlighted to the preset highlight color value and modifying the self-luminous intensity of the point corresponding to the instance index to be highlighted to the preset highlight self-luminous intensity, to implement the highlight selection function.
[0094] Optionally, in response to the current batch selection operation of the user, a to-be-selected instance index list is determined based on the current batch selection operation, and a rendering engine is used to update the rendering effect of each instance index point in the to-be-selected instance index list based on preset selection rendering attributes, wherein the preset selection rendering attributes can include a preset selection color value, and a flashing dotted border is displayed around the to-be-selected instance index list point by using the rendering engine, and the flashing dotted border can cover all points in the to-be-selected instance index list, so as to realize the batch selection function.
[0095] Optionally, in response to the current range filtering operation of the user, a to-be-displayed view range is determined based on the current range filtering operation, and S240 to S290 are executed based on the to-be-displayed view range to display the interest points in the to-be-displayed view range, so as to realize the range filtering function.
[0096] Optionally, different flashing attribute information can be set for different device types of interest points, such as red flashing for a fault device type and green flashing for a normal device type, so as to realize the classification flashing function.
[0097] The technical scheme of the embodiment of the present application can respond to the current map viewing operation of the user, determine a current view range based on the current map viewing operation, and obtain a previous view range corresponding to a previous map viewing operation of the user. Then, when the deviation between the current view range and the previous view range exceeds a preset deviation threshold, a plurality of visible leaf nodes in the current view range are determined based on the bounding box of each node in the octree. The lazy update mechanism can be realized, and the rendering content of the display screen is only updated when the deviation between the current view range and the previous view range exceeds the preset deviation threshold, thereby avoiding performance jitter caused by frequent updates. Then, a plurality of visible interest points in each visible leaf node are determined based on the position information of the interest points in the current view range and each visible leaf node. The visible leaf node is determined first, and then the visible interest points in the visible leaf node are determined. Compared with determining whether each interest point is a visible interest point one by one, the amount of calculation is effectively reduced, the calculation resources are saved, and the determination accuracy and efficiency of the visible interest points are improved. Then, the aggregated visible interest points and the non-aggregated visible interest points are determined based on the number of visible interest points in each visible leaf node. The function of dynamically switching the display granularity can be realized, that is, the merging rendering strategy is used at a long distance, and the real rendering strategy is used at a short distance, thereby avoiding visual confusion and improving the user experience.
[0098] After obtaining the aggregated instance of each representative point, the first preset relationship is queried based on the identification of the plurality of non-aggregated visual interest points, and the to-be-rendered instance index list is obtained, which can improve the calculation efficiency, reduce the implementation complexity, and further improve the determination accuracy and determination efficiency of the to-be-rendered instance index list; then, the rendering engine is used to obtain the corresponding rendering attribute information from the cache area of the graphics processor based on the instance index of the aggregated instance of the representative point and each instance index in the to-be-rendered instance index list, and batch visualization rendering is performed based on the rendering attribute information, which can reduce the number of drawing calls, realize the dynamic visualization capability without interrupting batch rendering, and further reduce the burden of the graphics processor and improve the efficiency of the graphics processor, thereby effectively reducing the phenomenon of lag, delay, or even crash during rendering, especially in scenes with a large number of interest points, meeting the demand of power grid scenes for large-scale spatial object visualization and improving the user experience.
[0099] Figure 3 is a structural schematic diagram of a visualization device of a power grid map provided by an embodiment of the present application, referring to Figure 3 The visualization device of the power grid map can include:
[0100] The first determination module 310 is configured to determine a current field of view range based on a current map viewing operation of a user in response to the current map viewing operation.
[0101] The second determination module 320 is configured to determine aggregated visual interest points and non-aggregated visual interest points in the current field of view range based on a spatial index, wherein the spatial index is obtained by grouping a plurality of interest points based on attribute information of the plurality of interest points in a preset area and constructing an index according to a grouping result.
[0102] The instantiation module 330 is configured to determine attribute information of a representative point of the aggregated visual interest points in the same group, determine preset aggregated rendering attribute information and the attribute information of the representative point as rendering attribute information of the corresponding representative point, and perform instantiation based on the rendering attribute information of the representative point to obtain an aggregated instance of the corresponding representative point.
[0103] The rendering module 340 is configured to perform batch visualization rendering on the aggregated instance of the representative point and individual instances of the non-aggregated visual interest points by using a rendering engine, wherein the individual instances are obtained by instantiating corresponding interest points based on rendering attribute information of the interest points.
[0104] In an embodiment, the attribute information of the interest point includes position information and an identifier, the spatial index is an octree, and the construction process of the spatial index in the second determining module 320 is as follows: an octree is established based on the spatial range of the preset region; the bounding box of the root node of the octree is the spatial range of the preset region; nodes in the octree are split according to a preset splitting criterion, and a leaf node to which a corresponding interest point belongs is determined based on the position information of each interest point; the preset splitting criterion includes that the number of interest points in a leaf node does not exceed a corresponding preset capacity threshold; and the position information and the identifier of each interest point are inserted into the leaf node to which the corresponding interest point belongs.
[0105] In an embodiment, the attribute information of each interest point is stored in a memory cache area, and the generation process of the individual instance in the rendering module 340 is as follows: the rendering attribute information in the attribute information of a corresponding interest point is obtained from the memory cache area based on the identifier of each interest point; the individual instance of the corresponding interest point is obtained by instantiating based on the rendering attribute information of each interest point, an instance index of each individual instance is generated, and a corresponding relationship between the instance index and the identifier of each interest point is written into the first preset relationship; and the rendering attribute information of the corresponding interest point is packed and stored into the cache area of the graphics processor based on the instance index.
[0106] In an embodiment, the second determining module 320 is specifically configured to: determine a plurality of visible leaf nodes in the current field of view range based on the bounding box of each node in the octree; determine a plurality of visible interest points in a corresponding visible leaf node based on the current field of view range and the position information of the interest points in each visible leaf node; and determine aggregated visible interest points and non-aggregated visible interest points based on the number of visible interest points in each visible leaf node.
[0107] In an embodiment, the second determining module 320 determines the aggregated visible interest points and the non-aggregated visible interest points based on the number of visible interest points in each visible leaf node, including: determining a current rendering threshold based on a current map viewing operation; for a current visible leaf node in the plurality of visible leaf nodes, when the number of visible interest points in the current visible leaf node exceeds the current rendering threshold, determining that the visible interest points in the current visible leaf node are aggregated visible interest points; and when the number of visible interest points in the current visible leaf node does not exceed the current rendering threshold, determining that the visible interest points in the current visible leaf node are non-aggregated visible interest points.
[0108] In an embodiment, the rendering module 340 is specifically configured to: query the first preset relationship based on the identifiers of the plurality of non-aggregated visible interest points to obtain a list of to-be-rendered instance indexes; and obtain corresponding rendering attribute information from the cache area of the graphics processor based on the instance index of the aggregated instance of the representative point and each instance index in the list of to-be-rendered instance indexes by using the rendering engine, and perform batch visualization rendering based on the rendering attribute information.
[0109] In an embodiment, the visualization device of the power grid map further comprises a determination module, which is specifically configured to: before determining the aggregated visual interest points and the non-aggregated visual interest points in the current field of view range based on the spatial index, acquire a previous field of view range corresponding to a previous map viewing operation of the user; and when a deviation between the current field of view range and the previous field of view range exceeds a preset deviation threshold, trigger the determination of the aggregated visual interest points and the non-aggregated visual interest points in the current field of view range based on the spatial index.
[0110] In an embodiment, the visualization device of the power grid map further comprises a writing module, which is specifically configured to: after the instantiation based on the rendering attribute information of the representative points is performed to obtain the aggregated instance of the corresponding representative point, write the corresponding relationship between the instance index of the aggregated instance of the representative point and the associated identifier list of the corresponding representative point into the second preset relationship; the associated identifier list comprises the identifiers of the multiple visual interest points in the visual leaf node to which the corresponding representative point belongs.
[0111] Correspondingly, the visualization device of the power grid map further comprises an information viewing module, which is specifically configured to: after the batch visualization rendering of the aggregated instance of the representative points and the individual instance of the non-aggregated visual interest points is performed by using the rendering engine, in response to a current information viewing operation of the user, determine a to-be-viewed instance index based on the current information viewing operation; when the point corresponding to the to-be-viewed instance index is an interest point, obtain a to-be-viewed identifier based on the to-be-viewed instance index by querying the first preset relationship, acquire attribute information of the corresponding interest point from the memory cache area based on the to-be-viewed identifier, obtain first detail information, and display the first detail information; when the point corresponding to the to-be-viewed instance index is a representative point, obtain a to-be-viewed associated identifier list based on the to-be-viewed instance index by querying the second preset relationship, acquire attribute information of the corresponding interest point from the memory cache area based on each identifier in the to-be-viewed associated identifier list, obtain second detail information, and display the second detail information.
[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above-described functional modules can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0113] The visualization device of the power grid map provided in this embodiment can be applied to the visualization method of the power grid map provided in any of the foregoing embodiments, and has corresponding functions and beneficial effects.
[0114] Figure 4 FIG. 1 is a structural schematic diagram of an electronic device provided in an embodiment of the present application.Figure 4 A block diagram of an exemplary electronic device 11 suitable for use in implementing embodiments of the application is shown. Figure 4 The electronic device 11 shown is merely one example. It should be appreciated that the functions and scope of the embodiments are not limited to the electronic device 11 shown.
[0115] As shown, the electronic device 11 is in the form of a general- purpose computing electronic device. Components of the electronic device 11 can include, but are not limited to, one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 to the processing unit 16. Figure 4 The bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration bus, a processor or local bus using any of a variety of bus architectures, and the like. By way of example, these architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0116] The electronic device 11 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by the electronic device 11 and includes both volatile and non- volatile media, removable and non-removable media.
[0117] The system memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 11 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 34 can be provided for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard drive").
[0118] Although not shown, a magnetic hard disk drive can also be used for a replacement or in addition to the removable, non-volatile magnetic media drive. Although not shown, a magnetic hard disk drive can also be used for a replacement or in addition to the removable, non-volatile magnetic media drive. Although not shown, a magnetic hard disk drive can also be used for a replacement or in addition to the removable, non-volatile magnetic media drive. Figure 4 In these instances, each drive might also be connected to the bus 18 via one or more data media interfaces. The system memory 28 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application. Figure 4
[0119] Program / utility 40 having a set of program modules 42 can be stored in system memory 28 by way of example, such program modules 42 include an operating system, one or more application programs, other program modules, and program data, each or some combination thereof, which may
[0120] Electronic device 11 can also communicate with one or more external devices 14 such as a keyboard or pointing device, a display 24, etc. ; one or more devices that enable a user to interact with electronic device 11 ; and / or one or more devices (e.g., a network card, modem, etc. ) that enable electronic device 11 to communicate with one or more other computing devices. Such communication can occur via Input / Output (I / O) interface 22. Still yet, electronic device 11 can communicate with one or more networks (such as one or more LANs, WANs, and / or the Internet through network adapter 20.
[0121] As shown, network adapter 20 communicates with the other components of electronic device 11 via bus 18. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with electronic device 11. Examples, include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc. Figure 4 It is to be appreciated that not shown in FIG. 1 are various other hardware and / or software modules, which can be used in conjunction with electronic device 11. Examples, include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0122] Processing unit 16 executes various program applications and page displays by running programs stored in system memory 28, such as implementing a method for visualizing a power grid map according to any embodiment of the present application.
[0123] A computer readable storage medium is provided in an embodiment of the present application, and the computer program is stored in the computer readable storage medium, and the computer program is executed by a processor to implement a method for visualizing a power grid map according to any embodiment of the present application.
[0124] The computer storage media of this embodiment can take the form of one or more combinations of computer-readable media. The computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, computer-readable storage media can be any tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
[0125] A computer-readable signal medium can include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
[0126] Program code embodied on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0127] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, application specific circuitry, or field programmable gate array (FPGA) circuitry can execute the computer program code.
[0128] Those skilled in the art should understand that each module or each step of the present application described above can be realized by a general computing device, which can be centralized on a single computing device or distributed on a network composed of multiple computing devices, and can be realized by computer device executable program code, so that it can be stored in a storage device and executed by a computing device, or it can be made into each integrated circuit module, or multiple modules or steps can be made into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
[0129] In addition, the acquisition, storage, use, processing and the like of data in the technical solutions of the present application comply with relevant provisions of laws and regulations.
[0130] Note that the above is only a preferred embodiment of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and those skilled in the art can make various obvious changes, re-adjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the inventive concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A method for visualizing a power grid map, characterized in that, The method comprises: determining a current field of view range based on a current map viewing operation of a user in response to the current map viewing operation; determining aggregated visible interest points and non-aggregated visible interest points within the current field of view range based on a spatial index; the spatial index is obtained by grouping a plurality of interest points based on attribute information of the plurality of interest points within a preset region and constructing an index according to a grouping result; determining attribute information of a representative point of the aggregated visible interest points within a same group, determining preset aggregated rendering attribute information and the attribute information of the representative point as rendering attribute information of the corresponding representative point, and instantiating based on the rendering attribute information of the representative point to obtain an aggregated instance of the corresponding representative point; performing batch visualization rendering on the aggregated instance of the representative point and individual instances of the non-aggregated visible interest points by using a rendering engine; the individual instances are obtained by instantiating corresponding interest points based on rendering attribute information of the interest points.
2. The method of visualizing a power grid map according to claim 1, characterized in that, The attribute information of the interest points comprises position information and an identifier, the spatial index is an octree, and a construction process of the spatial index is as follows: establishing an octree based on a spatial range of the preset region; a bounding box of a root node of the octree is the spatial range of the preset region; splitting nodes in the octree according to a preset splitting criterion, and determining a leaf node to which a corresponding interest point belongs based on position information of each interest point; the preset splitting criterion comprises that a number of interest points within a leaf node does not exceed a corresponding preset capacity threshold; inserting the position information and the identifier of each interest point into the leaf node to which the corresponding interest point belongs.
3. The method of visualizing a power grid map according to claim 2, characterized in that, The attribute information of each interest point is stored in a memory cache area, and a generation process of the individual instances is as follows: obtaining rendering attribute information in the attribute information of a corresponding interest point from the memory cache area based on an identifier of the interest point; instantiating based on the rendering attribute information of each interest point to obtain an individual instance of the corresponding interest point, generating an instance index of each individual instance, and writing a corresponding relationship between the instance index and the identifier of each interest point into a first preset relationship; packaging and storing the rendering attribute information of the corresponding interest point into a cache area of a graphics processing unit based on the instance index.
4. The method of visualizing a power grid map according to claim 3, characterized in that, The determination of the aggregated visible interest points and the non-aggregated visible interest points within the current field of view range based on the spatial index comprises: determining a plurality of visible leaf nodes within the current field of view range based on a bounding box of each node in the octree; determining a plurality of visible interest points within a corresponding visible leaf node based on position information of interest points within each visible leaf node and the current field of view range; determining the aggregated visible interest points and the non-aggregated visible interest points based on a number of visible interest points within each visible leaf node.
5. The method of visualizing a power grid map according to claim 4, characterized in that, The determination of the aggregated visible interest points and the non-aggregated visible interest points based on the number of visible interest points within each visible leaf node comprises: determining a current rendering threshold based on the current map viewing operation; For a current visible leaf node in the plurality of visible leaf nodes, when a number of visible interest points in the current visible leaf node exceeds the current rendering threshold, the visible interest points in the current visible leaf node are determined as the aggregated visible interest points; when the number of visible interest points in the current visible leaf node does not exceed the current rendering threshold, the visible interest points in the current visible leaf node are determined as the non-aggregated visible interest points.
6. The method for visualization of power grid maps according to claim 3, characterized in that, The batch visual rendering of the aggregated instance of the representative point and the individual instances of the non-aggregated visible interest points by the rendering engine comprises: querying the first preset relationship based on the identification of the plurality of non-aggregated visible interest points to obtain an instance index list to be rendered; acquiring corresponding rendering attribute information of the representative point from the cache area of the graphics processor based on the instance index of the aggregated instance of the representative point and each instance index in the instance index list to be rendered, and performing batch visual rendering based on the rendering attribute information.
7. The method of visualizing a power grid map of claim 1, wherein, Before determining the aggregated visible interest points and the non-aggregated visible interest points in the current field of view range based on the spatial index, further comprising: acquiring a previous field of view range corresponding to a previous map viewing operation of the user; when a deviation amount between the current field of view range and the previous field of view range exceeds a preset deviation threshold, triggering the determination of the aggregated visible interest points and the non-aggregated visible interest points in the current field of view range based on the spatial index.
8. The method for visualizing a power grid map according to claim 4, characterized in that, After instantiating based on the rendering attribute information of the representative point to obtain the aggregated instance of the corresponding representative point, further comprising: writing a corresponding relationship between the instance index of the aggregated instance of the representative point and an associated identification list of the corresponding representative point into a second preset relationship; the associated identification list comprises the identification of the plurality of visible interest points in the visible leaf node to which the corresponding representative point belongs; Correspondingly, after the batch visual rendering of the aggregated instance of the representative point and the individual instances of the non-aggregated visible interest points by the rendering engine, further comprising: in response to a current information viewing operation of the user, determining an instance index to be viewed based on the current information viewing operation; when the point corresponding to the instance index to be viewed is an interest point, querying the first preset relationship based on the instance index to be viewed to obtain an identification to be viewed, acquiring attribute information of the corresponding interest point from the memory cache area based on the identification to be viewed to obtain first detail information, and displaying the first detail information; when the point corresponding to the instance index to be viewed is a representative point, querying the second preset relationship based on the instance index to be viewed to obtain an associated identification list to be viewed, acquiring attribute information of the corresponding interest point from the memory cache area based on each identification in the associated identification list to be viewed to obtain second detail information, and displaying the second detail information.
9. An electronic device, comprising: The electronic device comprises at least one processor and a memory connected to the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the power grid map visualization method in any one of claims 1 to 8.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the power grid map visualization method in any one of claims 1 to 8.
Citation Information
Cited By
Production line equipment intelligent rendering method and system based on dynamic viewport detection
CN121280218A