Architectural planar graph model training method and device, architectural planar graph model generation method and device and medium

By using training data with a unified visual style and semantic attributes, combined with multimodal neural networks and contrastive learning methods, the architectural floor plan generation model was optimized, solving the problem of generation errors in existing models and achieving higher accuracy and generalization ability.

CN121787467APending Publication Date: 2026-04-03SUZHOU SUSONG EXHIBITION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing diffusion models suffer from poor performance when generating building floor plans due to a lack of domain-specific training, resulting in fundamental errors that defy common sense.

Method used

By employing training images that follow a unified visual style and training cues that accurately represent semantic attributes, the training data is preprocessed, and a multimodal neural network model is used for encoding and contrastive learning to construct a relation matrix and optimize model parameters.

Benefits of technology

It improves the accuracy and generalization ability of the model's generated results, reduces the proportion of erroneous graphs, and enhances the effectiveness of generating planar graphs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121787467A_ABST
    Figure CN121787467A_ABST
Patent Text Reader

Abstract

The invention provides an architectural planar graph model training method and device, an architectural planar graph model generating method and device and a medium. The method comprises the following steps: preprocessing training data to enable a model to better understand element information in the training data, and encoding training batches to obtain encoded sample pair data; wherein each sample pair comprises images of at least two colors and description information corresponding to the images. Therefore, the accuracy of the generation result of the model can be improved, and the generalization ability of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of natural language processing and computer vision, and in particular to a method for generating planar graphs based on artificial intelligence. Background Technology

[0002] Prefabricated buildings are increasingly being used in the construction industry, but past detailed design practices have encountered numerous problems, such as low standardization, incomplete drawing information, and frequent collisions, directly reducing project quality. In engineering practice, leveraging AI technology to intelligently generate architectural floor plans based on client needs can significantly improve design efficiency. Currently, diffusion models are commonly used in the field of AI-generated art. Diffusion models are based on a deep neural network (DNN) architecture and generate images using known labels. Commonly used large diffusion models like Midjourney, DALL-E 2, and Stable Diffusion are trained on a large number of different labels, which is sufficient for general applications. However, because these models are trained on a wide variety of cluttered images containing numerous visual variations, without being trained for specific application domains, the generated results contain some fundamental errors that defy common sense, resulting in poor performance. Summary of the Invention

[0003] To achieve the above objectives, this application uses training images that follow a unified visual style and training cues that accurately represent semantic attributes as the training dataset, and preprocesses the training data to obtain more accurate results. The technical solution provided by its embodiments is as follows:

[0004] In one aspect, embodiments of this application provide a method for training an architectural floor plan model, comprising:

[0005] Remove unnecessary elements from the training batch and retain elements that are relevant to the building itself;

[0006] The training batches are input into the multimodal neural network model and encoded to obtain encoded sample pair data; each sample pair includes an image of at least two colors and the corresponding descriptive information of the image;

[0007] Construct a relation matrix and calculate the similarity between the text features and image features of each element;

[0008] The parameters of the model are updated using a contrastive learning method to obtain a trained model.

[0009] In one aspect, embodiments of this application provide a method for generating an architectural floor plan model, comprising: inputting a prompt statement including a description of floor plan elements into a trained model; the prompt statement describing the floor plan elements includes one or a combination of element type, quantity, and shape features.

[0010] In one aspect, embodiments of this application provide a training apparatus for architectural floor plan models, comprising:

[0011] The preprocessing module is used to remove unnecessary elements from the training batch and retain elements that are relevant to the building itself.

[0012] The encoding module is used to input the training batch into the multimodal neural network model, encode the training batch, and obtain the encoded sample pair data; wherein, each sample pair includes an image of at least two colors and the corresponding descriptive information of the image;

[0013] The similarity acquisition module is used to construct a relationship matrix and calculate the similarity between the text features and image features of each element.

[0014] The update module uses a contrastive learning method to update the parameters of the model, resulting in a trained model.

[0015] In one aspect, embodiments of this application provide a computer-readable storage medium, characterized in that,

[0016] Used to store computer programs that cause a computer to perform the above-described training method or the above-described generation method.

[0017] Compared with existing technologies, this invention has the following advantages: This application preprocesses the training data, enabling the model to better understand the element information in the training data, and encodes the training batches to obtain encoded sample pairs; wherein each sample pair includes an image of at least two colors and corresponding descriptive information. This improves the accuracy of the model's generated results and enhances the model's generalization ability. Attached Figure Description

[0018] Figure 1 This is a diagram of the training model architecture of the present invention;

[0019] Figure 2 This is a flowchart of the training process of the present invention;

[0020] Figure 3 This is a schematic diagram illustrating the process of encoding elements in drawings using black and white colors according to the present invention.

[0021] Figure 4a This is a schematic diagram illustrating a process for encoding elements in a drawing using color according to the present invention;

[0022] Figure 4b This is a schematic diagram illustrating another process of encoding elements in a drawing using color according to the present invention;

[0023] Figure 5 This is a schematic diagram illustrating the application results of the model of the present invention;

[0024] Figure 6 A schematic diagram of the principle of a smart terminal for applying the present invention. Detailed Implementation

[0025] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. Those skilled in the art should understand that although the present invention has been described above with reference to specific embodiments and examples, the references to specific materials are for illustrative purposes only and are not intended to limit the invention. Those skilled in the art can develop equivalent devices or components without inventive effort and without departing from the scope of the present invention.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0027] like Figure 1 The diagram shows the training model architecture of the present invention, which includes a text encoder, an image encoder, and an image preprocessing module.

[0028] The training model used in this application is preferably a multimodal pre-trained model. In some embodiments, this application selects the CLIP model, which is capable of comparing text and images. The CLIP model achieves cross-modal understanding by learning how to compare text and images. The CLIP model is a multimodal model (including both text and image modalities) capable of learning the semantic relationships between text and images through comparative learning, making related text and images closer to each other in the semantic space, while unrelated text and images are farther apart in the semantic space. It is understood that this application may also select other multimodal models, such as ViLBERT, LXMERT, ImageBERT, and Pixel-BERT, and perform cross-modal image generation. The CLIP model can generate visual descriptive information of objects through a generative language model. Generative language models, by learning the statistical regularities of large-scale text data, can understand the inherent structure and regularity of language, and generate new, coherent, and reasonable text content based on this knowledge and given context or prompts. Its core idea is to use machine learning methods to establish a statistical model for text generation in order to achieve the generation and understanding of natural language.

[0029] like Figure 1 As shown, the CLIP model includes a text encoder, an image encoder, and an image preprocessing module. The text encoder encodes or extracts features from the image description information (i.e., the text description of the image), obtaining the text features corresponding to the image description information. The image encoder encodes or extracts features from the image, obtaining the corresponding image features. Both the text features and image features are fixed-dimensional vector representations. The image preprocessing module preprocesses the training data.

[0030] The model is trained using batch processing. The entire dataset is divided into multiple small batches. An image-text pair of a batch size is selected. An image-text pair consists of an image and its image description information. Assuming the batch size is N, that is, the batch contains N image-text pairs.

[0031] Input N image-text pairs into the CLIP model. The image description information of the N image-text pairs is processed by the text encoder to obtain N text features T1……TN. The images of the N image-text pairs are processed by the image encoder to obtain N image features I1……IN.

[0032] Construct a relationship matrix (or similarity matrix) as shown in the figure. This relationship matrix is ​​an N*N matrix, and each element in the matrix represents the similarity between text features and image features. For example, this similarity can be the cosine similarity between two vectors. (Refer to...) Figure 1 As shown, the samples corresponding to the elements on the main diagonal of the relation matrix (i.e., the straight line from the top left element to the bottom right element) are positive samples, and the samples corresponding to the other off-diagonal elements are negative samples.

[0033] The CLIP model's parameters are updated using contrastive learning, which trains the model to distinguish between positive and negative sample pairs, enabling it to learn robust feature representations. During training, the model attempts to minimize the distance between positive sample pairs and maximize the distance between negative sample pairs, thereby maximizing diagonal similarity and minimizing off-diagonal similarity.

[0034] During CLIP model training, the image description information in the image-text pair can be the category of the object in the image (i.e., the entity in the image), such as a cat or a dog, or it can be a sentence or a paragraph of explanatory or descriptive text, such as an image of a sleeping puppy. Optionally, the text encoder can be a Transformer, and the image encoder can be a ResNet or a VisionTransformer.

[0035] Figure 2 This is a flowchart illustrating a training method for an architectural floor plan model according to Embodiment 1 of this application. The method in this embodiment is executed by a training device, which can be a terminal device or a server. Terminal devices include, but are not limited to, mobile phones, personal computers, and dedicated computers. Figure 2 As shown, the training method provided in this embodiment includes the following steps:

[0036] S101. Remove unnecessary elements from the training batch and retain elements that are related to the building itself.

[0037] The more semantics contained in the training batch of floor plans, the harder it is for the model to distinguish them. Therefore, in the domain of architectural floor plans, elements unrelated to the building itself, such as furniture, appliances, and decorations, are unnecessary and are removed. Only elements related to the building itself in the floor plan are retained, such as walls, doors, and windows. This makes it easier for the model to identify key elements in the training batch. Furniture here includes sofas, beds, cabinets, etc. Appliances include televisions, refrigerators, washing machines, etc. Decorations include soft furnishings understood in daily life, such as flower pots. These elements can be one of these or a combination thereof.

[0038] During the training phase, this application uses a small number of training batches to tune an existing diffusion model (such as CLIP). Then, during the generation phase, the tuned diffusion model is used to generate a design that more closely approximates the training data.

[0039] Specifically, removing these elements further includes the following steps:

[0040] Annotation and recognition steps: First, the image needs to be annotated to identify the elements that need to be removed. This can be done manually or using a pre-trained object detection model.

[0041] Mask generation steps: Once the elements that need to be removed are identified, masks can be generated for these elements. The mask is a binary image of the same size as the original image, where the regions of elements to be removed are marked as 1 (or True), and other regions are marked as 0 (or False).

[0042] Image editing steps: Images can be edited using the generated mask. Common methods include image inpainting and blurring. Image inpainting: Image inpainting techniques fill in the blank areas left by removed elements. Image inpainting algorithms infer and fill these areas based on surrounding pixel information. Blurring: Simply blur the masked areas to reduce their impact on model training.

[0043] These steps can be accomplished using Python and related image processing libraries (such as OpenCV and PIL) and deep learning frameworks (such as PyTorch and TensorFlow). Removing unnecessary elements from training batches helps the model better focus on important features and improves its generalization ability.

[0044] S102. Input the training batch into the multimodal neural network model, encode the training batch, and obtain the encoded sample pair data; wherein, each sample pair includes an image of at least two colors and the corresponding descriptive information of the image.

[0045] To further improve upon the shortcomings of existing models, this application proposes a novel visual encoding method for the semantic information of floor plans. One of the main reasons why existing models encounter difficulties when processing floor plans is their lack of semantic understanding of elements in the image. While existing models may learn that the term "floor plan" is associated with rectangular lines, they do not truly understand that these lines are the walls surrounding a room. When more elements, such as doors, windows, furniture, or decorations, are added to the image based on image description information, the model struggles to understand the meaning of these elements and confuses them. Therefore, this application proposes a novel method to encode these semantics in training batches. When faced with a floor plan, the industry standard is that thick lines represent walls, enclosed white spaces represent rooms, and the semantic functions (kitchen, bedroom, living room) can be understood from the elements contained within (television, refrigerator, bed, sofa). When this application removes these elements to simplify the model, the model can no longer gain a semantic understanding of these elements from the image. Therefore, this application re-encodes this information using color, i.e., filling the room with different colors. For example, using grayscale images to fill in information for different rooms increases the contrast between the interior and exterior because the colors of the walls and rooms are very uniform, thus achieving a significant performance improvement. Another example is using cyan to represent the bathroom, yellow to represent the bedroom / living room, and red to represent the kitchen.

[0046] In one implementation, the image is encoded using two colors, namely black and white. In another implementation, regions within the image are encoded using color. In yet another implementation, elements within the image are encoded using color. Those skilled in the art should understand that "color" here refers to a situation with more than two colors, where gray is considered a lighter form of black.

[0047] like Figure 3 The diagram illustrates the process of removing unnecessary elements from a drawing and encoding those elements in black and white. Walls, windows, and doors are encoded using different shades of black, while room areas are encoded in white.

[0048] like Figure 4a , 4b The diagram illustrates the process of removing unnecessary elements from a drawing and color-coding those elements. The elements in the drawing include walls, windows on the walls, doors, and room areas, all coded with different colors. The order in which the elements are coded is not strictly defined. Figure 4a The order shown in the image indicates that after removing unnecessary elements, the room area is coded first, followed by the doors and windows. Figure 4bThe order shown in the diagram indicates that after removing unnecessary elements, doors and windows are encoded first, followed by room areas. To standardize the drawings and in accordance with engineering practice, it is preferable to limit walls and room areas to black and white, respectively. This makes it easier for the model to understand the elements and improves training efficiency.

[0049] S103. Construct a relation matrix and calculate the similarity between the text features and image features of each element.

[0050] Construct a relation matrix (or similarity matrix), which is an N*N matrix where each element represents the similarity between text features and image features. For example, this similarity could be the cosine similarity between two vectors. (See reference...) Figure 1 As shown, the samples corresponding to the elements on the main diagonal of the relation matrix (i.e., the straight line from the top left element to the bottom right element) are positive samples, and the samples corresponding to the other off-diagonal elements are negative samples.

[0051] First, text and image features are extracted from the data. Text features are generated using CLIP's text encoder (typically a Transformer model) to convert the input text description into a text feature vector. The input text is usually a pre-processed natural language description. Image features are generated using CLIP's image encoder (typically a convolutional neural network such as ResNet or Vision Transformer) to convert the input image into an image feature vector.

[0052] Next, the text and image features are standardized. L2 regularization is typically used to normalize the feature vectors to unit vectors. This step ensures numerical stability during similarity calculation. Then, cosine similarity is used to calculate the similarity between the text and image features.

[0053] The similarity calculation results of all text features and all image features are organized into a matrix. During training, the CLIP model optimizes its parameters by maximizing the similarity of correctly paired text-image pairs while minimizing the similarity of incorrectly paired pairs.

[0054] S104. Update the parameters of the model using a contrastive learning method to obtain a trained model.

[0055] Contrastive learning calculates the feature similarity between any two sample pairs based on the image features, original text features, visual features, and test cue features of the given N sample pairs. Contrastive learning trains the model to distinguish between positive and negative sample pairs, enabling the model to learn robust feature representations. During training, the model attempts to minimize the distance between positive sample pairs and maximize the distance between negative sample pairs, thereby maximizing the similarity along the diagonal and minimizing the similarity along the off-diagonal.

[0056] In the embodiments of this application, contrastive loss is used to optimize the model. Contrastive loss is, for example, the InfoNCE loss. For each correctly paired text-image pair, the objective is to maximize its similarity while minimizing the similarity of incorrect pairs.

[0057] The gradient of the loss with respect to the model parameters is calculated through backpropagation. The model parameters are then updated using an optimization algorithm (such as Adam or SGD) to minimize the contrastive loss.

[0058] Repeat the above steps iteratively using multiple batches of data until the model converges or reaches the predetermined number of training epochs. Through this contrastive learning method, the CLIP model can effectively learn the semantic relationships between text and images, thus maintaining excellent performance in multimodal tasks.

[0059] This contrastive loss can be understood as the loss of the original CLIP model. Finally, the parameters of the text encoder and image encoder in CLIP are updated based on the final loss calculated from the CLIP model.

[0060] Experimental results show that encoding the images significantly improves the effectiveness of generating floor plans. It reduces the proportion of erroneous drawings, characterized by rooms missing walls, partially unrecognizable elements, or unclear room types. Compared to directly using existing general-purpose models, the proportion of usable drawings increases by approximately 50%.

[0061] The training dataset is created to cover a wide range of possible floor plan designs, from buildings of different shapes to those with unique layouts. Examples include designs without windows or with a specific number of doors. Personalized elements such as doors or living rooms are also trained in multiple orientations using manually created images containing only these elements. Embodiments of this application require configuring training images that adhere to a unified visual style and training cues that accurately represent semantic attributes as the training dataset. After processing, the final training dataset consists of the following training images:

[0062] Two separate images of doors and windows, and three images of the living room, bathroom, and kitchen.

[0063] Ten floor plans, one of which has its color and size changed.

[0064] Ten floor plans of different building shapes: L-shaped, circular, C-shaped, square, rectangular, and multi-building.

[0065] Ten negative planar graphs, i.e., graphs with zero elements and a quantity descriptor of "none".

[0066] Ten floor plans, for both small and large quantities of each element.

[0067] Ten floor plans, with one element having a quantity of 2, 4, or 6.

[0068] For each batch of generated training data, this application uses text inversion to adjust the Stab1e Diffusion model.

[0069] There are several possible approaches to tuning. One is to retrain the entire diffusion model on a new dataset, thereby optimizing the weights in the DNN. This creates a variant of the initial model with the same size as the original network. However, optimizing all the weights of such a DNN is computationally expensive. To avoid this, some methods introduce new layers into the model and only modify their weights. This results in a smaller model and faster training because the original model remains unchanged and fewer weights need tuning. The approach proposed in this application modifies the input token vector P in the prompt instead of the DNN. The text prompt sent to the diffusion model needs to be encoded as a numeric vector to be used as the input layer of the DNN. This tuning method only changes the weights of the word embedding vector; this process is called text inversion.

[0070] The advantage of this approach is that it can be trained very quickly and produces a very small, tuned model that contains only the modified word embedding vectors.

[0071] Formally, this can be represented using a T-step Markov chain, meaning that each step depends only on the previous step. Given an original image pixel x0 with a distribution q(x0), this application calculates the pixel value of the image by feeding it into the matrix x0. t-1 Add variance β t A forward diffusion process is defined using Gaussian noise with a mean μ. t From q(x) t-1 This produces a new latent variable x. t Its distribution is as follows:

[0072]

[0073] The key is that if the steps (i.e., variance β) t If the variance is small enough, then the backdiffusion B can be considered a Gaussian process with a variance of 0. It depends only on βt and a mean function As shown below:

[0074]

[0075] This mean function Now learned by a DNN, this application inputs the label vector P from the cues describing the image. Since the training model of this application uses CLIP, it not only incorporates the mean function... Conditioning is applied to the label vector P describing the image, and the model learns how the labels relate to image parts in the diffusion model. This additional layer of abstraction allows CLIP to learn object types and image composition at a higher level, and details such as surface materials and colors at deeper diffusion layers. This application improves accuracy in the generation stage by color-coding elements in the image, thereby enabling the model to more accurately understand elements in architectural floor plans.

[0076] This application offers the fastest training time while achieving the same performance results. The application uses recommended training parameters to tune the model for 100 training epochs and uses a labeled instance as a cue. In some embodiments, a style description for the planar view can also be created in the textual description information of the image, and this adjustment is then specifically invoked during image generation. Examples include spacious, compact, and high space utilization.

[0077] The room generation algorithm for the floor plan is based on random room locations, which expand into rectangular areas until their edges collide with the edges and corners of other areas. First, image boundaries and initial room coordinates are set. The initial room coordinates can be randomly chosen. The room expansion process involves expanding in four directions (up, down, left, and right) based on the initial coordinates until they intersect with another room or the image boundary. The model can add walls, doors, and windows to the rooms. The placement of doors and windows follows a simple rule: exterior walls typically have one door and windows on both sides, while interior walls have only one door. However, random changes are possible for each step and each element, such as deleting rooms or walls to create non-rectangular building layouts. During this process, the model can also render a variation of the floor plan for each style. Once the final floor plan is created, the model automatically checks for obvious errors and corrects or discards them as necessary. A manual judgment process can also be set up to discard any erroneous floor plans not caught by the automatic verification steps and to mark additional information that is difficult to automatically identify, such as the general shape of the building.

[0078] The generated cues describe the characteristics of the generated planar graph and follow common guidelines for Stable Diffusion cues. Concepts are separated by commas and parentheses. The commas serve as concept separators, and the parentheses assign a cue weight to each concept (always kept at 1). There is also a style descriptor, exactly one token long, which needs to be included at the beginning of the cues to invoke the trained style from the text inversion. Each concept descriptor contains a number, a quantity descriptor (less or more), a word related to the element itself, and a color.

[0079] After training the model, we validated it by inputting the following prompt: Generate a floor plan of a circular building with black walls, a magenta kitchen, a cyan bathroom, seven yellow rooms, twelve blue windows, and five red doors. The result is as follows. Figure 5 As shown.

[0080] Based on the above embodiments, the present invention also provides a smart terminal, the principle block diagram of which can be as follows: Figure 6 As shown, the smart terminal includes a processor, memory, network interface, display screen, and temperature sensor connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an image classification method based on cross-modal concept discovery and reasoning. The display screen can be an LCD screen or an e-ink screen. The temperature sensor is pre-installed inside the smart terminal to detect the operating temperature of internal devices.

[0081] Those skilled in the art will understand that Figure 6 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the smart terminal to which the present invention is applied. A specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0082] This application provides a method for generating an architectural floor plan model, comprising: inputting a prompt statement including a description of floor plan elements into a trained model; the prompt statement describing the floor plan elements includes one or a combination of element type, quantity, and shape features.

[0083] This application embodiment also provides a training device for architectural floor plan models, including:

[0084] The preprocessing module is used to remove unnecessary elements from the training batch and retain elements that are relevant to the building itself.

[0085] The encoding module is used to input the training batches into the multimodal neural network model, encode the training batches, and obtain encoded sample pair data; wherein each sample pair includes an image of at least two colors and the corresponding descriptive information of the image:

[0086] The similarity acquisition module is used to construct a relationship matrix and calculate the similarity between the text features and image features of each element.

[0087] The update module uses a contrastive learning method to update the parameters of the model, resulting in a trained model.

[0088] This application embodiment also provides a computer-readable storage medium, characterized in that,

[0089] Used to store computer programs that cause a computer to perform the above-described training method or the above-described generation method.

[0090] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here.

[0091] This application also provides an electronic device that may include a memory and a processor. The memory stores a computer program and transfers the program code to the processor. In other words, the processor can retrieve and run the computer program from the memory.

[0092] In some embodiments of this application, the processor may include, but is not limited to: a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0093] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, operational databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual operating data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0094] The above description is merely a specific implementation of the embodiments of this application, but the protection scope of the embodiments of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of this application should be included within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of this application should be determined by the protection scope of the claims.

Claims

1. A method for training architectural floor plan models, characterized in that, include: Remove unnecessary elements from the training batch and retain elements that are relevant to the building itself; The training batches are input into the multimodal neural network model and encoded to obtain encoded sample pair data; each sample pair includes an image of at least two colors and the corresponding descriptive information of the image; Construct a relation matrix and calculate the similarity between the text features and image features of each element; The parameters of the model are updated using a contrastive learning method to obtain a trained model.

2. The method according to claim 1, characterized in that: The elements associated with the building itself include one or a combination of walls, doors, and windows.

3. The method according to claim 1, characterized in that: The multimodal neural network model is a diffusion model.

4. The method according to claim 1, characterized in that, The step of removing unnecessary elements from the training batch and retaining elements associated with the building itself further includes: annotation and recognition steps, mask generation steps, and image editing steps.

5. The method according to claim 1, characterized in that, The image editing steps include image restoration or blurring.

6. The method according to claim 1, characterized in that, The image is encoded in two colors.

7. The method according to claim 1, characterized in that, Color-encode the elements in the image.

8. A method for generating an architectural floor plan model, characterized in that, include: The prompt statement including the description of the planar graph elements is input into the model trained by the method of any one of claims 1-7; the prompt statement describing the planar graph elements includes one or a combination of element type, quantity, and shape features.

9. A training device for architectural floor plan models, characterized in that, include: The preprocessing module is used to remove unnecessary elements from the training batch and retain elements that are relevant to the building itself. The encoding module is used to input the training batch into the multimodal neural network model, encode the training batch, and obtain the encoded sample pair data; wherein, each sample pair includes an image of at least two colors and the corresponding descriptive information of the image; The similarity acquisition module is used to construct a relationship matrix and calculate the similarity between the text features and image features of each element. The update module uses a contrastive learning method to update the parameters of the model, resulting in a trained model.

10. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method of any one of claims 1-7, or to perform the method of claim 8.