Search

CN-121982247-A - Method for determining spatial position of labeling label of three-dimensional pipeline model

CN121982247ACN 121982247 ACN121982247 ACN 121982247ACN-121982247-A

Abstract

The invention relates to the technical field of three-dimensional digital visualization, in particular to a method for determining the spatial position of a labeling label of a three-dimensional pipeline model, which comprises the steps of analyzing geometric data, correlating pipe diameter, medium pressure, risk level and buried service metadata by utilizing a global unique identifier, sampling a camera pose transformation matrix to calculate a moving speed vector, utilizing a fast travelling algorithm to carry out wave front propagation by taking a pipeline grid boundary as a starting surface, determining a central ridge line, performing equal arc length resampling according to pipe diameters to generate discrete seed points, packaging attribute vectors, analyzing the visibility of the seed points by combining depth buffer comparison, prejudging shielding trend caused by visual angle transformation, driving anchor points to actively slide to a visual window along the central ridge line, constructing virtual force field coordination label layout conflict based on semantic weight, and correcting depth offset according to pipeline burial depth mapping to ensure labeling space-time mapping relation. The invention realizes stable representation of pipe network labeling through prediction slip and force field adjustment.

Inventors

  • ZHU WEI
  • YE YUN
  • WANG XIN
  • LIU CHEN

Assignees

  • 南京港华燃气有限公司

Dates

Publication Date
20260505
Application Date
20260408

Claims (8)

  1. 1. The method for determining the spatial position of the labeling label of the three-dimensional pipeline model is characterized by comprising the following steps of: The method comprises the steps of obtaining grid vertex data of a three-dimensional pipeline model, pipeline metadata and virtual camera parameters, wherein the pipeline metadata comprise pipe diameter, medium pressure, risk level and burial depth; extracting a three-dimensional pipeline center ridge line according to the grid vertex data, distributing discrete seed points on the three-dimensional pipeline center ridge line according to the pipe diameter, associating pipeline metadata to the corresponding seed points, and determining an initial anchor point from the discrete seed points; Analyzing the visibility of the seed point according to the real-time observation position and the view direction parameter, and driving the initial anchor point to slide towards the non-shielding visible window coordinate to obtain the real-time anchor point position; And inputting the moving speed vector, the medium pressure and the risk level into a strategy network, calculating the pre-judging sliding quantity, and adjusting the anchor point real-time coordinates.
  2. 2. The method for determining the spatial position of the labeling label of the three-dimensional pipeline model according to claim 1 is characterized in that the steps of obtaining grid vertex data, pipeline metadata and virtual camera parameters of the three-dimensional pipeline model comprise analyzing triangular grid geometric data files in an OBJ format, an FBX format and a 3D (three-dimensional) Tiles format, extracting discrete vertex spatial coordinates from the triangular grid geometric data files to obtain grid vertex data, carrying out semantic association on pipe diameters, medium pressures, risk grades and burial depths stored in a structural attribute database and pipe section grid components in the three-dimensional pipeline model by utilizing a global unique identifier, obtaining real-time observation positions and view direction parameters of a virtual camera in real time, sampling pose transformation matrixes of the virtual camera between a current frame and a previous frame in real time, calculating displacement difference values of the observation positions according to the pose transformation matrixes, and calculating a moving speed vector by combining frame interval time.
  3. 3. The method for determining the spatial position of the labeling label of the three-dimensional pipeline model according to claim 1 is characterized in that the process of associating pipeline metadata to corresponding seed points comprises the steps of carrying out wave front propagation calculation on the interior of a pipeline by using a pipeline model grid boundary as a starting surface through a fast traveling algorithm according to grid vertex data to obtain a distance field from each voxel to the pipeline model grid boundary, obtaining a set of local maximum points in the distance field, namely a set of maximum inscribed sphere centers, to obtain a three-dimensional pipeline center ridgeline, determining sampling step length of equal arc length resampling according to pipe diameter, carrying out discrete sampling on the three-dimensional pipeline center ridgeline by using the sampling step length to generate discrete seed points, and storing medium pressure, risk level and burial depth as attribute vectors of each discrete seed point to determine the initial anchor point.
  4. 4. The method for determining the spatial position of the labeling label of the three-dimensional pipeline model according to claim 1 is characterized in that the process of driving an initial anchor point to slide towards a non-shielding visual window coordinate comprises the steps of constructing a view projective transformation matrix according to the real-time observation position and the view direction parameter, converting three-dimensional coordinates of discrete seed points into a normalization equipment coordinate system to obtain screen pixel coordinates and corresponding projection depth values of the discrete seed points, reading back buffer area depth values matched with the screen pixel coordinates from a screen space depth buffer, comparing the projection depth values with the buffer area depth values, judging that the discrete seed points are in a shielding state and performing rejection if the projection depth values are larger than the buffer area depth values, searching a topological neighborhood on a three-dimensional pipeline central line by taking the rejected discrete seed points as starting points, identifying the seed points which are closest in topological distance and in a non-shielding state, determining the three-dimensional spatial position of the seed points in the non-shielding state as the visual window coordinate, and sliding the initial anchor point to the position along the three-dimensional pipeline central line.
  5. 5. The method for determining the spatial position of the labeling label of the three-dimensional pipeline model according to claim 1 is characterized in that the process of adjusting the real-time coordinates of the anchor points comprises the steps of combining the moving speed vector, the medium pressure and the risk level into a feature vector describing the current labeling state, inputting the feature vector into a pre-trained reinforcement learning strategy network, predicting a shielding trend generated by camera movement through the reinforcement learning strategy network, outputting a pre-judging sliding offset value along the central ridge line direction of the three-dimensional pipeline, acquiring the current parameterized arc length coordinates of a real-time anchor point on the central ridge line of the three-dimensional pipeline, performing accumulated update on the current parameterized arc length coordinates by utilizing the pre-judging sliding offset value, converting the updated parameterized arc length coordinates into the real-time coordinates in the three-dimensional space, establishing a space virtual force field by taking a real-time anchor point as an attractive force center, and calculating attractive force constraint of the real-time anchor point on the labeling label and mutual repulsive force between adjacent labeling labels.
  6. 6. The method for determining the spatial position of the labeling label of the three-dimensional pipeline model according to claim 5, wherein the process of calculating the attraction constraint of the real-time anchor point on the labeling label and the mutual repulsive force between adjacent labeling labels comprises the steps of mapping medium pressure into a pressure grade score, mapping a risk grade into a risk weight coefficient, calculating the product of the pressure grade score and the risk weight coefficient to obtain the physical weight of the labeling label, constructing a spatial virtual force field with different energy grades, calculating the elastic attraction of the real-time anchor point on the labeling label serving as the stress particle in the spatial virtual force field by taking the real-time anchor point as an attraction center, gathering the stress particle towards the attraction center, calculating the repulsive force between adjacent stress particles in the spatial virtual force field, pushing the mutually overlapped labeling labels away from each other, wherein the repulsive force is determined by the physical weight, under the combined action of the attraction constraint and the mutual repulsive force, enabling the total energy of the stress particles in the spatial virtual force field to reach dynamic balance, determining the stable position of the labeling label in a three-dimensional space, displaying the stable position of the labeling label in the spatial virtual force field by iterative calculation, correcting the coordinate of the labeling label to the overlapped label on a two-dimensional coordinate offset, and correcting the depth coordinate of the overlapped labeling label.
  7. 7. The method for determining the spatial position of a label tag for a three-dimensional pipeline model according to claim 6, wherein the step of adjusting the depth offset of the label tag in the line-of-sight direction in the three-dimensional world coordinate system according to the overlapping area and the burial depth comprises converting the three-dimensional coordinates of the label tag into a screen space by using a projection matrix of the virtual camera, and constructing a two-dimensional bounding box rectangle according to the text length and the font height of the label tag; the method comprises the steps of obtaining a three-dimensional bounding box rectangular, calculating intersection areas between two-dimensional bounding box rectangles to obtain an overlapping area on a screen, carrying out ascending arrangement on each labeling label according to a burial depth value in pipeline metadata, establishing a depth priority list, wherein the smaller the burial depth value is, the higher the corresponding depth priority of the labeling label is, when the overlapping area is larger than zero, obtaining an original Z-axis coordinate value of the labeling label under a viewpoint space coordinate system, subtracting a preset depth displacement step length on the basis of the original Z-axis coordinate value according to the depth priority, calculating to obtain an adjusted depth offset, utilizing an inverse observation matrix of a virtual camera, applying the depth offset to a position component of the labeling label under the viewpoint space coordinate system, restoring the position component to a world coordinate system, correcting the space coordinate, and smoothing the world coordinate, orientation data and turning path coordinates of a lead-out line of the center of the labeling label.
  8. 8. The method for determining the spatial position of a label of a three-dimensional pipeline model according to claim 7, wherein the process of outputting world coordinates, orientation data and turning path coordinates of an outgoing line of a label center comprises the steps of carrying out weighted average calculation on the spatial coordinates of the label at the current moment and the output coordinates of the label at the previous moment by using preset smooth coefficients to obtain world coordinates of the label center, obtaining a sight vector of the virtual camera, adjusting the normal vector direction of the label to enable the normal vector direction to be parallel to the opposite direction of the sight vector, obtaining the orientation data, ensuring that the label always faces an observation position of the virtual camera in a three-dimensional space, taking the real-time anchor point on a central spine line of the three-dimensional pipeline as a path starting point, taking the world coordinates of the label center as a path ending point, detecting and extracting non-collision intermediate turning point coordinates between the path starting point and the path ending point according to the geometric spatial boundary of the three-dimensional pipeline model, and generating the turning path coordinates formed by connecting the path starting point, the intermediate turning point coordinates and the path ending point sequentially.

Description

Method for determining spatial position of labeling label of three-dimensional pipeline model Technical Field The invention relates to the technical field of three-dimensional digital visualization, in particular to a method for determining the spatial position of a labeling label of a three-dimensional pipeline model. Background Along with the acceleration of industrial digitization process, a three-dimensional visualization technology has become a core supporting tool for the operation and maintenance of petrochemical industry, underground pipe networks and large-scale energy facilities, in a digital twin scene, a three-dimensional pipeline model is required to restore physical geometric forms, multi-dimensional service attribute information such as operation parameters, security levels, geographic depths and the like is also required to be carried, and in order to realize efficient man-machine interaction, a mode of combining labeling labels with outgoing lines is generally adopted to hang the abstract service data on corresponding spatial positions of the pipeline model. However, in practical applications, since industrial pipe networks often have extremely high spatial distribution density and complex topological structures, visual presentation of three-dimensional scenes faces serious challenges, and when an observer performs dynamic interactive operations such as rotation, translation or scaling through a virtual camera, visual association between a labeling label and a pipeline target is extremely susceptible to interference of spatial depth due to changes of perspective projection relations. Specifically, in the dynamic display process of high-density and multidimensional information, frequent mutual shielding and visual stacking can be generated between labeling labels and models and between different labeling labels, so that the effectiveness of information display is greatly reduced, and how to coordinate real-time presentation of high-density service information and maintain clear and stable space-time mapping relation between labeling content and complex pipe network targets in a three-dimensional dynamic visual environment is a technical problem to be solved in the current three-dimensional digital visualization field. Therefore, a method for determining the spatial position of a labeling label of a three-dimensional pipeline model is provided. Disclosure of Invention The invention aims to provide a method for determining the spatial position of a labeling label of a three-dimensional pipeline model, which realizes stable representation of pipe network labeling through prediction slip and force field adjustment. Analyzing geometric data, associating pipe diameter, medium pressure, risk level and buried depth service metadata by using a global unique identifier, sampling a camera pose transformation matrix to calculate a moving speed vector, carrying out wave front propagation by using a fast travelling algorithm and taking a pipeline grid boundary as a starting surface, determining a central ridge line, carrying out equal arc length resampling according to the pipe diameter to generate a discrete seed point, packaging an attribute vector, analyzing the visibility of the seed point by combining depth buffer comparison, prejudging the shielding trend caused by view angle transformation, driving an anchor point to actively slide to a visible window along the central ridge line, constructing a virtual force field coordination label layout conflict based on semantic weight, and correcting a depth offset according to pipeline buried depth mapping, thereby ensuring a marked space-time mapping relation. In order to achieve the above purpose, the present invention provides the following technical solutions: A method for determining the spatial position of a labeling label of a three-dimensional pipeline model comprises the following steps: The method comprises the steps of obtaining grid vertex data of a three-dimensional pipeline model, pipeline metadata and virtual camera parameters, wherein the pipeline metadata comprise pipe diameter, medium pressure, risk level and burial depth; extracting a three-dimensional pipeline center ridge line according to the grid vertex data, distributing discrete seed points on the three-dimensional pipeline center ridge line according to the pipe diameter, associating pipeline metadata to the corresponding seed points, and determining an initial anchor point from the discrete seed points; Analyzing the visibility of the seed point according to the real-time observation position and the view direction parameter, and driving the initial anchor point to slide towards the non-shielding visible window coordinate to obtain the real-time anchor point position; And inputting the moving speed vector, the medium pressure and the risk level into a strategy network, calculating the pre-judging sliding quantity, and adjusting the anchor point real-time coordinates. Preferably, th