Pipeline parameterization share calculation and transmission integrated processing method, equipment, medium and product
By performing geometric feature analysis and instantiation compression techniques on cylindrical pipeline components in Web3D scenes, combined with view frustum culling and depth map occlusion analysis, the problem of low pipeline processing efficiency in Web3D scenes is solved, improving recognition speed, reducing data volume, and enhancing rendering efficiency.
Patent Information
- Application Number
- CN202511080913.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional methods suffer from high preprocessing computation, large network data transmission volume, and low front-end rendering efficiency when processing cylindrical pipeline structures in Web3D scenes, resulting in low system efficiency.
By performing geometric feature analysis on the original 3D mesh model, cylindrical pipeline components are identified. Instantiation compression technology and view frustum culling and depth map occlusion analysis technology are used to remove invisible components before rendering.
It significantly improves the speed and accuracy of pipeline component identification, reduces the amount of data transmitted, improves system initialization speed and rendering efficiency, and enhances user experience.
Smart Images

Figure CN120976389A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of new energy engineering digital twin Web3D, in particular to a pipeline parameterized calculation-transmission-rendering integrated processing method, device, medium and product. BACKGROUND
[0002] In Web3D applications, especially after the rise of digital twin computing and metaverse concepts, large Web3D scenes are becoming more and more common. These scenes often contain a large number of cylindrical pipeline structures. Traditional processing methods usually rely on triangular mesh models to represent these pipelines, which has the defect of low processing efficiency. SUMMARY
[0003] The purpose of the present application is to provide a pipeline parameterized calculation-transmission-rendering integrated processing method, device, medium and product, which can improve the processing efficiency of pipeline components in Web3D scenes.
[0004] To achieve the above purpose, the present application provides the following solutions:
[0005] In a first aspect, the present application provides a pipeline parameterized calculation-transmission-rendering integrated processing method, comprising:
[0006] Performing geometric feature analysis on an original 3D mesh model to identify cylindrical pipeline components;
[0007] Converting the parameter information of the identified cylindrical pipeline components into instantiation data using instantiation compression technology;
[0008] Based on the instantiation data, using view frustum culling and depth map occlusion analysis technology, culling the cylindrical pipeline components that are not visible under the current viewpoint to obtain the culling cylindrical pipeline components;
[0009] Rendering the culling cylindrical pipeline components.
[0010] In a second aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the pipeline parameterized calculation-transmission-rendering integrated processing method of the first aspect.
[0011] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the pipeline parameterized calculation-transmission-rendering integrated processing method of the first aspect.
[0012] In a fourth aspect, the present application provides a computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the pipeline parameterized calculation-transmission-rendering integrated processing method of the first aspect.
[0013] According to the specific embodiments provided in the application, the application has the following technical effects:
[0014] The application provides a pipeline parameterization algorithm transmission rendering integrated processing method, device, medium and product. The method performs geometric feature analysis on an original 3D grid model, identifies a cylindrical pipeline component, and significantly improves the identification speed and accuracy of the pipeline component. The method converts parameter information of the identified cylindrical pipeline component into instantiation data by using an instantiation compression technology, greatly reduces the transmission data volume, and speeds up the system initialization speed. The method removes the cylindrical pipeline component that is invisible at the current viewpoint by using a view frustum culling and depth map occlusion analysis technology, obtains the removed cylindrical pipeline component, and improves the pickup efficiency and response speed of the pipeline component. Therefore, the application can improve the processing efficiency of the pipeline component in a Web3D scene. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0016] Figure 1 It is a schematic diagram of an application environment of the pipeline parameterization algorithm transmission rendering integrated processing method in Embodiment 1 of the application.
[0017] Figure 2 It is a flowchart of the pipeline parameterization algorithm transmission rendering integrated processing method provided in Embodiment 1 of the application.
[0018] Figure 3 It is a conceptual diagram of the pipeline parameterization algorithm transmission rendering integrated processing method in Embodiment 1 of the application.
[0019] Figure 4 It is a flowchart of the cylindrical pipeline component identification in Embodiment 1 of the application.
[0020] Figure 5 It is a flowchart of the parameterization transmission algorithm of the cylindrical pipeline in Embodiment 1 of the application.
[0021] Figure 6 It is a schematic diagram of the parameterization representation method of the cylindrical pipeline in Embodiment 1 of the application.
[0022] Figure 7 It is a schematic diagram of the pipeline component group analysis method in Embodiment 1 of the application.
[0023] Figure 8A flowchart of a visible picking algorithm for a cylindrical pipeline in Embodiment 1 of the present application is shown in the figure.
[0024] Figure 9 A structural diagram of a computer device provided in Embodiment 2 of the present application is shown in the figure. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0026] In order to make the above objectives, characteristics and advantages of the present application more apparent, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0027] Embodiment 1
[0028] During the research on Web3D scene optimization, the present inventors found that the traditional processing method has efficiency bottlenecks in the preprocessing, transmission and rendering stages, specifically including:
[0029] (1) Large amount of preprocessing calculation: In order to accurately represent the edge curve and surface of the cylindrical pipeline, a large number of triangles are needed, which increases the amount of calculation in the background preprocessing.
[0030] (2) Large amount of network transmission data: A large amount of triangle data leads to an increase in the amount of transmission data, affecting the initialization speed of the system.
[0031] (3) Low efficiency of front-end rendering: A large amount of triangle data also reduces the fluency of front-end rendering, affecting the user experience.
[0032] In view of this, after in-depth research, the present embodiment proposes a lightweight algorithm-transmission-integrated solution based on pipeline parameterization, which effectively solves the above problems through identification, parameterized transmission, lightweight picking and other algorithms of the cylindrical pipeline components. The lightweight algorithm-transmission-integrated solution identifies and parameterizes the cylindrical pipeline components, and combines a lightweight picking algorithm to optimize the preprocessing, transmission and rendering process in the Web3D scene. This method will bring significant improvement in reducing data redundancy and accelerating rendering efficiency.
[0033] The present embodiment provides a pipeline parameterization algorithm-transmission-integrated processing method, which can be applied to, for example, Figure 1The application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data required by the server 104 to process. The data storage system can be set up separately, or integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the original 3D mesh model to be processed to the server 104, and the server 104 receives the original 3D mesh model to be processed, analyzes the geometric features of the original 3D mesh model, and identifies the cylindrical pipeline component; the parameter information of the identified cylindrical pipeline component is converted into instantiation data by using instantiation compression technology; based on the instantiation data, the frustum culling and depth map occlusion analysis technology is used to remove the cylindrical pipeline component that is not visible at the current viewpoint, and the removed cylindrical pipeline component is obtained; the removed cylindrical pipeline component is rendered. The server 104 can feed back the rendered cylindrical pipeline component to the terminal 102. In addition, in some embodiments, the pipeline parameterization algorithm transmission and rendering integrated processing method can also be implemented by the server 104 or the terminal 102 alone, such as the terminal 102 can directly process the original 3D mesh model to be processed by using the pipeline parameterization algorithm transmission and rendering integrated processing method, or the server 104 can obtain the original 3D mesh model to be processed from the data storage system and process it by using the pipeline parameterization algorithm transmission and rendering integrated processing method.
[0034] Among them, the terminal 102 can be, but not limited to, various desktop computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers, and can also be a cloud server.
[0035] As shown in Figure 2 The embodiment provides a pipeline parameterization algorithm transmission and rendering integrated processing method, which is executed by a computer device, and can be executed by a terminal or a server alone, or by a terminal and a server together. In the embodiment of the application, the method is applied to the server 104 in Figure 1 The following steps 201 to 204 are included. Among them:
[0036] Step 201, performing geometric feature analysis on the original 3D mesh model to identify the cylindrical pipeline component.
[0037] Step 201-1, converting the original 3D mesh model into a triangular mesh model;
[0038] Step 201-2, performing PCA alignment on the triangular mesh model to obtain a coordinate system aligned triangular mesh model;
[0039] Step 201-3, determining whether there are edge points in the 3D component of the coordinate system aligned triangular mesh model, to obtain a first determination result, wherein the edge point refers to a vertex in the aligned triangular mesh model whose normal vector is not parallel to the main direction, and the main direction refers to the direction of the cylindrical axis aligned with the coordinate axis in the coordinate system aligned triangular mesh model;
[0040] Step 201-4, when the first determination result is yes, further determining whether the edge points fall on a pair of planes of the axis-aligned bounding box to obtain a second determination result;
[0041] Step 201-5, when the second determination result is yes, further determining whether the edge points all fall on a pair of circular rings to obtain a third determination result, wherein the circular ring refers to the bottom surface of the cylinder;
[0042] Step 201-6, when the third determination result is yes, determining whether the actual bottom surface area of the 3D component is greater than or equal to the bottom surface circle area, wherein the bottom surface circle area is a variable calculated according to the target radius, and the target radius is the distance from the target edge point to the cylindrical axis, and the target edge point is the edge point whose third determination result is yes;
[0043] Step 201-7, when the fourth determination result is yes, determining that the 3D component is a cylindrical pipeline component.
[0044] Step 202, using instantiation compression technology to convert the parameter information of the identified cylindrical pipeline component into instantiation data.
[0045] Step 202-1, grouping the materials of the identified cylindrical pipeline component to obtain a plurality of pipeline component groups;
[0046] Step 202-2, converting the geometric parameters of all identified cylindrical pipeline components in each pipeline component group into an instantiation component group matrix;
[0047] Step 202-3, compressing the material parameters of all identified cylindrical pipeline components in each pipeline component group and the corresponding instantiation component group matrix, and transmitting them to the web page end respectively, and obtaining the instantiation data after decoding.
[0048] Step 203, based on the instantiation data, using view frustum culling and depth map occlusion analysis technology to cull the cylindrical pipeline components that are not visible at the current viewpoint to obtain the culled cylindrical pipeline components.
[0049] Step 203 includes a pipeline frustum coarse picking process and a pipeline fine picking process, specifically including:
[0050] Step 203-1, determining center points of two bottom surfaces of the cylindrical pipeline component according to the instantiation data;
[0051] Step 203-2, judging whether the center points are inside the view frustum, obtaining a seventh judgment result;
[0052] Step 203-3, when the seventh judgment result is yes, retaining the cylindrical pipeline component whose center points are inside the view frustum, and performing the pipeline fine picking process by using a depth map occlusion analysis technique;
[0053] Step 203-4, when the seventh judgment result is no, further judging whether an axis segment of the cylindrical pipeline component intersects with the view frustum, obtaining an eighth judgment result;
[0054] Step 203-5, when the eighth judgment result is yes, retaining the cylindrical pipeline component whose axis segment intersects with the view frustum, and performing the pipeline fine picking process by using the depth map occlusion analysis technique;
[0055] Step 203-6, when the eighth judgment result is no, further judging whether a bounding box of the cylindrical pipeline component intersects with the view frustum, obtaining a ninth judgment result;
[0056] Step 203-7, when the ninth judgment result is yes, retaining the cylindrical pipeline component whose bounding box intersects with the view frustum, and performing the pipeline fine picking process by using the depth map occlusion analysis technique;
[0057] Step 203-8, when the ninth judgment result is no, determining that the cylindrical pipeline component is a cylindrical pipeline component invisible under the current view point and discarding it.
[0058] Step 203-9, obtaining a depth map of all non-pipeline components inside the view frustum;
[0059] Step 203-10, performing rasterization processing on the remaining cylindrical pipeline components, and calculating a corresponding depth value of each of the remaining cylindrical pipeline components when projected to a pixel, wherein the remaining cylindrical pipeline components include the cylindrical pipeline component whose center points are inside the view frustum, the cylindrical pipeline component whose axis segment intersects with the view frustum, and the cylindrical pipeline component whose bounding box intersects with the view frustum;
[0060] Step 203-11, judging whether the pixel corresponding to the depth value is a blank area in the depth map, obtaining an eleventh judgment result;
[0061] Step 203-12, when the eleventh judgment result is yes, determining that the remaining cylindrical pipeline component is visible under the current view point and retaining it.
[0062] Step 203-13, when the eleventh judgment result is no, judging whether the depth value is less than the corresponding value in the depth map, to obtain a twelfth judgment result;
[0063] Step 203-14, when the twelfth judgment result is yes, determining that the remaining cylindrical pipeline component is visible under the current viewpoint and being retained;
[0064] Step 203-15, when the twelfth judgment result is no, determining that the remaining cylindrical pipeline component is invisible under the current viewpoint and being deleted.
[0065] Step 204, rendering the remaining cylindrical pipeline component after the elimination.
[0066] Implementing the above steps 201 to 204 improves the preprocessing efficiency, transmission efficiency and rendering efficiency, and overcomes the following technical defects: (1) low efficiency of pipeline component detection algorithm: the existing method has insufficient performance of the detection algorithm when processing large-scale scenes, resulting in consumption of a large amount of computing power in the preprocessing stage. (2) low transmission mechanism efficiency: the existing compression encoding and decoding mechanism cannot effectively cope with the growth of model size, affecting the rapid initialization of the system. (3) low efficiency of pipeline component picking algorithm: the existing picking algorithm has low efficiency and slow response speed when processing a large number of pipeline structures.
[0067] In order to make the person skilled in the art more clear about the execution process of the above steps, the following will be specifically explained.
[0068] As shown in Figure 3 , the embodiment proposes an algorithm and transmission integrated solution for containing a large number of cylindrical pipelines, which is realized through the following steps:
[0069] S1, efficient cylindrical pipeline component identification algorithm;
[0070] S2, efficient cylindrical pipeline parameterized transmission algorithm;
[0071] S3, efficient cylindrical pipeline lightweight picking algorithm.
[0072] (1) as shown in Figures 3-4 , S1, efficient cylindrical pipeline component identification algorithm, specifically including the following contents:
[0073] S1.1, converting the original 3D grid model into a triangular grid model. Because the original 3D grid model may contain polygons other than triangles, such as quadrilaterals, it is necessary to convert all polygons into triangles, such as splitting a quadrilateral into two triangles or a pentagon into three triangles;
[0074] S1.2, PCA alignment. First, the center of the component and the origin of the coordinate system are aligned by translation. Then, the three main directions of the 3D model can be obtained by the PCA algorithm (principal component analysis), and the model is rotated so that the three main directions are aligned with the three main directions of the three-dimensional coordinate system. After PCA alignment, there are three cases for the direction of the cylindrical axis, which are the cylindrical axis parallel to the X axis, the cylindrical axis parallel to the Y axis, and the cylindrical axis parallel to the Z axis;
[0075] S1.3, find all edge points of the mesh model. If the normal vector of a vertex is not parallel to the three PCA main directions, the vertex is an edge point, otherwise it is not an edge point. Therefore, all vertices of the mesh model are traversed, and then the direction of the 3D component at the vertex is compared with the three main directions, so that all edge points of the component can be found. If there are no edge points in the component, the component is not a cylindrical pipeline, and the cylindrical pipeline recognition judgment is completed. If there are some edge points in the component, the following S1.4 is executed;
[0076] S1.4, detect whether all edge points fall on a pair of parallel planes of the axis-aligned bounding box. If the component is a cylindrical pipeline, the edge points must fall on the upper and lower two bottom surfaces of the cylinder, and after PCA alignment, the two bottom surfaces of the cylinder must coincide with a pair of parallel planes of the bounding box. Therefore, the edge points of the pipeline component must fall on a pair of parallel planes of the bounding box. Calculate the axis-aligned bounding box of the component, and the plane intersecting the positive half-axis of the X axis of the bounding box is denoted as +X, and the other five planes are denoted as -X, +Y, -Y, +Z and -Z respectively. First, it is judged whether all edge points fall on +X and -X, if not, it is judged whether all edge points fall on +Y and -Y, if not, it is judged whether all edge points fall on +Z and -Z, if not, it is judged that the component is not a cylindrical pipeline, and the cylindrical pipeline recognition judgment is completed. If the edge points all fall on a pair of planes, it means that the component is a cylindrical component, and further judgment is needed to execute the following S1.5;
[0077] S1.5, detect whether all edge points fall on a pair of circular rings. The edge points of the cylindrical pipeline must fall on a pair of parallel circular rings (the upper and lower two bottom surfaces of the cylinder), and the distance from any point on the two circular rings to the center of the component is equal. Therefore, this embodiment needs to calculate the distance from all edge points to the center of the component. If the distance from all edge points to the center is equal, continue to execute the following S1.6, otherwise it means that the component is not a cylindrical pipeline, and the cylindrical pipeline recognition judgment algorithm jumps to S2;
[0078] S1.6, calculate the area of the base circle of the cylinder. Assuming this component is a cylindrical pipeline component, because all edge points are located on the edge of the base circle of the cylinder and the cylinder axis coincides with the coordinate axis, the direction of the cylinder axis can be determined according to the distribution of the edge points, and the distance from the edge points to the cylinder axis is just the radius of the base circle of the cylinder, and the area of the base circle can be calculated according to the radius of the base circle;
[0079] S1.7, calculate the actual base area of the component. First, find all the triangles whose normal vectors are parallel to the cylinder axis from the triangular mesh component, and the pattern formed by these triangles is the actual base of the component. The area of a triangle can be calculated according to the coordinates of its three vertices, and then the actual base area of the component is obtained by adding up the areas of all the base triangles;
[0080] S1.8, detect the circular fullness of the base. The above step S1.5 only guarantees that the edge points of the component fall on a pair of circular rings, but for a cylindrical component, if its base is a semicircle, or a square, or a crescent, the edge points of the component will also fall on a pair of circular rings in these three cases. In order to exclude these three cases, the circular fullness of the base needs to be detected. If the actual base area is significantly smaller than the base circle area, it means that the base of the cylindrical component is a semicircle, or a square, or a crescent, and the component is not a cylindrical pipeline, and the cylindrical pipeline recognition and judgment ends, otherwise it means that the component is a cylindrical pipeline;
[0081] (2) as shown in Figure 3 and Figure 5 , S2, an efficient cylindrical pipeline parameterization transmission algorithm, specifically comprising:
[0082] S2.1, grouping all pipeline components based on the material type of the pipeline component. A scene contains pipeline components of various materials, and different types of materials require different GPU shading rendering codes, so they cannot be rendered using the same GPU instance thread. Since the GPU instance rendering technology is used in this embodiment to improve the rendering frame rate, the pipeline components must be grouped, and the pipeline components using the same GPU shading rendering code are grouped together, thereby facilitating subsequent rendering operations, as shown in Figure 7 ;
[0083] S2.2, obtain the parameter information of each pipeline component. The pipeline component needs to be accurately described by a set of parameters, and the parameters of the pipeline component include material parameters and geometric parameters, as shown in Figure 6 . The material parameters include color, metallicity, texture map index and other information, and these information can describe all the material properties of the component. The geometric parameters are used to describe the shape, size, position and direction of the cylinder. Since the cylinder is a symmetrical geometry, the position of the cylinder is the center of the component, and the following uses The cylinder axis of the component has been found according to the previous PCA calculation, and the direction of the cylinder axis is taken as the direction of the cylinder, denoted as In order to describe the shape and size of the cylinder, the radius r of the base of the cylinder and the height h of the cylinder are also needed. The geometric parameters of the cylinder component are r, h, and four data;
[0084] S2.3, instantiation reuse matrix conversion of the geometric parameters of the cylinder component into a standard cylinder. The rendering behind this embodiment uses a more powerful GPU instantiation technique, which requires a standard base mesh shape, and then generates different geometric entities using a set of instantiation transformation matrices, so it is necessary to convert the geometric parameters of the component into an instantiation transformation matrix. The geometric parameters of the component are
[0085] r, h, and four data into an instantiation transformation matrix. The base mesh of the standard cylinder used in this embodiment is a cylinder with a radius and height of 1, the cylinder axis coincides with the Y axis of the coordinate system, and the midpoint of the cylinder axis is at the origin. The specific conversion method of converting the geometric parameters of the component into an instantiation transformation matrix is that the scaling matrix Scale of the cylinder can be obtained through r and h, the rotation matrix Rotation of the cylinder can be obtained through , and the translation matrix Move of the cylinder can be obtained through , and the instantiation transformation matrix Matrix of the pipeline component is the product of the three matrices;
[0086]
[0087] matrix = Move * Rotation * Scale.
[0088] S2.4, transmission of the n x 12-dimensional matrix of the instance component group. Since the basic unit of rendering in the subsequent three-dimensional scene rendering process is instantiation, the basic unit of pipeline transmission is also an instantiation pipeline component group. The geometric information of each pipeline can be represented using a 4 x 4 matrix. Since the fourth row vector of this matrix is always (0, 0, 0, 1), only the first three rows of data are needed to restore this matrix, and the first three rows contain a total of 12 decimal numbers, so the geometric parameters that each pipeline component needs to transmit are these 12 numerical values. The geometric information of each instantiation pipeline component group can be represented by a two-dimensional matrix, the number of rows of the matrix is the number of pipelines in this instantiation pipeline, and the number of columns of the matrix is 12;
[0089] S2.5, transmission of material data packet. Since the basic unit of pipeline transmission scheduling is also an instantiation pipeline component group, the unit of material transmission scheduling is also an instantiation pipeline component group. All components in each instantiation component group use the relevant GPU shading rendering code, and the material of the component group needs to be described by parameters, which need the index of the shading rendering code, the index of all texture files used in the material, and the roughness, color and other parameters of each component. The information is added up to the material parameters corresponding to an instantiation group to be transmitted. Packaging these data together constitutes a material data packet;
[0090] S2.6, web page decoding of pipeline parameters. The data required by the subsequent three-dimensional scene instantiation rendering thread includes three parts, one is the basic 3D geometric grid, shading rendering code and texture file shared by all components in the instantiation group, the second is the instantiation matrix of each component in the instantiation group, and the third is the roughness, color and other parameters of each component in the instantiation group. Web page decoding of pipeline parameters is to obtain the three parts of information according to the data transmitted to the web page through the Internet. For the first part of the shared data of all components in the instantiation group, all cylindrical pipeline components use the same basic 3D geometric grid, and the shading rendering code and texture file are obtained through the index in the material data packet. For the second part of the instantiation geometric information, the n x 12-dimensional instantiation component group matrix is needed. For the third part of the instantiation material information, the component material parameters in the material data packet are needed.
[0091] (3) as shown in Figure 3 and Figure 8 S3, efficient cylindrical pipeline lightweight picking algorithm, specifically comprising:
[0092] S3.1, coarse-grained pipeline visible picking. First, the positions of the two bottom center points of the pipeline are calculated, and then it is judged whether the bottom center is inside the view frustum. If at least one of the center points is inside the view frustum, it means that the pipeline intersects with the view frustum, and the program jumps to S3.4, otherwise the following view frustum culling judgment S3.2 is continued;
[0093] S3.2, intersection judgment of cylindrical axis and view frustum. First, the equation of the axis segment is obtained according to the coordinates of the two bottom center points, and then it is judged whether the axis segment intersects with the view frustum. If the axis segment intersects with the view frustum, it means that the pipeline component intersects with the view frustum, and the program jumps to S3.4, otherwise the following view frustum culling judgment S3.3 is continued;
[0094] The expression equation of the axis segment is:
[0095]
[0096] The expression equation of the view frustum is:
[0097]
[0098] S3.3, the intersection judgment of OBB and view frustum. According to the previous PCA calculation, the main direction of each pipeline component has been obtained, and the main direction is verified to obtain the component OBB bounding box, and finally whether the bounding box intersects with the view frustum is judged. It is easy to judge whether a point is in the view frustum, and the sufficient and necessary condition for the intersection of the bounding box and the view frustum is that there are some vertices in the eight vertices of the bounding box in the bounding box. If the bounding box does not intersect with the view frustum, it means that the component is not in the view frustum, the component is invisible, and the visibility judgment ends, otherwise the following visible judgment S3.4 is continued;
[0099] S3.4, obtaining the depth map of non-pipeline components. All non-pipeline components in the view frustum are screened from the scene, then the projection calculation and rasterization calculation of the triangle are performed, and finally the depth map of the non-pipeline component under the current view frustum is obtained (the depth value in the depth map describes the distance from the component to the viewpoint, and the greater the depth value, the closer to the viewpoint). In addition, there are some blank areas on the depth map, which have no non-pipeline components, and therefore will not cause occlusion to the pipeline component, so these blank areas need to be marked to facilitate subsequent operations;
[0100] S3.4, pipeline rasterization. The parameterized pipeline component is rasterized to obtain the corresponding area of the pipeline component projected onto the screen, and all pixels in the area are traversed, and the corresponding depth value (i.e. the distance to the viewpoint) of the pipeline component projected onto the pixel is calculated;
[0101] S3.5, occlusion judgment. For a parameterized pipeline component, if there is a pixel in the pipeline projection area corresponding to the blank area on the depth map, or the depth value of the pipeline component corresponding to a certain pixel is greater than the depth of the non-pipeline scene, it means that the parameterized pipeline can be seen by the current viewpoint, otherwise the parameter pipeline is completely occluded and currently invisible.
[0102] The embodiment provides an algorithm and transmission integration solution for a Web3D scene containing a large number of cylindrical pipelines, solves the problems of large preprocessing calculation, large network transmission data and low front-end rendering efficiency in the prior art, significantly improves the identification speed and accuracy of the pipeline component through an efficient cylindrical pipeline component identification algorithm, greatly reduces the transmission data amount and speeds up the system initialization speed through an efficient cylindrical pipeline parameterization transmission algorithm, and improves the pickup efficiency and response speed of the pipeline component through an efficient cylindrical pipeline lightweight pickup algorithm.
[0103] Compared with the prior art, the scheme provided in the embodiment has the following advantages:
[0104] High computational efficiency: By using an efficient recognition algorithm, the amount of computation in the preprocessing stage is significantly reduced.
[0105] High transmission efficiency: By parameterized transmission, the amount of transmitted data is greatly reduced, and the system initialization speed is accelerated.
[0106] High rendering efficiency: By using a lightweight picking algorithm, the picking efficiency and response speed of the pipeline component are improved, and the user experience is improved.
[0107] Embodiment 2
[0108] The embodiment provides a computer device which can be a server or a terminal, and an internal structure diagram thereof can be as shown in Figure 9 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is used to store data in the pipeline parameterization algorithm transmission rendering integrated processing method. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement the pipeline parameterization algorithm transmission rendering integrated processing method of embodiment 1.
[0109] Those skilled in the art can understand that Figure 9 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in each of the method embodiments described above.
[0110] Embodiment 3
[0111] The embodiment provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the pipeline parameterization algorithm transmission rendering integrated processing method of embodiment 1.
[0112] Embodiment 4
[0113] The embodiment provides a computer program product comprising a computer program which, when executed by a processor, implements the pipeline parameterization algorithm integration processing method of the embodiment 1.
[0114] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0115] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.
[0116] The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0118] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for integrated processing of pipeline parameterization calculation, transmission, and rendering, characterized in that, The integrated pipeline parameterization, calculation, transmission, and rendering processing method includes: Geometric feature analysis was performed on the original 3D mesh model to identify cylindrical pipeline components; Instantiation compression technology is used to convert the parameter information of the identified cylindrical pipeline components into instantiated data; Based on the instantiated data, the cylindrical pipeline components that are not visible from the current viewpoint are removed using the view frustum removal and depth map occlusion analysis techniques to obtain the removed cylindrical pipeline components. The removed cylindrical pipeline component is then rendered.
2. The pipeline parameterization calculation, transmission, and rendering integrated processing method according to claim 1, characterized in that, Geometric feature analysis was performed on the original 3D mesh model to identify cylindrical pipeline components, specifically including: The original 3D mesh model is converted into a triangular mesh model; The triangular mesh model is aligned using PCA to obtain a coordinate-aligned triangular mesh model. Determine whether there are edge points in the 3D components of the triangular mesh model after the coordinate system is aligned, and obtain the first determination result. The edge point refers to the vertex in the triangular mesh model after the coordinate system is aligned where the normal vector and the principal direction are not parallel. The principal direction refers to the direction of the cylindrical axis aligned with the coordinate axis in the triangular mesh model after the coordinate system is aligned. If the first judgment result is yes, then further judge whether the edge point falls on a pair of planes of the axis-aligned bounding box to obtain the second judgment result; When the second judgment result is yes, it is further judged whether the edge points all fall on a pair of rings to obtain the third judgment result, wherein the rings refer to the bottom surface of the cylinder; When the third judgment result is yes, it is determined whether the actual bottom area of the 3D component is greater than or equal to the bottom circular area to obtain the fourth judgment result. The bottom circular area is a variable calculated based on the target radius, the target radius is the distance from the target edge point to the cylinder axis, and the target edge point is the edge point where the third judgment result is yes. When the fourth determination result is yes, the 3D component is determined to be a cylindrical pipeline component.
3. The pipeline parameterization calculation, transmission, and rendering integrated processing method according to claim 1, characterized in that, The instantiated data includes geometric parameters and material parameters. Instantiation compression technology is used to convert the parameter information of the identified cylindrical pipeline component into instantiated data, specifically including: The identified cylindrical pipeline components are grouped according to their material type, resulting in several pipeline component groups; The geometric parameters of all identified cylindrical pipeline components in each pipeline component group are converted into an instantiated component group matrix. The material parameters of all identified cylindrical pipeline components in each pipeline component group and the corresponding instantiated component group matrix are compressed and transmitted to the web page respectively, and the instantiated data is obtained after decoding.
4. The pipeline parameterization calculation, transmission, and rendering integrated processing method according to claim 1, characterized in that, Based on the instantiated data, using view frustum culling and depth map occlusion analysis techniques, cylindrical pipeline components that are not visible from the current viewpoint are removed, resulting in the removed cylindrical pipeline components, specifically including: Based on the instantiated data, the pipeline cone coarse picking process is performed using the cone removal technique to determine whether the cylindrical pipeline component is inside the cone and obtain the fifth judgment result. When the fifth judgment result is yes, the pipeline fine picking process is performed using depth map occlusion analysis technology to determine whether the cylindrical pipeline component is occluded, and the sixth judgment result is obtained. When the fifth judgment result is negative, the cylindrical pipeline component is determined to be an invisible cylindrical pipeline component under the current viewpoint and is removed. When the sixth judgment result is yes, the cylindrical pipeline component is determined to be a visible cylindrical pipeline component under the current viewpoint and is retained; If the sixth judgment result is negative, the cylindrical pipeline component is determined to be an invisible cylindrical pipeline component under the current viewpoint and is removed.
5. The pipeline parameterization calculation, transmission, and rendering integrated processing method according to claim 4, characterized in that, The pipeline coarse cone pickup process is performed using the cone removal technique, specifically including: The center points of the two bottom surfaces of the cylindrical pipeline component are determined based on the instantiated data. Determine whether the center point is inside the visual cone to obtain the seventh determination result; When the seventh judgment result is yes, the cylindrical pipeline component with its center point inside the vertebral body is retained, and the pipeline fine picking process is performed using depth map occlusion analysis technology. If the seventh judgment result is negative, further judgment is made as to whether the axial segment of the cylindrical pipeline component intersects with the visual cone, thus obtaining the eighth judgment result; When the eighth judgment result is yes, the cylindrical pipeline component that intersects the axial segment with the visual cone is retained, and the pipeline fine picking process is performed using depth map occlusion analysis technology; If the eighth judgment result is negative, further judgment is made as to whether the enclosure of the cylindrical pipeline component intersects with the visual cone, thus obtaining the ninth judgment result; When the ninth judgment result is yes, the cylindrical pipeline component that intersects the bounding box and the view frustum is retained, and the pipeline fine picking process is performed using depth map occlusion analysis technology. If the ninth judgment result is negative, the cylindrical pipeline component is determined to be an invisible cylindrical pipeline component under the current viewpoint and is removed.
6. The pipeline parameterization calculation, transmission, and rendering integrated processing method according to claim 5, characterized in that, The pipeline fine-picking process is performed using depth map occlusion analysis technology, specifically including: Obtain depth maps of all non-pipeline components within the visual cone; The remaining cylindrical pipeline components are rasterized, and the depth value corresponding to each remaining cylindrical pipeline component when projected onto a pixel is calculated. The remaining cylindrical pipeline components include cylindrical pipeline components whose center point is inside the visual cone, cylindrical pipeline components whose axial segment intersects the visual cone, and cylindrical pipeline components whose bounding box intersects the visual cone. Based on the depth value and the depth map, it is determined whether the remaining cylindrical pipeline component is visible from the current viewpoint, and the tenth determination result is obtained; When the tenth judgment result is yes, the remaining cylindrical pipeline components visible from the current viewpoint are retained, resulting in the removed cylindrical pipeline components.
7. The pipeline parameterization calculation, transmission, and rendering integrated processing method according to claim 6, characterized in that, Based on the depth value and the depth map, it is determined whether the remaining cylindrical pipeline component is visible from the current viewpoint, resulting in the tenth determination result, which specifically includes: Determine whether the pixel corresponding to the depth value is a blank area in the depth map to obtain the eleventh determination result; When the eleventh judgment result is yes, it is determined that the remaining cylindrical pipeline components are visible and retained in the current viewpoint; If the eleventh judgment result is negative, determine whether the depth value is less than the corresponding value in the depth map to obtain the twelfth judgment result; When the twelfth judgment result is yes, it is determined that the remaining cylindrical pipeline components are visible and retained in the current viewpoint; If the twelfth judgment result is negative, the remaining cylindrical pipeline components are determined to be invisible from the current viewpoint and deleted.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the pipeline parameterization computation-transfer-rendering integrated processing method according to any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the pipeline parameterization calculation, transmission, and rendering integrated processing method as described in any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the pipeline parameterization calculation, transmission, and rendering integrated processing method as described in any one of claims 1-7.