Spatial intelligent three-dimensional modeling method for designing sketch image based on two-dimensional structure

By preprocessing and structural tensor representation of 2D sketches, a sketch semantic graph is constructed and mechanical logic reasoning is performed, generating a more reasonable and stable 3D model. This solves the problem of unreasonable component connection relationships in existing technologies, and improves modeling efficiency and engineering usability of the model.

CN121505201APending Publication Date: 2026-02-10BEIJING FEIDU TECH CO LTD

Patent Information

Application Number
CN202610030555.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing 3D modeling solutions fail to effectively uncover the spatial component relationships and force constraint logic hidden in 2D sketches, resulting in a lack of rationality in the connection relationships of components in the generated 3D model, making it difficult to meet structural stability requirements and affecting modeling efficiency and engineering usability.

Method used

By preprocessing the two-dimensional structural design sketch image, extracting the structured tensor representation, constructing the sketch semantic graph, determining the node embedding vector, and defining the geometric reasoning order according to the mechanical logic, a three-dimensional structural model is generated.

Benefits of technology

It improves the structural rationality and mechanical stability of 3D models, reduces the workload of subsequent adjustments and verification, and is suitable for scenarios such as architectural design and robot construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505201A_ABST
    Figure CN121505201A_ABST
Patent Text Reader

Abstract

The invention provides a spatial intelligent three-dimensional modeling method based on a two-dimensional structure design sketch image, and the method comprises the steps: carrying out the preprocessing of an input two-dimensional structure design sketch image, and obtaining a preprocessed design sketch image, extracting two-dimensional structure design features from the preprocessed design sketch image, and encoding the two-dimensional structure design features to generate structured tensor representation; deducing space components, function partitions and constraint logic based on structured tensor representation to construct a sketch semantic graph, nodes of the sketch semantic graph representing physical structure units, and edges of the sketch semantic graph representing connection relations and stress constraints among the physical structure units; determining a node embedding vector corresponding to each node in the sketch semantic graph so as to perform three-dimensional space coding on the node embedding vector to obtain a node potential vector, and generating a geometric reasoning sequence during three-dimensional structure geometric reasoning according to a mechanical logic definition on the basis of edges in the sketch semantic graph, and performing three-dimensional structure geometric reasoning based on the node potential vectors and the geometric reasoning sequence to generate a three-dimensional structure model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of spatial intelligence and computer-aided design, and particularly relates to a three-dimensional modeling method combining sketch recognition, feature coding and geometric reasoning, which can be applied to scenarios such as architectural structure design, robot building, creative modeling and virtual reality configuration. BACKGROUND

[0002] In scenarios such as architectural design and robot structure research and development, designers often express spatial ideas quickly through two-dimensional structural design sketches, and converting two-dimensional sketches into three-dimensional models with reasonable structures is a key link for subsequent design verification and manufacturing. Efficient and accurate realization of this conversion can significantly shorten the design cycle, reduce research and development costs, and meet the actual needs of rapid modeling in various fields. Existing three-dimensional modeling schemes extract line coordinate information from two-dimensional sketches, match shapes with a pre-set three-dimensional component library, and directly map two-dimensional lines to corresponding three-dimensional geometric entities. This scheme first extracts basic geometric parameters such as length and angle from sketch lines, then matches three-dimensional components of similar sizes in the parameter library, and finally forms a three-dimensional model by translating and splicing components. Its core relies on the reuse of pre-set component shapes to realize the conversion from two-dimensional to three-dimensional through fixed mapping rules. However, this existing technical solution only focuses on the basic geometric parameters of lines and fails to tap the spatial component association and force constraint logic implied in two-dimensional sketches. This results in a lack of reasonableness in the connection relationship of components in the generated three-dimensional model, making it difficult to meet the structural stability requirements in actual applications, and a large amount of effort needs to be invested in additional component connection adjustment and mechanical verification, significantly affecting the modeling efficiency and engineering usability of the model. SUMMARY

[0003] To solve the above technical problems, the present application provides a spatial intelligent three-dimensional modeling method based on a two-dimensional structural design sketch image, at least to alleviate the above technical problems.

[0004] The technical solution provided in this application is as follows: A method for spatial intelligent 3D modeling based on a 2D structural design sketch image, comprising the following steps: Step 1: Preprocessing the input 2D structural design sketch image to obtain a preprocessed design sketch image; extracting 2D structural design features from the preprocessed design sketch image and encoding them to generate a structured tensor representation; Step 2: Inferring spatial components, functional partitions, and constraint logic based on the structured tensor representation to construct a sketch semantic graph, wherein nodes in the sketch semantic graph represent physical structural units, and edges represent the connection relationships and force constraints between physical structural units; Step 3: Determining the node embedding vector corresponding to each node in the sketch semantic graph and obtaining the node latent vector by encoding it in 3D space; generating the geometric reasoning order for 3D structural geometric reasoning based on the edges in the sketch semantic graph according to the mechanical logic definition; and performing 3D structural geometric reasoning based on the node latent vector and the geometric reasoning order to generate a 3D structural model.

[0005] The spatial intelligent 3D modeling method based on 2D structural design sketch images provided in this application involves "preprocessing the input 2D structural design sketch image to obtain a preprocessed design sketch image, extracting 2D structural design features from the preprocessed design sketch image and encoding them to generate a structured tensor representation." Preprocessing reduces the interference of shadows and noise on the geometric contours, while feature extraction and encoding integrate the geometric attributes of lines (such as line segment node pairs and length direction) with potential spatial association information into a structured tensor. Compared to traditional single-parameter extraction, this process can more comprehensively retain the effective information of the sketch, laying a data foundation for subsequent "understanding of structural intent" rather than "meeting only the appearance of lines." This is particularly suitable for scenarios such as architectural design and robot construction where "the sketch needs to convey complex spatial concepts"—in these scenarios, the implicit relationships between components cannot be reflected solely by line length and angle, while structured tensors can carry richer design intent and reduce information bias in the subsequently generated model. In addition, by "inferring spatial components, functional zones, and constraint logic based on structured tensor representation to construct a sketch semantic graph, where nodes in the sketch semantic graph represent physical structural units and edges represent the connection relationships and force constraints between physical structural units": This step differs from the traditional simple mapping of "lines-components". By mining spatial components, functional zones, and constraint logic through structured tensors, the two-dimensional sketch is transformed into a semantic graph containing "physical structural units (nodes)" and "connection / force constraints (edges)". The semantic graph clarifies these constraints in advance, making the subsequent three-dimensional generation change from "unlogical splicing" to "construction according to constraints", which greatly reduces the workload of subsequent model adjustments. Finally, by "determining the node embedding vector corresponding to each node in the sketch semantic graph to obtain the node latent vector through 3D spatial encoding, generating the geometric reasoning order for 3D structural geometric reasoning based on the edges in the sketch semantic graph according to the mechanical logic definition, and generating the 3D structural geometric reasoning model based on the node latent vector and the geometric reasoning order": On the one hand, the node latent vector provides feature support for 3D spatial position reasoning, ensuring that the generated component shape conforms to the sketch semantics; on the other hand, the mechanical logic order based on the "edge" (connection / force constraint) definition ensures that the reasoning process follows mechanical laws (such as prioritizing the generation of support-type physical structural units). Compared with the traditional fixed-order generation, this reasoning method makes the 3D model conform to mechanical logic from the generation stage, which is especially suitable for scenarios with high requirements for "structural stability" such as robot building and architectural structural design. In these scenarios, traditional solutions often result in unstable models due to the lack of mechanical logic in the generation order, such as "generating end components first and then supporting components." The mechanical logic order of this solution can reduce such problems from the source, making the generated 3D model structure more reasonable than the traditional solution, and reducing the cost of subsequent mechanical verification and correction. Attached Figure Description

[0006] Figure 1 This application provides a schematic flowchart of a method for spatial intelligent 3D modeling based on 2D structural design sketch images. Detailed Implementation

[0007] like Figure 1 As shown, a method for spatial intelligent 3D modeling based on 2D structural design sketch images is provided, including the following steps: Step 1: Preprocess the input 2D structural design sketch image to obtain a preprocessed design sketch image, extract the 2D structural design features from the preprocessed design sketch image and encode them to generate a structured tensor representation; Step 2: Based on the structured tensor representation, infer spatial components, functional partitions and constraint logic to construct a sketch semantic graph, where nodes in the sketch semantic graph represent physical structural units, and edges represent the connection relationships and force constraints between physical structural units; Step 3: Determine the node embedding vector corresponding to each node in the sketch semantic graph and obtain the node latent vector by 3D spatial encoding it, generate the geometric reasoning order for 3D structural geometric reasoning based on the edges in the sketch semantic graph according to the mechanical logic definition, and perform 3D structural geometric reasoning based on the node latent vector and the geometric reasoning order to generate a 3D structural model.

[0008] Optionally, in step 1, when preprocessing the input two-dimensional structural design sketch image to obtain the preprocessed design sketch image, the spatial domain pixel matrix corresponding to the two-dimensional structural design sketch image is converted into frequency domain data. The frequency domain data is then subjected to high-pass filtering to retain the high-frequency components of the corresponding geometric contours and attenuate and suppress the low-frequency components of the corresponding shadows to generate high-frequency enhanced data in the frequency domain. The high-frequency enhanced data in the frequency domain is then converted back to the spatial domain through inverse Fourier transform to obtain a high-frequency enhanced sketch image to generate the preprocessed design sketch image.

[0009] Preferably, the specific implementation process of preprocessing the input two-dimensional structural design sketch image in step 1 to obtain the preprocessed design sketch image is as follows: First, obtain the spatial domain pixel matrix corresponding to the two-dimensional structural design sketch image. The row dimension of this spatial domain pixel matrix corresponds to the pixel position in the height direction of the sketch image (e.g., the pixel index from the top to the bottom of the image), and the column dimension corresponds to the pixel position in the width direction of the sketch image (e.g., the pixel index from the left to the right of the image). The element value at the intersection of the row and column in the matrix is ​​the gray value of the corresponding pixel position (the value range is usually 0-255, where 0 represents black and 255 represents white). This spatial domain pixel matrix is ​​the initial processing object for preprocessing; this spatial domain image The prime matrix is ​​subjected to an improved Fast Fourier Transform (FFT) to convert it into frequency domain data. The improvement lies in the characteristic of two-dimensional structural design sketch images with "locally dense lines and locally blank areas (such as background areas)". Block-based adaptive FFT processing is adopted: first, the spatial domain pixel matrix is ​​divided into multiple non-overlapping pixel blocks. Smaller block sizes (e.g., 8×8 pixel blocks) are used for densely lined areas (such as wall intersections in architectural sketches or component connection points in robot sketches) to preserve the detailed frequency information of line edges. Larger block sizes (e.g., 32×32 pixel blocks) are used for blank or shaded areas to reduce redundant computation. This approach improves computational efficiency compared to traditional fixed-block FFT while preserving key line information. The resulting frequency domain data is a complex matrix, where the amplitude of each element represents the intensity of the corresponding frequency component. Low-frequency components (the central region of the matrix) correspond to smooth areas in the sketch (such as shadows or large background areas), while high-frequency components (the edge regions of the matrix) correspond to geometric contour lines in the sketch (such as wall lines or component edges). Using this frequency domain data as the processing object, an adaptive high-pass filtering process based on line contribution is performed: first, the correlation between each frequency component in the frequency domain and lines in the spatial domain is statistically analyzed—by analyzing a large number of similar scenarios (such as architectural structural design and robot construction) in the sketch... For the sample graph, a mapping relationship between "frequency component - line type" is established. For example, in the high-frequency region of the frequency domain, the frequency component corresponding to the edge of a straight line in the spatial domain is marked as "high line contribution", and the frequency component corresponding to random noise in the spatial domain (such as noise in a scanned sketch) is marked as "low line contribution". Based on this mapping relationship, filter thresholds are designed: for high-frequency components with high line contribution, a lower filter threshold is set (e.g., 0.1 times the maximum amplitude of the frequency domain), attenuating only a very small portion of this type of component; for high-frequency components with low line contribution, a higher filter threshold is set (e.g., 0.3 times the maximum amplitude of the frequency domain), significantly attenuating this type of component. At the same time, a fixed attenuation coefficient (e.g., 0.5) is applied to all low-frequency components (regardless of contribution).5) To suppress the smooth signal corresponding to shadows, adaptive filtering is used to obtain high-frequency enhanced data in the frequency domain. The high-frequency components corresponding to the geometric contours are effectively preserved, while the low-frequency components corresponding to shadows and high-frequency noise components are significantly attenuated. Using this high-frequency enhanced data, an Inverse Fast Fourier Transform (IFFT) is performed to convert the complex frequency domain data back to the spatial domain, resulting in a spatial domain complex matrix. A modulo operation is then performed on this spatial domain complex matrix to convert the complex elements into non-negative amplitude data, resulting in a spatial domain amplitude matrix. Finally, grayscale normalization is performed on this spatial domain amplitude matrix. Processing: The maximum and minimum amplitude values ​​in the amplitude matrix are calculated. Each element's amplitude is then mapped to a grayscale value range of 0-255 using a linear mapping formula (mapping formula: normalized grayscale value = (current amplitude - minimum amplitude) / (maximum amplitude - minimum amplitude) × 255), resulting in a grayscale-normalized image matrix. The image corresponding to this matrix is ​​the high-frequency enhanced sketch image. In this image, the geometric contour lines of the 2D structural design sketch are significantly clearer than the original input image, and shadows and noise interference are significantly reduced. This high-frequency enhanced sketch image serves as a core component of the preprocessed design sketch image, providing a high-quality geometric contour foundation for subsequent 2D structural design feature extraction.

[0010] Optionally, in step 1, when preprocessing the input two-dimensional structural design sketch image to obtain the preprocessed design sketch image, based on the spatial domain pixel matrix corresponding to the high-frequency enhanced sketch image, the encoder of the U-Net convolutional network extracts line features, the decoder extracts spatial semantic features, and the line features and spatial semantic features are fused to obtain multi-scale composite features, so as to generate the preprocessed design sketch image.

[0011] Preferably, in the specific technical implementation of extracting and fusing features based on the spatial domain pixel matrix corresponding to the high-frequency enhanced sketch image in step 1, the spatial domain pixel matrix corresponding to the high-frequency enhanced sketch image is first obtained. The row dimension of this matrix corresponds to the pixel position in the height direction of the sketch image (e.g., pixel numbers 1 to H from the top to the bottom of the image, where H is the number of pixels in the image height, for example, 512), and the column dimension corresponds to the pixel position in the width direction of the sketch image (e.g., pixel numbers 1 to W from the left to the right of the image, where W is the number of pixels in the image width, for example, 512). The element value at the intersection of the row and column of the matrix is ​​the gray value of the corresponding pixel position (the value ranges from 0 to 255, where 0 represents a darker line area). (where 255 represents a brighter background area), this spatial pixel matrix is ​​the initial processing object for feature extraction. An improved U-Net convolutional network encoder is then applied to this spatial pixel matrix to extract line features. The improved encoder contains four feature extraction stages, each consisting of a "line-aware convolutional layer + batch normalization layer + ReLU activation layer + max pooling layer". The design of the line-aware convolutional layer involves: in addition to the standard 3×3 convolutional kernel (used to capture local line details, such as the corners of walls in architectural sketches or the chamfers of components in robot sketches), additional 1×5 and 5×1 strip convolutional kernels are introduced (used to capture long strip lines in sketches). To ensure continuity and adapt to scenarios such as continuous wall lines in architectural sketches and slender support axes in robot sketches, the number of convolutional kernels of different sizes in each convolutional layer is configured in a 1:1:1 ratio (e.g., the first stage convolutional layer contains 32 3×3 convolutional kernels, 32 1×5 convolutional kernels, and 32 5×1 convolutional kernels; the number of convolutional kernels in the second to fourth stages doubles to 64, 128, and 256 respectively). The number of channels in the output feature map of each stage doubles with increasing stage depth (64 channels in the first stage, 128 channels in the second stage, 256 channels in the third stage, and 512 channels in the fourth stage). The feature maps output in each stage are named "Shallow Line Edge Feature Map" (the first stage is named "Shallow Line Edge Feature Map"). The first stage preserves subtle grayscale variations at the line edges; the second stage highlights the overall outline shape of the lines; the third stage explores local connections between adjacent lines; and the fourth stage presents the overall topological distribution of all lines. In each of these line feature maps, the channel dimension represents different types of line features (e.g., channel 1 represents line edge intensity, channel 2 represents line extension direction, and channel 3 represents line curvature). The element value at the intersection of rows and columns represents the response intensity of the corresponding pixel position under the channel feature (the higher the value, the more the position conforms to the definition of the channel feature).Using the four-stage line feature maps output by the encoder as a reference, an improved U-Net convolutional network decoder is applied to extract spatial semantic features. The improved decoder also contains four feature recovery stages, each corresponding to a feature extraction stage of the encoder. Each stage consists of a transposed convolutional layer (upsampling), a feature concatenation layer, and a spatial semantic inference layer. The transposed convolutional layer uses a 2×2 kernel to double the row and column dimensions of the previous stage's output feature map (e.g., upsampling the 512-channel feature map output from the fourth stage of the decoder to the same row and column dimensions as the "deep line association feature map" from the third stage of the encoder). The feature concatenation layer combines the upsampled feature map with the corresponding line feature map from the encoder. The feature map is concatenated along the channel dimension (e.g., after concatenating the upsampled feature map from the fourth stage of the decoder with the "deep line association feature map" from the third stage of the encoder, the number of channels is 512 + 256 = 768). The spatial semantic inference layer is a design module, which is implemented through three steps: "1×1 convolution dimensionality reduction + graph convolution inference + sigmoid activation". First, 1×1 convolution dimensionality reduction is performed on the concatenated feature map, reducing the number of channels to half of the original number (e.g., from 768 channels to 384 channels), reducing the computational load of subsequent inference. Second, a pixel-level semantic association graph is constructed based on the Graph Convolutional Network (GCN) algorithm. Each node in this graph corresponds to a pixel position in the feature map. The edge weights are determined by calculating the cosine similarity of the line features between two pixels (e.g., in an architectural sketch, adjacent wall pixels have high line feature similarity and therefore higher edge weights; background pixels and line pixels have low similarity and therefore lower edge weights). Spatial semantic relationships between pixels are mined through graph convolution inference (e.g., the support relationship between "wall pixels and beam pixels," and the fixed relationship between "robot base pixels and column pixels"). In the third step, the semantic response value (range 0-1) of each pixel position is output via a sigmoid activation function. The feature maps output by the decoder at each stage are named "Local Spatial Semantic Feature Map" (fourth stage, corresponding to the third stage of the encoder, capturing semantic relationships within a local area) and "Regional Spatial Semantic Feature Map" (third stage). The segments, corresponding to the second stage of the encoder, present the functional semantics of a larger area, such as the room area in a building or the actuator area in a robot; the "global spatial semantic feature map" (the second stage, corresponding to the first stage of the encoder, covering the spatial semantic distribution of the entire sketch); and the "fine spatial semantic feature map" (the first stage, corresponding to the first stage of the encoder, preserving pixel-level fine semantic details). In each of these spatial semantic feature maps, the channel dimension represents different types of semantic features (e.g., channel 1 is the component type identifier, channel 2 is the connection relationship category, and channel 3 is the functional partition label). The element value at the intersection of the row and column represents the association strength of the corresponding pixel position under the semantics of that channel (the higher the value, the higher the probability that the position belongs to the semantic category of that channel).Using the four-stage line feature maps output by the encoder and the four-stage spatial semantic feature maps output by the decoder as processing objects, multi-scale attention fusion processing is performed to obtain multi-scale composite features. The fusion process is implemented through a designed "multi-scale attention fusion module": First, the line feature maps and corresponding spatial semantic feature maps of each stage are aligned in size. A bilinear interpolation algorithm is used to uniformly enlarge the row and column dimensions of all feature maps to be consistent with the spatial domain pixel matrix of the high-frequency enhanced sketch image (e.g., enlarging the fourth stage "global line topology feature map" of the encoder from 32×32 pixels to 512×512 pixels), resulting in 8 feature maps of uniform size (4 line feature maps and 4 semantic feature maps). Then, the association weight between line features and semantic features at each pixel position is calculated: For each pixel position, the average response value of all channels in the four line feature maps is extracted as the comprehensive value of the line features at that position, and the average response value of all channels in the four semantic feature maps is extracted as the comprehensive value of the semantic features at that position. The cosine similarity formula is used to calculate... The correlation between the comprehensive value of line features and the comprehensive value of semantic features (correlation ranges from 0 to 1; a higher value indicates a higher matching degree between the line features and semantic features at that location, such as the high correlation at the intersection of walls in an architectural sketch) is normalized and used as the fusion weight for that pixel location. Finally, the line features and semantic features at each pixel location are weighted and fused according to the formula "comprehensive value of line features × fusion weight + comprehensive value of semantic features × (1 - fusion weight)". After fusion, a single-channel multi-scale composite feature map is obtained. The row and column dimensions of this feature map are completely consistent with the high-frequency enhanced sketch image. The element values ​​at the intersection of rows and columns represent the comprehensive response intensity of "line geometric features - spatial semantic features" at the corresponding pixel location. This multi-scale composite feature map is the core feature carrier of the preprocessed design sketch image, providing high-quality input with both geometric details and semantic correlation for the subsequent "size restoration - semantic segmentation" line-background separation processing, ensuring that the extracted two-dimensional structural design features contain both accurate line geometric information and corresponding spatial semantic information.

[0012] Optionally, in step 1, when preprocessing the input two-dimensional structural design sketch image to obtain the preprocessed design sketch image, the multi-scale composite features are mapped back to the original size of the high-frequency enhanced sketch image to obtain the size-restored feature map. Then, the size-restored feature map is subjected to binary classification semantic segmentation to distinguish geometric contours from noise pixels, resulting in the preprocessed design sketch image after line-background separation.

[0013] Preferably, the specific implementation process of mapping the multi-scale composite features back to the original size and performing binary classification semantic segmentation in step 1 is as follows: First, obtain the multi-scale composite features, which are single-channel feature maps (channel dimension is only 1 dimension, representing the comprehensive response intensity of "line geometry-spatial semantics"), with a row dimension of H / 2^k and a column dimension of W / 2^k (k is the maximum pooling number of the U-Net encoder, for example, k=4. If the original size of the high-frequency enhanced sketch image is H=512 pixels and W=512 pixels, then the initial size of the multi-scale composite feature is 32×32 pixels). The element values ​​at the intersection of the row and column of the feature map are the comprehensive response intensity of 0-1 (the higher the value, the higher the probability that the corresponding position belongs to the geometric contour line). This multi-scale composite feature is the initial processing object for size mapping. Improved bilinear interpolation is performed on the multi-scale composite features to map them back to the original size of the high-frequency enhanced sketch image. The improvement lies in the introduction of a "line continuity weight adjustment mechanism": traditional bilinear interpolation only allocates weights according to pixel position distance. This application, when calculating the interpolation weights, additionally combines multi-scale... The interpolation weights are shifted towards pixels with higher response intensity in the multi-scale composite feature. If the difference in response intensity between adjacent pixels is less than the set difference threshold T1 (for example, T1=0.1, which means the area is a continuous line area), the interpolation weights are shifted to pixels with higher response intensity (the shift ratio is 1.2 times to enhance line continuity). If the difference in response intensity between adjacent pixels is greater than or equal to T1 (which means the area is a line edge or background transition area), the traditional distance weight allocation is maintained (to avoid excessive shifting that would blur the line edges). During the interpolation process, the contribution weight of each pixel in the multi-scale composite feature to the original size target pixel is calculated first, and then the response value of the target pixel is obtained by weighted summation. Finally, a feature map with a size completely consistent with the high-frequency enhanced sketch image (H×W pixels) is output. This feature map is named "size-restored feature map". Its row dimension corresponds to the pixel position in the height direction (1 to H) of the high-frequency enhanced sketch image, and its column dimension corresponds to the pixel position in the width direction (1 to W). The element values ​​at the intersection of rows and columns are still the comprehensive response intensity of 0-1, and the continuity and semantic association of lines in the multi-scale composite feature are preserved.Using the resized feature map as the processing object, an improved binary semantic segmentation process is performed to distinguish geometric contours from noise pixels. The improved segmentation model is a "line-focused lightweight segmentation network," which consists of three parts: a feature enhancement layer, a line attention layer, and a classification output layer. The feature enhancement layer uses 3×3 convolutional kernels to perform convolution operations on the resized feature map (16 kernels, outputting a 16-channel feature map). The weights of each convolutional kernel are initialized with an emphasis on "line edge response" (optimized using a pre-trained dataset (containing sketch samples from scenes such as architecture and robotics) to make the kernels more likely to capture grayscale gradient changes in lines). The output 16-channel feature map is named the "line detail enhancement feature map," with each channel focusing on a specific line detail (e.g., channel 1 focuses on horizontal lines, channel 2 on vertical lines, channel 3 on 45° diagonal lines, etc., adapting to the line direction requirements of different scene sketches). The line attention layer is the core module, which generates the line attention map through three steps: "channel weight calculation → spatial weight calculation → weight fusion." The first step is to calculate the channel weights: statistically analyze the 16 channels... The first step is to calculate the cosine similarity between each channel in the feature map and the "line sample library" (built during pre-training, containing standard line features for various scenes). Channels with higher similarity are assigned higher weights (e.g., horizontal / vertical lines have higher weights in architectural sketches, and diagonal lines have higher weights in robot sketches), resulting in a 16-dimensional channel weight vector. The second step is to calculate spatial weights: global average pooling is performed on the 16-channel feature map to obtain a 16-dimensional channel mean vector, which is then multiplied pixel-by-pixel with the size-restored feature map to highlight spatial locations with high response intensity (i.e., potential line regions), resulting in a spatial weight feature map. The third step is to fuse the channel weight vector and the spatial weight feature map in a weighted manner along the channel dimension to obtain a single-channel line attention map (element values ​​are 0-1, with higher values ​​indicating higher confidence that the position belongs to a geometric contour line). The classification output layer uses a 1×1 convolutional kernel to map the line attention map into a single-channel classification feature map, and then outputs the "line category probability" of each pixel through a sigmoid activation function (between 0 and 1, with values ​​close to 1 indicating that the pixel is a geometric contour pixel, and values ​​close to 0 indicating that the pixel is a noise / background pixel).Using the line category probability map obtained from the classification output layer as the processing object, binary classification threshold segmentation is performed: A category determination threshold T2 is set (adaptively adjusted according to the scene; for architectural sketches with thicker lines, T2 can be set to 0.3, and for robot sketches with thinner lines, T2 can be set to 0.25). Pixels with a probability value greater than T2 are marked as "geometric contour pixels" (assigned a value of 255, white), and pixels with a probability value less than or equal to T2 are marked as "noise / background pixels" (assigned a value of 0, black). The final result is a black and white binary image, which is the "preprocessed design sketch image after line-background separation". —Only clear geometric contour lines are retained in the image. Noise such as shadows, scan noise, and slight overlapping strokes in the original sketch are filtered out. Furthermore, the continuity and integrity of the lines are significantly improved compared to traditional segmentation methods. This preprocessed design sketch image provides a noise-free and geometrically clear foundation for subsequent morphological processing and vectorization conversion, effectively solving the problem of incomplete separation of lines and noise in traditional sketch preprocessing. It is particularly suitable for scenarios requiring clear and continuous lines for walls and beams in architectural structural design, and for precise separation of support shafts and connecting parts in robot assembly.

[0014] Optionally, in step 1, when extracting two-dimensional structural design features from the preprocessed design sketch image and encoding them to generate a structured tensor representation, morphological processing is performed on the preprocessed design sketch image to obtain the lines and perform vectorization transformation processing to obtain vectorized path data containing node pairs corresponding to each line segment and attached geometric attributes, which is then encoded to generate a structured tensor representation.

[0015] Preferably, the specific implementation process of performing morphological processing and vectorization transformation on the preprocessed design sketch image in step 1 is as follows: First, obtain the preprocessed design sketch image after line-background separation. This image is a black and white binary image (pixel values ​​are only 0 or 255, where 255 represents geometric contour line pixels and 0 represents background pixels). Its row dimension corresponds to the pixel position in the height direction of the sketch (1 to H, H is 512 pixels for example), and its column dimension corresponds to the pixel position in the width direction (1 to W, W is 512 pixels for example). This preprocessed design sketch image is the initial processing object for morphological processing. Improved morphological operations are performed on this preprocessed design sketch image. The core improvement lies in "scene-adaptive structural element design", which is divided into three steps: First, morphological deburring: use elliptical structural elements to perform opening operations (erosion followed by dilation). The major axis length L and minor axis length M of the structural element are dynamically adjusted according to the line type. Adjustments—If the image is an architectural structural design sketch (lines are relatively thick, such as wall lines with a width of about 5-8 pixels), then set L=3 pixels and M=2 pixels; if it is a robot construction sketch (lines are relatively thin, such as support shafts with a width of about 2-3 pixels), then set L=2 pixels and M=1 pixel. During the opening operation, first remove burr pixels (such as isolated noise left over from scanning) smaller than the size of the structural element by erosion, and then restore the main shape of the lines by dilation to avoid excessive thinning of the lines, resulting in a deburred line image; the second step, morphological breakpoint filling: use linear structural elements to perform closing operations (dilation followed by erosion), the direction of the linear structural element is consistent with the dominant direction of the lines (by statistically analyzing the slopes of all lines in the image, the slope with the highest frequency is taken as the dominant direction, such as the dominant directions of 0° and 90° in architectural sketches, and 45° in robot sketches), and the length of the structural element is set to 1 of the average width of the lines.The first step involves a 5x multiplication factor (for example, if the average line width is 3 pixels, then the length is set to 4 pixels). The closing operation connects breakpoints smaller than the length of the structuring element (such as slight breaks in hand-drawn lines) between lines through dilation. Then, the edges of the lines are regularized by erosion to obtain a continuous line image. The third step is morphological skeleton extraction: using a distance transform combined with threshold segmentation, the shortest distance from each line pixel to the background pixel in the continuous line image is calculated. Pixels with distance values ​​greater than half the line width are retained, forming a single-pixel-width line skeleton. This skeleton preserves the topological structure of the lines (such as intersections and turning points) and has no redundant pixels, thus obtaining the line skeleton. The image contains a single pixel position that corresponds to the central axis position of the original line. Using the line skeleton image as the processing object, an improved vectorization transformation is performed. The improvement lies in "intersection point priority splitting + dynamic statistics of geometric attributes," specifically divided into four steps: Step 1, intersection point detection and marking: A 3×3 neighborhood window is used to traverse the line skeleton image, counting the number of neighboring non-background pixels for each non-background pixel (value 255). If the number of neighboring non-background pixels is greater than 2 (representing that the pixel is an intersection point, such as the T-shaped intersection of a wall in an architectural sketch, or the cross intersection of an axis and joint in a robot sketch), then... The first step is to mark the pixel as an intersection point and record its coordinates (x_c, y_c), where x_c is the column dimension position and y_c is the row dimension position. The second step is line segmentation: using the intersection point as the splitting node, the continuous line skeleton is divided into several independent line segments—starting from each intersection point, pixels are traced along different extension directions of the line skeleton until the next intersection point or line endpoint (a pixel with a non-background neighbor of 1 pixel) is encountered. Each tracing path corresponds to an independent line segment, resulting in a set of line segment fragments, each composed of continuous skeleton pixels. The third step is line segment endpoint extraction and node pair construction: For each line segment, the starting pixel coordinates (x_s, y_s) and ending pixel coordinates (x_e, y_e) of the tracking path are taken as the endpoints of the line segment, forming the corresponding node pair ((x_s, y_s), (x_e, y_e)). At the same time, all skeleton pixel coordinates of the line segment are recorded for subsequent geometric attribute calculation. The fourth step is geometric attribute statistics: For each line segment, three core geometric attributes are calculated based on its node pair and skeleton pixel coordinates: the first is the line length L_line, which is calculated by the Euclidean distance of the node pair ((x_s, y_s), (x_e, y_e)). ); secondly, the line segment direction θ_line, which calculates the angle between the line connecting the nodes and the horizontal axis (x-axis) (range 0°-180°, θ_line=arctan[(y_e-y_s) / (x_e-x_s)], if x_e=x_s then θ_line=90°); thirdly, the line segment thickness W_line, which counts the number of pixels with a value of 255 in the 3×3 neighborhood around the corresponding line segment skeleton pixel in the original preprocessed design sketch image, and takes the average value as the thickness of the line segment (e.g., the building wall line segment W_line is about 5 pixels, and the robot support axis line segment W_line is about 2 pixels). The "node pairs + three geometric attributes" of line segments are integrated to obtain vectorized path data. This data is in list form, where each element corresponds to a line segment. The element content includes the coordinates of the starting endpoint, the coordinates of the ending endpoint, the length, the direction, and the thickness. Using the vectorized path data as the processing object, feature encoding processing is performed to generate a structured tensor representation: First, normalization processing is performed on each line segment feature (starting x-coordinate, starting y-coordinate, ending x-coordinate, ending y-coordinate, length, direction, and thickness) in the vectorized path data—the coordinate values ​​are divided by the image size (x-coordinate divided by W, y-coordinate divided by H), and the length is divided by the length of the image diagonal (…). The direction is divided by 180°, and the thickness is divided by the maximum possible line width of the image (e.g., 20 pixels), mapping all feature values ​​to the 0-1 range. Then, the seven normalized features of each line segment are arranged in the order of "start x → start y → end x → end y → length → direction → thickness," forming a 1×7 feature vector. Finally, all the feature vectors of the line segments are stacked in the first dimension (sample dimension) to form an N×7 two-dimensional tensor (N is the total number of line segments in the vectorized path data, e.g., N=50). This two-dimensional tensor is the structured tensor representation. The row dimension corresponds to different line segments (each row represents one line segment), and the column dimension corresponds to different geometric features of the line segments (each column represents a normalized geometric attribute). The element value at the intersection of the row and column is the normalized feature value of the corresponding line segment under that geometric attribute. This structured tensor representation completely preserves the geometric feature information of all lines in the two-dimensional structural design sketch, providing structured feature input for the construction of the sketch semantic graph in the subsequent step 2. It is especially suitable for the high accuracy requirements of line segment geometric attributes in scenarios such as architecture and robotics, avoiding the semantic reasoning bias caused by feature confusion in traditional encoding.

[0016] Optionally, in step 1, when extracting two-dimensional structural design features from the preprocessed design sketch image and encoding them to generate a structured tensor representation, position normalization processing is performed on the vectorized path data to obtain a set of structural elements with unified spatial position reference, and feature encoding processing is performed on the set of structural elements with unified spatial position reference to obtain a unified structured tensor representation.

[0017] Preferably, the specific implementation process of performing position normalization and feature encoding on the vectorized path data in step 1 is as follows: First, obtain the vectorized path data containing each line segment node pair and geometric attributes. This data is a list structure, where each element corresponds to a line segment. Each element contains five pieces of information: "starting endpoint coordinates (x_s, y_s), ending endpoint coordinates (x_e, y_e), line segment length L_line, line segment direction θ_line, and line segment thickness W_line". The coordinate values ​​(x_s, y_s) and (x_e, y_e) are based on the pixel coordinate system of the preprocessed design sketch image (row dimension is y-axis, column dimension is x-axis, origin is at the upper left corner of the image). The coordinate ranges of different scene sketches vary. Differences (e.g., architectural structural design sketches may have coordinate values ​​of 512×512 pixels due to their large drawing area, while robot assembly sketches may have coordinate values ​​concentrated within 256×256 pixels due to their compact structure) mean that this vectorized path data is the initial processing object for position normalization. An improved position normalization process is then performed on this vectorized path data. The core improvement lies in the "scene adaptive reference point determination mechanism," which consists of three steps: First, calculate the global bounding box: traverse the endpoint coordinates of all line segments in the vectorized path data, and calculate the minimum x-coordinate x_min (the minimum x-coordinate among all starting and ending endpoints), the maximum x_max (the maximum x-coordinate among all starting and ending endpoints), and the minimum y-coordinate y_min. The first step is to define the minimum y-coordinate of all start and end points (x_min) and the maximum y_max of all start and end points (y_max). This forms a global bounding box encompassing all line segments. The width of the bounding box is W_bbox = x_maxx_min, and the height is H_bbox = y_maxy_min. The second step is to determine the scene adaptation reference point: dynamically select a normalized reference point (x0, y0) based on the sketch's application scenario. If it's an architectural structural design sketch (which needs to show the relative positions of spatial layouts, such as the horizontal / vertical spacing between walls and beams), then set the reference point to the lower left corner vertex of the global bounding box (x0 = x_min, y0 = y_min), consistent with architectural design starting from the lower left corner. The initial planning and layout habits; if sketching for the robot (which needs to reflect the central symmetry of the structure, such as aligning the centers of joints and support axes), then set the reference point as the center of the global bounding box (x0=(x_min+x_max) / 2, y0=(y_min+y_max) / 2), adapting to the multi-symmetric characteristics of the robot structure; the third step, coordinate offset and scale normalization: perform two-step adjustments on the starting endpoint coordinates (x_s, y_s) and ending endpoint coordinates (x_e, y_e) of each line segment—first calculate the offset coordinates (x_s'=x_sx0, y_s'=y_sy0; x_e'=x_ex0, y_e'=y_ey0) to eliminate the positional offset caused by the difference in reference points;Then divide the offset coordinates by the maximum dimension of the bounding box (max_dim=max(W_bbox,H_bbox)) to obtain normalized coordinates (x_s_norm=x_s' / max_dim, y_s_norm=y_s' / max_dim; x_e_norm=x_e' / max_dim, y_e_norm=y_e' / max_dim), mapping all coordinate values ​​to the interval [-0.5,0.5] (when the reference point is the center) or the interval [0,1] (when the reference point is the bottom left corner), while preserving the line segment spacing. The relative positional relationships are determined to obtain position-normalized line segment data. In this data, the coordinate reference of each line segment is unified, with no differences in positional scale between scenes. Using the position-normalized line segment data as the processing object, a set of structural elements with unified spatial positional references is constructed: First, the line segments are classified according to their geometric attributes and scene characteristics—for architectural structural design sketches, line segments with a length L_line greater than 0.2 × max_dim (for example, max_dim = 512 pixels, i.e., a length greater than 102 pixels) and a direction θ_line of 0° or 90° are classified as "wall structure elements". The text describes a process for defining line segments in a robot model. It categorizes line segments with length L_line between 0.05×max_dim and 0.2×max_dim and direction θ_line at 90° as "beam-column structural elements." For robot model sketches, line segments with length L_line greater than 0.15×max_dim and direction θ_line at any angle are categorized as "support axis structural elements," while line segments with length L_line less than 0.05×max_dim and thickness W_line greater than 0.02×max_dim are categorized as "joint structural elements." Finally, it describes the classification of line segments within the same category as "joint structural elements." Line segments and their normalized coordinates and geometric attributes are integrated to form a set of structural elements with a unified spatial location benchmark. Each element in the set is a structural element with a category, including "category label, normalization start coordinate, normalization end coordinate, normalization length, normalization direction, and normalization thickness". The normalization length is L_line / max_dim, the normalization direction is θ_line / 180° (mapped to the [0,1] interval), and the normalization thickness is W_line / W_avg (W_avg is the average thickness of all line segments to ensure uniform thickness feature scale).Taking a set of structural elements with a unified spatial location benchmark as the processing object, an improved feature encoding process is performed to generate a structured tensor representation. The improvement lies in "multi-dimensional feature fusion encoding," which is specifically divided into three steps: Step 1, geometric attribute encoding: For each structural element, the five geometric attributes of "normalized start coordinates (x_s_norm, y_s_norm), normalized end coordinates (x_e_norm, y_e_norm), normalized length L_norm, normalized direction θ_norm, and normalized thickness W_norm" are arranged in order to form a 1×5 geometric feature vector, where each element value... All are within the range of [0,1] or [-0.5,0.5] to ensure consistent geometric feature scale; the second step is category label encoding: one-hot encoding is performed on the category labels of structural elements. For example, in the building scene, "wall structural elements" are encoded as [1,0,0], and "beam and column structural elements" are encoded as [0,1,0], while in the robot scene, "support axis structural elements" are encoded as [1,0], and "joint structural elements" are encoded as [0,1], forming a 1×C category feature vector (C is the number of structural element categories in the scene; C=2 for the building scene and C=2 for the robot scene); the third step, Feature vector concatenation and tensor construction: The 1×5 geometric feature vector of each structural element is concatenated with the 1×C categorical feature vector in the channel dimension to form a 1×(5+C) comprehensive feature vector; then, all comprehensive feature vectors in the structural element set are stacked in the first dimension (sample dimension) according to the category priority order of "wall / support axis → beam / column / joint" to form an M×(5+C) two-dimensional structured tensor representation (M is the total number of elements in the structural element set, for example, 30). The row dimension of this tensor corresponds to different structural elements (each row represents one structural element), and the column dimension corresponds to the comprehensive features (the first 5 columns are geometric attributes, and the last C columns are geometric attributes). (For category attributes), the element value at the intersection of rows and columns is the normalized encoding value of the corresponding structural element under that feature; this structured tensor representation differs from traditional single geometric feature encoding. It solves the problem of inconsistent sketch position references in different scenarios through position normalization, and preserves the semantic attributes of structural elements through category and geometric fusion encoding. This ensures that when constructing the sketch semantic graph in step 2, spatial components and constraint logic can be accurately inferred based on features of a uniform scale. It is particularly suitable for the technical bottleneck of "large differences in structural element types and inconsistent position scales" in different scenarios such as architecture and robotics, giving the structured tensor high scene adaptability and information integrity.

[0018] Optionally, in step 2, when inferring spatial components, functional partitions, and constraint logic based on structured tensor representation to construct a sketch semantic graph, local and global geometric features contained in the structured tensor representation are extracted to obtain high-level semantic information carrying association information of symmetry planes, repeating structures, and connection points. Based on this, spatial components, functional partitions, and constraint logic are inferred to construct the sketch semantic graph.

[0019] Preferably, the specific implementation process of extracting local and global geometric features and constructing a sketch semantic graph based on structured tensor representation in step 2 is as follows: First, obtain the unified structured tensor representation output in step 1. This tensor is a two-dimensional matrix of M×(5+C) (M is the total number of structural elements, 5 is the geometric attribute dimension, and C is the category attribute dimension). The row dimension corresponds to the structural elements with unified spatial position reference (such as "wall structural elements" and "beam and column structural elements" in the building scene, and "support axis structural elements" and "joint structural elements" in the robot scene). The column dimension includes "normalized start x coordinate, normalized start y coordinate, normalized end x coordinate, normalized end y coordinate, normalized length, normalized direction, and normalized thickness" (the first 7 columns are geometric attributes, and if C=2, the last 2 columns are category attributes, such as [1,0] representing walls and [0,1] representing beams and columns). The matrix is ​​defined at the intersection of rows and columns. The element value is the normalized encoding value of the corresponding structural element under this attribute (e.g., if the element value in the 5th column of a certain row is 0.3, it means that the normalized length of the wall structural element is 0.3). This structured tensor representation is the initial processing object for geometric feature extraction. Improved local geometric feature extraction is performed on this structured tensor representation. The core improvement lies in the "scene adaptive sliding window design", which is divided into three steps: First, determine the window size: dynamically set the sliding window size according to the average size of the structural elements. If it is a building structure design scene (the size of the structural elements is relatively large, such as the normalized length of the wall element is mostly in the range of 0.2-0.5), then set the window size to K1×(5+C) (K1 takes the value of 5-8, which means that the window covers 5-8 adjacent structural elements each time); if it is a robot building scene (the size of the structural elements is relatively small, such as the normalized length of the support axis element is mostly in the range of 0.05 ...If the window size is set to K2×(5+C) (K2 takes values ​​of 3-5), then the window size is set to K2×(5+C) (K2 takes values ​​of 3-5) to ensure that the window can completely cover the local association range of adjacent elements; the second step is window sliding and local feature calculation: the sliding direction is the row dimension (in order of priority of structural element category), and the window step size is set to 1 / 2 of the window size each time. For the structural elements in each window, three local association features are calculated: one is the element spacing feature (the normalized center coordinate distance between any two elements in the window, the center coordinate is the average of the start and end coordinates), which is used to reflect the spatial compactness of local elements (such as the spacing between adjacent walls in a building scene, the spacing between adjacent support axes in a robot scene); the second is the element angle feature (the normalized center coordinate distance between any two elements in the window). The first step involves generating a set of local geometric features: First, the directional angle (angle = |θ1-θ2| / 180°) is used to reflect the directional relationships of local elements (e.g., the 90° perpendicular relationship between walls and beams / columns in an architectural scene, and the 45° tilt relationship between support axes and joints in a robot scene). Second, the element category collaboration features (the proportion of similar elements within a window, and the combination ratio of different element categories) are used to reflect the functional relationships of local elements (e.g., the proportion of "wall + beam / column" combinations in an architectural scene, and the proportion of "support axis + joint" combinations in a robot scene). The third step is to generate a set of local geometric features: All three local correlation features of all windows are concatenated in sliding order to form a set of M'×3 local geometric features (M' being the number of windows), where each element corresponds to a window's local geometric feature set. The set of associated features, named "Local Feature Association Set," contains information on local spatial relationships and functional collaborations between structural elements. Using structured tensor representations and the Local Feature Association Set as joint processing objects, an improved global geometric feature extraction is performed. The improvement lies in the "scene-specific global topology capture mechanism," which consists of three steps: First, constructing a global feature extraction network: An improved Transformer encoder is used, with the encoder input being row vectors of the structured tensor (the comprehensive feature vector of each structural element), and scene-specific position encoding is added—the architectural structure design scene uses "grid-type position encoding" (mapping the normalized coordinates of elements to grid cell indices, such as [0.2, 0.3] corresponding to...). The grid in the 2nd row and 3rd column reflects the grid layout characteristics of the building space; the robot building scene adopts "center-radial position encoding" (the offset of the normalized coordinates of the element relative to the center of the global bounding box is used as the encoding value, such as [0.1, -0.2] representing the element at a position 0.1 to the right and 0.2 below the center, adapting to the central symmetry characteristics of the robot structure); the second step is global attention calculation: the encoder's multi-head self-attention layer sets up 3 attention heads, focusing on "symmetric structure capture", "repeated structure capture" and "global association capture" respectively - the "symmetric structure capture" head calculates the similarity between the element and the potential symmetrical position element (such as the similarity between the element with x coordinate 0.2 and the element with x coordinate 0.8 in the building scene, if the similarity is greater than 0).8 are judged as symmetric candidates); the "repeated structure capture" head calculates the cosine similarity of the feature vectors of the feature element with other features (e.g., in a robot scene, support axis features with a feature vector similarity greater than 0.75 are judged as repeated candidates); the "global association capture" head calculates the association strength between the feature element and key positions such as the vertices and center of the global bounding box (e.g., in a building scene, the association strength between features near the edge of the bounding box and the "exterior wall" function); the third step is to generate a global geometric feature set: the global association features output by the attention layer are processed by a feedforward network to obtain an M×10 global geometric feature set (10 is the global feature dimension), which includes "symmetric similarity, repetition probability, Features such as "global positional correlation" are included in this set, which is named the "global element topology feature set." This set explicitly records the positions of potential symmetry planes (e.g., the x=0.5 symmetry plane in an architectural scene) and the number and distribution of repeating structures (e.g., the three sets of repeating support axes in a robot scene). Using the local element correlation feature set and the global element topology feature set as processing objects, connection point correlation information is extracted: First, the local element correlation feature set is traversed, filtering out elements with "element spacing features less than 0.05 (after normalization, the corresponding actual size is approximately 5% of the maximum dimension of the global bounding box)" and "element angle features of 0.5 (corresponding to a 90° angle, suitable for building walls-beams and columns, robots..."). A window for "Vertical Connection of Support Axis-Joint" is created, marking the elements within the window as "Potential Connection Element Pairs." Then, combining this with the global element topology feature set, it's determined whether the potential connection element pair is located at the intersection of the global topology (e.g., wall intersections in a building scene, joint concentration points in a robot scene). If the global position correlation is greater than 0.6, the intersection point of the element pair is determined as a "valid connection point," and the normalized coordinates (x_j, y_j, obtained by weighted average of the center coordinates of the two elements, with the weight being the proportion of element length) and associated element identifiers (e.g., "Wall Element 1 - Beam-Column Element 3") of the connection point are recorded. Finally, a "Connection Point Association Information Set" is formed. It includes the coordinates of valid connection points, associated feature pairs, and connection angles; it fuses the local feature association feature set, the global feature topology feature set, and the connection point association information set to generate high-level semantic information: first, it performs global average pooling on the local feature association feature set to obtain a 1×3 local semantic vector (reflecting the overall local association strength, such as the average wall spacing in a building scene and the average support axis angle in a robot scene); it performs max pooling on the global feature topology feature set to select the top two positions with the highest symmetry similarity as "candidate symmetry planes" (such as the x=0.5 and y=0.5 symmetry planes in a building scene), and counts the repetition probability as greater than 0.The number of element groups of 7 is used as the "number of repeating structures" (e.g., 3 sets of repeating joints in a robot scene), forming a 1×(2+1) global semantic vector; the set of connection point association information is grouped according to the category of associated elements, and the number of connection points and the average connection angle of each group are counted to form a 1×(C×2) connection semantic vector (C is the number of categories, such as the number of connection points and the average connection angle of "wall-beam-column" in an architectural scene); the local semantic vector, the global semantic vector, and the connection semantic vector are concatenated in the channel dimension to obtain 1×(3+3+2C) high-level semantic information, which explicitly includes: the normalized coordinates of the symmetry plane (e.g., x=0.5 in an architectural scene). The number and composition of repetitive structures (e.g., 3 sets of "support axis + joint" in a robot scene), the types and distribution of associated elements of connection points (e.g., 20 "wall-beam-column" connection points in a building scene); based on high-level semantic information, inferences are made about spatial components, functional zoning, and constraint logic to construct a sketch semantic graph: first, spatial components are inferred—elements in the local element association feature set that have "element spacing less than 0.03 and category combination conforming to scene functional logic" are grouped into the same physical structural unit (e.g., in a building scene, "adjacent walls + matching beams and columns" are grouped into "enclosing structure unit", and in a robot scene, "support axis + two-end joints" are grouped into "execution arm"). The process involves several steps: First, structural units are defined. Each unit serves as a node in the sketch semantic graph, with node attributes including geometric parameters (merged length, overall orientation) and semantic labels (e.g., "enclosure structure," "execution arm"). Second, functional zones are inferred—based on the symmetry planes in the high-level semantic information, the global space is divided into symmetrical functional areas (e.g., in an architectural scene, the x=0.5 symmetry plane divides the space into a "living room area" on the left and a "bedroom area" on the right; in a robot scene, the central symmetry plane divides the space into "left execution area" and "right execution area"). These functional zones are implicit attributes of the sketch semantic graph and associated with the corresponding nodes. Finally, constraint logic is inferred—based on the connection point association information, the nodes are determined. The connections between elements are defined (e.g., in a building scene, "enclosure structure unit" and "beam-column structure unit" are "rigidly connected," while in a robot scene, "execution arm structure unit" and "base structure unit" are "rotatably connected"), and force constraint weights are assigned based on the connection angle and element stiffness (rigid connection weight is set to 0.9, and rotary connection weight is set to 0.3). These connections and constraint weights serve as edge attributes of the sketch semantic graph. The final constructed sketch semantic graph, centered on "physical structure unit nodes," "connection and force constraint edges," and "functional zoning attributes," forms a structured graph model, providing clear spatial semantics and constraint basis for subsequent 3D structural geometric reasoning.

[0020] Optionally, in step 2, when inferring spatial components, functional partitions, and constraint logic based on structured tensor representation to construct a sketch semantic graph, the connection relationship between nodes is inferred based on high-level semantic information to obtain connection edge attributes including constraint type, connection strength, and contact method. Corresponding constraint weights are assigned according to the connection type to form weighted topological connection relationship data and construct the sketch semantic graph accordingly.

[0021] Preferably, the specific implementation process of reasoning the connection relationship between nodes based on high-level semantic information and forming weighted topological connection relationship data in step 2 is as follows: First, the extracted high-level semantic information is obtained, which is a 1×(3+3+2C) feature vector (C is the number of structural element categories, such as C=2 in the building scene and C=2 in the robot scene), containing three core sub-data: First, symmetry plane association data (such as the coordinates of the symmetry plane parallel to the coordinate axis in the building scene, and the range of symmetry plane offset based on the global bounding box center in the robot scene), used to locate potential connection nodes in the symmetry region; Second, repetitive structure association data (such as the [2-5] sets of repetitive "bearing unit + auxiliary unit" combinations in the building scene, and the [1-3] sets of repetitive "support unit + motion unit" combinations in the robot scene), used to identify the standard within the repetitive unit. The first part describes the connection relationships; the second part describes the connection point association data (including the normalized coordinates (x_j, y_j) of the connection points, the identifiers of the associated structural units, such as "unit A-unit B" and "unit M-unit N", and the angle information at the connection points, such as the feature angles in the range of [90-180]°). This data directly marks the structural unit pairs that have the possibility of connection. The above high-level semantic information is the initial processing object for connection relationship reasoning. The connection point association data in the high-level semantic information is decomposed to obtain the "potential connection unit pair set". Each element in this set is (unit ID1, unit ID2, connection point coordinates, connection angle), such as (unit 1-wall, unit 3-beam column, (0.3, 0.4), 90°) in the building scene and (unit 5-support axis, unit 7-joint, (0.2, 0.4), 90°) in the robot scene.3), 45°), and simultaneously extract the category labels (such as "wall", "beam", "support axis", "joint") and geometric attributes (normalized length, normalized thickness, normalized direction) of each structural unit from high-level semantic information to form a "structural unit attribute table". This attribute table and the set of potential connected unit pairs serve as input for constraint type reasoning; execute scene-adaptive constraint type reasoning. The core improvement lies in the "multi-dimensional feature fusion judgment rule", which is divided into three steps: First, determine the scene judgment dimension - the architectural structural design scene focuses on "connection angle + unit stiffness association", and the robot building scene focuses on "unit function + motion degree of freedom"; Second, single-dimensional judgment: in the architectural scene, if the connection angle of the potential connected unit pair is [90°±Δθ] (Δθ is the angular tolerance value, usually set to [3-5]°, such as the vertical connection between a wall and a beam / column), and the two unit categories are "rigid unit combination" (walls and beams / columns are classified as rigid units, and floor slabs as semi-rigid units), then it is initially determined to be a "rigid connection"; if the connection angle is [180°±Δθ] (such as the straight splicing of two wall sections), then it is initially determined to be a "rigid splicing connection"; in robot scenarios, if the potential connection unit includes the "motion unit" category (such as unit 7 being a joint), and the other unit is a "support unit" (such as a support shaft), and the connection angle is [45°±Δθ] or [90°±Δθ] (adapting to the rotation requirements of the motion unit), then it is initially determined to be a "rotational connection"; if both units are "support units", then it is initially determined to be a "rotational connection". If the connection angle of the supporting unit is [180°±Δθ], it is determined to be a "fixed connection". The third step is multi-dimensional verification: fine-tuning the judgment result based on the geometric properties of the structural units—in the architectural scenario, if two units initially judged as "rigid connections" have a normalized thickness ratio greater than [1.5-2.5] (e.g., the beam / column thickness is 1 / 3 of the wall thickness, resulting in excessive stiffness difference), it is corrected to a "semi-rigid connection". In the robotic scenario, if a motion unit initially judged as a "rotational connection" has a normalized thickness less than [1 / 2-1 / 3] of the supporting unit (the motion unit size is too small, limiting its load-bearing capacity), it is corrected to a "flexible rotational connection". Finally, the constraint type of each potential connection unit pair is obtained (e.g., "rigid connection", "rotational connection"). (Semi-rigid connection); taking constraint type and structural unit attribute table as input, the connection strength is quantitatively calculated. The improvement lies in the "scene-specific strength calculation model": the building scene adopts the "geometric parameter + stiffness mapping" model, the connection strength = (normalized thickness of element 1 × α + normalized thickness of element 2 × β) × stiffness coefficient (α + β = 1, α is usually taken as [0.5-0.7], β is taken as [0.3-0.5]; the stiffness coefficient of rigid element is set to [0.8-1.0], and that of semi-rigid element is set to [0.5-0.7]). For example, the connection strength between the wall (normalized thickness 0.05, stiffness coefficient 0.9) and the beam and column (normalized thickness 0.08, stiffness coefficient 1.0) = (0.05 × 0.6 + 0.08 × 0.4) × 0.95 (take the average of the two stiffness coefficients) = (0.03 + 0.032) × 0.95 ≈ 0.0589; The robot scenario adopts the "functional attribute + size adaptation" model, and the connection strength = (normalized length of motion unit × γ + normalized length of support unit × δ) × motion adaptation coefficient (γ + δ = 1, γ is usually taken as [0.2-0.4], δ is taken as [0.1-0.3]; the motion adaptation coefficient of rotational connection is set to [0.6-0.8], and the motion adaptation coefficient of fixed connection is set to [0.9-1.0]). For example, the connection strength between the joint (normalized length 0.1, motion adaptation coefficient 0.7) and the support shaft (normalized length 0.2, motion adaptation coefficient 0.7) = (0.1 × 0.3 + 0.2 × 0.2) × 0. 7 = (0.03 + 0.04) × 0.7 = 0.049. All connection strength values ​​are mapped to the [0-0.1] range to ensure quantitative consistency. Based on the connection point coordinates and the geometric properties of the structural unit, the contact method is determined, specifically in two steps: First, calculate the contact area ratio at the connection point—in architectural scenarios, the contact area of ​​a structural unit is positively correlated with its normalized thickness (e.g., a unit with a normalized thickness of w corresponds to a contact area ratio of approximately w). If the sum of the contact area ratios of the two units at the connection point is greater than [0.08-0.12] (e.g., wall 0.05 + beam / column 0.08 = 0.13), it is determined to be "surface contact" (e.g., the side of a wall and beam / column are in contact); if it is less than [0.03-0.05] (e.g., two segments...). For thin wall splicing, if the sum of the contact area ratios is 0.04, it is judged as "line contact". In robot scenarios, the contact area ratio of motion units is calculated by normalizing the thickness to [1 / 2-1 / 3] (e.g., for a joint with a normalized thickness of w, the corresponding contact area ratio is approximately w / 2). The same applies to support units. If the sum of the contact area ratios is less than [0.02-0.03], it is judged as "point contact" (e.g., the fit between a joint and a support shaft's hole); if it is between [0.03-0.05], it is judged as "line contact". The second step is to verify the rationality of the contact method in conjunction with the constraint type—for example, in architectural scenarios, if a "rigid connection" is judged as "point contact", it is corrected to "surface contact" (rigid connections require a larger contact area to transmit force). If a "rotational connection" in a human-centric scenario is determined to be "surface contact," it is corrected to "point contact" (rotational motion requires reducing contact friction), ultimately resulting in the contact method for each connection (surface contact, line contact, point contact). Based on the constraint type, connection strength, and contact method, corresponding constraint weights are assigned. The specific rules are as follows: First, set the baseline weight for the constraint type (rigid connection baseline weight [0.8-0.9], semi-rigid connection [0.6-0.7], rotational connection [0.4-0.5], flexible rotational connection [0.2-0.3], fixed connection [0.9-1.0]); then, fine-tune the baseline weight according to the connection strength (for every increase in connection strength [0.005-0.01], the weight increases by [0.01-0.01].02], the increase shall not exceed [8-12]% of the baseline weight), for example, in the building scene, the rigid connection (baseline weight 0.85) corresponds to a connection strength of 0.0589, the fine adjustment amount = (0.0589-0.05) / 0.01×0.02≈0.0178, and the final constraint weight = 0.85+0.0178≈0.8678; in the robot scene, the rotational connection (baseline weight 0.45) corresponds to a connection strength of 0.049, the fine adjustment amount = (0. 0.49-0.04) / 0.01×0.02=0.018, the final constraint weight = 0.45+0.018=0.468. All constraint weights are rounded to [3-4] decimal places to ensure quantization accuracy. The above results are integrated into weighted topological connectivity data, using an "adjacency matrix + edge attribute list" data structure: the row and column dimensions of the adjacency matrix correspond to the nodes (physical structural units) of the sketch semantic graph, and the element value at the intersection of the matrix rows and columns is... The constraint weights for corresponding node pairs (0 if there is no connection) are as follows: For example, the element at position [1,3] in the adjacency matrix has a value of 0.8678, representing a constraint weight of 0.8678 between node 1 (wall element) and node 3 (beam-column element). The edge attribute list adds attributes to each non-zero weight edge (node ​​pair), including constraint type (e.g., "rigid connection"), connection strength (e.g., 0.0589), and contact method (e.g., "face contact"). Each element in the list is formatted as (node ​​ID1, node ID2, constraint type, connection strength, contact method, constraint weight). This weighted topological connection data directly serves as the edge data basis for constructing the sketch semantic graph. The edges of the sketch semantic graph correspond to the elements in the list, with edge weights being constraint weights and edge attributes including constraint type, connection strength, and contact method. This ensures that the edge information of the sketch semantic graph is complete and quantifiable, providing accurate constraint basis for the subsequent step 3, which defines the geometric reasoning order based on mechanical logic.

[0022] Optionally, in step 2, when inferring spatial components, functional partitions, and constraint logic based on structured tensor representation to construct a sketch semantic graph, the structure type corresponding to the shape symbol in the preprocessed design sketch image is identified based on high-level semantic information and the shape symbol features corresponding to the structured tensor, so as to generate a set of structural elements with semantic labels; and the sketch semantic graph is constructed based on the weighted topological connection relationship data and the set of structural elements with semantic labels.

[0023] Preferably, the specific implementation process of identifying the structure type and constructing the sketch semantic graph based on high-level semantic information and shape symbol features in step 2 is as follows: First, two types of core input data are obtained. One is the extracted high-level semantic information (1×(3+3+2C) feature vector, where C is the number of structural element categories, such as C=2 for architectural scenes and C=2 for robot scenes), including symmetry plane coordinates (such as the vertical symmetry plane of x=0.5 in architectural scenes), the number of repeating structure groups (such as 2 repeating support units in robot scenes), and connection point association information (such as the connection coordinates and angles of "unit A-unit B"); the other is the shape symbol features corresponding to the structured tensor representation, which are derived from the structured tensor. Extracted from the geometric attribute columns (normalized start / end coordinates, length, direction), the potential shape is reflected by the combination of line segments (e.g., in architectural scenes, "four line segments connected end to end with an angle close to 90°" corresponds to a rectangle symbol, and in robotic scenes, "a long line segment connected to short line segments at both ends" corresponds to an axis-joint combination symbol). Both types of input data serve as the basis for structure type recognition. Improved shape symbol feature extraction is performed on the structured tensor representation. The core improvement lies in the "scene-adaptive shape determination rule," which is divided into three steps: First, line segment grouping and morphological clustering: the structural elements in the structured tensor are grouped according to the normalized direction and spatial position correlation of the line segments. —In architectural scenarios, line segments with a direction difference less than [5-10]° and a spacing less than [0.02-0.05] (after normalization) are grouped together (e.g., wall segment group, floor segment group); in robot scenarios, line segments with a length ratio greater than [3-5]:1 and a center spacing less than [0.03-0.06] are grouped together (e.g., support shaft and end joint segment group), resulting in a set of line segment groups; the second step is shape symbol determination: specific determination conditions are set for different scenarios—in architectural scenarios, if a line segment group contains [4-6] line segments, the angle between adjacent line segments is [90°±5°], and the distance between the endpoints of the first and last line segments is less than [0.01-0.03], then it is determined that... If a line segment group contains [3-4] line segments with an included angle of [60°±5°] or [120°±5°], it is classified as a "triangle symbol" (corresponding to support or bracing components). In a robot scenario, if a line segment group contains one long line segment (normalized length greater than [0.2-0.3]) and two short line segments (normalized length less than [0.05-0.08]), with an included angle of [90°±5°] between the short and long line segments, it is classified as an "axis-joint combination symbol" (corresponding to an actuator arm unit). If the line segment group is a closed curve (smoothly connected by multiple short line segments with a curvature change less than [0.1-0.08]), it is classified as a "axis-joint combination symbol" (corresponding to an actuator arm unit).If the shape symbol is 2 pixels, it is determined to be a "circular symbol" (corresponding to a rotational joint unit); the third step is shape symbol feature quantization: assign a quantized feature vector to each determined shape symbol (e.g., the rectangular symbol vector in the building scene is [1,0,0], the triangle symbol is [0,1,0], the axis-joint symbol in the robot scene is [1,0], and the circular symbol is [0,1]), forming a "shape symbol-quantized vector" mapping table. This mapping table and the line segment set together constitute the shape symbol feature set; using high-level semantic information and the shape symbol feature set as input, an improved structure type recognition is performed. The improvement lies in the "shape-semantic fusion classification model", which contains a three-layer structure: the first layer is the feature fusion layer, which combines the shape symbol feature set with the quantized feature vectors of the shape symbol feature set. The quantized vector is element-wise multiplied with the corresponding sub-data in the high-level semantic information (such as line segment groups associated with repeating structures, matching the "number of repeating structure groups" in the high-level semantics) to enhance scene matching. For example, in an architectural scene, the quantized vector of the rectangle symbol [1,0,0] is multiplied with the sub-data of "wall repeating group" in the high-level semantics (value 0.8) to obtain the fusion feature [0.8,0,0], highlighting the correlation of the wall structure. The second layer is the scene classification layer, which uses an improved softmax classifier and sets exclusive classification weights for different scenes. In the architectural scene, the classification weights for "rectangle symbol - wall" and "triangle symbol - support" are set to [0.7-0.8], and for "other symbols - auxiliary components" to [0.2-0.3]. In the robot scenario, the classification weights for "axis-joint combination symbol-actuator arm" and "circular symbol-rotational joint" are set to [0.65-0.75], and for "long line segment symbol-fixed axis" to [0.25-0.35]. The classifier outputs the probability of the structure type corresponding to each line segment group (e.g., the probability of a line segment group being "wall" is 0.85, and the probability of "floor slab" is 0.12). The third layer is type confirmation and label generation: the structure type with the highest probability is selected as the final result, and a semantic label is assigned to each line segment group. The label format is "scene-structure type-serial number" (e.g., "building-wall-1" and "building-support-2" in the building scenario, and "robot-actuator arm-3" and "robot-rotational joint-4" in the robot scenario), and is also associated with... The geometric attributes (normalized length, direction, position) of the line segment group in the structured tensor are used to generate a set of structural elements with semantic labels. Each element in the set contains (semantic label, geometric attribute, and shape symbol type). The previously generated weighted topological connection relationship data (adjacency matrix + edge attribute list, where adjacency matrix elements are constraint weights and edge attributes include constraint type, connection strength, and contact method) is obtained. Using this data and the set of structural elements with semantic labels as joint input, a sketch semantic graph is constructed, which consists of three steps: Step 1, Node Construction: Each element in the set of structural elements with semantic labels is used as a node in the sketch semantic graph. Node attributes include semantic labels (e.g., "Building-Wall-1") and geometric attributes (normalized length 0).4. **Direction 90° and Shape Symbol Type (Rectangle Symbol):** Ensure each node clearly reflects the identity and form of its corresponding physical structural unit. The second step is edge construction: Extract non-zero weight node pairs (e.g., "Building-Wall-1" and "Building-Support-2") from the weighted topological connection data and use them as edges in the sketch semantic graph. Edge attributes directly reuse constraint types (e.g., rigid connection), connection strength (e.g., 0.058), contact methods (e.g., surface contact), and constraint weights (e.g., 0.86) from the topological connection data to ensure the edges reflect the connections and force constraints between physical structural units. The third step is graph structure optimization. The process involves supplementing node association attributes with high-level semantic information. For nodes associated on symmetrical planes (e.g., "Building-Wall-1" and "Building-Wall-2" on opposite sides of a symmetrical plane in a building scene), a "Symmetrical Association" tag is added. For nodes within repeating structural groups (e.g., "Robot-Actuator-3" and "Robot-Actuator-4" in a robot scene), a "Repetition Group ID" (e.g., G1, G2) is added. This results in a complete sketch semantic graph where nodes correspond to physical structural units, edges correspond to connections and force constraints, and the graph carries scene-specific semantic and shape information. This provides clear semantic and constraint basis for the subsequent 3D structural geometric reasoning in step 3.

[0024] Optionally, in step 3, when determining the node embedding vector corresponding to each node in the sketch semantic graph to obtain the node latent vector by spatial encoding, the node embedding vector corresponding to each node is extracted from the sketch semantic graph; the node embedding vector is spatially encoded to obtain the node latent vector.

[0025] Preferably, the specific implementation process of extracting node embedding vectors and spatially encoding them in step 3 to obtain node latent vectors is as follows: First, obtain the constructed sketch semantic graph, which contains a set of nodes and a set of edges. Each node in the node set corresponds to a physical structural unit, and the node attributes include geometric feature parameters (normalized values ​​of length, angle, and normal direction), semantic labels (such as "building-wall-1", "robot-actuator-3"), and connection relationship parameters (constraint type and connection strength of associated edges). The edge set corresponds to the connections and force constraints between nodes, and the edge attributes include constraint weight and contact method. Based on the edge set, an adjacency matrix A can be constructed—the row and column dimensions of the adjacency matrix A correspond to the node indices. Element A(i,j) represents the constraint weight between node i and node j (0 if there is no connection, such as A(1,3)=0.86 for node 1 and node 3 in the building scene, representing the rigid connection weight between the wall and the beam). The node attributes of the sketch semantic graph and the adjacency matrix A are used as inputs for node embedding vector extraction. The node attributes of the sketch semantic graph are structured to generate a "node attribute feature matrix X": the row dimension of matrix X corresponds to the node index (e.g., N rows if there are N nodes), and the column dimension corresponds to the quantified features of the node attributes (D columns in total, where D is the attribute dimension, such as 3D geometric features + 2D one-hot encoding of semantic labels + 2D connection parameters, for a total of 7 dimensions). The meaning of each column element is as follows: The 1st Columns -3 represent the normalized length (e.g., 0.4 for a building wall), normalized angle (e.g., 0.5 for 90°), and normalized normal direction (e.g., 0.0 for the vertical direction) of the physical structural unit corresponding to the node. Columns 4-5 represent the one-hot encoding of the semantic label (e.g., [1,0] for "wall" in the building scene, and [0,1] for "support"). Columns 6-7 represent the connection relationship parameters (quantized values ​​of constraint type, e.g., 1.0 for rigid connection and 0.5 for rotational connection; normalized value of connection strength, e.g., 0.058). The element values ​​at the intersection of rows and columns in matrix X are the quantized features of the corresponding node under this attribute. This node attribute feature matrix X is the core data foundation for node embedding vector extraction. The improved node embedding vector extraction is achieved through a core improvement in the "Scene Adaptive Graph Convolutional Network (GCN)," which consists of two improved graph convolutional layers. The improvement is implemented in three steps: First, scene-specific convolutional kernels are constructed. The weights of the graph convolutional kernels are adjusted for different application scenarios—in the architectural structure design scenario, the elements of the adjacency matrix A are multiplied by a "rigidity coefficient" (the coefficient for rigidly connected node pairs is set to [1.1-1.2], and for semi-rigid connections to [0.9-1.0]), strengthening feature transfer between rigidly connected nodes; in the robot construction scenario, the kernel weights are increased by [0.2-0] for node pairs labeled "rotational connection."[3] times, adapting to the feature association requirements of motion units; the second step, the first layer graph convolution calculation: taking the node attribute feature matrix X and the adjusted adjacency matrix A as input, it is calculated by the formula "intermediate feature of node i = weighted sum of features of adjacent nodes + feature of node i itself", with the weights being the element values ​​of adjacency matrix A. After weighted summation, it is output by ReLU activation function to obtain an N×D1 intermediate feature matrix (D1 is the output dimension of the first layer, set to [16-32] dimensions). This matrix highlights the local adjacency association features of nodes (such as feature fusion of walls and surrounding beams and columns in building scenes, and the relationship between the actuator arm and joints in robot scenes). (Feature fusion); the third step, second-layer graph convolution calculation: taking the intermediate feature matrix and adjacency matrix A as input, the convolution kernel weights further incorporate the correlation of node semantic labels (for node pairs of the same semantic category, the weights are increased by [0.1-0.2]), and output an N×D2 node embedding vector matrix E (D2 is the embedding vector dimension, set to [32-64] dimensions). Each row of matrix E is the node embedding vector of the corresponding node. This vector integrates the node's own attributes, local adjacency constraints and scene semantic correlation, such as the embedding vector E1=[0.32,0.15,...,0.41], which includes both the geometric features of the wall and the connection constraints with the beams and columns; taking the node embedding vector matrix E as the processing object, the improved spatial encoding processing is performed. The improvement lies in the "fusion of three-dimensional spatial basis vectors for scene adaptation", which is divided into three steps: The first step is to determine the scene-specific spatial basis vectors: the architectural structure design scene adopts "Cartesian coordinate system basis vectors" (x-axis corresponds to the horizontal direction, y-axis corresponds to the vertical direction, z-axis corresponds to the building height direction), and the basis vectors are set as v1=[1,0,0], v2=[0,1,0], v3=[0,0,1] to adapt to the orthogonal layout of the architectural space; the robot building scene adopts "cylindrical coordinate system basis vectors" (r-axis corresponds to the radial direction). The θ-axis corresponds to the circumferential direction, and the z-axis corresponds to the axial direction. The basis vectors are set as v1=[1,0,0], v2=[0,1,0], and v3=[0,0,1] (quantized into corresponding vectors in Cartesian coordinates) to adapt to the rotational symmetry layout of the robot structure. The second step is to fuse the high-dimensional space mapping and basis vectors: the node embedding vector matrix E (N×D2) is mapped to an N×3K high-dimensional feature matrix through a fully connected layer (K ​​is the basis vector expansion factor, set to [4-8] times). Then, the high-dimensional feature matrix is ​​divided into K groups by columns. Each group is multiplied element-wise with 3 scene space basis vectors to obtain an N×3K fused feature matrix. For example, in the architectural scene, the first group of features is multiplied with v1. The first step emphasizes the horizontal response of the node; the second group is multiplied by v2 to emphasize the vertical response, thus establishing the association between the node embedding vector and the 3D spatial direction; the third step is dimensionality reduction and normalization: global average pooling is performed on the fused feature matrix to reduce the N×3K matrix to an initial N×3 spatial feature matrix, and then L2 normalization is performed on each row of this matrix (making the vector magnitude 1), resulting in an N×3 node latent vector matrix V. Each row of matrix V is the node latent vector of the corresponding node, and the three elements of this vector correspond to the feature components in the x, y, and z directions in 3D space (e.g., the latent vector of node 1 in the building scene V1=[0.23,0.51,0.1). [2] represents the basis for reasoning about the position and shape of the wall in three-dimensional space; this process differs from the limitations of traditional graph convolution, which only extracts topological features and ignores scene differences in spatial encoding: traditional GCN uses the same convolution kernel for all scenes, which cannot adapt to the different structural constraints of buildings and robots; this application uses scene-adaptive convolution kernels and spatial basis vectors to make the node embedding vectors more closely match the scene-specific structural association logic, and the node latent vectors more accurately reflect the direction and constraint features required for three-dimensional spatial reasoning, providing high-quality feature support for subsequent geometric reasoning order definition based on mechanical logic and three-dimensional structure generation, ensuring a higher degree of matching between the generated three-dimensional structure and the spatial characteristics required by the scene.

[0026] Optionally, in step 3, when generating the geometric reasoning order for three-dimensional structural geometric reasoning based on the edges in the sketch semantic graph according to the mechanical logic definition, the connection relationships and force constraints carried by the edges in the sketch semantic graph are extracted and spatially encoded to obtain edge encoding features that integrate connection relationships and force constraints. Based on the edge encoding features, the node set of the sketch semantic graph is sorted to generate a structural topology containing the generation order of nodes. The sorting process is based on the mechanical logic reflected by the force constraints corresponding to the edges. The generation order of nodes contained in the structural topology serves as the geometric reasoning order for three-dimensional structural geometric reasoning.

[0027] Preferably, the specific implementation process of defining the 3D structural geometric reasoning order based on the edge definition of the sketch semantic graph in step 3 is as follows: First, obtain the edge set of the constructed sketch semantic graph. Each edge in this edge set corresponds to the connection relationship and force constraint between two physical structural units (nodes). The edge attributes include constraint type (such as "rigid connection", "rotational connection", "semi-rigid connection"), connection strength (normalized value, range [0-0.1]), contact method ("face contact", "line contact", "point contact"), constraint weight (normalized value, range [0-1]), and associated node pair (such as node i and node j, denoted as (i,j)). At the same time, obtain the node set attributes of the sketch semantic graph, including the structural unit type corresponding to the node (such as the building scene's...). "Base wall", "upper floor", "fixed axis" and "movable joint" in the robot scene, and node geometric dimensions (normalized volume). The above edge set attributes and node set attributes are used as inputs for defining the geometric reasoning order. The edge set attributes are structured and quantized to generate an "edge attribute feature matrix F": the row dimension of matrix F corresponds to the edge index (M rows if there are M edges), and the column dimension corresponds to the quantized features of the edge attributes (K columns in total, K is the attribute dimension, such as constraint type encoding 2D + connection strength 1D + contact mode encoding 2D + constraint weight 1D, a total of 6 dimensions). The meaning and quantization rules of each column element are as follows: the first and second columns are the one-hot encoding of constraint type (in the building scene, "rigid connection" corresponds to [1,0], "semi-rigid connection" corresponds to [1,0], and so on). [0,1]; "rotational connection" in robot scenarios corresponds to [1,0], and "fixed connection" corresponds to [0,1]); the third column is the normalized value of the connection strength (e.g., the connection strength of the wall and beam in the building scenario is 0.058, which is directly filled in); the fourth and fifth columns are the one-hot encoding of the contact method ("surface contact" corresponds to [1,0], "line contact" corresponds to [0,1], and "point contact" reuses [0,1] or adds a new dimension in both scenarios, taking 2D as an example here); the sixth column is the constraint weight (e.g., the constraint weight of edge (i,j) in the building scenario is 0.86, which is directly filled in), the element value at the intersection of the row and column in matrix F is the quantized feature of the corresponding edge under this attribute, and the edge attribute feature matrix F is the core input for subsequent spatial encoding; for edge attributes The feature matrix F performs improved spatial coding processing. The core improvement lies in "scene-adaptive mechanical feature fusion," which generates edge coding features that fuse connection relationships and force constraints. Specifically, it consists of three steps: First, constructing a scene-specific coding weight vector W: adjusting the coding weights of each edge attribute for different application scenarios—in the building structure design scenario, the weights of "constraint type (rigid)" and "constraint weight" are set to [0.6-0.8] (example 0.7), and the weight of "contact method (surface contact)" is set to [0.2-0.4] (example 0.3), strengthening the feature proportion of rigid connections and high-weight constraints; in the robot building scenario, the weights of "constraint type (rotation)" and "connection strength" are set to [0.5-0.7] (example 0.6) The weight of "contact method (point contact)" is set to [0.3-0.5] (example 0.4) to adapt to the connection feature requirements of the motion unit; the second step is element-wise weighted fusion: each row of the edge attribute feature matrix F (feature vector of a single edge) is element-wise multiplied with the weight vector W to obtain the "weighted attribute vector" of a single edge. For example, the weighted attribute vector of a rigid connection edge in a building scene is [0.7×1,0.7×0,0.3×0.058,0.3×1,0.3×0,0.7×0.86]≈[0.7,0,0.017,0.3,0,0.602]; the third step is high-dimensional mapping and normalization: the weighted attribute vectors of all edges are input into the improved 1-layer fully connected network (excitation). The live function uses LeakyReLU with a slope of [0.1-0.2] (e.g., 0.15), mapped to a high-dimensional feature space of [16-32] dimensions (e.g., 24 dimensions). L2 normalization is then performed on the high-dimensional features (making the feature vector magnitude 1), resulting in an M×24 edge-encoded feature matrix E_edge. Each row of matrix E_edge represents the fusion connection relationship and force constraint edge-encoded feature of the corresponding edge. Using the edge-encoded feature matrix E_edge, the associated node pairs of the edge set, and the node set attributes as input, a "mechanical priority score" is calculated for each node. This score reflects the generation priority of the node in the three-dimensional structural geometric reasoning (the higher the score, the earlier the generation order). Specifically... The calculation rules are as follows: First, calculate the feature contribution of the associated edges of the node: For each node k, traverse all edges containing node k (i.e., edges containing k in the associated node pair), extract the corresponding rows of these edges in the edge encoding feature matrix E_edge, calculate the average value of these edge features, and obtain the "edge feature association vector" V_k of node k; Second, incorporate the node structure type weight: Assign a "type weight" T_k according to the structural unit type corresponding to the node—in the architectural scenario, T_k is set to [0.7-0.9] for load-bearing nodes such as "base wall" and "support column" (example 0.8), and T_k is set to [0.3-0.5] for non-load-bearing nodes such as "upper floor slab" and "decorative component" (example 0.4); Machine In the human scenario, the T_k of fixed nodes such as "fixed axis" and "base joint" is set to [0.6-0.8] (example 0.7), and the T_k of motion nodes such as "active execution arm" and "rotation joint" is set to [0.2-0.4] (example 0.3). The third step is to calculate the mechanical priority score: sum the elements of the edge feature association vector V_k of node k to obtain the "edge feature sum S_k", and then multiply it with the type weight T_k to obtain the mechanical priority score P_k of node k = S_k × T_k (for example, in the building scenario, if S_k=0.6 and T_k=0.8 for the base wall node k, then P_k=0.48; if S_k=0.5 and T_k=0.4 for the upper floor slab node, then P_k=0).2) Based on the mechanical priority score P_k of all nodes, sort the node set of the sketch semantic graph to generate a structural topology containing the generation order of nodes: First, sort the nodes in descending order of P_k. If the difference in P_k between two nodes is less than a set threshold ΔP (range [0.01-0.03], for example 0.02), then further compare the number of associated edges between the two nodes (the more associated edges, the higher the sorting, ensuring priority positioning of multi-constraint nodes); Second, label the sorted node sequence as [Node_1, Node_2, ..., Node_N] (N is the total number of nodes), where Node_1 has the highest mechanical priority (e.g., base wall nodes in a building scene, fixed axis nodes in a robot scene), and Node_N has the lowest priority (e.g., decorative component nodes in a building scene, end effector nodes in a robot scene); Third, define this node sequence as the "structural topology generation order", and the generation order of the nodes it contains is directly used as the 3D structural geometry. The geometric reasoning order—that is, generating the 3D local geometry of each node sequentially in the order of Node_1→Node_2→...→Node_N—is technically significant. Unlike traditional node sorting methods based solely on topological connections (such as "left before right" or "top before bottom"), this application fuses connection relationships and force constraints through edge encoding features, combined with scene-specific node type weights. This ensures the sorting result conforms to the core logic of "prioritizing mechanical support"—load-bearing and fixed nodes are generated first due to their higher P_k value. This allows for the early construction of the mechanical support framework for the 3D structure, preventing issues like "hanging" and "imbalance" when generating non-supporting nodes later. For example, in a building scenario, the base wall is generated before the upper floor slab, ensuring stable support during floor slab generation; in a robot scenario, fixed axes are generated before the moving actuator arm, ensuring a rigid, fixed foundation for the actuator arm's movement. This reasoning order lays the foundation for the physical stability of the subsequent 3D structure, reducing the probability of later local mechanical imbalances.

[0028] Optionally, in step 3, when performing 3D structural geometric reasoning based on node latent vectors and geometric reasoning order to generate a 3D structural model, the spatial position and size ratio of the next node are predicted successively through an attention mechanism based on the node latent vector of the current node, according to the geometric reasoning order, to obtain progressively generated local geometric structures. After each geometric shape is generated, the mechanical stability-related parameters corresponding to this generation are calculated, including local stress distribution, force balance, and contact stability. If there is a local mechanical imbalance, the corresponding spatial position and / or size ratio are finely adjusted and corrected to obtain the corrected local geometric structure. Node attributes are configured for the corrected local geometric structures corresponding to all nodes to generate a 3D structural model.

[0029] Optionally, the node attributes include: geometric feature parameters, semantic tags, connection relationship parameters, and force constraint parameters. The geometric feature parameters include length, angle, and normal direction. The connection relationship parameters include constraint type, connection strength, and contact method. The semantic tags are structural unit type identifiers.

[0030] Preferably, the specific implementation process of generating the 3D structural model based on the node latent vectors and geometric reasoning order in step 3 is as follows: First, two types of core input data are obtained. One is the node latent vector matrix V (N×3 dimensions, where N is the total number of nodes, and the three column elements correspond to the feature components in the x, y, and z directions of the 3D space, such as V1=[0.23,0.51,0.12] for Node1 in the building scene and V3=[0.42,0.18,0.35] for Node3 in the robot scene). This matrix is ​​obtained by spatial encoding of the node embedding vectors, and the feature component range is [-1,1]. It needs to be mapped to the actual 3D coordinates later. The second is the geometric reasoning order (node ​​sequence [Node1,Node2,...,Node_...). The sequence is arranged in descending order of mechanical priority, with Node1 being load-bearing nodes (such as the "base wall" of a building, or the "fixed axis" of a robot) and Node_N being non-load-bearing nodes (such as the "decorative components" of a building, or the "end effector" of a robot). Simultaneously, the basic node attribute data (normalized values ​​of geometric feature parameters, semantic labels, and connection parameters) stored in previous steps are called. These three types of data serve as input for 3D geometric reasoning. A "feature-coordinate mapping" process is performed on the node latent vector matrix V to generate an "initial 3D coordinate matrix C": the mapping rule is "actual coordinates = node latent vector components × scene scaling factor S + scene offset O", where the scene scaling factor S is dynamically set according to the application scenario. For the architectural structure design scenario, due to the large component dimensions, S is set to [100-500] mm (e.g., 300 mm). For example, the x-component of V1, 0.23, corresponds to the actual x-coordinate = 0.23 × 300 = 69 mm. For the robot assembly scenario, due to the small component dimensions, S is set to [10-50] mm (e.g., 20 mm). For example, the x-component of V3, 0.42, corresponds to the actual x-coordinate = 0.42 × 20 = 8.4 mm. The scene offset O is set to the center coordinate of the inference space (e.g., for the architectural scene, O = [500, 500, 0] mm, ensuring the structure is located at the center of the space; for the robot scene, O = [100, 100, 0] mm). This results in an initial N×3 three-dimensional coordinate matrix C, with matrix elements C(i, 1), C(...). i,2) and C(i,3) are the actual x, y, and z coordinates of Node_i, respectively; 3D position and size ratio prediction is performed node by node according to the geometric reasoning order [Node1,Node2,...,Node_N]. The core relies on the improved "scene adaptive attention mechanism", which is divided into three steps: First, attention weight calculation: For the current node Node_k, extract its node latent vector V_k and the node latent vectors V1~V_{k-1} of the generated nodes (Node1 to Node_{k-1}), and calculate the cosine similarity as the attention weight. In the architectural scene, if the generated node is a "support column" (semantic label), the similarity weight is amplified by [1.2-1.5] times (Example 1).3 times), strengthening the influence of support relationships on position prediction; in robot scenarios, if the generated node is a "rotational joint", the weight is amplified by [1.1-1.3] times (1.2 times for example) to adapt to the position association requirements of the motion unit; the second step is spatial position prediction: V_k is weighted and fused with attention weights to obtain the fused feature vector V'_k, and then combined with C(k,:) in the initial three-dimensional coordinate matrix C, the position is corrected by the "position fine-tuning formula" (text description: predicted coordinates = initial coordinates + fused feature vector × fine-tuning coefficient T) - the fine-tuning coefficient T is set to [5-20] mm (10 mm for example), such as Node2 (upper floor slab) in the building scenario. If V'_k=[0.05,0.02,0.1], then the predicted y-coordinate = initial y-coordinate + 0.02×10 = initial y-coordinate + 0.2mm, ensuring alignment with the base wall position; the third step is size ratio prediction: based on the "normalized value of geometric feature parameters" in the node attributes (such as the normalized value of length 0.4, the normalized value of angle 0.5), combined with the scene size benchmark (the base wall length is used as the benchmark in the architectural scene, and the fixed axis length is used as the benchmark in the robot scene), the actual size ratio is predicted—in the architectural scene, if the predicted length of the base wall Node1 is [2000-3000]mm (for example, 2500mm), Node2 (floor slab) If the length normalization value is 0.8, then the predicted length = 2500 × 0.8 = 2000 mm; in the robot scenario, if the predicted length of the fixed axis Node1 is [100-200] mm (for example, 150 mm), and the length normalization value of Node3 (executor arm) is 0.6, then the predicted length = 150 × 0.6 = 90 mm, thus obtaining the "predicted 3D position" and "predicted size ratio" of each node; based on the predicted 3D position and predicted size ratio, a progressive local geometry is generated: the geometry type is determined according to the semantic label of the node—in the building scenario, the semantic labels "wall" and "floor" correspond to a cuboid geometry (parameters are length × width × height). "Support column" corresponds to cylindrical geometry (parameters are base diameter × height); in the robot scene, "fixed axis" and "actuator arm" correspond to cylindrical geometry (parameters are diameter × length), and "rotation joint" corresponds to toroidal geometry (parameters are inner diameter × outer diameter × thickness); the predicted size ratio is assigned to the corresponding geometric parameters, such as the predicted position (x=69mm, y=500mm, z=0) and size ratio (length 2500mm, width 200mm, height 300mm) of Node1 (base wall) in the building scene, generating "cubic prism base wall partial structure"; the predicted position (x=70mm, y=500mm) of Node2 (upper floor slab) is generated.Using a 2mm diameter, z=300mm, and a size ratio (length 2000mm, width 180mm, height 20mm), a "cubic prism floor slab local structure" is generated. This process is repeated to generate a progressive set of local geometric structures, each associated with its generation node identifier (e.g., "Node1 - Base Wall Structure"). Mechanical stability parameters are calculated for each generated local geometric structure, including local stress distribution, stress balance, and contact stability. The specific calculation rules are as follows: First, local stress distribution calculation: A simplified stress estimation formula is used (based on approximate values ​​of material properties, after material properties are...). Continuing from step 4, we will define the following. First, we associate the default scene values: For the building scene, the default material is concrete, with an elastic modulus E = [20-30] GPa (e.g., 25 GPa); for the robot scene, the default material is aluminum alloy, with E = [60-80] GPa (e.g., 70 GPa). Local stress = (predicted load × structural length) / (structural section moment of inertia × 2). The predicted load is set according to the scene: for the building scene, the wall load is [5-10] kN / m (e.g., 8 kN / m); for the robot scene, the actuator arm load is [0.1-0.5] kN (e.g., 0.3 kN). If the calculated local stress is greater than... If the scene allows a stress threshold (building scene [10-15] MPa, example 12 MPa; robot scene [20-30] MPa, example 25 MPa), then the local stress is determined to be excessive; the second step is to calculate the force balance: for the current local geometry, calculate the interaction force between it and the generated structure (such as the pressure of the floor slab on the wall in the building scene, the tension of the actuator arm on the joint in the robot scene). If the resultant force is greater than the balance threshold (building scene [1-3] kN, example 2 kN; robot scene [0.1-0.3] N, example 0.2 N), then the force is determined to be unbalanced; the third step is to stabilize the contact. Qualitative calculation: Calculate the minimum distance between the current local geometry and the generated structure. If the distance is less than the contact threshold (5-10 mm in architectural scenarios, for example 8 mm to avoid excessive gaps; 0.1-0.5 mm in robot scenarios, for example 0.3 mm to ensure movement gaps) or the distance is negative (geometric overlap), then the contact is considered unstable. If any of the above parameters does not meet the requirements, perform fine-tuning correction on the current local geometry—spatial position fine-tuning (moving along the force balance direction [1-5] mm, for example 3 mm) or size ratio fine-tuning (adjusting by a ratio of [0.05-0.2] times, for example 0.(e.g., adjusting the arm length from 90mm to 99mm) to a 1x ratio, resulting in the corrected local geometry. Node attributes are configured for all nodes corresponding to the corrected local geometry. These attributes include four types of parameters: First, geometric feature parameters (actual values ​​of length, angle, and normal direction, such as a building scene base wall with a length of 2500mm, an angle of 90°, and a normal direction along the z-axis; a robot scene arm with a length of 99mm, an angle of 0°, and a normal direction along the x-axis), directly taken from the corrected local geometry dimensions; second, semantic tags (e.g., "Building-Base Wall-1", "Robot-Arm-3"), reusing semantic identifiers from previous node attributes; and third, connection relationship parameters (constraint type, connection strength). The contact methods, such as "rigid connection," "connection strength 0.058," and "surface contact" between the base wall and floor slab in the building scene; and "rotational connection," "connection strength 0.049," and "point contact" between the fixed axis and the actuator arm in the robot scene, are taken from the edge attributes of the sketch semantic graph. The force constraint parameters (such as the vertical load of 8kN / m on the building scene wall and the horizontal tension of 0.3kN on the actuator arm in the robot scene) are taken from the predicted loads in the mechanical stability parameter calculation. These four types of parameters are bound to the corrected local geometry to form "attribute-structure" association pairs. All corrected local geometry with bound node attributes is integrated according to the geometric reasoning order, and a global topology check is performed (ensuring the connection relationship between adjacent structures matches the sketch semantics). Figure 1 If the surface contact area between the floor slab and the wall in the building scene meets the constraint requirements, and the point contact position between the execution arm and the joint in the robot scene is accurate, after verification, a complete three-dimensional structural model is generated. This model contains the geometry, node attributes and connection relationships of all physical structural units, and can be exported as preliminary three-dimensional model data (such as point cloud or mesh data), providing a basis for the subsequent finite element analysis in step 4 and the correction in step 6. Moreover, because the reasoning process follows mechanical logic and verifies stability in real time, the generated three-dimensional structural model has a lower probability of local imbalance and a higher degree of adaptability to the actual mechanical requirements of the scene compared with the traditional "generate first and then verify" method.

[0031] Optionally, the method further includes step 4: performing finite element mesh transformation and defining material properties and boundary conditions on the three-dimensional structural model to generate a finite element analysis model to evaluate the physical stability of the three-dimensional structural model.

[0032] Optionally, when evaluating the physical stability of the three-dimensional structural model in step 4, the stress-strain distribution field is solved based on the finite element analysis model to obtain displacement and deformation data. Combined with the material properties in the finite element analysis model and the geometric parameters of the three-dimensional structural model, the nodal balance, structural stiffness coefficient, and center of gravity stability index are calculated to evaluate the physical stability of the three-dimensional structural model.

[0033] Optionally, when evaluating the physical stability of the three-dimensional structural model in step 4, collision detection is performed on the three-dimensional structural model to obtain information on geometric overlap / support conflict areas. Based on this information, conflict identification processing is performed to form a geometric overlap / support conflict area identification result to evaluate the physical stability of the three-dimensional structural model.

[0034] Optionally, when evaluating the physical stability of the three-dimensional structural model in step 4, a global stability score is calculated based on the displacement and deformation data, the identification results of geometric overlap / support conflict areas, and the nodal balance, structural stiffness coefficient, and center of gravity stability index; the physical stability of the three-dimensional structural model is then evaluated based on the global stability score and the identification results of geometric overlap / support conflict areas.

[0035] Preferably, the specific implementation process of generating the finite element analysis model and evaluating the physical stability of the 3D structural model in step 4 is as follows: First, obtain the 3D structural model output in step 3. This model includes the corrected local geometry of all physical structural units (such as the cuboid walls and cylindrical support columns in the building scene, and the cylindrical fixed axis and toroidal rotary joint in the robot scene) and the bound node attributes (geometric feature parameters such as length and angle, semantic tags such as "building-base wall" and "robot-rotational joint", and connection relationship parameters such as constraint type). Based on this 3D structural model, perform finite element mesh transformation, material property definition, and boundary condition definition in sequence to generate a finite element analysis model for physical stability evaluation. Preferably, the 3D structural model is further processed by the finite element analysis model. The model's local geometry undergoes an improved "scene-adaptive mesh generation," with the core improvement being "dynamic mesh type selection based on semantic labels and geometric shapes." This is specifically divided into three steps: First, structural unit classification and mesh type matching: The mesh unit type is determined based on the semantic labels and geometric shapes of the node attributes. In architectural scenes, planar / block structures (cubic prisms, cubes) such as "base walls" and "upper floor slabs" are matched with hexahedral elements (high computational accuracy, suitable for stress analysis of large-size rigid structures); columnar structures (cylinders) such as "support columns" are matched with swept meshes (SweptMesh, which sweeps along the axial direction to generate hexahedral elements, preserving the cylindrical symmetry). In robot scenarios, complex curved surface structures (toroids, irregular geometries) such as "rotary joints" and "end-effectors" are matched with tetrahedral elements (Tetrahedral Elements, which adapt to complex mesh filling shapes); simple columnar structures such as "fixed axes" are still matched with hexahedral elements; the second step is adaptive adjustment of the element size: the mesh element size is set based on the geometric feature parameters of the structural elements—in architectural scenarios, the element size is set to [1 / 5-1 / 10] of the minimum feature size of the structure (for example, the thickness of the base wall is [200-300] mm, and the element size is set to [20-30] mm), to ensure the accuracy of the stress calculation at the wall edge; in robot scenarios, the element size is set to [1] of the minimum feature size of the structure. / 3-1 / 8] (for example, the thickness of a rotary joint is [5-10] mm, and the unit size is set to [0.8-1.5] mm), to adapt to the local stress capture of small-sized structures; at the same time, the mesh is refined in the stress-sensitive areas of the structural unit (such as the connection angle between the building wall and the support column, and the transition section between the robot fixed axis and the joint). After refinement, the unit size is [1 / 2-1 / 3] of the original size (for example, the original unit size of the building connection angle is 20 mm, and after refinement it is [8-10] mm); the third step is mesh quality verification and optimization: the generated mesh is verified by mesh quality evaluation indicators (such as unit distortion rate, AspectRatio) - the building scene requires the unit distortion rate to be less than [0.1-0.2] (for example, 0.15) AspectRatio less than [5-8] (Example 6); Robotic scenarios require element distortion rate less than [0.1-0.18] (Example 0.12), and AspectRatio less than [3-6] (Example 4); For meshes that do not meet the requirements, readjust the element size or mesh type (e.g., replace tetrahedral elements with pyramidal elements for transition), and finally obtain the finite element mesh model of each local geometry. All mesh models are spliced ​​together to form a "finite element mesh overall model". The node and element information of this model are stored in matrix form (the node matrix records the three-dimensional coordinates of each mesh node, and the element matrix records the node number associated with each element). Preferably, the material properties and boundary conditions are defined as follows: 1. Material property definition: Based on the semantic tags of the node properties of the three-dimensional structural model and the application scenario, the “scenario-specific material library” is associated and the material property parameters are assigned. The improvement lies in the “automatic mapping of semantic tags to material types”: In the building scenario, structural units with semantic tags such as “base wall”, “support column” and “upper floor” are automatically mapped to concrete material (material property parameters: elastic modulus E=[20-30]GPa (example 25GPa), Poisson’s ratio ν=[0.15-0.25] (example 0.2), density ρ=[2300-2600]kg / m³ (example 2400kg / m³)); If the semantic tag is "lightweight partition wall", it is mapped to aerated concrete material (E=[3-8]GPa (e.g. 5GPa), ν=0.2, ρ=[600-800]kg / m³ (e.g. 700kg / m³)); in the robot scenario, structural units with semantic tags "fixed axis" and "actuator arm" are mapped to aluminum alloy material (E=[60-80]GPa (e.g. 70GPa), ν=[0.26-0.3] (e.g. 0.28), density ρ=[2600-2800]kg / m³ (e.g. 2700kg / m³)); "rotary joint" is mapped to engineering plastic material (E=[2-5]GPa (e.g. 3GPa), ν=0.2, ρ=[600-800]kg / m³ (e.g. 700kg / m³)); =0.35, ρ=[1100-1300]kg / m³ (example 1200kg / m³)); Assign material property parameters to the corresponding elements of the overall finite element mesh model to generate a "mesh model with material properties"; 2. Boundary condition definition: Based on the force logic of the structural elements and the application requirements of the scenario, set the "scenario adaptive constraint type": In the architectural scenario, the bottom mesh nodes with the semantic label "base wall" are subject to fixed constraints (FixedConstraint, which restricts displacement and rotation in the x, y, and z directions, simulating the rigid connection between the wall and the ground); the edge nodes of the "upper floor slab", if connected to the wall, are subject to coupling constraints (Coup `lingConstraint` restricts the relative displacement of the connection nodes between the floor slab and the wall, simulating a rigid connection. In the robot scenario, the mesh node with the semantic label "fixed axis" is subject to a fixed constraint (restricting all degrees of freedom to simulate the fixed installation of the axis and the base). The inner nodes of the "revolute joint" are subject to a rotational constraint (`RevoluteConstraint`, which retains only the rotational degree of freedom around the joint axis, restricting displacement and rotation in other directions to simulate the motion characteristics of the joint). At the same time, a gravity load (`GravityLoad`, with a direction along the negative z-axis and a magnitude of [9.8-9.81] m / s²) is applied to all structural elements (Example 9).8 m / s²), additional uniformly distributed loads are applied to the floor in the building scene (e.g., [2-5] kN / m² (e.g., 3 kN / m²), simulating the floor load), and additional concentrated loads are applied to the end effector in the robot scene (e.g., [0.1-0.5] kN (e.g., 0.3 kN), simulating the actuator working load); the constraint type and load parameters are assigned to the mesh model with material properties, and finally a "finite element analysis model" (including mesh elements, material properties, boundary constraints, and load conditions) is generated; Preferably, the stress-strain solution and stability index calculation are implemented as follows: 1. Stress-strain distribution field solution: Using the finite element analysis model as input, an improved "scene-adaptive solver" is used to calculate the stress-strain distribution field—for architectural scenes, due to their large structural size and high rigidity, an implicit finite element solver (such as ABAQUS / Standard, adapted for static stress analysis, with high calculation accuracy) is used; for robot scenes, due to their small structural size and potential dynamic motion, an explicit finite element solver (such as ABAQUS / Explicit, adapted for transient stress analysis, with high calculation efficiency) is used; during the solution process, each... The system outputs the stress values ​​(e.g., normal stress σ, shear stress τ) and strain values ​​(e.g., normal strain ε, shear strain γ) of the mesh elements, and outputs "displacement and deformation data"—this data is stored in the form of a "node displacement matrix U" (N×3 dimensions, N is the total number of mesh nodes, U(i,1), U(i,2), U(i,3) are the displacements of the i-th node in the x, y, and z directions, respectively, in mm), and also outputs the "element stress matrix S" (M×6 dimensions, M is the total number of mesh elements, the 6 columns correspond to the normal stress in the x, y, and z directions and the shear stress in the xy, yz, and xz directions, respectively, in MPa); 2. Stability index calculation: Based on the displacement and deformation data, the material properties of the finite element analysis model, and the geometric parameters of the three-dimensional structural model, the system calculates the node stress values. The three core indicators are balance, structural stiffness coefficient, and center of gravity stability. Node balance: Select key stress-bearing nodes in the 3D structural model (such as wall-column connections in a building, or axis-joint connections in a robot), extract the force vectors of these nodes (calculate node forces based on the element stress matrix S, force = stress × element cross-sectional area), and calculate the standard deviation of the force vectors of all key nodes—the smaller the standard deviation, the higher the node balance; for architectural scenarios, the standard deviation is required to be less than [5-10] kN (e.g., 8 kN), and for robot scenarios, it is required to be less than [0.1-0.3] kN (e.g., 0.2 kN). Structural stiffness coefficient: Select typical stress-bearing segments of the structural unit (such as the middle segment of a building support column, or the middle segment of a robot fixed axis), and calculate the stress coefficient of that segment. The force-strain ratio (stiffness coefficient = average normal stress / average normal strain) is the highest. The higher the ratio, the higher the structural stiffness. In architectural scenarios, the stiffness coefficient of concrete support columns needs to be greater than [15-25] GPa (e.g., 20 GPa), and the stiffness coefficient of robot aluminum alloy fixed shaft needs to be greater than [50-70] GPa (e.g., 60 GPa). Center of gravity stability: Calculate the overall center of gravity coordinates of the 3D structural model (based on the volume and density weighted average of each structural unit), and then calculate the minimum distance from the projection of the center of gravity onto the support plane to the support boundary. The ratio of the minimum distance to the characteristic dimensions of the support plane (such as the length of the building base wall, the support diameter of the robot fixed shaft) is the center of gravity stability. The higher the ratio, the higher the stability. Architectural scenarios require a ratio greater than [0.2-0.1].[3] (Example 0.25), robot scenarios require values ​​greater than [0.15-0.25] (Example 0.2); Preferably, collision detection and global stability scoring are implemented as follows: 1. Collision detection and conflict identification: An improved "multi-resolution voxel collision detection" is performed on the 3D structural model. The improvement lies in "dynamic adjustment of voxel size based on structural accuracy": First, voxelization processing: The space where the 3D structural model is located is divided into voxel meshes. The voxel size for the building scene is set to [10-20] mm (e.g., 15 mm), and for the robot scene it is set to [1-3] mm (e.g., 2 mm); Second, overlap detection: Traverse the voxels of all structural units and determine whether there is spatial overlap between voxels of different units (voxel coordinates are the same and both are occupied by structural units). If there is overlap, record the 3D coordinate range of the overlapping voxels to form "geometric overlap region information". Simultaneously, determine the voxel distance between the supporting unit (such as building base, robot fixed axis) and the supported unit (such as building floor slab, robot actuator arm). If the distance is greater than [5-10] mm (e.g., 8 mm, building scenario) or [0.5-1.5] mm (e.g., 1 mm, robot scenario), it is determined as a "support conflict," and the coordinates of the conflict area are recorded to form "support conflict area information." The third step is conflict identification and processing: For geometric overlap area information, label the semantic tags of the overlapping units (such as "building - floor slab and column overlap", "robot - joint and axis overlap") and the overlap volume ratio (number of overlapping voxels / total number of units); For support conflict area information, label the conflict type (such as "floor slab suspended", "actuator arm unsupported") and the conflict... The distance is determined, ultimately forming the "Geometric Overlap / Support Conflict Area Identification Result" (including conflict area coordinates, conflict unit, conflict type, and conflict degree); 2. Global Stability Score and Evaluation: Based on displacement and deformation data, geometric overlap / support conflict area identification results, and three stability indicators, a global stability score is calculated—using a "weighted summation model," with weights set according to the scenario: In the building scenario, the weights are: center of gravity stability [0.3-0.4] (example 0.35), node balance [0.25-0.35] (example 0.3), structural stiffness coefficient [0.2-0.3] (example 0.25), and conflict result [0.05-0.1] (example 0.1); In the robot scenario, the weights are: structural stiffness coefficient [0.05-0.1] (example 0.1). [0.3-0.4] (example 0.35), node balance weight [0.25-0.35] (example 0.3), center of gravity stability weight [0.2-0.3] (example 0.25), conflict result weight [0.05-0.1] (example 0.1); all indicators are normalized to the [0-1] range (e.g., actual value of center of gravity stability / maximum allowable value), and conflict results are assigned values ​​as "no conflict = 1, slight conflict = 0.5, severe conflict = 0"; global stability score = (center of gravity stability × weight 1) + (node ​​balance × weight 2) + (structural stiffness coefficient × weight 3) + (conflict result × weight 4); the score range is [0-1]. If the score is greater than the set stability threshold (building scenario [0.6-0.1]), the score is lower than the set stability threshold.[7] (Example 0.65), robot scene [0.55-0.65] (Example 0.6)) and no serious conflict, then the 3D structural model is judged to be physically stable; if the score is less than the threshold or there is serious conflict, then it is judged to be unstable. The instability conclusion needs to be combined with the geometric overlap / support conflict area identification results (marking the location and cause of the unstable area) to provide a basis for the unstable area localization in the subsequent step 5.

[0036] Optionally, the method further includes step 5: calculating a comprehensive stability evaluation value based on the global stability score and the identification results of geometric overlap / support conflict areas; if the comprehensive stability evaluation value is less than a set stability threshold, the three-dimensional structural model is determined to be unstable; and the unstable areas in the three-dimensional structural model are determined based on the low stability data associated with the global stability score and the identification results of geometric overlap / support conflict areas, and their geometric coordinates and stress values ​​are determined.

[0037] Preferably, the specific implementation process of step 5 is as follows: First, three types of core input data are obtained. The first is the global stability score output in step 4 (denoted as S, with a value range of [0-1], such as S=0.58 for the building scene and S=0.52 for the robot scene). This score has integrated the weighted contributions of node balance, structural stiffness coefficient, center of gravity stability, and conflict results. The second is the geometric overlap / support conflict area identification result (denoted as R), which includes the three-dimensional coordinate range of the conflict area (such as the coordinate range of the overlapping area in the building scene x∈[200-300]mm, y∈[500-600]mm, z∈[300-350]mm, and the coordinate range of the support conflict area in the robot scene x∈[50-60]mm, y∈[200-300]mm, z ... [80-90]mm, z∈[20-30]mm), conflict unit identifiers (such as building scene unit ID100-150, robot scene unit ID50-80), conflict types (divided into "minor conflict" such as small area overlap, "severe conflict" such as large area overlap or support missing) and conflict degree parameters (such as overlap volume ratio, support gap distance); thirdly, low stability data associated with global stability score (denoted as D), including a list of key nodes with excessive node balance (such as building scene node ID200-250, whose force vector standard deviation exceeds [8-10]kN (example 8kN); robot scene node ID80-100, whose standard deviation exceeds [0.2-0.3]kN (example The data includes: a list of elements with stiffness coefficients below a threshold (e.g., element IDs 300-350 in the building scene, with stiffness coefficients below [20-25] GPa (e.g., 20 GPa); element IDs 120-150 in the robot scene, with stiffness coefficients below [60-70] GPa (e.g., 60 GPa); and information on areas with low center of gravity stability (e.g., areas in the building scene where the distance between the center of gravity projection and the support boundary is less than [0.2-0.3] times the support size (e.g., 0.25 times), and areas in the robot scene where the distance is less than [0.15-0.25] times (e.g., 0.2 times)). These three types of data serve as input for comprehensive stability assessment and unstable area location; improvements are then applied to these three types of input data. The core improvement in the comprehensive stability assessment calculation lies in the "scene adaptive conflict impact coefficient and low stability weight dynamic allocation", which is divided into three steps: First, set the basic weight and conflict impact coefficient: In the building structure design scenario, the basic weight of the global stability score S is set to [0.6-0.7] (0.65 for example), and the conflict impact coefficient K_c is dynamically adjusted according to the conflict type - severe conflict (overlapping volume ratio exceeds [10-15]% (12% for example) or support gap exceeds [10-15]mm (12mm for example)) K_c=0.3, slight conflict (overlapping volume ratio [3-10]% (5% for example) or support gap [5-10]mm (8mm for example)) K_c=0.1;In the robot building scenario, the basic weight of the global stability score S is set to [0.65 - 0.75] (for example, 0.7). The conflict impact coefficient K_c - for severe conflicts (the overlapping volume ratio exceeds [8 - 12]% (for example, 10%) or the support gap exceeds [1 - 3] mm (for example, 2 mm)), K_c = 0.25; for minor conflicts (the overlapping volume ratio is [2 - 8]% (for example, 4%) or the support gap is [0.5 - 1] mm (for example, 0.8 mm)), K_c = 0.08. Second step, calculate the low stability correction term ΔS: For each index in the low stability data D, according to the scene setting correction coefficient - in the building scene, the correction coefficient ΔS1 for the area with low center of gravity stability is [0.05 - 0.1] (for example, 0.08), the correction coefficient ΔS2 for the excessive node balance is [0.03 - 0.07] (for example, 0.05), and the correction coefficient ΔS3 for the low structural stiffness coefficient is [0.02 - 0.05] (for example, 0.03); in the robot scene, the correction coefficient ΔS3 for the low structural stiffness coefficient is [0.06 - 0.1] (for example, 0.08), the correction coefficient ΔS2 for the excessive node balance is [0.04 - 0.08] (for example, 0.06), and the correction coefficient ΔS1 for the area with low center of gravity stability is [0.03 - 0.06] (for example, 0.04); ΔS is the sum of the correction coefficients of all exceeded low stability indexes (for example, in the building scene, if a certain model has low center of gravity stability and excessive node balance, then ΔS = 0.08 + 0.05 = 0.13). Third step, calculate the comprehensive stability evaluation value S_comp: The formula (described in words) is S_comp = (S × basic weight) - (conflict result score × K_c) - ΔS, where the conflict result score is assigned according to the conflict type (severe conflict = 1, minor conflict = 0.5, no conflict = 0). For example, in the building scene, S = 0.58, basic weight 0.65, severe conflict (score 1), K_c = 0.3, ΔS = 0.13, then S_comp = (0.58 × 0.65) - (1 × 0.3) - 0.13 = 0.377 - 0.3 - 0.13 = -0.053 (this is only a calculation example, in practice, it is necessary to ensure that S_comp is non - negative, and a lower limit can be introduced and truncated to 0); in the robot scene, S = 0.52, basic weight 0.7, minor conflict (scoreIf S_comp≥T_s, but there is a "severe conflict" in the geometric overlap / support conflict area identification result R and the volume of the conflict area accounts for more than [5-8]% of the total volume of the model (e.g., 6%), or there are two or more indicators exceeding the standard in the low stability data D (e.g., both node balance and structural stiffness coefficient exceed the standard), it is still judged as unstable, ensuring coverage of the scenario of "score meets the standard but local severe defects"; for the three-dimensional structural model judged as unstable, perform unstable area localization. The core improvement lies in "fusion and clustering of low stability data and conflict results", which is divided into three steps: the first step, low stability Qualitative region extraction: For the units / nodes corresponding to the out-of-range indicators in the low-stability data D, perform spatial clustering (using the DBSCAN algorithm, with the cluster radius set to [50-100] mm for architectural scenarios (e.g., 80 mm) and [5-15] mm for robot scenarios (e.g., 10 mm)) to obtain several "low-stability unit clusters". Each cluster contains the IDs of all units within the cluster, the coordinates of the three-dimensional mesh nodes (taken from the finite element mesh node matrix in step 4), and the corresponding low-stability indicators (such as "cluster 1 - low stiffness" and "cluster 2 - poor node balance"). The second step is to identify conflict regions. Merging with low-stability regions: The intersection range of the conflict region coordinates in the geometric overlap / support conflict region identification result R is calculated with the spatial coordinate range of the low-stability unit cluster. If the spatial overlap rate between a low-stability unit cluster and the conflict region exceeds [30-50]% (e.g., 40%), the two are merged into "unstable region candidates". For low-stability unit clusters without conflict overlap, if the corresponding low-stability index exceeds the threshold by [50-80]% (e.g., 60%) (such as the stiffness coefficient of a building scene being only 40% of the threshold), it is also included in the unstable region candidates; Third Step 1, Unstable Region Verification and Screening: For each candidate unstable region, extract all the finite element elements contained therein, and extract the maximum stress value of these elements from the element stress matrix S (M×6 dimensions, M is the total number of elements) in step 4 (take the maximum value of normal stress and shear stress in the x / y / z directions). If the maximum stress value exceeds the scene's allowable stress threshold (concrete in building scene [12-15] MPa (example 12 MPa), aluminum alloy in robot scene [25-30] MPa (example 25 MPa)), then it is finally determined as an "unstable region", and a list of unstable regions is obtained.Based on the list of unstable regions, determine the geometric coordinates and stress values ​​of the unstable regions: First, geometric coordinate transformation: Map the coordinates of the finite element mesh nodes (relative to the mesh coordinate system) contained in the unstable region back to the physical coordinate system of the 3D structural model (consistent with the coordinates of the 3D structural model generated in step 3). The mapping rule is "physical coordinate = mesh node coordinate × scene scaling factor S + scene offset O" (S and O are consistent with step 3, such as S=300mm and O=[500,500,0]mm for architectural scenes). Take the extreme values ​​of all physical coordinates of the unstable region (x_min / x_max, y_min / y_max, z_min / z_max) to form the "3D coordinate range of the unstable region" (such as the coordinate range of the unstable region in architectural scenes: x∈[210-290]mm, y∈[510-590]mm, z∈[310-340]mm). At the same time, record the coordinates of the center of the region ((x_min + ... x_max) / 2, (y_min+y_max) / 2, (z_min+z_max) / 2) are used as the region identifier coordinates; the second step is stress value extraction: from the element stress matrix S in step 4, the maximum stress value of all elements in the unstable region is extracted, and the maximum value is taken as the "characteristic stress value" of the unstable region (e.g., the maximum stress value of the unstable region in the building scene [15-18] MPa (example 16 MPa), and the maximum stress value of the robot scene [28-32] MPa (example 29 MPa)). At the same time, the stress type is recorded (e.g., normal stress in the x direction, shear stress in the xy direction); finally, the "unstable region information table" is output, which includes the unstable region ID, three-dimensional coordinate range, center coordinates, characteristic stress value, stress type and the cause of instability (e.g., "low stiffness + geometric overlap", "poor node balance + support conflict"). This information table provides accurate region location and defect cause basis for the rollback and correction in the subsequent step 6.

[0038] Optionally, the method further includes step 6: rolling back and correcting the three-dimensional structural model based on the comprehensive stability assessment value and the geometric coordinates and stress values ​​corresponding to the unstable region, to obtain the final three-dimensional structural model output to the actual manufacturing process. Optionally, in step 6, the stress gradient is calculated based on the stress values ​​corresponding to the unstable region, and the comprehensive stability assessment value, the geometric coordinates and stress values ​​of the unstable region are constructed into a state vector. At the same time, a reward signal is generated based on the stress gradient to roll back and correct the three-dimensional structural model, to obtain the final three-dimensional structural model output to the actual manufacturing process. Optionally, in step 6, based on the state vector and the reward signal, correction actions such as fine-tuning of geometric parameters, repositioning of nodes, changing connection methods, or adjusting material distribution are generated. The three-dimensional structural geometric reasoning strategy used for three-dimensional structural geometric reasoning is updated based on the correction actions to roll back and correct the three-dimensional structural model, to obtain the final three-dimensional structural model output to the actual manufacturing process. Optionally, in step 6, based on the updated 3D structural geometry reasoning strategy, local regeneration is performed only on unstable regions. After local regeneration is completed, a global rebalancing calculation is performed to regulate the stress continuity and topological consistency of the structure and recalculate the stability score of the 3D structural model. The improvement of the stability score over several consecutive iterations is detected. If the improvement of the stability score over several consecutive iterations is less than the set improvement threshold, the correction process is considered to have converged. The 3D structural model at this time is the final 3D structural model output to the actual manufacturing process.

[0039] Preferably, in one embodiment, the specific implementation of step 6 uses the comprehensive stability evaluation value (denoted as S_comp, such as S_comp=0.52 for the building scene and S_comp=0.48 for the robot scene) and the unstable region information table as the core input. The unstable region information table includes the unstable region ID, the three-dimensional coordinate range (such as region 1 in the building scene: x∈[200-300]mm, y∈[500-600]mm, z∈[300-350]mm; region 2 in the robot scene: x∈[50-60]mm, y∈[80-90]mm, z∈[20-30]mm), and the characteristic stress value (such as 16MPa for the building scene and 29MPa for the robot scene). First, calculate the stress gradient corresponding to the unstable region: adopt a scene-adapted spatial sampling interval—for architectural scenes, due to the large area size, the sampling interval is set to [10-20] mm (e.g., 15 mm), and for robot scenes, it is set to [1-3] mm (e.g., 2 mm). Select several sampling points in the unstable region according to the sampling interval, calculate the ratio of the stress difference between adjacent sampling points to the spatial distance, and obtain the stress gradient components in each direction (e.g., gradient Gx in the x direction, Gy in the y direction, and Gz in the z direction), forming a "stress gradient matrix G" (M×3 dimensions, where M is the number of sampling points, and each row corresponds to the three-dimensional gradient component of one sampling point); then construct the state vector V_state: the vector dimension is [1+3×2+1] (8 dimensions in total), and the elements are, in order, the comprehensive stability evaluation value S_comp, the minimum value (x_min, y_min, z_min) and maximum value (x_max, y_max, z_max) of the three-dimensional coordinates of the unstable region, and the characteristic stress value σ_char, such as V_state=[0.52, 200, 500, 300, 300, 600, 350] for architectural scenes.

[16] , each element in the vector is normalized (mapped to the [0-1] interval, such as the coordinate divided by the maximum scene size, the stress value divided by the scene's allowable stress threshold); finally, a reward signal R is generated based on the stress gradient: a scene-specific reward coefficient is set—in the architectural scene, regions with an absolute stress gradient greater than [0.5-1] MPa / mm (e.g., 0.8 MPa / mm) are given a reverse penalty (R=-[0.1-0.3] (e.g., -0.2)), and regions with an absolute stress gradient less than [0.2-0.5] MPa / mm (e.g., 0.1-0.3) are given a reverse penalty (R=-[0.1-0.3] (e.g., -0.2)). In regions with a stress gradient greater than [2-5] MPa / mm (e.g., 3 MPa / mm), a positive reward is given (R = [0.05-0.15] (e.g., 0.1)). In robot scenarios, regions with an absolute stress gradient greater than [2-5] MPa / mm (e.g., 3 MPa / mm) are penalized with R = -[0.15-0.35] (e.g., -0.25), while regions with a stress gradient less than [0.5-2] MPa / mm (e.g., 1 MPa / mm) are rewarded with R = [0.08-0.2] (e.g., 0.12). The reward signal and the state vector together provide a decision basis for subsequent correction actions.

[0040] Preferably, in one embodiment, the process of generating corrective actions and updating the three-dimensional structural geometric reasoning strategy in step 6 uses the state vector V_state and the reward signal R as inputs, and adopts an improved Proximal Policy Optimization (PPO) reinforcement learning controller. The core improvement lies in the "scene-adaptive action space design and policy update rules". First, the corrective action space is defined: the action space of the building structure design scene includes four types of actions and corresponding parameter ranges - geometric parameter fine-tuning (such as adjusting the wall thickness [5-20] mm (example 10 mm), adjusting the floor slab thickness [3-15] mm (example 8 mm)), node relocation (moving along the opposite direction of the stress gradient [5-15] mm (example 10 mm)), changing the connection method (such as changing "semi-rigid connection" to "rigid connection", which requires synchronous adjustment of the constraint weight from [0.6-0.7] to [0.8-0.9]), and adjusting the material distribution (such as increasing the material density in high-stress areas). The range of motion space parameters for robot building scenarios is more refined—geometric parameter fine-tuning (support shaft diameter adjustment [0.5-3] mm (example 1.5 mm), joint thickness adjustment [0.3-2] mm (example 1 mm)), node repositioning (movement [0.3-2] mm (example 1 mm)), connection method change (e.g., "flexible rotary connection" changed to "rigid rotary connection", constraint weight from [0.2-0.3] to [0.4-0.5]), material distribution adjustment (material density adjustment [3-10]% (example 5%)). The controller selects corrective actions through multi-round interactive learning: in each round, V_state is input into the policy network, the action probability distribution is output, a corrective action is selected based on the probability, a new reward signal R_new is obtained after execution, and the policy network parameters are updated through the clip objective function; the 3D structural geometry inference policy is updated based on the selected corrective action—if the action is a fine-tuning of geometric parameters, the weight of the "size ratio prediction module" in the policy is adjusted (e.g., the attention weight of the size prediction of high stress areas is increased [0.1-0.2]); if the action is a change in connection method, the "constraint type inference rule" in the policy is corrected (e.g., the priority of rigid connection judgment is increased). The updated policy must retain the original mechanical logic order (e.g., priority of load-bearing nodes), and only optimize the inference parameters for unstable regions.

[0041] Preferably, in one embodiment, step 6 involves performing a local regeneration and global rebalancing process based on the updated 3D structural geometric reasoning strategy, using the updated strategy, the unstable region information table, and the original 3D structural model as input. First, unstable region localization and node selection are performed: based on the 3D coordinate range of the unstable region, nodes with a spatial overlap rate exceeding [30-50]% (e.g., 40% for example) with that region are selected from the node set of the original 3D structural model, forming a "local regeneration node list." This ensures that operations are only performed on nodes that affect stability, avoiding damage to the overall structure. Next, local regeneration is performed: the updated 3D structural geometry reasoning strategy is invoked, and the spatial position and size ratio are re-predicted based on the node's latent vector, following the original geometry reasoning order (but only processing nodes in the local regeneration node list). For example, in the architectural scene, for node ID120 (support column node), according to the updated strategy, its z-direction position is adjusted from 300mm to 310mm (along the opposite direction of the stress gradient), and its diameter is adjusted from 20mm to 22mm; in the robotic scene, for node ID60 (joint node), its x-direction position is adjusted from 55mm to 56mm, and its thickness is adjusted from 5mm to 5.5mm. After each local regeneration, the relevant parameters of local mechanical stability (local stress distribution, force balance, contact stability) of the node are calculated. If imbalance still exists, fine-tuning is repeated until the parameters meet the standards, resulting in the "locally regenerated structure". Then, a global rebalancing calculation is performed: the locally regenerated structure is spliced ​​with the unstable region of the original 3D structural model, and the force continuity of the overall structure (such as the force transmission efficiency of adjacent nodes, which is required to exceed [80-90]% (e.g., 85%)) and topological consistency (such as the constraint weight deviation of the connection relationship being less than [0.05-0.1] (e.g., 0.08)) is calculated. By adjusting the small positions of the nodes in the unstable region (moving [1-5] mm (e.g., 3 mm)) or constraint weights (fine-tuning [0.01-0.05] (e.g., 0.03)), the overall force path is regulated. Finally, the global stability score of the 3D structural model is recalculated (e.g., from 0.58 to 0.68 for the building scene and from 0.52 to 0.62 for the robot scene).

[0042] Preferably, in one embodiment, the process of detecting the convergence of the correction process and outputting the final model in step 6 uses the global stability score of each iteration (denoted as Siter, such as S1=0.68 for the first iteration, S2=0.72 for the second iteration, and S3=0.73 for the third iteration) as the core input. First, the convergence judgment parameters are set: the number of consecutive iterations K is set to [2-3] times (2 times for example), and the magnitude increase threshold T_up is set to [0.01-0.03] (0.02 for example). Due to the complexity of the building scene, T_up can be appropriately relaxed to [0.02-0.04] (0.03 for example). Due to the fine structure of the robot scene, T_up is set to [0.01-0.02] (0.015 for example). Next, iterative scoring monitoring is performed: S_iter is recorded after each local regeneration and global rebalancing, and the score improvement ΔS = S_iterS_iter-K is calculated for K consecutive iterations (e.g., ΔS1 = 0.72 - 0.68 = 0.04 for the 2nd iteration and 1st iteration, ΔS2 = 0.73 - 0.72 = 0.01 for the 3rd iteration and 2nd iteration). Finally, convergence is determined: if ΔS is less than T_up for K consecutive iterations (e.g., ΔS2 = 0.01 < 0.015 in the robot scenario, and the previous ΔS1 = 0.04 > 0.015, iteration continues; until the 4th iteration S4 = 0.735, ΔS3 = 0.735 - 0.73 = 0.005 < 0.015, and ΔS is less than the threshold for two consecutive iterations), then the correction process is considered converged. After convergence, the current 3D structural model is output as the final model. The model must meet the following requirements: the global stability score exceeds the set stability threshold (0.65 for building scene, 0.6 for robot scene), and the characteristic stress value of the unstable region is lower than the scene's allowable stress threshold (12MPa for building scene, 25MPa for robot scene). The proportion of geometric overlap / support conflict areas is lower than [3-5]% (4% for example). This ensures that the model can be directly output to the actual manufacturing process (e.g., the building model is exported as STL format, and the robot model is exported as G-Code instructions).

[0043] Preferably, in one embodiment, a WebGL or OpenGL visualization engine is invoked to load the geometric data and node attribute data of the final model, generating a basic 3D interactive interface that supports rotation and scaling operations. A slice viewing module is configured for the basic 3D interactive interface, importing the 3D coordinate range data of the final model to enable viewing of the model's internal structure based on arbitrary cross-sections, resulting in an interactive 3D model display interface. Using this interactive 3D model display interface as a carrier, the stress distribution data obtained in step 4 and the global stability score data from step 5 are input into a heatmap rendering module. Through color gradient mapping rules (e.g., low stress corresponds to blue, high stress corresponds to red), these data are converted into visualization layers and superimposed onto the surface of the 3D model, forming an interactive interface with real-time stress visualization and a stability heatmap.

[0044] Preferably, in one embodiment, the geometric topology data of the final model, material parameters (such as density and elastic modulus) in the node attributes, and component semantic tags are obtained. Combined with the parameter specifications of the target manufacturing equipment (such as the forming size of the 3D printer and the working range of the robot), material layout optimization is performed: the internal units of the model are traversed by a greedy algorithm, and the material density of each unit is adjusted according to the stress distribution data in step 4. The high-stress area maintains the baseline density, and the low-stress area reduces the density, resulting in an optimized material density distribution matrix. The optimized material density distribution matrix and the geometric data of the final model are input into the component segmentation module. Based on the maximum processing size of the equipment (such as length [500-1000] mm, width [500-1000] mm, height [500-1000] mm), spatial segmentation is performed to generate several segmented models and corresponding splicing positioning marks, resulting in an optimized model data package containing material layout data and segmentation information.

[0045] Preferably, in one embodiment, the geometric data, material parameters, and component semantic tags in the optimized model data package are imported into a format conversion module. An STL, OBJ, or STEP format encoding library is called to convert the geometric topology and attribute information according to the format specifications, generating a standard industrial format model file with an accompanying material parameter table and component tag list. Simultaneously, the geometric coordinates of the segmented model, the material density distribution matrix, and the equipment instruction protocol (such as G-Code's G01 linear instruction or ROS's motion control msg format) in the optimized model data package are read and converted into a manufacturing script containing processing paths, material supply rates, and assembly sequences using an instruction generation algorithm. The standard industrial format model file and manufacturing script are then sent to the target storage path via a data transmission interface or directly pushed to the receiving port of the 3D printing equipment or robot control system.

[0046] Preferably, in one embodiment, the interactive interface with real-time stress visualization and stability heatmap integrates a sketch editing plugin. It receives user-input sketch local modification commands (such as line dragging and size adjustment), locates the original 2D structural design sketch coordinates and associated final model node set corresponding to the modified area. The sketch pixel data of the modified area is extracted, and the preprocessing, feature extraction, and encoding logic of step 1 is invoked to regenerate the structured tensor representation of that area. The newly generated structured tensor representation is then fused with the data of the unmodified areas in the original structured tensor representation to obtain an updated structured tensor representation. The updated structured tensor representation is sequentially input into the semantic graph construction (step 2), 3D geometric reasoning (step 3), stability assessment (step 4), unstable region identification (step 5), and model correction (step 6) processes to obtain the updated final model. The updated final model is then re-input into the 3D visualization interactive output, manufacturing data optimization, and model format export processes to complete the dynamic update cycle.

Claims

1. A method for spatial intelligent 3D modeling based on 2D structural design sketch images, characterized in that, include: Step 1: Preprocess the input two-dimensional structural design sketch image to obtain a preprocessed design sketch image. Extract the two-dimensional structural design features from the preprocessed design sketch image and encode them to generate a structured tensor representation. Step 2: Based on structured tensor representation, infer spatial components, functional partitions and constraint logic to construct a sketch semantic graph, where nodes in the sketch semantic graph represent physical structural units and edges represent the connection relationships and force constraints between physical structural units. Step 3: Determine the node embedding vector corresponding to each node in the sketch semantic graph to obtain the node latent vector by encoding it in three-dimensional space. Generate the geometric reasoning order for three-dimensional structural geometric reasoning based on the edges in the sketch semantic graph according to the mechanical logic definition. Perform three-dimensional structural geometric reasoning based on the node latent vector and the geometric reasoning order to generate a three-dimensional structural model.

2. The method according to claim 1, characterized in that, In step 1, when preprocessing the input two-dimensional structural design sketch image to obtain the preprocessed design sketch image, the spatial domain pixel matrix corresponding to the two-dimensional structural design sketch image is converted into frequency domain data. The frequency domain data is then subjected to high-pass filtering to retain the high-frequency components of the corresponding geometric contours and attenuate and suppress the low-frequency components of the corresponding shadows to generate high-frequency enhanced data in the frequency domain. The high-frequency enhanced data in the frequency domain is then converted back to the spatial domain through inverse Fourier transform to obtain a high-frequency enhanced sketch image to generate the preprocessed design sketch image.

3. The method according to claim 2, characterized in that, In step 1, when the input two-dimensional structural design sketch image is preprocessed to obtain the preprocessed design sketch image, based on the spatial domain pixel matrix corresponding to the high-frequency enhanced sketch image, the encoder of the U-Net convolutional network extracts line features, the decoder extracts spatial semantic features, and the line features and spatial semantic features are fused to obtain multi-scale composite features to generate the preprocessed design sketch image.

4. The method according to claim 3, characterized in that, In step 1, when the input two-dimensional structural design sketch image is preprocessed to obtain the preprocessed design sketch image, the multi-scale composite features are mapped back to the original size of the high-frequency enhanced sketch image to obtain the size-restored feature map. Then, the size-restored feature map is subjected to binary classification semantic segmentation to distinguish geometric contours and noise pixels, resulting in the preprocessed design sketch image after line-background separation.

5. The method according to claim 1, characterized in that, In step 1, when extracting two-dimensional structural design features from the preprocessed design sketch image and encoding them to generate a structured tensor representation, morphological processing is performed on the preprocessed design sketch image to obtain the lines and perform vectorization transformation processing to obtain vectorized path data containing the node pairs corresponding to each line segment and the attached geometric attributes, which is then encoded to generate a structured tensor representation.

6. The method according to claim 5, characterized in that, In step 1, when extracting two-dimensional structural design features from the preprocessed design sketch image and encoding them to generate a structured tensor representation, position normalization processing is performed on the vectorized path data to obtain a set of structural elements with unified spatial position reference. Feature encoding processing is then performed on the set of structural elements with unified spatial position reference to obtain a unified structured tensor representation.

7. The method according to claim 1, characterized in that, In step 2, when inferring spatial components, functional partitions, and constraint logic based on structured tensor representation to construct the sketch semantic graph, local and global geometric features are extracted from the structured tensor representation to obtain high-level semantic information carrying association information of symmetry planes, repeating structures, and connection points. Based on this, spatial components, functional partitions, and constraint logic are inferred to construct the sketch semantic graph.

8. The method according to claim 7, characterized in that, In step 2, when inferring spatial components, functional partitions, and constraint logic based on structured tensor representation to construct the sketch semantic graph, the connection relationship between nodes is inferred based on high-level semantic information to obtain connection edge attributes including constraint type, connection strength, and contact method. Corresponding constraint weights are assigned according to the connection type to form weighted topological connection relationship data and construct the sketch semantic graph accordingly.

9. The method according to claim 8, characterized in that, In step 2, when inferring spatial components, functional partitions and constraint logic based on structured tensor representation to construct a sketch semantic graph, the structure type corresponding to the shape symbol in the preprocessed design sketch image is identified based on high-level semantic information and the shape symbol features corresponding to the structured tensor, so as to generate a set of structural elements with semantic labels. A sketch semantic graph is constructed based on weighted topological connection relationship data and a set of structural elements with semantic labels.

10. The method according to claim 1, characterized in that, In step 3, when determining the node embedding vector corresponding to each node in the sketch semantic graph to obtain the node latent vector by spatial encoding, the node embedding vector corresponding to each node is extracted from the sketch semantic graph; the node embedding vector is spatially encoded to obtain the node latent vector.

11. The method according to claim 1, characterized in that, In step 3, when generating the geometric reasoning order for three-dimensional structural geometric reasoning based on the edges in the sketch semantic graph according to the mechanical logic definition, the connection relationships and force constraints carried by the edges in the sketch semantic graph are extracted, and spatially encoded to obtain the edge encoding features that integrate the connection relationships and force constraints. Based on edge encoding features, the node set of the sketch semantic graph is sorted to generate a structural topology containing the order of node generation. The sorting process is based on the mechanical logic reflected by the force constraints corresponding to the edges. The order of node generation contained in the structural topology serves as the geometric reasoning order for three-dimensional structural geometric reasoning.

12. The method according to claim 1, characterized in that, In step 3, when performing 3D structural geometric reasoning based on node latent vectors and geometric reasoning order to generate a 3D structural model, the spatial position and size ratio of the next node are predicted successively through an attention mechanism based on the node latent vector of the current node, in accordance with the geometric reasoning order, so as to obtain the progressively generated local geometric structure. After each geometry is generated, the mechanical stability parameters corresponding to that generation are calculated, including local stress distribution, force balance and contact stability. If there is local mechanical imbalance, the corresponding spatial position and / or size ratio are finely adjusted and corrected to obtain the corrected local geometry. Node attributes are configured for the corrected local geometry of all nodes to generate a three-dimensional structural model.

Citation Information

Patent Citations

  • CAD model generation method and system based on integral sketch

    CN118395528A

  • Freehand sketch-based three-dimensional model generation method and system

    CN119295648A

  • Intelligent costume design method fusing AI and CAD technologies

    CN120597358A

  • Double-branch diffusion three-dimensional scene generation method based on multi-modal semantic graph

    CN120833445A

  • Extraction of inference rules from heterogeneous graphs

    US20160078344A1

Cited By

  • AI self-generating system for converting engineering 2D graph into 3D graph

    CN121880445A

  • 2d drawing to 3d drawing ai self-generation system

    CN121880445B

  • Sketch image analysis and classification system based on line structure modeling

    CN121904293A

  • Typesetting method and typesetting equipment capable of shooting and typesetting at same time, medium and program product

    CN122018830A

  • A method, equipment, media, and program product for on-the-fly typesetting.

    CN122018830B