Generative shear wall structure arrangement method based on flow matching frame
By combining a flow matching framework with rules, an ordinary differential equation trajectory is constructed. By utilizing a dual-flow U-Net network and a coordinate attention mechanism, the problems of long iteration cycles and unstable generation in shear wall structure design are solved, and fast and accurate shear wall layout is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2026-01-17
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional shear wall structure design has a long iteration cycle and relies on human experience. Existing deep learning generation technology is unstable in training or has a long computation time, and the topology is unreasonable when dealing with key functional areas.
A flow matching framework is used to extract key region masks by combining rules, and ordinary differential equation trajectories are constructed. Shear wall structures are generated by numerical integration. The two-stream U-Net network and coordinate attention mechanism are combined to ensure that the generation process is stable and efficient.
It enables rapid iteration and stable generation of shear wall structure designs, with accurate topology in key areas, fast generation speed, compliance with seismic codes, high versatility, and automated data processing.
Smart Images

Figure CN121936026A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interdisciplinary technology of artificial intelligence and civil engineering. Specifically, it relates to a method for intelligent structural design using generative deep learning models, and in particular, a method for automatically generating shear wall structure layout schemes under given building conditions based on a flow matching framework. Background Technology
[0002] Shear wall structures play a crucial role in high-rise buildings and buildings in seismically fortified areas due to their superior lateral stiffness and load-bearing capacity.
[0003] However, the traditional shear wall structure design process is largely a labor-intensive iterative process that relies on engineers' expertise and experience. The "design-analysis-optimization" cycle often needs to be repeated many times, consuming significant time and computational resources, and incurring high communication costs. The quality of the final solution is largely limited by the engineer's experience level and the number of iterations invested, making it difficult to guarantee global optimization.
[0004] In recent years, with the rapid development of deep learning technology, data-driven generative models have gradually become the main direction of intelligent structure design. Among them, Generative Adversarial Networks (GANs), Graph Neural Networks (GNNs), and Diffusion Models (DMs) have been applied to the field of structure design.
[0005] GANs learn data distribution through an adversarial game between the generator and the discriminator, and in theory, they can generate high-quality samples. However, in practice, the training process of GANs is extremely unstable, often encountering problems such as mode collapse (i.e., the generator can only produce a very limited number of samples) and training non-convergence, making it difficult for the model to converge and resulting in insufficient diversity of generated results.
[0006] GNN training is relatively stable and offers advantages such as high computational speed and low computational resource requirements. However, GNNs require complex preprocessing operations to abstract a real-world structure into graph-structured data. Because the input and output are deterministic parameters, the diversity of generated structures is insufficient. Diffusion models are a technique that has achieved great success in image generation in recent years. They generate data through a progressively noisy forward process and a progressively denoising backward process. Diffusion models can generate highly high-quality and diverse samples. However, their core bottleneck lies in the inference (generation) speed. Because their denoising process requires hundreds or thousands of iterations, generating a structural diagram can take tens of seconds or even minutes. This is too slow for interactive design scenarios that strive for "what you see is what you get" (e.g., an architect adjusting the position of a door and wanting to immediately see the updated structural suggestions), severely limiting their application value in rapid design iterations.
[0007] Flow matching theory provides an efficient generative modeling paradigm by constructing and fitting a vector field of probability density paths connecting source and target distributions. This method mathematically avoids the instabilities caused by adversarial training, and by directly regressing the flow field, it allows numerical solvers to use larger step sizes due to the relatively straight transmission paths it generates. This significantly reduces the number of iterations required by traditional diffusion models and greatly improves sampling efficiency.
[0008] Based on the above, this invention proposes a generative shear wall structure layout method based on a flow matching framework. Summary of the Invention
[0009] The purpose of this invention is to propose a generative shear wall structure layout method based on a flow matching framework to solve the following problems: (1) The traditional shear wall structure design process has a long iteration cycle and relies heavily on manual experience; (2) In existing deep learning generative techniques, generative adversarial networks are difficult to train and prone to pattern collapse, and diffusion models have many back-inference steps and are computationally time-consuming. (3) Existing pure data-driven generation models suffer from unreasonable topological structures and poor generation quality when dealing with key functional areas such as elevator shafts and core tubes due to the lack of explicit geometric constraints.
[0010] This invention combines a flow matching framework with domain rules, utilizing rule-based key region masks to constrain the initial state, and constructs a deterministic ordinary differential equation trajectory that evolves from a hybrid prior distribution to the true structural distribution. During the inference phase, the mapping from the hybrid initial state to the structural design tensor can be achieved within a small number of discrete steps by solving this ordinary differential equation using a numerical integrator. This invention improves generation efficiency and accuracy of key regions while ensuring computational convergence and generation stability, providing a solution for generative shear wall structure design that balances physical logic and computational performance.
[0011] To achieve the above objectives, the present invention proposes the following technical solution: A generative shear wall structure layout method based on a flow matching framework includes the following steps: S1. Data Preprocessing and Key Region Extraction: Obtain a dataset containing architectural design drawings, shear wall structure design drawings, and corresponding basic design seismic acceleration values; Extracting key region masks from architectural design drawings using rule-based image processing methods M The key region mask M Used to indicate areas where shear walls must be installed, such as elevator shafts or core tubes; Data tensorization is performed on the dataset to augment the data by converting the architectural design drawings, shear wall structure design drawings, and key area masks into tensors of a preset format; wherein the architectural design drawings are... C 1. The basic design seismic acceleration value is C 2. The shear wall structure design drawing is as follows: X 1, Mask the critical area M With architectural design drawings C 1. Perform splicing to form an enhanced geometric condition input; S2, Flow Matching Model Construction: A neural network module for fitting a vector field is constructed, and the neural network module is configured to receive multimodal data as conditional input, the conditional input including: the current time point. t intermediate state image X t Architectural design drawings C 1 and conditional earthquake acceleration values C 2; S3, Stream Matching Model Training: Construct the initial mixed state X 0 Masking in critical areas M Within the specified area, pixel values are initialized to shear wall feature values, and a mask is applied to the key area. M Sample Gaussian noise outside the indicated area; Data distribution from the target structure diagram P Samples collected in 1 X 1. And construct intermediate state images. X t The calculation formula is as follows:
[0012] By minimizing the vector field predicted by the neural network module With the set conditional probability path direction vector The loss between them is calculated, and the parameters of the neural network module are optimized so that the model can learn to generate shear walls under conditional guidance. S4. Structure diagram reasoning generation: During the reasoning phase, input the architectural design drawings to be designed. C 1 and its corresponding critical region mask M With the specified seismic acceleration value C 2. Construct the initial mixed state X 0. Fix the pixel values of the wall in the key area to the shear wall feature values, and initialize the remaining locations with random Gaussian noise; from the initial mixing state X Starting from 0, the numerical integration method is used to solve the ordinary differential equations, generating the final shear wall structure design drawings. X 1.
[0013] Preferably, the key region mask extraction method described in S1 using rule-based image processing specifically includes: In architectural design drawings, traverse the connected background regions in the drawings and calculate the aspect ratio and pixel area of the minimum bounding rectangle of each region. The background connected regions are filtered according to the set aspect ratio range and pixel area range; For each filtered region, the number of door openings on its adjacent walls is further detected; if the number of door openings on the adjacent walls of a region meets the specified condition (no more than two), the region is marked as a key region and a corresponding key region mask is generated.
[0014] Preferably, the shear wall structure design drawing X 1 is represented as a single-channel tensor, whose pixel values correspond to the shear wall, the infill wall, and the background space, respectively; wherein, the pixel value at the shear wall position is 1, the pixel value at the infill wall position is 0, and the pixel value at the background space position is -1; the shear wall feature value mentioned in S3 and S4 corresponds to 1.
[0015] Preferably, the neural network module adopts a dual-stream U-Net network architecture; the dual-stream U-Net network architecture includes a main generator network and a parallel conditional encoder; the input end of the conditional encoder includes a multi-channel fusion module, which is used to concatenate the architectural design drawing and the key area mask in the channel dimension as a conditional input, and then the conditional encoder extracts multi-scale features.
[0016] Preferably, the dual-stream U-Net network architecture further includes a spatial feature injection mechanism; the spatial feature injection mechanism uses a set of projection convolutional layers to superimpose and fuse the feature maps of each level extracted by the conditional encoder onto the feature map of the corresponding resolution in the main generator network encoder in a pixel-level aligned manner, so as to achieve strong guidance of the geometric constraints of the building base map.
[0017] Preferably, the basic convolutional units in the main generator network adopt a residual block structure; the residual block integrates a coordinate attention mechanism, which is located after the convolutional layer of the residual block and before the residual connections are added, and aggregates features in the horizontal and vertical directions respectively, in order to capture the axial long-distance dependencies of the shear wall structure and enhance the alignment capability of the axis grid.
[0018] Preferably, the conditional encoder and the main generator network use a matching downsampling ratio; the conditional encoder outputs a feature map at each resolution level, and the main generator network performs dimension verification before receiving feature injection, and performs feature fusion only when the spatial resolution and the number of channels are matched, so as to ensure accurate transmission of geometric information at multiple scales.
[0019] Preferably, the numerical integration method used in S4 to solve the ordinary differential equation is specifically calculated using the following formula:
[0020]
[0021] in, t Indicates time; X t Indicates the current time point t The corresponding intermediate state image; Represents a conditional vector field. Represents the conditional vector field used for prediction The neural network module; C 1 indicates architectural design drawings; C 2 represents the earthquake acceleration value; h Indicates the step size; M This represents the mask for the critical region.
[0022] The present invention further protects a computer device, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the instruction, program, code set or instruction set being loaded and executed by the processor to implement the above-described generative shear wall structure arrangement method based on the flow matching framework.
[0023] The present invention further protects a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the instruction, program, code set, or instruction set is loaded and executed by a processor to implement the above-described generative shear wall structure arrangement method based on the flow matching framework.
[0024] Compared with the prior art, the present invention provides a generative shear wall structure layout method based on a flow matching framework, which has the following advantages: (1) High training stability and improved convergence efficiency: The flow matching framework adopted in this invention avoids the instability caused by pattern collapse and minimax game, which are common in generative adversarial networks, by directly regressing the vector field. This significantly reduces the learning difficulty, makes the model training process more stable, and further accelerates the convergence speed.
[0025] (2) Fast inference generation speed, meeting the needs of real-time interaction: The generation process of this invention is essentially solving an ordinary differential equation (ODE); thanks to the low curvature of the probabilistic flow trajectory generated by the flow matching model, high-quality results can be evolved with only a few dozen discrete steps using numerical integration methods (such as the Euler method), and a single structural design diagram can be generated in sub-second time. Compared with traditional diffusion models (such as DDPM) which usually require hundreds or thousands of iterative denoising steps, this method achieves an order-of-magnitude improvement in inference speed, which can effectively meet the needs of real-time feedback and rapid iteration in structural design.
[0026] (3) Accurate topology in key areas and reasonable overall layout: This invention innovatively adopts a rule-guided hybrid initialization strategy, combined with coordinate attention mechanism and multi-scale feature injection technology. This mechanism ensures that the geometric constraints of key functional areas such as elevator shafts and core tubes are explicitly preserved and transmitted, effectively solving the problem of structural missing or topological errors that are prone to occur in complex components in traditional generative models.
[0027] (4) Automated data processing and convenient engineering applications: This invention is mainly based on images, and the extraction of key region masks is also automatically completed through standardized image processing algorithms, without the need for manual annotation. Compared with the complicated preprocessing process of complex node definition, edge connection construction and graph structure abstraction required by graph neural networks (GNN), the data preparation path of this method is simpler and more efficient, and has stronger engineering implementation capabilities.
[0028] (5) Strong multidimensional controllability, taking into account both standardization and diversity: This invention supports multimodal condition input of architectural design drawings, key area masks and seismic design parameters; users can not only quickly obtain recommended schemes that comply with seismic codes, but also guide the model to meet the requirements of key areas by adjusting geometric constraints (such as mask areas) or physical parameters (such as seismic acceleration), while exploring diverse shear wall layout forms, thus achieving the unity of design standardization and generation diversity. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings involved in the embodiments are now briefly described. Obviously, the drawings in the following description are merely illustrative of some embodiments of the present invention. For those skilled in the art, other forms of drawings can be constructed based on these drawings without creative effort.
[0030] Figure 1 This is a schematic diagram illustrating the principle of a flow matching method for generative design of shear walls provided in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the overall process of a generative shear wall structure layout method based on a flow matching framework provided in Embodiment 1 of the present invention; Figure 3 The neural network module used for predicting conditional vector fields in Embodiment 1 of the present invention ( μ θ Detailed structural diagram of ) Figure 4 This is a schematic diagram of the structure of each module in the neural network module of Embodiment 1 of the present invention; Figure 5 This is a schematic diagram of the shear wall arrangement evolution process in the reasoning process of Embodiment 1 of the present invention; Figure 6 This is a comparison diagram of a portion of the design generated in Embodiment 1 of the present invention and the actual design; Figure 7 This is a comparison diagram of the generative design combining prior rules in Embodiment 1 of the present invention. Detailed Implementation
[0031] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0032] This invention proposes a generative shear wall structure layout method based on a flow matching framework. Utilizing a conditional flow matching model, it learns a direct mapping from a hybrid initial distribution incorporating rule priors to a complex shear wall layout distribution conditional on architectural and seismic information. This is achieved through the following four steps: S1. Data Preprocessing and Rule-Based Feature Extraction: Collect and organize a dataset containing architectural design drawings, shear wall structure design drawings, and corresponding basic seismic acceleration values; use a rule-based image processing algorithm to automatically extract key area masks containing elevator shaft and core tube information from the architectural design drawings, and concatenate the masks with the architectural design drawings in the channel dimension to construct an enhanced geometric condition tensor; then convert all image data into a standardized tensor format, and perform data augmentation operations such as flipping and rotating to construct a high-quality training dataset.
[0033] S2, Model Building Stage: Design and build a deep neural network based on the dual-stream U-Net architecture as the core of the flow matching model; the network is configured to receive enhanced building features containing key region masks as conditional inputs. The network integrates a coordinate attention mechanism in the residual blocks to replace the computationally expensive global self-attention, accurately capturing the axial alignment features of the shear walls. Through parallel conditional encoders and multi-scale spatial feature injection technology, the geometric constraints of the building base map and the topological constraints of key regions are accurately fused layer by layer into the main generator network.
[0034] S3. Model Training Phase: A conditional flow matching training paradigm that integrates rule priors is proposed. During the training process, a hybrid initial state sample is first constructed. X 0. Specifically, within the key area mask, the locations indicated by walls in the architectural drawing are filled with shear wall feature values, while the remaining locations are filled with Gaussian noise. Subsequently, this mixed initial sample, the real structural drawing sample, time variables, and multimodal conditional data (including the masked architectural drawing and seismic parameters) are input into the model to drive the model to predict the instantaneous velocity vector on the probability flow path from the mixed prior distribution to the real structural drawing distribution. The training objective is set to minimize the mean square error between the predicted vector and the real path vector.
[0035] S4. Inference Generation Stage: In the inference stage, new architectural drawings and seismic parameters are received. First, the corresponding key area masks are extracted; then, the initial mixed state is constructed. X 0. Fix the pixel values of the wall positions in the key area as shear wall features, and initialize the other positions as random Gaussian noise; use an efficient numerical solver of ordinary differential equations (such as the Euler method) to perform integral iteration along the vector field predicted by the model, and evolve the final shear wall structure design drawing with both data distribution diversity and compliance with the topological constraints of the key area within a very small number of discrete steps.
[0036] The generative shear wall structure layout method based on the flow matching framework proposed in this invention will be described below with reference to specific examples and related figures.
[0037] Example 1: This invention proposes an innovative generative shear wall structure design method based on a rule-guided and conditional flow matching framework. For example... Figure 1 As shown, its core idea is to use a mixture of initial distributions from a prior fusion rule. P Evolving from 0 to a complex target data distribution P The process of 1 (such as a real shear wall layout) is modeled as a continuous time-dependent probability flow. This process is described by an ordinary differential equation:
[0038] in, The sample in time t The state; It is a mixed initial state that includes geometric constraints of the key region; It is time-dependent and derived from architectural drawings. Critical area mask and physical conditions A vector field jointly determined by (seismic parameters).
[0039] The objective of this invention is to train a neural network. To approximate this unknown vector field Thus, the structure is generated under the guidance of prior rules.
[0040] The following will describe in detail a preferred embodiment, strictly following the four steps of the method proposed in this invention. The general process is as follows: Figure 2 As shown.
[0041] Step 1: Data acquisition, preprocessing, and key region extraction, specifically including the following: 1. Data Sources and Collection: The data in this embodiment comes from a large open-source architectural drawing dataset. Each valid data sample contains three parts: (a) Architectural floor plan; (b) Final layout of the shear wall structure; (c) The basic design seismic acceleration values for the project (e.g., 0.1g, 0.15g, 0.2g, etc.).
[0042] 2. Image standardization, key region extraction, and tensor quantization: Architectural design drawings C 1. The original CAD drawings are first converted into RGB image format. To ensure the model can clearly identify different building components, this invention sets a unified color code: walls are rendered as gray (RGB: 152,152,152), doors as green (RGB: 0,255,0), and windows as blue (RGB: 0,0,255). Then, this RGB image is converted into a three-channel floating-point tensor, with each channel representing the presence of a wall, door, or window. Specifically, at a given pixel location, if the corresponding component exists, the corresponding value for that channel is 1; otherwise, it is 0.
[0043] Critical area mask To enhance the model's ability to perceive key functional areas such as elevator shafts and core tubes, this invention introduces a rule-based image processing step to extract key region masks. The specific extraction logic is as follows: traverse the background connected regions in the architectural drawing, calculate their minimum bounding rectangle parameters and adjacency relationships with door and window elements, and filter key regions. The key regions are represented in the mask tensor. M The area in the middle is marked as 1, and the rest is marked as 0. Finally, this single-channel mask... Tensors of architectural design drawings C 1. The input tensors are spliced along the channel dimension to form a four-channel conditional input tensor containing explicit geometric constraints.
[0044] Shear wall structure diagram X 1. The structural diagram was converted into a single-channel grayscale image, with shear walls marked in red (RGB:255,0,0). This image was then converted into a single-channel floating-point tensor. To enable the model to distinguish different unstructured regions, a ternary encoding scheme was used: pixels containing shear walls were assigned a value of +1, non-load-bearing infill walls or core tube regions were assigned a value of 0, and completely blank background areas (such as interiors or exteriors) were assigned a value of -1. This ternary representation, compared to a simple binary (wall / non-wall) representation, provides richer semantic information to the model, facilitating the generation of more refined layouts.
[0045] 3. Size normalization and condition coding: Image size: Considering computational efficiency and video memory limitations, all image tensors (including architectural drawings) are... Critical area mask and structural diagram All images were uniformly scaled to 512x1024 pixels. Nearest neighbor interpolation was used during scaling to ensure that the boundaries of the wall edges and key area masks remained clear and unblurred.
[0046] earthquake acceleration value C 2. The basic seismic acceleration value is designed as a scalar. To effectively integrate it into the neural network, we employ a sinusoidal position encoding method, mapping it to a high-dimensional vector. This encoding method helps the model understand the continuous relationship between different acceleration values.
[0047] Step 2: Constructing the flow matching model. The core of this invention is a parameter that is Deep neural networks Its structural design is as follows Figure 3 As shown, the details of each module are as follows: Figure 4 As shown. This network uses U-Net as its backbone and has undergone targeted improvements, specifically including the following: Dual-stream U-Net backbone architecture: The main body of the model adopts a dual-stream architecture in parallel with the main generator network and the conditional encoder.
[0048] The encoder: The encoding path of the main generator network consists of a series of stacked improved residual blocks (ResBlocks) and downsampling modules. Each residual block contains a normalization layer, a SiLU activation function, and a convolutional layer, responsible for processing the input noise or streaming state. Features are extracted; the downsampling module gradually reduces the resolution and increases the number of channels through convolution with a stride of 2 in order to obtain high-level semantic information.
[0049] Decoder: Its structure is symmetrical to the encoder, consisting of a series of upsampling modules and residual blocks. It gradually restores the resolution of the feature map through interpolation upsampling and convolution operations, reducing abstract semantic features to a concrete shear wall pixel layout.
[0050] Skip Connections: Direct connections are established between encoder and decoder layers of the main generator network at the same resolution. These connections directly pass shallow features that retain high-frequency details (such as edges and corners) in the encoding path to the decoding path, preventing information loss in deep networks and ensuring clear shear wall boundaries in the generated network.
[0051] Fusion of attention mechanisms: Coordinate Attention: Unlike methods used only at skip connections, this invention deeply integrates the coordinate attention mechanism into each residual block. In each step of feature extraction, the coordinate attention module aggregates and encodes the feature map in both the horizontal and vertical directions. This mechanism allows the convolutional kernel to perceive global axial position information while processing local pixels.
[0052] Multimodal conditional injection: The model's behavior is influenced by the building base map. C 1. Critical area mask M Time step t and physical parameters C 2. Joint guidance.
[0053] time t and physical parameters C 2: Time variable t and physical parameter vector C 2. (e.g., earthquake intensity) is encoded by a multilayer perceptron (MLP) and mapped to a temporal embedding vector. This vector is then injected into each residual block of the main generator network through addition or adaptive normalization (scale-shift) to dynamically adjust the distribution of the feature maps and control the progress and physical properties of the generation process.
[0054] Architectural map spatial feature injection: This is a parallel conditional encoder branch. It is responsible for injecting features from the original high-resolution architectural base map. C 1 and critical region mask M Multi-scale feature pyramids are extracted. Instead of simple input concatenation, these features are superimposed layer by layer, at multiple scales, onto the corresponding feature maps of the main generator network encoder through a set of zero-initialized convolutions, with pixel-level alignment. This mechanism ensures that the geometric constraints of the building base map are propagated to deeper layers of the generator network, mitigating the spatial information loss problem caused by input concatenation.
[0055] Step 3: Model Training The training goal of the model is to make the neural network The output should be as close as possible to the predefined conditional probability path direction vector. This approximates the true marginal vector field. To achieve a mixed initial distribution from the prior fusion rules. To the real data distribution The mapping specifically includes the following: 1. Training Process: In each training iteration, perform the following operations: Sample acquisition: Randomly select a mini-batch of sample pairs from the dataset. Corresponding conditions and the corresponding key region mask extracted in step 1 .
[0056] Constructing a mixed initial state Unlike traditional flow matching which only samples Gaussian noise, this step constructs an initial state that incorporates geometric constraints.
[0057] First, sample a value from the standard normal distribution (Gaussian distribution) that is similar to... Pure noise tensors of the same size ; Then, using a mask M right Z After correction X 0. Specifically, in the mask M The key areas indicated (i.e.) (location), X The pixel value corresponding to the infill wall position in 0 is forcibly set to the shear wall feature value (+1), and the area outside the mask (i.e. (position), kept as noise sample value The formula is expressed as:
[0058] Time sampling: from uniform distribution Each sample is sampled at one time point. .
[0059] Constructing intermediate states: Based on the linear interpolation formula:
[0060] Calculate the intermediate state image at the current time point. It is worth noting that for pixels within key regions, since... and These are all characteristic values of shear walls. This region will remain constant throughout the entire flow process, thus constituting a strong geometric constraint.
[0061] Forward computation: Architectural design drawings ,condition Critical area mask and Input to neural network The calculations are performed to obtain the vector field predicted by the model. .
[0062] Calculate the target vector: Calculate the predefined conditional probability path direction vector. .
[0063] Loss function calculation: The L2 norm (mean squared error, MSE) is used to measure the difference between the predicted vector and the conditional probability path direction vector.
[0064] 2. Optimization: Calculate the loss function using the backpropagation algorithm. L Regarding network parameters The gradient is calculated, and modern optimizers such as AdamW are used to update the network weights. This process is repeated until the model's loss on the validation set converges or the preset number of training epochs is reached.
[0065] Step 4: Structure Diagram Generation (Reasoning) Once the model is trained, it can be used to generate new shear wall layouts, including the following: 1. Input and Condition Construction: Provide a new, untrained architectural drawing as And specify a basic design seismic acceleration value (coded as...) ).
[0066] First, the rule-based image processing algorithm described in step 1 is invoked to... Automatic extraction of key region mask (Indicates the location of the elevator shaft and core tube); subsequently, the mask... With architectural design drawings By splicing along the channel dimension, an enhanced conditional input tensor with explicit geometric constraints is constructed.
[0067] 2. Initialization (Constructing a mixed initial state): Constructing a hybrid initial state for the fusion rule priors, the operation steps and training process The construction is the same.
[0068] 3. Solving ordinary differential equations: The ordinary differential equations are solved along the vector field predicted by the model using numerical integration. This embodiment preferably uses the Euler method because it can achieve high-precision generation with very few steps within the flow matching framework. The total number of discrete steps is set. (For example More steps result in more accurate results, but also take longer. In practice, due to the flatness of the flow matching trajectory, twenty steps are sufficient to generate high-quality results. Calculate the step size. From the initial mixed state (Right now Begin, proceed The second iteration update. In the [number]th iteration update. Step (corresponding time) The iterative formula is:
[0069] go through After the iteration, the result is (Right now This is the final continuous value result tensor.
[0070] 4. Post-processing: Thresholding: The final tensor X The values in 1 are continuous. A thresholding operation is needed to convert them into a discrete structure graph. This invention sets a threshold, iterates through all pixels in the tensor, and if a pixel's value is greater than the threshold, the location is considered a shear wall, and its value is set to 1.
[0071] Assignment: Based on business needs, other pixel values can be categorized as fill walls or background, thereby generating a clear shear wall structure design drawing that is completely consistent with the training data format.
[0072] Step 5: Results Analysis and Performance Verification 1. Generation speed analysis: like Figure 5As shown in the test, the generation method based on the flow matching framework proposed in this invention requires only 20 steps of ordinary differential equation integration calculations to generate a complete shear wall layout result during the inference phase. Each step corresponds to one forward propagation of the model, and the entire calculation process can be completed in less than 2 seconds. In contrast, traditional diffusion models (such as DDPM), due to their stepwise denoising mechanism, typically require 1000 or more backward inference steps to obtain a clear result, resulting in a significantly longer generation time. Therefore, this invention has an order-of-magnitude advantage in inference efficiency, meeting the application scenarios of real-time feedback and rapid iteration in structural design.
[0073] 2. Generate quality analysis To comprehensively evaluate the effectiveness of this invention, a shear wall intersection ratio was selected. Shear wall ratio ( ) and shear wall quantity correction coefficient (Consistency in the number of shear walls in response to environmental changes) is used as an evaluation index, and quantitative analysis is conducted from three dimensions: geometric accuracy, physical response, and material usage. Some designs generated by this method are shown below. Figure 6 As shown, even with the base model, the intersection-over-union (SIoU) ratio of its generated results generally exceeds the validity threshold of 0.5. The average values are all greater than 0.85, proving that the generated images are similar to the actual design. The joint prediction strategy for shear walls and infill walls has significant advantages. Compared with single prediction, the joint prediction model achieves a significant improvement of 10% to 20% in the SIoU index under complex working conditions, and its overall performance far exceeds the similarity baseline. There has also been some improvement. This indicates that the introduction of non-load-bearing components provides the model with key semantic boundary constraints, enabling it to more accurately define the layout range of shear walls.
[0074] This model successfully established a logically sound mapping relationship between input seismic parameters and output structural density. As the basic design seismic acceleration value increases (e.g., from low-intensity to high-intensity zones), the proportion of shear walls generated by the model exhibits a clear step-like upward trend. This trend is highly consistent with the distribution patterns in real-world engineering cases, indicating that the model does not simply memorize patterns but possesses the ability to intelligently adjust structural stiffness according to seismic design requirements.
[0075] Comparative analysis verified the unique value of rule-based priors in ensuring structural rationality. Although the introduction of rigid rule masks may cause slight fluctuations in pixel-level metrics (SIoU) within 5% due to manual mapping errors in the training data, qualitative analysis showed that the mask-guided model generated walls with higher closure and more complete topological structures in key areas such as elevator shafts and core tubes. Some designs, such as... Figure 7As shown in the figure, this proves that the prior rules effectively correct the local structural discontinuities, ensuring that the core lateral force resisting components comply with engineering safety specifications. A small number of key structural areas still exhibit local discontinuities. Analysis of this phenomenon is mainly attributed to the following two factors: First, due to the limitations of dataset standardization, some architectural drawings in the open-source dataset have non-standard representations, such as missing or offset door and window elements, causing the rule-based preprocessing algorithm to fail on specific samples and fail to generate accurate masks. Second, due to the diversity of real structural design distributions, although a fully enclosed core tube arrangement is the conventional design choice, the dataset still contains some real-world cases with non-fully enclosed or mixed arrangements. This inconsistency within the data distribution generates conflicting supervision signals during training, which to some extent interferes with the model's learning and fitting of strict topological rules for key areas.
[0076] Through the above steps, this invention successfully realizes a rapid and high-quality generation process from architectural design drawings to shear wall structure drawings, providing a powerful and efficient new tool for the field of intelligent structure design.
[0077] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A generative shear wall structure layout method based on a flow matching framework, characterized in that, Includes the following steps: S1. Data Preprocessing and Key Region Extraction: Obtain a dataset containing architectural design drawings, shear wall structure design drawings, and corresponding basic design seismic acceleration values; A rule-based image processing method is used to extract key area masks from architectural design drawings. These key area masks are used to indicate the areas where shear walls must be placed. Data augmentation is performed on the dataset by processing the architectural design drawings, shear wall structure design drawings, and key area masks into tensors of a preset format; The key area mask is stitched together with the architectural design drawings to form an enhanced geometric condition input; S2, Flow Matching Model Construction: A neural network module for fitting a vector field is constructed, and the neural network module is configured to receive multimodal data as conditional inputs, including: an intermediate state image at the current time point, architectural design drawings, and conditional seismic acceleration values; S3, Stream Matching Model Training: Construct an initial blending state. Within the area indicated by the key area mask, initialize the pixel values corresponding to the walls in the architectural drawing to the feature values of the shear walls, and sample Gaussian noise outside the area indicated by the key area mask. Samples are collected from the target structure map data distribution, and intermediate state images are constructed; By minimizing the loss between the vector field predicted by the neural network module and the vector of the set conditional probability path direction, and by optimizing the parameters of the neural network module, the model learns to generate shear walls under conditional guidance. S4. Structure diagram reasoning generation: During the inference phase, the architectural design drawing to be designed, its corresponding key area mask, and the specified seismic acceleration value are input to construct an initial mixed state. The pixel values corresponding to the walls in the architectural drawing within the key area are fixed as shear wall feature values, while the remaining locations are initialized with random Gaussian noise. Starting from the initial mixed state, the ordinary differential equations are solved using the numerical integration method to generate the final shear wall structure design drawing.
2. The method according to claim 1, characterized in that, The key region mask extraction method described in S1 using rule-based image processing specifically includes: In architectural design drawings, traverse the connected background regions in the drawings and calculate the aspect ratio and pixel area of the minimum bounding rectangle of each region. The background connected regions are filtered according to the set aspect ratio range and pixel area range; For each filtered region, the number of door openings on its adjacent walls is further detected; if the number of door openings on the adjacent walls of a region does not exceed two, the region is marked as a critical region and a corresponding critical region mask is generated.
3. The method according to claim 1, characterized in that, The shear wall structure design drawing is represented as a single-channel tensor, with pixel values corresponding to the shear wall, infill wall, and background space, respectively; wherein, the pixel value at the shear wall position is 1, the pixel value at the infill wall position is 0, and the pixel value at the background space position is -1; the shear wall feature value in S3 and S4 is 1.
4. The method according to claim 1, characterized in that, The neural network module adopts a dual-stream U-Net network architecture; the dual-stream U-Net network architecture includes a main generator network and a parallel conditional encoder; the input of the conditional encoder includes a multi-channel fusion module, which is used to concatenate the architectural design drawing and the key area mask in the channel dimension as a conditional input, and then the conditional encoder extracts multi-scale features.
5. The method according to claim 4, characterized in that, The dual-stream U-Net network architecture also includes a spatial feature injection mechanism; the spatial feature injection mechanism uses a set of projection convolutional layers to superimpose and fuse the feature maps of each level extracted by the conditional encoder onto the feature map of the corresponding resolution in the main generator network encoder in a pixel-level aligned manner, so as to achieve strong guidance of the geometric constraints of the building base map.
6. The method according to claim 4, characterized in that, The basic convolutional units in the main generator network adopt a residual block structure. The residual block integrates a coordinate attention mechanism, which is located after the convolutional layer of the residual block and before the residual connections are added. The coordinate attention mechanism aggregates features in the horizontal and vertical directions respectively to capture the long-distance axial dependencies of the shear wall structure and enhance the alignment capability of the axis grid.
7. The method according to claim 4, characterized in that, The conditional encoder and the main generator network use a matching downsampling ratio; the conditional encoder outputs feature maps at each resolution level, and the main generator network performs dimension verification before receiving feature injection, and performs feature fusion only when the spatial resolution and the number of channels are matched, so as to ensure accurate transmission of geometric information at multiple scales.
8. The method according to claim 1, characterized in that, The numerical integration method described in S4 is used to solve ordinary differential equations. The specific calculation formula is as follows: in, t Indicates time; X t Indicates the current time point t The corresponding intermediate state image; Represents a conditional vector field. Represents the conditional vector field used for prediction The neural network module; C 1 indicates architectural design drawings; C 2 represents the earthquake acceleration value; h Indicates the step size; M This represents the mask for the critical region.
9. A computer device, characterized in that, The computer device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the instruction, program, code set, or instruction set is loaded and executed by the processor to implement the generative shear wall structure layout method based on the flow matching framework as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, at least one program, code set, or instruction set, which is loaded and executed by a processor to implement the generative shear wall structure layout method based on the flow matching framework as described in any one of claims 1-8.