A light-weight method and system for power transmission three-dimensional model
By splitting the three-dimensional transmission engineering model, calculating the description operator and building the HLOD scene tree, the problem of long calculation time in the three-dimensional transmission line engineering simulation process in the existing technology is solved, and the lightweight processing of the three-dimensional transmission engineering model is realized, which improves the Work efficiency.
Patent Information
- Application Number
- CN202411186867.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-08-28
AI Technical Summary
In the three-dimensional transmission line engineering simulation process, the existing technology has a long calculation time due to the large scene scale and complex data, which increases the processing time of staff and reduces work efficiency.
By splitting the three-dimensional transmission engineering model into component lists, the description operator of the component model is calculated in real time, and the HLOD scene tree is constructed in the target space, the instance model and the HLOD scene tree are exported, and the lightweight processing of the three-dimensional transmission engineering model is realized. .
It effectively reduces data processing volume, improves work efficiency, shortens calculation and processing time, and improves the lightweight processing efficiency of the three-dimensional transmission engineering model.
Smart Images

Figure CN118691753B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for lightweighting a three-dimensional power transmission model. Background Art
[0002] With the advancement of science and technology and the rapid development of productivity, Web3D technology has become increasingly mature and has been widely used in many fields, bringing certain conveniences to people.
[0003] Among them, with the increasing demand for online three-dimensional visualization, the complexity, data volume and scene scale of three-dimensional models required to be carried by Web3D systems such as digital twins and digital cities are also increasing day by day.
[0004] Furthermore, in the field of power transmission technology, before actual construction, most of the existing technologies need to construct a corresponding three-dimensional transmission line project and simulate the actual transmission scenario to perform corresponding transmission simulation. However, due to the large scale of the existing three-dimensional transmission line project scenario and the complex data, the simulation process requires a long calculation time and processing time, which in turn increases the processing time of the staff and reduces work efficiency. Summary of the invention
[0005] Based on this, the purpose of the present invention is to provide a method and system for lightweighting a three-dimensional power transmission model to solve the problem that the prior art requires a long computing time and processing time during the simulation process, which increases the processing time of the staff and correspondingly reduces work efficiency.
[0006] The first aspect of the embodiment of the present invention proposes:
[0007] A method for lightweighting a three-dimensional power transmission model, wherein the method comprises:
[0008] Splitting the received three-dimensional power transmission engineering model into a corresponding component list based on a first preset rule, and correspondingly detecting a plurality of component models included in the component list;
[0009] Calculate the description operator corresponding to each component model in real time according to the first preset algorithm, and construct the corresponding target flyweight space according to the component list and the description operator;
[0010] Based on a second preset rule, constructing in real time in the target flyweight space an HLOD scene tree corresponding to the component list, wherein the HLOD scene tree includes a plurality of LOD models;
[0011] The corresponding instance models are exported in real time according to the plurality of LOD models, and the HLOD scene tree is exported synchronously, so as to complete the lightweight processing of the three-dimensional power transmission engineering model.
[0012] The beneficial effect of the present invention is that the amount of data processing can be effectively reduced by splitting the entire three-dimensional power transmission engineering model into corresponding component lists, based on which the corresponding component models are synchronously constructed, and further, a target flyweight space for lightweight processing is constructed in real time, and a corresponding HLOD scene tree is constructed inside the target flyweight space. On this basis, it is only necessary to finally export the required instance model and HLOD scene tree, so that the lightweight processing of the three-dimensional power transmission engineering model can be effectively completed, and the work efficiency is correspondingly improved.
[0013] Furthermore, the step of calculating in real time according to the first preset algorithm the description operator corresponding to each of the component models comprises:
[0014] When each component model is acquired in real time, a target type corresponding to the component model is detected in real time;
[0015] According to the target type, the target GIM model parameters corresponding to the component model are matched in real time in the preset database, and the first preset algorithm is called accordingly;
[0016] The description operator corresponding to the component model is calculated in real time according to the target GIM model parameters through the first preset algorithm, wherein each component model corresponds to a description operator.
[0017] Furthermore, the expression of the first preset algorithm is:
[0018] D = [D1, D2, …, D n ]
[0019] D n =Code(X)
[0020] Code = C ^ U(S i ) / Code = C * P
[0021] Wherein, D represents the three-dimensional power transmission engineering model, D n represents the description operator of each component model, n represents the total number of components, Code represents the coding algorithm, X represents the target GIM model parameter for building the model, C represents the initial coding value, U(S i ) represents the character S i The character encoding set of , i represents the number of characters in the string, and P represents the basic prime number.
[0022] Furthermore, the step of constructing a corresponding target flyweight space according to the component list and the description operator includes:
[0023] When the component list and the description operator are obtained respectively, the corresponding initial flyweight space is called out;
[0024] The component models in the component list and the corresponding description operators are simultaneously input into the initial flyweight space, and it is determined in real time whether the description operator exists in the initial flyweight space, so as to generate the target flyweight space accordingly according to the determination result.
[0025] Furthermore, the step of generating the target flyweight space according to the judgment result includes:
[0026] If it is determined in real time that the description operator does not exist in the initial flyweight space, the component model corresponding to the current description operator is added to the flyweight component list, and the corresponding target LOD instance model is generated in real time according to the flyweight component list, so as to generate the target flyweight space based on the target LOD instance model;
[0027] If it is determined in real time that the description operator exists in the initial flyweight space, a corresponding record identifier is added to the component model corresponding to the current description operator, and the record identifier is unique.
[0028] Furthermore, the step of constructing a HLOD scene tree corresponding to the component list in real time in the target flyweight space based on the second preset rule includes:
[0029] When the target flyweight space is acquired in real time, bounding boxes corresponding to the component models in the component list are calculated in real time;
[0030] The target flyweight space is divided into scenes according to the bounding box by using a preset spatial octree algorithm to generate a number of corresponding minimum scene components, each of which includes a component model;
[0031] The HLOD scene tree is generated according to a plurality of the minimum scene components, and each of the minimum scene components is unique.
[0032] Furthermore, the step of generating the HLOD scene tree according to the plurality of the minimum scene components includes:
[0033] Detecting in real time the target description operator corresponding to each of the minimum scene components, and constructing a mapping relationship between the target description operator and the target LOD instance model;
[0034] The geometric error coefficient corresponding to the target LOD instance model is calculated in real time according to the mapping relationship through a second preset algorithm, and each geometric error coefficient is associated with each target LOD instance model to generate the HLOD scene tree accordingly, and the mapping relationship is unique.
[0035] The second aspect of the embodiment of the present invention proposes:
[0036] A light-weight system for a three-dimensional power transmission model, wherein the system comprises:
[0037] A splitting module, used for splitting the received three-dimensional power transmission engineering model into a corresponding component list based on a first preset rule, and correspondingly detecting a plurality of component models included in the component list;
[0038] A calculation module, used to calculate the description operator corresponding to each of the component models in real time according to the first preset algorithm, and to construct a corresponding target flyweight space according to the component list and the description operator;
[0039] A processing module, configured to construct a HLOD scene tree corresponding to the component list in the target flyweight space in real time based on a second preset rule, wherein the HLOD scene tree includes a plurality of LOD models;
[0040] The output module is used to export the corresponding instance model in real time according to the plurality of LOD models, and to synchronously export the HLOD scene tree, so as to complete the lightweight processing of the three-dimensional power transmission engineering model.
[0041] Furthermore, the calculation module is specifically used for:
[0042] When each component model is acquired in real time, a target type corresponding to the component model is detected in real time;
[0043] According to the target type, the target GIM model parameters corresponding to the component model are matched in real time in the preset database, and the first preset algorithm is called accordingly;
[0044] The description operator corresponding to the component model is calculated in real time according to the target GIM model parameters through the first preset algorithm, wherein each component model corresponds to a description operator.
[0045] Furthermore, the expression of the first preset algorithm is:
[0046] D = [D1, D2, …, D n ]
[0047] D n =Code(X)
[0048] Code = C ^ U(S i ) / Code = C * P
[0049] Wherein, D represents the three-dimensional power transmission engineering model, D n represents the description operator of each component model, n represents the total number of components, Code represents the coding algorithm, X represents the target GIM model parameter for building the model, C represents the initial coding value, U(S i ) represents the character S i The character encoding set of , i represents the number of characters in the string, and P represents the basic prime number.
[0050] Furthermore, the calculation module is specifically used for:
[0051] When the component list and the description operator are obtained respectively, the corresponding initial flyweight space is called out;
[0052] The component models in the component list and the corresponding description operators are simultaneously input into the initial flyweight space, and it is determined in real time whether the description operator exists in the initial flyweight space, so as to generate the target flyweight space accordingly according to the determination result.
[0053] Furthermore, the calculation module is specifically used for:
[0054] If it is determined in real time that the description operator does not exist in the initial flyweight space, the component model corresponding to the current description operator is added to the flyweight component list, and the corresponding target LOD instance model is generated in real time according to the flyweight component list, so as to generate the target flyweight space based on the target LOD instance model;
[0055] If it is determined in real time that the description operator exists in the initial flyweight space, a corresponding record identifier is added to the component model corresponding to the current description operator, and the record identifier is unique.
[0056] Furthermore, the processing module is specifically used for:
[0057] When the target flyweight space is acquired in real time, bounding boxes corresponding to the component models in the component list are calculated in real time;
[0058] The target flyweight space is divided into scenes according to the bounding box by using a preset spatial octree algorithm to generate a number of corresponding minimum scene components, each of which includes a component model;
[0059] The HLOD scene tree is generated according to a plurality of the minimum scene components, and each of the minimum scene components is unique.
[0060] Furthermore, the processing module is specifically used for:
[0061] Detecting in real time the target description operator corresponding to each of the minimum scene components, and constructing a mapping relationship between the target description operator and the target LOD instance model;
[0062] The geometric error coefficient corresponding to the target LOD instance model is calculated in real time according to the mapping relationship through a second preset algorithm, and each geometric error coefficient is associated with each target LOD instance model to generate the HLOD scene tree accordingly, and the mapping relationship is unique.
[0063] The third aspect of the embodiment of the present invention proposes:
[0064] A computer comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for lightweighting a three-dimensional power transmission model when executing the computer program.
[0065] The fourth aspect of the embodiments of the present invention proposes:
[0066] A readable storage medium stores a computer program thereon, wherein when the program is executed by a processor, the method for lightweighting a three-dimensional power transmission model as described above is implemented.
[0067] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 A flowchart of a method for lightweighting a three-dimensional power transmission model provided by a first embodiment of the present invention;
[0069] Figure 2 A schematic diagram of a flyweight space provided for the second embodiment of the present invention;
[0070] Figure 3 A schematic diagram of an export file directory provided for the second embodiment of the present invention;
[0071] Figure 4 This is a structural block diagram of a lightweight system for a three-dimensional power transmission model provided in the third embodiment of the present invention.
[0072] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0073] In order to facilitate understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are provided in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in the present invention. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0074] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used in the present invention are for illustrative purposes only.
[0075] Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used in the present invention and in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used in the present invention includes any and all combinations of one or more of the related listed items.
[0076] See also Figure 1 , which shows a lightweight method for a three-dimensional power transmission model provided in the first embodiment of the present invention. The lightweight method for a three-dimensional power transmission model provided in this embodiment can effectively complete the lightweight processing of a three-dimensional power transmission engineering model, thereby correspondingly improving work efficiency.
[0077] Specifically, this embodiment provides:
[0078] A method for lightweighting a three-dimensional power transmission model comprises the following steps:
[0079] Step S10, splitting the received three-dimensional power transmission engineering model into a corresponding component list based on a first preset rule, and correspondingly detecting a plurality of component models included in the component list;
[0080] Step S20, calculating in real time according to the first preset algorithm the description operator corresponding to each of the component models, and constructing a corresponding target flyweight space according to the component list and the description operator;
[0081] Step S30, constructing a HLOD scene tree corresponding to the component list in real time in the target flyweight space based on a second preset rule, wherein the HLOD scene tree includes a plurality of LOD models;
[0082] Step S40, exporting corresponding instance models in real time according to the plurality of LOD models, and synchronously exporting the HLOD scene tree, so as to correspondingly complete lightweight processing of the three-dimensional power transmission engineering model.
[0083] Specifically, in this embodiment, it should be noted that in order to quickly and effectively complete the lightweight processing of the three-dimensional power transmission engineering model, it is necessary to accurately obtain the specific content corresponding to the current three-dimensional power transmission engineering model. It should be pointed out that the existing three-dimensional power transmission engineering model is an overall structural model, which contains a large number of components. Based on this, in order to facilitate subsequent lightweighting, the present invention will first split the three-dimensional power transmission engineering model currently input by the user in real time into a corresponding component list through a pre-set first preset rule. Specifically, the component list contains several components in sequence. Based on this, in order to accurately obtain the data corresponding to each current component, it is necessary to detect the component model corresponding to each current component in real time through the existing three-dimensional software. Similarly, each current component model is also in a three-dimensional state.
[0084] Furthermore, in order to facilitate the subsequent lightweight processing, the present invention will further create a target flyweight space that is convenient for lightweight processing. Preferably, the present invention will calculate the description operator corresponding to each current component model in real time through a pre-set first preset algorithm. Specifically, the description operator contains specific calculation information. Based on this, the required target flyweight space can be immediately created in real time according to the current component list and the description operator obtained in real time. Furthermore, the present invention will further immediately create an HLOD scene tree that is adapted to the current component list in real time inside the current target flyweight space according to a pre-set second preset rule, so that the above-mentioned three-dimensional power transmission engineering model can be lightweight processed into the required HLOD scene tree, and the HLOD scene tree contains an instance model adapted thereto. On this basis, it is only necessary to export the current instance model and the current HLOD scene tree in real time to complete the lightweight processing of the current three-dimensional power transmission engineering model, thereby reducing the data processing amount of the staff and correspondingly improving the work efficiency.
[0085] Second embodiment
[0086] Furthermore, the step of calculating in real time according to the first preset algorithm the description operator corresponding to each of the component models comprises:
[0087] When each component model is acquired in real time, a target type corresponding to the component model is detected in real time;
[0088] According to the target type, the target GIM model parameters corresponding to the component model are matched in real time in the preset database, and the first preset algorithm is called accordingly;
[0089] The description operator corresponding to the component model is calculated in real time according to the target GIM model parameters through the first preset algorithm, wherein each component model corresponds to a description operator.
[0090] Furthermore, the expression of the first preset algorithm is:
[0091] D = [D1, D2, …, D n ]
[0092] D n =Code(X)
[0093] Code = C ^ U(S i ) / Code = C * P
[0094] Wherein, D represents the three-dimensional power transmission engineering model, D n represents the description operator of each component model, n represents the total number of components, Code represents the coding algorithm, X represents the target GIM model parameter for building the model, C represents the initial coding value, U(S i ) represents the character S i The character encoding set of , i represents the number of characters in the string, and P represents the basic prime number.
[0095] Furthermore, the step of constructing a corresponding target flyweight space according to the component list and the description operator includes:
[0096] When the component list and the description operator are obtained respectively, the corresponding initial flyweight space is called out;
[0097] The component models in the component list and the corresponding description operators are simultaneously input into the initial flyweight space, and it is determined in real time whether the description operator exists in the initial flyweight space, so as to generate the target flyweight space accordingly according to the determination result.
[0098] Furthermore, the step of generating the target flyweight space according to the judgment result includes:
[0099] If it is determined in real time that the description operator does not exist in the initial flyweight space, the component model corresponding to the current description operator is added to the flyweight component list, and the corresponding target LOD instance model is generated in real time according to the flyweight component list, so as to generate the target flyweight space based on the target LOD instance model;
[0100] If it is determined in real time that the description operator exists in the initial flyweight space, a corresponding record identifier is added to the component model corresponding to the current description operator, and the record identifier is unique.
[0101] Furthermore, the step of constructing a HLOD scene tree corresponding to the component list in real time in the target flyweight space based on the second preset rule includes:
[0102] When the target flyweight space is acquired in real time, bounding boxes corresponding to the component models in the component list are calculated in real time;
[0103] The target flyweight space is divided into scenes according to the bounding box by using a preset spatial octree algorithm to generate a number of corresponding minimum scene components, each of which includes a component model;
[0104] The HLOD scene tree is generated according to a plurality of the minimum scene components, and each of the minimum scene components is unique.
[0105] Furthermore, the step of generating the HLOD scene tree according to the plurality of the minimum scene components includes:
[0106] Detecting in real time the target description operator corresponding to each of the minimum scene components, and constructing a mapping relationship between the target description operator and the target LOD instance model;
[0107] The geometric error coefficient corresponding to the target LOD instance model is calculated in real time according to the mapping relationship through a second preset algorithm, and each geometric error coefficient is associated with each target LOD instance model to generate the HLOD scene tree accordingly, and the mapping relationship is unique.
[0108] In addition, in this embodiment, it is also necessary to explain that, for ease of understanding, the present invention is explained by taking a certain power transmission project as an example. Preferably, the project is composed of several pole tower groups, and each pole tower group is composed of three-dimensional models of pole towers, insulator strings, and hardware.
[0109] 1. Split components
[0110] Specifically, the present invention divides the current three-dimensional power transmission engineering model into corresponding components according to each business unit, and preferably, the component list of the current three-dimensional power transmission engineering model is set as P,
[0111] Then: P=[P1, P2, …, P n ], where n is the total number of components, and any component P nThey all contain corresponding modeling parameters and business parameters, which can be used to describe the calculation of the operator in the next step.
[0112] 2. Computational component model description operator
[0113] For each component model in the three-dimensional power transmission project, the corresponding description operator is calculated, and then D=[D1,D2,…,Dn], where n is the total number of components and D n With P n One-to-one correspondence. The calculation method of the description operator of various three-dimensional transmission components is as follows: For example, the tower model can be uniquely determined by three parts of information, namely: tower Mod, call height parameter and leg length parameter. Among them, the unique code of tower Mod is M, the call height is H, and the leg length parameter is V = (h1, h2, h3, h4), where h1-h4 correspond to the height values of the four sub-legs in the four quadrants.
[0114] Then the description operator of the tower model is: D tower = Code(M+H+V)
[0115] Among them, + represents the concatenation of numeric characters, Code is the parameter encoding algorithm, and the subsequent calculations are implemented in the same way, so it is not repeated. The calculation rules of the Code encoding algorithm are as follows: Let the string be S = [S1, S2, …, Sn], the offset base B = -2128831035, the basic prime number P = 16777619, and the encoding value be C, then: Initialize the encoding value C = B, then traverse the string character list, and perform the following two calculations for each character:
[0116] Code = C ^ U(S i )
[0117] Code = C * P
[0118] Among them, U(S i ) is to obtain the character set encoding of character Si, i=1,2,…,n, n is the number of characters in the string, ^ represents bitwise XOR, * represents multiplication, where the insulator string model may be presented in two forms, namely:
[0119] a. Import external design models in STL format
[0120] Assume that the unique code of the model is M, then the description operator of the insulator string model is: D string = Code(M);
[0121] b. Describing with parameterized expressions
[0122] The parameters of the insulator string include: number of links N, double string spacing D, number of porcelain sleeves N1, single-piece height H1, large shed radius R1, small shed radius R2, porcelain sleeve inner radius R, front end length FL, rear end length AL, and number of connecting wire splits LN. The description operator of the insulator string model is:
[0123] D string = Code(N+D+N1+H1+R1+R2+R+FL+AL+LN)
[0124] In addition, hardware fittings are often imported into external design models in STL format. Assuming the unique model code is M, the description operator of the hardware fitting model is:
[0125] D fitting = Code(M)
[0126] In addition, the existing GIM specification defines 18 types of foundations and clarifies the modeling parameters of each type of foundation. Here, we take the bored pile foundation as an example to explain the calculation method of its corresponding description operator. Other types can be calculated in the same way. The parameters of the bored pile foundation include: height H1, base platform height H2, base column height H3, base hemisphere height H4, pile column diameter d, base column diameter D. Then the description operator of the bored pile foundation is: Dbase = Code(H1+H2+H3+H4+d+D).
[0127] 3. Constructing the Flyweight Space
[0128] The target flyweight space provided by the present invention is as follows: Figure 2 As shown, the flyweight space is a data space that contains the power transmission component P, the component's corresponding description operator D, and the component's lightweight model GLB. The core idea of using the flyweight space to improve lightweight performance is: based on the uniqueness of the description operator of the same component, the description operator and lightweight model pointed to by the same component model are unique, avoiding the waste of time and space performance caused by repeated component conversion; at the same time, the LOD model combined with the subsequent scene tree can greatly improve the rendering efficiency of the WebGL system, and realize more efficient lightweight processing of the power transmission three-dimensional scene. Further, the flyweight space construction method is as follows:
[0129] When a component Pi is entered, first check whether it exists in the flyweight space according to the description operator Di corresponding to Pi; if it does not exist, add a new record S j , denoted as: S j ={Di , [Pi], [GLB*]}, where j represents the index number of the current flyweight, [P i] is the component list corresponding to the current flyweight, and [GLB*] is the 4-layer LOD instance model corresponding to the current flyweight. If it exists, the current component P i , add record S j List of shared element components, that is: S j ={Di, [Pi-1, Pi], [GLB*]}. Furthermore, for the four types of three-dimensional models of power transmission, the four-layer LOD model forms are defined as shown in the following table:
[0130]
[0131] Among them, the accuracy of level 1 to level 4 models increases in turn, the level 4 model is the original model with the highest accuracy, and the level 1 to level 3 models are simplified representations of the original models. Empty means that there is no corresponding model, which means that such models can be displayed at the current line of sight; symbols are simplified by vector graphic markers, and tower symbols and hardware symbols can be represented by a certain graphic according to the actual situation; blocks are simplified by model AABB bounding boxes; single-line towers are simplified by straight lines; steel plate towers are simplified by square steel with square cross-sections. According to the above definitions and parametric modeling methods, any record S in the element space can be obtained. j For: S j ={Di , [Pi , Pk, …], [GLB1, GLB2,GLB3, GLB4]}, where GLB1, GLB2, GLB3, GLB4 are LOD instance models of levels 1-4.
[0132] 4. Build HLOD scene tree
[0133] The construction of the HLOD scene tree is divided into three steps: (1) Segment the scene based on the spatial octree algorithm: traverse the list P of power transmission line components and calculate the corresponding AABB bounding box for each component; use the spatial octree algorithm to subdivide the power transmission scene with the center of the component AABB bounding box as the component position until there is only one component in the minimum space. (2) Link the 4-layer LOD model: The minimum scene component is associated with the 4-layer LOD model of the corresponding description operator in the flyweight space based on the component description operator. (3) Calculate the LOD model geometric error: The screen error coefficient SSE calculation formula of the WebGL rendering engine is:
[0134] SSE=geometricError*drawingBufferHeight / (2*D*tan(fovy / 2)
[0135] Among them, geometricError is the geometric error of the model, drawingBufferHeight is the underlying parameter of WebGL, D is the camera viewing distance parameter, and fovy is the tilt angle of the camera in the vertical direction. Therefore, the geometric error coefficient of any LOD model is:
[0136] geometricError = SSE / (drawingBufferHeight / (2*D*tan(fovy / 2)))
[0137] Among them, SSE can be set in the range of 1-16 according to actual needs, and the camera viewing distance parameters can be referred to as shown in the following table:
[0138] After the above calculations, the HLOD scene tree can be obtained.
[0139] 5. Export lightweight model
[0140] The lightweight model export is divided into two steps: 1. Export the instance model:
[0141] The instance model is the 4-layer LOD model in the flyweight space. Each model is exported as a binary file with the suffix .glb. Further, the glb binary file is written using the existing GLB generation tool, which is a data conversion component written with reference to the glTF data specification. 2. Export HLOD scene tree: The HLOD scene tree is exported in the form of Json and file directory. The export result is as follows: Figure 3 As shown, tileset.json describes the hierarchical link information of the scene tree, and product.json describes the four-layer LOD model link, geometric error coefficient, bounding box information and other setting parameters of the component.
[0142] Furthermore, the above method can eventually quickly and effectively complete the lightweight processing of the three-dimensional power transmission engineering model, and output the corresponding instance model and HLOD scene tree, thereby reducing the workload of the staff and correspondingly improving work efficiency.
[0143] See also Figure 4 , the third embodiment of the present invention provides:
[0144] A light-weight system for a three-dimensional power transmission model, wherein the system comprises:
[0145] A splitting module, used for splitting the received three-dimensional power transmission engineering model into a corresponding component list based on a first preset rule, and correspondingly detecting a plurality of component models included in the component list;
[0146] A calculation module, used to calculate the description operator corresponding to each of the component models in real time according to the first preset algorithm, and to construct a corresponding target flyweight space according to the component list and the description operator;
[0147] A processing module, configured to construct a HLOD scene tree corresponding to the component list in the target flyweight space in real time based on a second preset rule, wherein the HLOD scene tree includes a plurality of LOD models;
[0148] The output module is used to export the corresponding instance model in real time according to the plurality of LOD models, and to synchronously export the HLOD scene tree, so as to complete the lightweight processing of the three-dimensional power transmission engineering model.
[0149] Furthermore, the calculation module is specifically used for:
[0150] When each component model is acquired in real time, a target type corresponding to the component model is detected in real time;
[0151] According to the target type, the target GIM model parameters corresponding to the component model are matched in real time in the preset database, and the first preset algorithm is called accordingly;
[0152] The description operator corresponding to the component model is calculated in real time according to the target GIM model parameters through the first preset algorithm, wherein each component model corresponds to a description operator.
[0153] Furthermore, the expression of the first preset algorithm is:
[0154] D = [D1, D2, …, D n ]
[0155] D n =Code(X)
[0156] Code = C ^ U(S i ) / Code = C * P
[0157] Wherein, D represents the three-dimensional power transmission engineering model, D n represents the description operator of each component model, n represents the total number of components, Code represents the coding algorithm, X represents the target GIM model parameter for building the model, C represents the initial coding value, U(S i ) represents the character S i The character encoding set of , i represents the number of characters in the string, and P represents the basic prime number.
[0158] Furthermore, the calculation module is specifically used for:
[0159] When the component list and the description operator are obtained respectively, the corresponding initial flyweight space is called out;
[0160] The component models in the component list and the corresponding description operators are simultaneously input into the initial flyweight space, and it is determined in real time whether the description operator exists in the initial flyweight space, so as to generate the target flyweight space accordingly according to the determination result.
[0161] Furthermore, the calculation module is specifically used for:
[0162] If it is determined in real time that the description operator does not exist in the initial flyweight space, the component model corresponding to the current description operator is added to the flyweight component list, and the corresponding target LOD instance model is generated in real time according to the flyweight component list, so as to generate the target flyweight space based on the target LOD instance model;
[0163] If it is determined in real time that the description operator exists in the initial flyweight space, a corresponding record identifier is added to the component model corresponding to the current description operator, and the record identifier is unique.
[0164] Furthermore, the processing module is specifically used for:
[0165] When the target flyweight space is acquired in real time, bounding boxes corresponding to the component models in the component list are calculated in real time;
[0166] The target flyweight space is divided into scenes according to the bounding box by using a preset spatial octree algorithm to generate a number of corresponding minimum scene components, each of which includes a component model;
[0167] The HLOD scene tree is generated according to a plurality of the minimum scene components, and each of the minimum scene components is unique.
[0168] Furthermore, the processing module is specifically used for:
[0169] Detecting in real time the target description operator corresponding to each of the minimum scene components, and constructing a mapping relationship between the target description operator and the target LOD instance model;
[0170] The geometric error coefficient corresponding to the target LOD instance model is calculated in real time according to the mapping relationship through a second preset algorithm, and each geometric error coefficient is associated with each target LOD instance model to generate the HLOD scene tree accordingly, and the mapping relationship is unique.
[0171] A fourth embodiment of the present invention provides a computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for lightweighting a three-dimensional power transmission model as described above when executing the computer program.
[0172] A fifth embodiment of the present invention provides a readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for lightweighting a three-dimensional power transmission model as described above is implemented.
[0173] In summary, the method and system for lightweighting a three-dimensional power transmission model provided by the above-mentioned embodiments of the present invention can effectively complete the lightweight processing of a three-dimensional power transmission engineering model, thereby correspondingly improving work efficiency.
[0174] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0175] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0176] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0177] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0178] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation 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.
[0179] The above-described embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.
Claims
1. A method for lightweighting a three-dimensional power transmission model, characterized in that: The method comprises: Splitting the received three-dimensional power transmission engineering model into a corresponding component list based on a first preset rule, and correspondingly detecting a plurality of component models included in the component list; Calculate in real time according to the first preset algorithm the description operator corresponding to each of the component models, and construct a corresponding target flyweight space according to the component list and the description operator; Based on a second preset rule, constructing in real time in the target flyweight space an HLOD scene tree corresponding to the component list, wherein the HLOD scene tree includes a plurality of LOD models; Exporting corresponding instance models in real time according to the plurality of LOD models, and synchronously exporting the HLOD scene tree, so as to correspondingly complete lightweight processing of the three-dimensional power transmission engineering model; The step of calculating the description operator corresponding to each component model in real time according to the first preset algorithm comprises: When each component model is acquired in real time, a target type corresponding to the component model is detected in real time; According to the target type, the target GIM model parameters corresponding to the component model are matched in real time in the preset database, and the first preset algorithm is called accordingly; Calculating in real time through the first preset algorithm the description operator corresponding to the component model according to the target GIM model parameters, wherein each component model corresponds to a description operator; The expression of the first preset algorithm is: D=[D1,D2,…,D n ] D n =Code(X) Code= C ^ U(S i ) / Code= C * P Wherein, D represents the three-dimensional power transmission engineering model, D n represents the description operator of each component model, n represents the total number of components, Code represents the coding algorithm, X represents the target GIM model parameter for building the model, C represents the initial coding value, U(S i ) represents the character S i Character encoding set, i represents the number of characters in the string, and P represents the basic prime number; The step of constructing a corresponding target flyweight space according to the component list and the description operator comprises: When the component list and the description operator are obtained respectively, the corresponding initial flyweight space is called out; Inputting the component models in the component list and the corresponding description operators into the initial flyweight space at the same time, and determining in real time whether the description operator exists in the initial flyweight space, so as to generate the target flyweight space according to the determination result; The step of generating the target flyweight space according to the judgment result includes: If it is determined in real time that the description operator does not exist in the initial flyweight space, the component model corresponding to the current description operator is added to the flyweight component list, and the corresponding target LOD instance model is generated in real time according to the flyweight component list, so as to generate the target flyweight space based on the target LOD instance model; If it is determined in real time that the description operator exists in the initial flyweight space, a corresponding record identifier is added to the component model corresponding to the current description operator, and the record identifier is unique.
2. The method for lightweighting a three-dimensional power transmission model according to claim 1, characterized in that: The step of constructing the HLOD scene tree corresponding to the component list in the target flyweight space in real time based on the second preset rule comprises: When the target flyweight space is acquired in real time, bounding boxes corresponding to the component models in the component list are calculated in real time; The target flyweight space is divided into scenes according to the bounding box by using a preset spatial octree algorithm to generate a number of corresponding minimum scene components, each of which includes a component model; The HLOD scene tree is generated according to a plurality of the minimum scene components, and each of the minimum scene components is unique.
3. The method for lightweighting a three-dimensional power transmission model according to claim 2, characterized in that: The step of generating the HLOD scene tree according to the plurality of the minimum scene components comprises: Detecting in real time the target description operator corresponding to each of the minimum scene components, and constructing a mapping relationship between the target description operator and the target LOD instance model; The geometric error coefficient corresponding to the target LOD instance model is calculated in real time according to the mapping relationship through a second preset algorithm, and each geometric error coefficient is associated with each target LOD instance model to generate the HLOD scene tree accordingly, and the mapping relationship is unique.
4. A three-dimensional power transmission model lightweight system, characterized in that: For implementing the light-weight method of a power transmission three-dimensional model according to any one of claims 1 to 3, the system comprises: A splitting module, used for splitting the received three-dimensional power transmission engineering model into a corresponding component list based on a first preset rule, and correspondingly detecting a plurality of component models included in the component list; A calculation module, used to calculate the description operator corresponding to each of the component models in real time according to the first preset algorithm, and to construct a corresponding target flyweight space according to the component list and the description operator; A processing module, configured to construct a HLOD scene tree corresponding to the component list in the target flyweight space in real time based on a second preset rule, wherein the HLOD scene tree includes a plurality of LOD models; The output module is used to export the corresponding instance model in real time according to the plurality of LOD models, and to synchronously export the HLOD scene tree, so as to complete the lightweight processing of the three-dimensional power transmission engineering model.
5. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for lightweighting the three-dimensional power transmission model as described in any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for lightweighting a three-dimensional power transmission model as described in any one of claims 1 to 3 is implemented.
