A substation design drawing preview method and system based on density clustering
By using density-based clustering, interfering elements in substation design drawings are removed. By utilizing the model bounding box clustering algorithm, the problem of equipment drawing offset or invisibility is solved, and the correct rendering of equipment drawings and generation of datasets are achieved.
Patent Information
- Application Number
- CN202511029151.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-07-25
AI Technical Summary
Due to non-standard design or misoperation by equipment manufacturers, the substation design drawings contain interfering elements, causing the equipment drawings to be offset or invisible when the rendering engine performs the best preview according to the scene bounding box.
A density-based clustering method is adopted. By obtaining the input scene model list, unknown devices are eliminated, the model bounding boxes are calculated, a set of center points is formed and clustered, the main scene cluster is located, the model bounding boxes are merged for rendering, and interfering elements are eliminated to ensure the correct display of the device drawings.
It effectively solves the problem of equipment drawings being offset or invisible, improves the preview effect of design drawings, and ensures the correctness and completeness of equipment drawing sample data.
Smart Images

Figure CN120541900B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of drawing data making, in particular to a substation design drawing preview method and system based on density clustering. BACKGROUND
[0002] With the development of economy and the progress of society, the demand for electricity is growing, and the scale of the power system is expanding. As an important part of the power system, the design and construction of the substation also face higher requirements. The substation design drawing is an important achievement of the substation design, and accurate and clear drawings are crucial for the construction, construction and operation and maintenance of the substation.
[0003] Currently, in the substation design drawing, there are several device models. When making the device drawing dataset, according to the device block, these device models need to be extracted, and then rendered by the best preview algorithm to obtain an image, which is serialized and exported, that is, the automatic generation of device drawing sample data is realized.
[0004] However, due to the non-standard design or misoperation of the device manufacturer, many device drawings contain interference elements. Since the rendering engine defaults to the best preview according to the scene bounding box, the device drawing may be offset, or even almost invisible. SUMMARY
[0005] Therefore, the purpose of the present application is to provide a substation design drawing preview method and system based on density clustering, which aims to solve the problem that many device drawings contain interference elements due to the non-standard design or misoperation of the device manufacturer, and the device drawing may be offset or even almost invisible due to the rendering engine defaults to the best preview according to the scene bounding box.
[0006] To achieve the above purpose, the present application provides a substation design drawing preview method based on density clustering, which comprises:
[0007] Obtain an input scene model list, classify the models in the input scene, and remove unknown devices;
[0008] Calculate the model bounding box based on any model in the input scene model list, extract the center point to form a center point set, cluster the center point set, obtain the center point cluster, and locate the main scene cluster, wherein the main scene cluster is the center point cluster with the most center points;
[0009] Merge the model bounding boxes in the main scene cluster to form a main scene bounding box, and render the main scene bounding box.
[0010] According to an aspect of the above technical solution, the step of obtaining an input scene model list, classifying models in the input scene, and eliminating unknown devices includes:
[0011] Obtaining an input scene model list, classifying all scene graph models in the input scene based on devices, and setting the input scene as IS, IS=[M1, M2,..., M N ], wherein M is a scene graph model, N is the number of scene models and is a natural number;
[0012] Among them, the scattered graph model of the type that cannot be identified is marked as an unknown device, and the unknown device is eliminated.
[0013] According to an aspect of the above technical solution, the step of calculating the model bounding box based on any model in the input scene model list, extracting the center point, forming the center point set, clustering the center point set, obtaining the center point cluster, and positioning the main scene cluster includes:
[0014] Based on any scene graph model M in the input scene IS, the corresponding model bounding box is calculated through the model discrete vertex bounding box algorithm, and the center point C of the model bounding box is extracted. A plurality of center points C form a center point set CS, CS=[C1, C2,..., C N ];
[0015] Among them, the scene graph model M is discretized according to a preset accuracy, the scene graph model M is converted into a discrete point set, and the bounding box of the discrete point set is calculated. This bounding box is used as the model bounding box.
[0016] According to an aspect of the above technical solution, the step after forming the center point set includes:
[0017] Using a density-based clustering algorithm, all the center point sets are clustered, and a plurality of center point clusters CSS are formed, CSS=[CS1, CS2,..., CS L ], wherein L is the number of clustering classifications, the number of center point clusters is equal to the number of clustering classifications, and 1≤L≤N;
[0018] According to a plurality of center point clusters CSS, the set with the largest number of center points is calculated, which is defined as the main scene cluster, denoted as CS Z , Z is the main scene cluster number 1≤Z≤L, and the remaining center point clusters are interference clusters, and the corresponding models are interference models.
[0019] According to an aspect of the above technical solution, the specific steps of the density-based clustering algorithm include:
[0020] Define a sample point P, P={nClusterId,bKey,bVisited,ids}, wherein nClusterId is a cluster ID, bKey is whether it is a core object, bVisited is whether it is visited, and ids is a list of field data point serial numbers;
[0021] Initialize a sample point set PS, PS=[P1,P2,…,P N ], the sample points are one-to-one corresponding to the center points according to serial numbers, and each sample point is assigned values according to a preset rule, wherein the nClusterId bit is assigned a value of -1, the bKey bit is assigned a value of false, the bVisited bit is assigned a value of false, and the ids bit is assigned a value of empty;
[0022] Taking the sample point P as an origin and a radius R as a search range, other sample points in the range are searched, and serial numbers of the other sample points are recorded in the ids list of the sample point P, and range objects of all sample points are calculated in turn;
[0023] Based on the sample point P, if the number of range objects thereof is greater than a threshold MPC, the bKey bit of the sample point P is assigned a value of true, and the sample point P is defined as a core object, and if the number of range objects thereof is not greater than the threshold MPC, the bKey bit is not changed, wherein MPC is a minimum sample number, 1≤MPC≤N.
[0024] According to an aspect of the above technical solution, the step of rendering the main scene bounding box includes:
[0025] Obtaining a main scene cluster CS Z corresponding to a model list, denoted as MS Z , merging the model bounding boxes in the main scene cluster by a bounding box merging algorithm to form a main scene bounding box, and rendering the main scene bounding box using a rendering engine for blueprint preview.
[0026] The application further provides a power transformation design blueprint preview system based on density clustering, which is used to implement the power transformation design blueprint preview method based on density clustering.
[0027] The classification module is configured to obtain an input scene model list, classify the models in the input scene, and remove unknown devices.
[0028] A positioning module is configured to calculate a model bounding box based on any model in the input scene model list, extract a center point, form a center point set, cluster the center point set, obtain a center point cluster, and locate a main scene cluster, wherein the main scene cluster is a center point cluster containing the largest number of center points;
[0029] A rendering module is configured to merge the model bounding boxes in the main scene cluster to form a main scene bounding box, and render the main scene bounding box.
[0030] The application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the preview method for power transformation design drawings based on density clustering.
[0031] The application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the preview method for power transformation design drawings based on density clustering when executing the computer program.
[0032] In summary, according to the preview method for power transformation design drawings based on density clustering, the main scene model can be well divided out by calculating the model bounding box, clustering the center point set based on the density clustering algorithm, and forming the center point cluster after removing the interference elements, without the limitation of special cases, and the method has strong adaptability to engineering practice. Meanwhile, by using the hierarchical clustering idea for the mass of total station level graph element scene, the devices are clustered in units of graph elements to remove the interference graph elements, and this process can be accelerated by parallel computing because the calculations of the devices do not affect each other; then the total scene is clustered in units of devices to remove the interference devices, thereby ensuring the algorithm performance. The application solves the problem that, due to non-standard design or misoperation, a number of interference elements are introduced, the model deviates or even disappears when the rendering engine performs the best preview in the power transformation design drawing rendering process, improves the preview effect of the design drawing, and ensures the correctness of the device drawing sample data.
[0033] Additional aspects and advantages of the application will be given, partially in the following description, partially apparent from the following description, or understood from the practice of the application. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 A flow chart of the preview method for power transformation design drawings based on density clustering in the embodiment one of the application;
[0035] Figure 2 A structure schematic diagram of the preview system for power transformation design drawings based on density clustering in the embodiment three of the application;
[0036] Figure 3 This is a structural block diagram of the electronic device in Embodiment 5 of the present invention. Detailed Implementation
[0037] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0038] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0040] Example 1
[0041] like Figure 1 The diagram shows a flowchart of a substation design drawing preview method based on density clustering according to Embodiment 1 of the present invention. The substation design drawing preview method based on density clustering includes the following steps S01-S03, wherein:
[0042] S01. Obtain the input scene model list, classify the models in the input scene, and remove unknown devices.
[0043] Obtain the input scene model list, classify all primitive models in the input scene according to the device, and set the input scene as IS, IS=[M1,M2,…,M…]. N ], where M is the scene primitive model, N is the number of scene models and is a natural number, and scattered primitive models with unidentifiable types are marked as unknown devices and unknown devices are removed.
[0044] S02. Calculate the model bounding box based on any model in the input scene model list, extract the center points, form a set of center points, cluster the set of center points, obtain the center point cluster, and locate the main scene cluster, wherein the main scene cluster is the center point cluster containing the most center points.
[0045] For any scene primitive model M in the input scene IS, the corresponding model bounding box is calculated using the model discrete vertex bounding box algorithm, and the center point C of the model bounding box is extracted. Several center points C form a center point set CS, CS=[C1,C2,…,C2]. N ].
[0046] Among them, the discrete vertex bounding box algorithm is a fundamental method in computer graphics, computational geometry and 3D modeling for quickly describing the spatial extent of 3D models. Its core idea is to calculate the smallest geometric bounding box that can wrap the entire model by using the discrete vertex coordinates of the model, thereby simplifying the spatial calculation of complex models.
[0047] The model bounding box is calculated using the discrete vertex bounding box algorithm. First, the scene primitive model M is discretized according to a preset precision, which transforms the scene primitive model M into a set of discrete points. Then, the bounding box of the discrete point set is calculated, and this bounding box is used as the model bounding box of the model.
[0048] After forming the set of centroids, a density-based clustering algorithm is used to cluster all the centroid sets, forming several centroid clusters CSS, where CSS = [CS1, CS2, ..., CS...]. L ], where L is the number of clusters, the number of centroid clusters is equal to the number of clusters, and 1≤L≤N;
[0049] Based on several sets of center point clusters (CSS), the set with the most center points is defined as the main scene cluster, denoted as CS. Z Z is the main scene cluster number 1≤Z≤L, and the other center point clusters are interference clusters, and their corresponding models are interference models.
[0050] Furthermore, the specific steps of the density-based clustering algorithm are as follows:
[0051] Define a sample point P, P={nClusterId,bKey,bVisited,ids}, where nClusterId is the cluster ID, bKey is whether it is a core object, bVisited is whether it is accessed, and ids is a list of domain data point numbers;
[0052] Initialize the sample point set PS, PS=[P1,P2,…,P…] N The sample points and the center point correspond one-to-one according to the serial number. Each sample point is assigned a value according to a preset rule, wherein the nClusterId bit is assigned a value of -1, the bKey bit is assigned a value of false, the bVisited bit is assigned a value of false, and the ids bit is assigned a value of empty.
[0053] With the sample point P as the origin, with a radius R as the search range, find other sample points in the range, and record the serial number of other sample points in the ids list of the sample point P, and sequentially calculate the range objects of all sample points;
[0054] Based on the sample point P, if the number of its range objects is greater than the threshold MPC, the bKey bit of the sample point P is assigned as true, and it is defined as a core object, and if the number of its range objects is not greater than the threshold MPC, the bKey bit is unchanged, wherein MPC is the minimum sample number, 1≤MPC≤N.
[0055] Further, the clustering process is (taking sample point P as an example):
[0056] Define the cluster serial number nClusterId of all center point clusters as 0, and query the sample points in the sample point set (before querying, it has been determined whether the sample point is a core object), if the sample point P has not been accessed, and the sample point P is a core object (at this time, the sample point P has been accessed), set the access mark bVisited of the sample point P as true, set the cluster ID serial number of the sample point P as nClusterId (i.e. 0), and continue to query the ids list of the current sample point P.
[0057] If the field object NP has not been accessed (at this time, the field object NP has been accessed), set the access mark bVisited of the field object NP as true, and set the cluster ID serial number of the field object NP as nClusterId (this step classifies the object NP and the sample point P into a cluster), if the field object NP is also a core object, repeat the above access steps of the field object NP, if the object NP is not a core object, the cluster serial number nClusterId of all center point clusters is incremented by 1, i.e. the next clustering is performed.
[0058] Through the above clustering method, the objects in the ids list of the sample point P (i.e. within the range with a radius R) are clustered into a center point cluster, which is used for subsequent positioning of a main scene cluster.
[0059] S03, merge the model bounding boxes in the main scene cluster to form a main scene bounding box, and render the main scene bounding box.
[0060] Obtain the main scene cluster CS Z The corresponding model list is denoted as MS Z , merge the model bounding boxes in the main scene cluster to form a main scene bounding box by a bounding box merging algorithm, and use a rendering engine to render the main scene bounding box, which is used for drawing preview.
[0061] Specifically, in the process of carrying out the substation AI recognition modeling intelligent design project research, it is necessary to carry out AI recognition on the substation design drawings, and to realize type recognition of the equipment in the substation design drawings by using artificial intelligence technology. The first step of the project research is to automatically generate the equipment drawing data set. There are many substation design drawings, and each equipment in the drawings has been manually labeled with type. It is necessary to automatically extract the equipment graphics and generate the equipment image, and finally form the equipment drawing data set. However, after extracting the equipment graphics and rendering, it is found that there are a large number of devices that appear position offset after best preview, or even almost invisible, which seriously affects the quality of the data set.
[0062] The algorithm of the present application can well eliminate the interference graph elements in the equipment, and then the image obtained by best preview after rendering of the equipment graphics meets the needs of AI model training.
[0063] The case application method is as follows:
[0064] For the equipment D, there are N graph element models, that is, D=[E1, E2, …, En]. N ]。
[0065] According to the method of the present application, the interference graph elements are eliminated, the main scene bounding box of the equipment is obtained, and the equipment rendering image obtained by best preview with the equipment main scene bounding box parameters can be used as the sample of the current equipment.
[0066] According to this method, the equipment drawing data set can be obtained by executing the method device by device.
[0067] In summary, according to the substation design drawing preview method based on density clustering proposed by the present application, after eliminating the interference elements, the center point set is clustered by using the density-based clustering algorithm to form the center point cluster, which can well divide the main scene model and does not exist special case limitation, and has strong adaptability to engineering practice application. At the same time, for the mass graph element scene of the whole station level, the hierarchical clustering idea is adopted, the equipment is clustered as a unit, the interference graph elements are eliminated, this process can be accelerated by parallel computing because the calculations of each device do not affect each other; then the whole scene is clustered as a unit, the interference equipment is eliminated, and the algorithm performance is ensured. The present application solves the problem that in the process of rendering the substation design drawings, due to non-standard design or misoperation, a number of interference elements are introduced, which causes the model to deviate or even disappear when the rendering engine performs best preview, improves the preview effect of the design drawings, and ensures the correctness of the equipment drawing sample data.
[0068] Embodiment two
[0069] Different from embodiment one, after classifying all scene graph models in the input scene based on the device and removing the unknown device, the interference device can be removed through hierarchical clustering:
[0070] Taking the case application in embodiment one as an example, the scene graph in this embodiment is consistent with the graph model in the case application in embodiment one.
[0071] Supposing that the input scene is IS2, IS2=[E1, E2, …, E N ], E is a scene graph, and N is the number of scene graphs;
[0072] The scene graph is reorganized in the unit of device blocks, so IS2=[D1, D2, …, D K ], K is the number of scene devices. Any device block D q =[E1, E2, …, E H ], H is the number of graphs of the current device. In addition, there are some scattered graphs in the real transformer design drawing, which are not organized into device blocks. These scattered graphs are a device block for one graph, and do not participate in the interference graph removal calculation of the device block, but directly participate in the scene interference device block removal calculation.
[0073] According to the interference element removal algorithm based on density, the interference graph removal of the device block D q is realized, and the main scene bounding box DB of the device block D q is obtained. According to this method, the algorithm calculation is performed on all device blocks, and parallel calculation is used to accelerate the process.
[0074] Taking the scene device list as input, the interference graph removal is realized according to the interference element removal algorithm based on density, and the main scene bounding box of the entire transformer design drawing is obtained.
[0075] Taking the main scene bounding box of the transformer design drawing as input, scene rendering is performed to realize the best preview of the entire drawing.
[0076] Embodiment three
[0077] Another aspect of the application also provides a transformer design drawing preview system based on density clustering, please refer to Figure 2 , which is a structural schematic diagram of the transformer design drawing preview system based on density clustering in embodiment three of the application. The transformer design drawing preview system based on density clustering comprises:
[0078] A classification module 11 is used to obtain an input scene model list, classify the models in the input scene, and remove unknown devices;
[0079] The positioning module 12 is used to calculate the model bounding box based on any model in the input scene model list, extract the center point, form a center point set, cluster the center point set, obtain the center point cluster, and locate the main scene cluster, wherein the main scene cluster is the center point cluster containing the most center points.
[0080] The rendering module 13 is used to merge the model bounding boxes in the main scene cluster to form the main scene bounding box, and to render the main scene bounding box.
[0081] Obtain the input scene model list, classify all primitive models in the input scene according to the device, and set the input scene as IS, IS=[M1,M2,…,M…]. N ], where M is the scene primitive model, N is the number of scene models and is a natural number, and scattered primitive models with unidentifiable types are marked as unknown devices and unknown devices are removed.
[0082] For any scene primitive model M in the input scene IS, the corresponding model bounding box is calculated using the model discrete vertex bounding box algorithm, and the center point C of the model bounding box is extracted. Several center points C form a center point set CS, CS=[C1,C2,…,C2]. N ].
[0083] Among them, the discrete vertex bounding box algorithm is a fundamental method in computer graphics, computational geometry and 3D modeling for quickly describing the spatial extent of 3D models. Its core idea is to calculate the smallest geometric bounding box that can wrap the entire model by using the discrete vertex coordinates of the model, thereby simplifying the spatial calculation of complex models.
[0084] The model bounding box is calculated using the discrete vertex bounding box algorithm. First, the scene primitive model M is discretized according to a preset precision, which transforms the scene primitive model M into a set of discrete points. Then, the bounding box of the set of discrete points is calculated, and this bounding box is used as the model bounding box of the model.
[0085] After forming the set of centroids, a density-based clustering algorithm is used to cluster all the centroid sets, forming several centroid clusters CSS, where CSS = [CS1, CS2, ..., CS...]. L ], where L is the number of clusters, the number of centroid clusters is equal to the number of clusters, and 1≤L≤N;
[0086] Based on several sets of center point clusters (CSS), the set with the most center points is defined as the main scene cluster, denoted as CS. Z Z is the main scene cluster number 1≤Z≤L, and the other center point clusters are interference clusters, and their corresponding models are interference models.
[0087] Further, the specific steps of the density-based clustering algorithm are as follows:
[0088] Define a sample point P, P={nClusterId, bKey, bVisited, ids}, wherein nClusterId is a cluster ID, bKey is whether it is a core object, bVisited is whether it is visited, and ids is a list of domain data point serial numbers;
[0089] Initialize a sample point set PS, PS=[P1, P2, …, P N ], which is one-to-one corresponding to the center point according to the serial number, and each sample point is assigned values according to a predetermined rule, wherein the nClusterId bit is assigned a value of -1, the bKey bit is assigned a value of false, the bVisited bit is assigned a value of false, and the ids bit is assigned a value of empty;
[0090] Take the sample point P as the origin and a radius R as the search range, find other sample points in the range, record the serial numbers of the other sample points in the ids list of the sample point P, and sequentially calculate the range objects of all sample points;
[0091] Based on the sample point P, if the number of its range objects is greater than a threshold MPC, the bKey bit of the sample point P is assigned a value of true, and it is defined as a core object, and if the number of its range objects is not greater than the threshold MPC, the bKey bit value remains unchanged, wherein MPC is the minimum sample number, 1≤MPC≤N.
[0092] Further, the clustering process is as follows (taking the sample point P as an example):
[0093] Define the cluster serial number nClusterId of all center point clusters as 0, and query the sample points in the sample point set (before the query, it is determined whether the sample point is a core object), if the sample point P has not been visited and the sample point P is a core object (at this time, the sample point P has been visited), set the access mark bVisited of the sample point P to true, set the cluster ID serial number of the sample point P to nClusterId (i.e. 0), and continue to query the ids list of the current sample point P;
[0094] If the domain object NP has not been visited (at this time, the domain object NP has been visited), set the access mark bVisited of the domain object NP to true, and set the cluster ID serial number of the domain object NP to nClusterId (this step classifies the object NP and the sample point P into a cluster), if the domain object NP is also a core object, repeat the above access steps of the domain object NP, and if the object NP is not a core object, the cluster serial number nClusterId of all center point clusters is incremented by 1, i.e. the next clustering is performed.
[0095] By the above clustering manner, the objects in the ids list of the sample point P (i.e. in the range with the radius R) are clustered into a center point cluster, for subsequent positioning of a main scene cluster.
[0096] Obtain the main scene cluster CS Z The corresponding model list is denoted as MS Z By the bounding box merging algorithm, the model bounding boxes in the main scene cluster are merged to form a main scene bounding box, and the rendering engine is used to render the main scene bounding box for blueprint preview.
[0097] Specifically, in the process of carrying out the AI recognition and modeling intelligent design project of the substation, AI recognition needs to be carried out on the substation design blueprint, and the type of the equipment in the substation design blueprint is identified by using artificial intelligence technology. The first step of the project research is to automatically generate the equipment blueprint data set. There are many design blueprints of substations, and each equipment in the blueprint has been manually labeled with the type. The equipment graphics need to be automatically extracted, and the equipment images need to be generated, so as to finally form the equipment blueprint data set. However, after the equipment graphics are extracted and rendered, it is found that there are a large number of devices that appear position deviation or even almost invisible after the best preview, which seriously affects the quality of the data set.
[0098] The algorithm can well eliminate the interference graphics in the equipment, and the image obtained by the best preview after the equipment graphics are rendered meets the needs of AI model training.
[0099] The case application method is as follows:
[0100] For the equipment D, there are N graphic models, that is, D=[E1, E2, …, EN]. N ]。
[0101] According to the method of the application, the interference graphics are eliminated, the main scene bounding box of the equipment is obtained, the equipment main scene bounding box parameters are used for the best preview, and a better equipment rendering image can be obtained as the sample of the current equipment.
[0102] According to the method, the equipment blueprint data set can be obtained.
[0103] In summary, according to the substation design drawing preview system based on density clustering provided by the present application, firstly, after the interference elements are removed, the center point set is clustered by using the density-based clustering algorithm through the calculation of the model bounding box, and the center point cluster is formed, so that the main scene model can be well divided out, and there is no special case limitation, and the adaptability to engineering practice application is relatively strong. At the same time, for the mass of the total station level graphic element scene, the hierarchical clustering idea is adopted, the devices are clustered in the graphic element unit, and the interference graphic elements are removed, and this process can be accelerated by using parallel computing, because the calculations of the devices are not affected each other; then the whole scene is clustered in the device unit, and the interference devices are removed, and then the algorithm performance is ensured. The present application solves the problem that in the substation design drawing rendering process, due to the non-standard design or misoperation, after introducing a number of interference elements, the model deviates or even disappears when the rendering engine executes the best preview, improves the design drawing preview effect, and ensures the correctness of the device drawing sample data.
[0104] Embodiment four
[0105] In another aspect, the present application further provides a computer readable storage medium, which stores one or more computer programs, and the programs are executed by a processor to realize the above-mentioned substation design drawing preview method based on density clustering.
[0106] Those skilled in the art can understand that the logic or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequence list of executable instructions for realizing the logic function, which can be specifically embodied in any computer readable storage medium for use by or in combination with an instruction execution system, device or equipment (such as a computer-based system, a system including a processor or other system that can fetch and execute instructions from the instruction execution system, device or equipment). For the present specification, the "computer readable storage medium" can be any device that can contain, store, communicate, propagate or transmit programs for use by or in combination with the instruction execution system, device or equipment.
[0107] More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires (electrical device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer readable storage medium can also be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example via an optical scanner, then compiled, interpreted, or otherwise processed, and stored in a computer memory in order to be executed.
[0108] Embodiment Five
[0109] Figure 3 A structural block diagram of an electronic device is provided for Embodiment Five. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the density clustering based substation design drawing preview method in the above embodiments when executing the program. Figure 3 The electronic device 30 shown is merely an example and should not limit the function and use range of the embodiments of the present application.
[0110] As shown in Figure 3 The electronic device 30 can be in the form of a general computing device, for example, it can be a server device. The components of the electronic device 30 can include, but are not limited to, the above-mentioned at least one processor 31, the above-mentioned at least one memory 32, and a bus 33 connecting different system components, including the memory 32 and the processor 31.
[0111] The bus 33 includes a data bus, an address bus, and a control bus.
[0112] The memory 32 can include volatile memory, such as a RAM 321 (Random Access Memory), and / or cache memory 322, and can further include a ROM 323 (Read-Only Memory).
[0113] The memory 32 can further include a program tool 325 having a set of (at least one) program modules 324, such as an operating system, one or more application programs, other program modules, and program data, and each of these examples or some combination thereof can include implementation of a network environment.
[0114] The processor 31 performs various function applications and data processing by running the computer program stored in the memory 32, such as the density clustering based substation design drawing preview method of the present application as described above.
[0115] The electronic device 30 can also communicate with one or more external devices 34 such as a keyboard or a pointing device, by way of I / O interface 35. Furthermore, the model generation electronic device 30 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the public network, such as the Internet, by way of the network adapter 36. As Figure 3 illustrated, the network adapter 36 communicates with the other modules of the model generation electronic device 30 by way of the bus 33. It should be appreciated that other hardware and / or software modules that can be used in conjunction with the model generation electronic device 30 include, but are not limited to: microcode, device drivers, redundant processing units, disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0116] It should be noted that although several means / modules or sub-means / modules of the electronic device are mentioned in the foregoing detailed description, such a division is merely exemplary and not mandatory. Indeed, according to an embodiment of the application, the features and functions of two or more means / modules described above can be embodied in one means / module. Conversely, the features and functions of one means / module described above can be further divided into several means / modules.
[0117] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0118] The above-described embodiments are merely some embodiments of the present application, and the description is relatively specific and detailed, but it should not be understood as limiting the scope of the present application. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the scope of the present application should be subject to the appended claims.
Claims
1. A density clustering based substation design drawing preview method, characterized in that, The transformer design drawing preview method based on density clustering comprises: Obtaining an input scene model list, classifying models in an input scene, and eliminating unknown devices; Calculating a model bounding box based on any model in the input scene model list, extracting a center point, forming a center point set, adopting a density-based clustering algorithm to cluster all the center point set, and forming a plurality of center point clusters CSS, CSS=[CS1, CS2, …, CSL], wherein L is a clustering classification number, the number of the center point clusters is equal to the clustering classification number, 1≤L≤N, and a center point number of a largest set is calculated according to the plurality of center point clusters CSS, and the center point number of the largest set is defined as a main scene cluster, and is recorded as CSZ, wherein Z is a main scene cluster serial number, 1≤Z≤L, and the remaining center point clusters are interference clusters, and the corresponding models are interference models, wherein the specific steps of the density-based clustering algorithm comprise: Defining a sample point P, P={nClusterId, bKey, bVisited, ids}, wherein nClusterId is a cluster ID, bKey is whether a core object, bVisited is whether visited, and ids is a domain data point serial number list; Initializing a sample point set PS, PS=[P1, P2, …, PN], the sample points and the center points are one-to-one corresponding according to serial numbers, and each sample point is assigned values according to a preset rule, wherein nClusterId is assigned a value of -1, bKey is assigned a value of false, bVisited is assigned a value of false, and ids is assigned an empty value; Taking the sample point P as an origin and a radius R as a search range, other sample points in the range are found, and serial numbers of the other sample points are recorded in the ids list of the sample point P, and range objects of all sample points are calculated in turn; Based on the sample point P, if the number of the range objects is greater than a threshold value MPC, the bKey bit of the sample point P is assigned a value of true, and the sample point P is defined as a core object, and if the number of the range objects is not greater than the threshold value MPC, the bKey bit is not changed, wherein MPC is a minimum sample number, 1≤MPC≤N; Defining a cluster serial number nClusterId of all the center point clusters as 0, and querying sample points in the sample point set, if the sample point P is not visited and the sample point P is a core object, the access mark bVisited of the sample point P is set to true, the cluster ID serial number of the sample point P is set to nClusterId, the ids list of the current sample point P is continuously queried, if the domain object NP is not visited, the access mark bVisited of the domain object NP is set to true, the cluster ID serial number of the domain object NP is set to nClusterId, if the domain object NP is also a core object, the above access step of the domain object NP is repeated, if the object NP is not a core object, the cluster serial number nClusterId of all the center point clusters is increased by 1, that is, the next clustering is performed, and the center point cluster containing the largest number of center points is positioned as the main scene cluster. Merge the model bounding boxes in the main scene cluster to form a main scene bounding box, and render the main scene bounding box.
2. The density clustering based substation design drawing preview method of claim 1, wherein, The step of obtaining the input scene model list, classifying the models in the input scene, and eliminating unknown devices includes: Obtaining an input scene model list, classifying all scene graph models in the input scene based on devices, and setting the input scene as IS, IS=[M1, M2, …, M N ], wherein M is a scene graph model, N is the number of scene models and is a natural number; Wherein, the scattered primitive model of the unrecognized type is marked as an unknown device, and the unknown device is eliminated.
3. The density clustering based substation design drawing preview method of claim 1, wherein, The step of calculating the model bounding box based on any model in the input scene model list and extracting the center point to form a center point set includes: Based on any scene primitive model M in the input scene IS, a model discrete vertex bounding box algorithm is used to calculate a corresponding model bounding box, and a center point C of the model bounding box is extracted. A plurality of center points C form a center point set CS, CS=[C1, C2, …, Cn], wherein n is a positive integer. N ] Wherein, the scene primitive model M is discretized according to a preset accuracy, the scene primitive model M is converted into a discrete point set, a bounding box is calculated for the discrete point set, and the bounding box is taken as the model bounding box.
4. The density clustering based substation design drawing preview method of claim 1, wherein, The step of merging the model bounding boxes in the main scene cluster to form a main scene bounding box, and rendering the main scene bounding box includes: Obtain a model list corresponding to the main scene cluster CSZ, denoted as MS Z Merge the model bounding boxes in the main scene cluster by a bounding box merging algorithm to form a main scene bounding box, and use a rendering engine to render the main scene bounding box for blueprint preview.
5. A density clustering based substation design drawing preview system, characterized by, The transformer design drawing preview system based on density clustering is used to implement the transformer design drawing preview method based on density clustering in any one of claims 1-4, and the system includes: A classification module is configured to obtain an input scene model list, classify models in an input scene, and eliminate unknown devices. A positioning module is configured to calculate a model bounding box based on any model in the input scene model list, extract a center point, form a center point set, perform clustering on all the center point sets by using a density-based clustering algorithm, form a plurality of center point clusters CSS, CSS=[CS1, CS2, …, CSL], where L is a clustering classification number, the number of the center point clusters is equal to the clustering classification number, 1≤L≤N, a set with the largest number of center points is calculated according to the plurality of center point clusters CSS, and is defined as a main scene cluster, denoted as CSZ, where Z is a main scene cluster serial number, 1≤Z≤L, and the remaining center point clusters are interference clusters, and the corresponding models are interference models. A sample point P is defined, P={nClusterId, bKey, bVisited, ids}, where nClusterId is a cluster ID, bKey is whether it is a core object, bVisited is whether it is visited, and ids is a domain data point serial number list. A sample point set PS is initialized, PS=[P1, P2, …, PN], the sample points and the center points are one-to-one corresponding according to serial numbers, and each sample point is assigned values according to a preset rule, where the nClusterId bit is assigned a value of -1, the bKey bit is assigned a value of false, the bVisited bit is assigned a value of false, and the ids bit is assigned an empty value. Other sample points within the search range are found with the sample point P as the origin and a radius R as the search range, the serial numbers of the other sample points are recorded in the ids list of the sample point P, and the range objects of all the sample points are sequentially calculated. Based on the sample point P, if the number of its range objects is greater than a threshold MPC, the bKey bit of the sample point P is assigned as true, and the sample point P is defined as a core object, if the number of its range objects is not greater than the threshold MPC, the bKey bit is unchanged, wherein MPC is a minimum sample number, 1≤MPC≤N; Defining the cluster serial number nClusterId of all the center point clusters as 0, and querying the sample points in the sample point set, if the sample point P is not visited, and the sample point P is a core object, setting the visit mark bVisited of the sample point P as true, setting the cluster ID serial number of the sample point P as nClusterId, and continuing to query the ids list of the current sample point P, if the range object NP is not visited, setting the visit mark bVisited of the range object NP as true, setting the cluster ID serial number of the range object NP as nClusterId, if the range object NP is also a core object, repeating the above visit step of the range object NP, if the object NP is not a core object, the cluster serial number nClusterId of all the center point clusters is increased by 1, that is, the next clustering is performed, and the center point cluster containing the largest number of center points is positioned as the main scene cluster; The rendering module is used for merging the model bounding boxes in the main scene cluster to form a main scene bounding box, and rendering the main scene bounding box.
6. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the substation design drawing preview method based on density clustering according to any one of claims 1-4.
7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the substation design drawing preview method based on density clustering according to any one of claims 1-4.
Citation Information
Patent Citations
Model merging method in three-dimensional scene and model merging device thereof
CN106327572A
Data processing method, device and equipment of game scene, and readable storage medium
CN110368694A
Generation method and device of proxy model in virtual scene and electronic equipment
CN115837163A